Realm count updated properly.

This commit is contained in:
MagicBot committed 2026-07-26 16:38:01 -04:00
1 parent 4a217d1a6b
commit 46045895d7
5 files changed
+19 -23

No files matched your search

+1 -15
View File
@@ -54,7 +54,7 @@ public class Guild extends AbstractWorldObject {
private String icmotd = "";
private String nmotd = "";
private int guildLeaderUUID;
private int realmsOwned;
public int realmsOwned;
private int cityUUID = 0;
private int mineTime;
private ArrayList<PlayerCharacter> banishList;
@@ -797,20 +797,6 @@ public class Guild extends AbstractWorldObject {
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) {
// Update database
+8 -5
View File
@@ -333,11 +333,12 @@ public class Realm {
}
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());
}
guild.setRealmsOwned(guild.getRealmsOwned() + 1);
guild.realmsOwned = guild.realmsOwned + 1;
GuildManager.updateAllGuildTags(guild);
AbstractCharacter.removeAllBlessings(player);
@@ -509,9 +510,11 @@ public class Realm {
DataWarehouse.pushToWarehouse(realmRecord);
// No longer own a realm
this.getRulingCity().getGuild().setRealmsOwned(this.getRulingCity().getGuild().getRealmsOwned() - 1);
if (!this.getRulingCity().getGuild().getNation().equals(this.getRulingCity().getGuild()))
this.getRulingCity().getGuild().getNation().setRealmsOwned(this.getRulingCity().getGuild().getNation().getRealmsOwned() - 1);
Guild guild1 = this.getRulingCity().getGuild();
guild1.realmsOwned = this.getRulingCity().getGuild().realmsOwned - 1;
if (!guild1.getNation().equals(guild1))
guild1.getNation().realmsOwned -= 1;
// Configure realm
this.charterType = 0;