Realm count updated properly.
This commit is contained in:
@@ -314,7 +314,7 @@ public class InfoCmd extends AbstractDevCmd {
|
|||||||
output += newline;
|
output += newline;
|
||||||
output += "State: " + targetPC.getGuild().guildState;
|
output += "State: " + targetPC.getGuild().guildState;
|
||||||
output += newline;
|
output += newline;
|
||||||
output += "Realms Owned:" + targetPC.getGuild().getRealmsOwned();
|
output += "Realms Owned:" + targetPC.getGuild().realmsOwned;
|
||||||
output += newline;
|
output += newline;
|
||||||
output += "====Nation====";
|
output += "====Nation====";
|
||||||
output += newline;
|
output += newline;
|
||||||
@@ -322,7 +322,7 @@ public class InfoCmd extends AbstractDevCmd {
|
|||||||
output += newline;
|
output += newline;
|
||||||
output += "Nation State: " + targetPC.getGuild().getNation().guildState;
|
output += "Nation State: " + targetPC.getGuild().getNation().guildState;
|
||||||
output += newline;
|
output += newline;
|
||||||
output += "Realms Owned:" + targetPC.getGuild().getNation().getRealmsOwned();
|
output += "Realms Owned:" + targetPC.getGuild().getNation().realmsOwned;
|
||||||
output += newline;
|
output += newline;
|
||||||
output += "Guild Rank:" + (GuildStatusController.getRank(targetPC.getGuildStatus()) + targetPC.getGuild().getRealmsOwnedFlag());
|
output += "Guild Rank:" + (GuildStatusController.getRank(targetPC.getGuildStatus()) + targetPC.getGuild().getRealmsOwnedFlag());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,6 +106,9 @@ public class DismissGuildHandler extends AbstractClientMsgHandler {
|
|||||||
ErrorPopupMsg.sendErrorMsg(player, "A Serious error has occured. Please post details for to ensure transaction integrity");
|
ErrorPopupMsg.sendErrorMsg(player, "A Serious error has occured. Please post details for to ensure transaction integrity");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (toDismiss.guildState.equals(mbEnums.GuildState.Province))
|
||||||
|
nation.realmsOwned = nation.realmsOwned - 1;
|
||||||
|
|
||||||
nation.getSubGuildList().remove(toDismiss);
|
nation.getSubGuildList().remove(toDismiss);
|
||||||
toDismiss.guildState = mbEnums.GuildState.Sovereign;
|
toDismiss.guildState = mbEnums.GuildState.Sovereign;
|
||||||
toDismiss.setNation(toDismiss);
|
toDismiss.setNation(toDismiss);
|
||||||
@@ -131,7 +134,6 @@ public class DismissGuildHandler extends AbstractClientMsgHandler {
|
|||||||
|
|
||||||
City.lastCityUpdate = System.currentTimeMillis();
|
City.lastCityUpdate = System.currentTimeMillis();
|
||||||
|
|
||||||
|
|
||||||
ArrayList<PlayerCharacter> guildMembers = SessionManager.getActivePCsInGuildID(nation.getObjectUUID());
|
ArrayList<PlayerCharacter> guildMembers = SessionManager.getActivePCsInGuildID(nation.getObjectUUID());
|
||||||
|
|
||||||
for (PlayerCharacter member : guildMembers) {
|
for (PlayerCharacter member : guildMembers) {
|
||||||
|
|||||||
@@ -107,6 +107,11 @@ public class SwearInGuildHandler extends AbstractClientMsgHandler {
|
|||||||
protectorate.guildState.equals(GuildState.Province))
|
protectorate.guildState.equals(GuildState.Province))
|
||||||
nation.guildState = GuildState.Nation;
|
nation.guildState = GuildState.Nation;
|
||||||
|
|
||||||
|
// Nation realm count update
|
||||||
|
|
||||||
|
if (protectorate.guildState.equals(GuildState.Province))
|
||||||
|
nation.realmsOwned = nation.realmsOwned + 1;
|
||||||
|
|
||||||
SendGuildEntryMsg msg = new SendGuildEntryMsg(player);
|
SendGuildEntryMsg msg = new SendGuildEntryMsg(player);
|
||||||
dispatch = Dispatch.borrow(player, msg);
|
dispatch = Dispatch.borrow(player, msg);
|
||||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class Guild extends AbstractWorldObject {
|
|||||||
private String icmotd = "";
|
private String icmotd = "";
|
||||||
private String nmotd = "";
|
private String nmotd = "";
|
||||||
private int guildLeaderUUID;
|
private int guildLeaderUUID;
|
||||||
private int realmsOwned;
|
public int realmsOwned;
|
||||||
private int cityUUID = 0;
|
private int cityUUID = 0;
|
||||||
private int mineTime;
|
private int mineTime;
|
||||||
private ArrayList<PlayerCharacter> banishList;
|
private ArrayList<PlayerCharacter> banishList;
|
||||||
@@ -797,20 +797,6 @@ public class Guild extends AbstractWorldObject {
|
|||||||
return motto;
|
return motto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the realmsOwned
|
|
||||||
*/
|
|
||||||
public int getRealmsOwned() {
|
|
||||||
return realmsOwned;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param realmsOwned the realmsOwned to set
|
|
||||||
*/
|
|
||||||
public void setRealmsOwned(int realmsOwned) {
|
|
||||||
this.realmsOwned = realmsOwned;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void removeSubGuild(Guild subGuild) {
|
public void removeSubGuild(Guild subGuild) {
|
||||||
|
|
||||||
// Update database
|
// Update database
|
||||||
|
|||||||
@@ -333,11 +333,12 @@ public class Realm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!guild.getNation().equals(guild)) {
|
if (!guild.getNation().equals(guild)) {
|
||||||
guild.getNation().setRealmsOwned(guild.getNation().getRealmsOwned() + 1);
|
Guild guild1 = guild.getNation();
|
||||||
|
guild1.realmsOwned = guild.getNation().realmsOwned + 1;
|
||||||
GuildManager.updateAllGuildTags(guild.getNation());
|
GuildManager.updateAllGuildTags(guild.getNation());
|
||||||
}
|
}
|
||||||
|
|
||||||
guild.setRealmsOwned(guild.getRealmsOwned() + 1);
|
guild.realmsOwned = guild.realmsOwned + 1;
|
||||||
GuildManager.updateAllGuildTags(guild);
|
GuildManager.updateAllGuildTags(guild);
|
||||||
|
|
||||||
AbstractCharacter.removeAllBlessings(player);
|
AbstractCharacter.removeAllBlessings(player);
|
||||||
@@ -509,9 +510,11 @@ public class Realm {
|
|||||||
DataWarehouse.pushToWarehouse(realmRecord);
|
DataWarehouse.pushToWarehouse(realmRecord);
|
||||||
|
|
||||||
// No longer own a realm
|
// No longer own a realm
|
||||||
this.getRulingCity().getGuild().setRealmsOwned(this.getRulingCity().getGuild().getRealmsOwned() - 1);
|
Guild guild1 = this.getRulingCity().getGuild();
|
||||||
if (!this.getRulingCity().getGuild().getNation().equals(this.getRulingCity().getGuild()))
|
guild1.realmsOwned = this.getRulingCity().getGuild().realmsOwned - 1;
|
||||||
this.getRulingCity().getGuild().getNation().setRealmsOwned(this.getRulingCity().getGuild().getNation().getRealmsOwned() - 1);
|
|
||||||
|
if (!guild1.getNation().equals(guild1))
|
||||||
|
guild1.getNation().realmsOwned -= 1;
|
||||||
|
|
||||||
// Configure realm
|
// Configure realm
|
||||||
this.charterType = 0;
|
this.charterType = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user