Refactor item_type
This commit is contained in:
1 parent
87290baa52
commit
df5c607375
24 files changed
+137
-203
No files matched your search
@@ -28,7 +28,6 @@ import engine.net.client.msg.guild.GuildCreationFinalizeMsg;
|
||||
import engine.net.client.msg.guild.GuildInfoMsg;
|
||||
import engine.objects.Guild;
|
||||
import engine.objects.Item;
|
||||
import engine.objects.ItemBase;
|
||||
import engine.objects.PlayerCharacter;
|
||||
import engine.util.StringUtils;
|
||||
|
||||
@@ -46,7 +45,7 @@ public class GuildCreationFinalizeHandler extends AbstractClientMsgHandler {
|
||||
Enum.GuildCharterType charterType;
|
||||
Guild newGuild;
|
||||
Guild playerGuild;
|
||||
ItemBase itemBase;
|
||||
|
||||
Item charter;
|
||||
Dispatch dispatch;
|
||||
|
||||
@@ -69,16 +68,14 @@ public class GuildCreationFinalizeHandler extends AbstractClientMsgHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
itemBase = charter.getItemBase();
|
||||
|
||||
// Item must be a valid charterType (type 10 in db)
|
||||
|
||||
if (itemBase == null || (itemBase.getType().equals(ItemType.GUILDCHARTER) == false)) {
|
||||
if (charter == null || (charter.template.item_type.equals(ItemType.CHARTER) == false)) {
|
||||
ErrorPopupMsg.sendErrorPopup(player, GuildManager.NO_CHARTER_FOUND);
|
||||
return true;
|
||||
}
|
||||
|
||||
charterType = Enum.GuildCharterType.getGuildTypeFromCharter(itemBase);
|
||||
charterType = Enum.GuildCharterType.getGuildTypeFromCharter(charter);
|
||||
|
||||
if (charterType == null) {
|
||||
ErrorPopupMsg.sendErrorPopup(player, GuildManager.NO_CHARTER_FOUND);
|
||||
|
||||
Reference in new issue
Block a user