|
|
@ -1197,7 +1197,10 @@ public class City extends AbstractWorldObject { |
|
|
|
// these assets are autoprotected.
|
|
|
|
// these assets are autoprotected.
|
|
|
|
|
|
|
|
|
|
|
|
if ((cityBuilding.getBlueprint().getBuildingGroup() == BuildingGroup.TOL) || (cityBuilding.getBlueprint().getBuildingGroup() == BuildingGroup.SPIRE) || (cityBuilding.getBlueprint().getBuildingGroup() == BuildingGroup.BARRACK) || (cityBuilding.getBlueprint().isWallPiece()) || (cityBuilding.getBlueprint().getBuildingGroup() == BuildingGroup.SHRINE)) { |
|
|
|
if ((cityBuilding.getBlueprint().getBuildingGroup() == BuildingGroup.TOL) || (cityBuilding.getBlueprint().getBuildingGroup() == BuildingGroup.SPIRE) || (cityBuilding.getBlueprint().getBuildingGroup() == BuildingGroup.BARRACK) || (cityBuilding.getBlueprint().isWallPiece()) || (cityBuilding.getBlueprint().getBuildingGroup() == BuildingGroup.SHRINE)) { |
|
|
|
|
|
|
|
PlayerCharacter guildLeader = PlayerCharacter.getPlayerCharacter(sourcePlayer.guild.getGuildLeaderUUID()); |
|
|
|
|
|
|
|
if(guildLeader != null) |
|
|
|
|
|
|
|
cityBuilding.claim(guildLeader); |
|
|
|
|
|
|
|
else |
|
|
|
cityBuilding.claim(sourcePlayer); |
|
|
|
cityBuilding.claim(sourcePlayer); |
|
|
|
cityBuilding.setProtectionState(ProtectionState.PROTECTED); |
|
|
|
cityBuilding.setProtectionState(ProtectionState.PROTECTED); |
|
|
|
} |
|
|
|
} |
|
|
@ -1205,6 +1208,7 @@ public class City extends AbstractWorldObject { |
|
|
|
|
|
|
|
|
|
|
|
this.setForceRename(true); |
|
|
|
this.setForceRename(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Reset city timer for map update
|
|
|
|
// Reset city timer for map update
|
|
|
|
|
|
|
|
|
|
|
|
City.lastCityUpdate = System.currentTimeMillis(); |
|
|
|
City.lastCityUpdate = System.currentTimeMillis(); |
|
|
|