Inlines method. upgraded protection

This commit is contained in:
2026-05-10 10:36:27 -04:00
parent d014aafe45
commit 09c9dfbc06
15 changed files with 36 additions and 43 deletions
@@ -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);