forked from MagicBane/Server
New atomic boolean to lock down destruction
This commit is contained in:
@@ -505,6 +505,11 @@ public class Building extends AbstractWorldObject {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.isDeranking.compareAndSet(false, true) == false) {
|
||||
Logger.error("Attempt to derank tol twice");
|
||||
return;
|
||||
}
|
||||
|
||||
bane = city.getBane();
|
||||
|
||||
// We need to collect the spires and shrines on the citygrid in case
|
||||
@@ -600,8 +605,6 @@ public class Building extends AbstractWorldObject {
|
||||
|
||||
newOwner = Guild.GetGL(bane.getOwner().getGuild());
|
||||
|
||||
this.isDeranking.compareAndSet(false, true);
|
||||
|
||||
if ((bane.getOwner().getGuild().getGuildState() == GuildState.Sovereign) ||
|
||||
(bane.getOwner().getGuild().getGuildState() == GuildState.Protectorate) ||
|
||||
(bane.getOwner().getGuild().getGuildState() == GuildState.Province) ||
|
||||
|
||||
Reference in New Issue
Block a user