Building Management compiled to a single method check
This commit is contained in:
@@ -28,30 +28,6 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
super();
|
||||
}
|
||||
|
||||
public static boolean playerCanManageNotFriends(PlayerCharacter player, Building building) {
|
||||
|
||||
//Player Can only Control Building if player is in Same Guild as Building and is higher rank than IC.
|
||||
|
||||
if (player == null)
|
||||
return false;
|
||||
|
||||
if (building.getRank() == -1)
|
||||
return false;
|
||||
|
||||
if (BuildingManager.IsOwner(building, player))
|
||||
return true;
|
||||
|
||||
if (GuildStatusController.isGuildLeader(player.getGuildStatus()) == false && GuildStatusController.isInnerCouncil(player.getGuildStatus()) == false)
|
||||
return false;
|
||||
|
||||
//Somehow guild leader check fails above? lets check if Player is true Guild GL.
|
||||
if (building.getGuild() != null && building.getGuild().isGuildLeader(player.getObjectUUID()))
|
||||
return true;
|
||||
|
||||
return Guild.sameGuild(building.getGuild(), player.getGuild());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean _handleNetMsg(ClientNetMsg baseMsg, ClientConnection origin) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user