Inlines method. upgraded protection
This commit is contained in:
@@ -173,7 +173,7 @@ public class AbandonAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
|
||||
sourceGuild.setCityUUID(0);
|
||||
sourceGuild.setGuildState(GuildState.Errant);
|
||||
sourceGuild.guildState = GuildState.Errant;
|
||||
sourceGuild.setNation(null);
|
||||
|
||||
// Transfer the city assets
|
||||
|
||||
@@ -81,7 +81,7 @@ public class AcceptSubInviteHandler extends AbstractClientMsgHandler {
|
||||
//all tests passed, let's Handle code
|
||||
//Update Target Guild State.
|
||||
|
||||
swornGuild.setGuildState(GuildState.Petitioner);
|
||||
swornGuild.guildState = GuildState.Petitioner;
|
||||
|
||||
//Add sub so GuildMaster can Swear in.
|
||||
|
||||
@@ -91,7 +91,7 @@ public class AcceptSubInviteHandler extends AbstractClientMsgHandler {
|
||||
//Let's send the message back.
|
||||
|
||||
msg.setUnknown02(1);
|
||||
msg.setResponse("Your guild is now a " + swornGuild.getGuildState().name() + '.');
|
||||
msg.setResponse("Your guild is now a " + swornGuild.guildState.name() + '.');
|
||||
dispatch = Dispatch.borrow(sourcePlayer, msg);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
|
||||
@@ -75,12 +75,12 @@ public class BreakFealtyHandler extends AbstractClientMsgHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (guild.getGuildState()) {
|
||||
switch (guild.guildState) {
|
||||
case Sworn:
|
||||
guild.setNation(Guild.getErrantNation());
|
||||
GuildManager.updateAllGuildTags(guild);
|
||||
GuildManager.updateAllGuildBinds(guild, null);
|
||||
guild.setGuildState(mbEnums.GuildState.Errant);
|
||||
guild.guildState = mbEnums.GuildState.Errant;
|
||||
break;
|
||||
case Province:
|
||||
case Protectorate:
|
||||
@@ -95,9 +95,9 @@ public class BreakFealtyHandler extends AbstractClientMsgHandler {
|
||||
isNation = true;
|
||||
|
||||
if (isNation)
|
||||
guild.setGuildState(mbEnums.GuildState.Nation);
|
||||
guild.guildState = mbEnums.GuildState.Nation;
|
||||
else
|
||||
guild.setGuildState(mbEnums.GuildState.Sovereign);
|
||||
guild.guildState = mbEnums.GuildState.Sovereign;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public class BreakFealtyHandler extends AbstractClientMsgHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (guild.getGuildState()) {
|
||||
switch (guild.guildState) {
|
||||
case Sworn:
|
||||
guild.setNation(null);
|
||||
GuildManager.updateAllGuildTags(guild);
|
||||
|
||||
@@ -78,7 +78,7 @@ public class ChannelMuteMsgHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
|
||||
sourceGuild.setCityUUID(0);
|
||||
sourceGuild.setGuildState(GuildState.Errant);
|
||||
sourceGuild.guildState = GuildState.Errant;
|
||||
sourceGuild.setNation(null);
|
||||
|
||||
// Transfer the city assets
|
||||
|
||||
@@ -77,7 +77,7 @@ public class DismissGuildHandler extends AbstractClientMsgHandler {
|
||||
return true;
|
||||
}
|
||||
|
||||
switch (toDismiss.getGuildState()) {
|
||||
switch (toDismiss.guildState) {
|
||||
case Sworn:
|
||||
|
||||
if (!DbManager.GuildQueries.UPDATE_PARENT(toDismiss.getObjectUUID(), WorldServer.worldUUID)) {
|
||||
|
||||
@@ -88,8 +88,8 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
// Validate that the player is the leader of a guild
|
||||
// that is not currently Sovereign *** BUG? Doesn't look right. isGuildLeader()?
|
||||
|
||||
if ((playerCharacter.getGuild().getGuildState() != GuildState.Sworn
|
||||
|| playerCharacter.getGuild().getGuildState() != GuildState.Errant) == false) {
|
||||
if ((playerCharacter.getGuild().guildState != GuildState.Sworn
|
||||
|| playerCharacter.getGuild().guildState != GuildState.Errant) == false) {
|
||||
PlaceAssetMsg.sendPlaceAssetError(origin, 17, ""); // Your is not an errant or soverign guild
|
||||
return false;
|
||||
}
|
||||
@@ -161,7 +161,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
// Errant guilds cannot place assets
|
||||
|
||||
if (player.getGuild().getGuildState() == GuildState.Errant) {
|
||||
if (player.getGuild().guildState == GuildState.Errant) {
|
||||
PlaceAssetMsg.sendPlaceAssetError(origin, 1, "Only sovereign or sworn guilds may place assets.");
|
||||
return false;
|
||||
}
|
||||
@@ -774,7 +774,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
playerCharacter.getGuild().setNation(playerCharacter.getGuild());
|
||||
playerNation = playerCharacter.getGuild();
|
||||
playerNation.setGuildState(GuildState.Sovereign);
|
||||
playerNation.guildState = GuildState.Sovereign;
|
||||
|
||||
// Update guild binds and tags
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -437,7 +437,7 @@ public class ManageCityAssetsMsg extends ClientNetMsg {
|
||||
else
|
||||
writer.putInt((int) timeLeft / 1000); // Time remaing until bane/Seconds
|
||||
|
||||
if (attackerGuild.getGuildState() == GuildState.Sworn)
|
||||
if (attackerGuild.guildState == GuildState.Sworn)
|
||||
writer.putInt(4); //3 capture/errant,4 capture/sworn, 5 destroy/soveirgn.
|
||||
else
|
||||
writer.putInt(5);
|
||||
|
||||
@@ -63,7 +63,7 @@ public class SendGuildEntryMsg extends ClientNetMsg {
|
||||
if (subsAndSovs.size() > 0) {
|
||||
|
||||
for (Guild guild : subsAndSovs) {
|
||||
int state = guild.getGuildState().getStateID();
|
||||
int state = guild.guildState.getStateID();
|
||||
|
||||
writer.putInt(guild.getObjectType().ordinal());
|
||||
writer.putInt(guild.getObjectUUID());
|
||||
|
||||
Reference in New Issue
Block a user