forked from MagicBane/Server
Inlines method. upgraded protection
This commit is contained in:
@@ -72,7 +72,7 @@ public class SwearInGuildHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
|
||||
if (!Guild.canSwearIn(protectorate)) {
|
||||
ErrorPopupMsg.sendErrorMsg(player, protectorate.getGuildState().name() + "cannot be sworn in");
|
||||
ErrorPopupMsg.sendErrorMsg(player, protectorate.guildState.name() + "cannot be sworn in");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -87,22 +87,23 @@ public class SwearInGuildHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
|
||||
//shouldn't get here.
|
||||
if (protectorate.getGuildState().equals(GuildState.Petitioner))
|
||||
if (protectorate.guildState.equals(GuildState.Petitioner))
|
||||
GuildManager.updateAllGuildBinds(protectorate, nation.getOwnedCity());
|
||||
|
||||
//update Guild state.
|
||||
|
||||
if (protectorate.getNation().isEmptyGuild())
|
||||
protectorate.setGuildState(GuildState.Sworn);
|
||||
protectorate.guildState = GuildState.Sworn;
|
||||
else
|
||||
protectorate.setGuildState(GuildState.Protectorate);
|
||||
protectorate.guildState = GuildState.Protectorate;
|
||||
|
||||
protectorate.setNation(nation);
|
||||
GuildManager.updateAllGuildTags(protectorate);
|
||||
|
||||
if (nation.getGuildState() == GuildState.Sovereign &&
|
||||
protectorate.getGuildState().equals(GuildState.Protectorate))
|
||||
nation.setGuildState(GuildState.Nation);
|
||||
if (nation.guildState == GuildState.Sovereign) {
|
||||
if (protectorate.guildState.equals(GuildState.Protectorate))
|
||||
nation.guildState = GuildState.Nation;
|
||||
}
|
||||
|
||||
SendGuildEntryMsg msg = new SendGuildEntryMsg(player);
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
|
||||
Reference in New Issue
Block a user