forked from MagicBane/Server
claiming an errant ToL gives ownership to the leader of the guild, not individual player
This commit is contained in:
@@ -1197,14 +1197,18 @@ public class City extends AbstractWorldObject {
|
||||
// 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)) {
|
||||
|
||||
cityBuilding.claim(sourcePlayer);
|
||||
PlayerCharacter guildLeader = PlayerCharacter.getPlayerCharacter(sourcePlayer.guild.getGuildLeaderUUID());
|
||||
if(guildLeader != null)
|
||||
cityBuilding.claim(guildLeader);
|
||||
else
|
||||
cityBuilding.claim(sourcePlayer);
|
||||
cityBuilding.setProtectionState(ProtectionState.PROTECTED);
|
||||
}
|
||||
}
|
||||
|
||||
this.setForceRename(true);
|
||||
|
||||
|
||||
// Reset city timer for map update
|
||||
|
||||
City.lastCityUpdate = System.currentTimeMillis();
|
||||
|
||||
Reference in New Issue
Block a user