diff --git a/src/engine/net/client/handlers/SwearInGuildHandler.java b/src/engine/net/client/handlers/SwearInGuildHandler.java index b73957e4..b413430b 100644 --- a/src/engine/net/client/handlers/SwearInGuildHandler.java +++ b/src/engine/net/client/handlers/SwearInGuildHandler.java @@ -68,12 +68,14 @@ public class SwearInGuildHandler extends AbstractClientMsgHandler { } if (!nation.getSubGuildList().contains(protectorate)) { - ErrorPopupMsg.sendErrorMsg(player, "Your do not have such authority!"); + ErrorPopupMsg.sendErrorMsg(player, "Guild is not a petitioner!"); return true; } - if (protectorate.guildState.equals(GuildState.Petitioner) == false) + if (protectorate.guildState.equals(GuildState.Petitioner) == false) { + ErrorPopupMsg.sendErrorMsg(player, "Guild is not a petitioner!"); return true; + } if (GuildStatusController.isGuildLeader(player.getGuildStatus()) == false) { ErrorPopupMsg.sendErrorMsg(player, "Your do not have such authority!"); @@ -85,16 +87,15 @@ public class SwearInGuildHandler extends AbstractClientMsgHandler { return true; } - //shouldn't get here. - if (protectorate.guildState.equals(GuildState.Petitioner)) - GuildManager.updateAllGuildBinds(protectorate, nation.getOwnedCity()); - - //update Guild state. + // update Guild state. + // R8 is a province if (protectorate.getNation().isEmptyGuild()) protectorate.guildState = GuildState.Sworn; else - protectorate.guildState = GuildState.Protectorate; + protectorate.guildState = (protectorate.getOwnedCity().getTOL().getRank() == 8) + ? GuildState.Province + : GuildState.Protectorate; protectorate.setNation(nation); GuildManager.updateAllGuildTags(protectorate);