Better handling of abandoned tols

This commit is contained in:
2026-07-26 17:13:01 -04:00
parent 19e6c182c0
commit 6a946428bf
@@ -171,12 +171,14 @@ public class AbandonAssetMsgHandler extends AbstractClientMsgHandler {
if (sourceGuild.getOwnedCity().realm != null) if (sourceGuild.getOwnedCity().realm != null)
sourceGuild.getOwnedCity().realm.abandonRealm(); sourceGuild.getOwnedCity().realm.abandonRealm();
if (sourceGuild.getNation().equals(sourceGuild)) if (sourceGuild.guildState.equals(GuildState.Sovereign))
sourceGuild.guildState = GuildState.Errant; sourceGuild.guildState = GuildState.Errant;
else else
sourceGuild.guildState = GuildState.Sworn; sourceGuild.guildState = GuildState.Sworn;
sourceGuild.setCityUUID(0); sourceGuild.setCityUUID(0);
GuildManager.updateAllGuildTags(sourceGuild);
GuildManager.updateAllGuildBinds(sourceGuild, null);
// Guild no longer owns his tree. // Guild no longer owns his tree.
if (!DbManager.GuildQueries.SET_GUILD_OWNED_CITY(sourceGuild.getObjectUUID(), 0)) { if (!DbManager.GuildQueries.SET_GUILD_OWNED_CITY(sourceGuild.getObjectUUID(), 0)) {