|
|
@ -72,19 +72,19 @@ public class DestroyCityThread implements Runnable { |
|
|
|
|
|
|
|
|
|
|
|
// By losing the tree, the former owners lose all of their subguilds.
|
|
|
|
// By losing the tree, the former owners lose all of their subguilds.
|
|
|
|
|
|
|
|
|
|
|
|
if (formerGuild.getSubGuildList().isEmpty() == false) { |
|
|
|
if (!formerGuild.getSubGuildList().isEmpty()) { |
|
|
|
|
|
|
|
|
|
|
|
subGuildList = new ArrayList<>(); |
|
|
|
subGuildList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
for (Guild subGuild : formerGuild.getSubGuildList()) { |
|
|
|
subGuildList.addAll(formerGuild.getSubGuildList()); |
|
|
|
subGuildList.add(subGuild); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (Guild subGuild : subGuildList) { |
|
|
|
for (Guild subGuild : subGuildList) { |
|
|
|
formerGuild.removeSubGuild(subGuild); |
|
|
|
formerGuild.removeSubGuild(subGuild); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Building tol = null; |
|
|
|
|
|
|
|
|
|
|
|
// Build list of buildings within this parent zone
|
|
|
|
// Build list of buildings within this parent zone
|
|
|
|
|
|
|
|
|
|
|
|
for (Building cityBuilding : cityZone.zoneBuildingSet) { |
|
|
|
for (Building cityBuilding : cityZone.zoneBuildingSet) { |
|
|
@ -100,6 +100,13 @@ public class DestroyCityThread implements Runnable { |
|
|
|
if (cityBuilding.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.BANESTONE)) |
|
|
|
if (cityBuilding.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.BANESTONE)) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TOL is processed after all other structures in the city zone
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (cityBuilding.getBlueprint().getBuildingGroup().equals(Enum.BuildingGroup.TOL)) { |
|
|
|
|
|
|
|
tol = cityBuilding; |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// All buildings are moved to a location relative
|
|
|
|
// All buildings are moved to a location relative
|
|
|
|
// to their new parent zone
|
|
|
|
// to their new parent zone
|
|
|
|
|
|
|
|
|
|
|
@ -132,6 +139,11 @@ public class DestroyCityThread implements Runnable { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Destroy the tol
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (tol != null) |
|
|
|
|
|
|
|
BuildingManager.setRank(tol, -1); |
|
|
|
|
|
|
|
|
|
|
|
if (city.getRealm() != null) |
|
|
|
if (city.getRealm() != null) |
|
|
|
city.getRealm().removeCity(city.getObjectUUID()); |
|
|
|
city.getRealm().removeCity(city.getObjectUUID()); |
|
|
|
|
|
|
|
|
|
|
|