forked from MagicBane/Server
New collection created in handled and loaded from db
This commit is contained in:
@@ -42,7 +42,7 @@ public enum BuildingManager {
|
||||
public static HashMap<Integer, ArrayList<BuildingLocation>> _slotLocations = new HashMap<>();
|
||||
|
||||
public static HashMap<Integer, ConcurrentHashMap<Integer, BuildingFriends>> _buildingFriends = new HashMap<>();
|
||||
|
||||
public static HashMap<Integer, ConcurrentHashMap<Integer, Condemned>> _buildingCondemned = new HashMap<>();
|
||||
public static int getAvailableSlot(Building building) {
|
||||
|
||||
ArrayList<BuildingLocation> slotLocations = _slotLocations.get(building.meshUUID);
|
||||
@@ -497,18 +497,18 @@ public enum BuildingManager {
|
||||
|
||||
Condemned condemn = building.getCondemned().get(player.getObjectUUID());
|
||||
|
||||
if (condemn != null && condemn.isActive())
|
||||
if (condemn != null && condemn.active)
|
||||
return true;
|
||||
|
||||
if (player.getGuild() != null) {
|
||||
|
||||
Condemned guildCondemn = building.getCondemned().get(player.getGuild().getObjectUUID());
|
||||
|
||||
if (guildCondemn != null && guildCondemn.isActive())
|
||||
if (guildCondemn != null && guildCondemn.active)
|
||||
return true;
|
||||
|
||||
Condemned nationCondemn = building.getCondemned().get(player.getGuild().getNation().getObjectUUID());
|
||||
return nationCondemn != null && nationCondemn.isActive() && nationCondemn.getFriendType() == Condemned.NATION;
|
||||
return nationCondemn != null && nationCondemn.active && nationCondemn.friendType == Condemned.NATION;
|
||||
} else {
|
||||
//TODO ADD ERRANT KOS CHECK
|
||||
}
|
||||
@@ -516,18 +516,18 @@ public enum BuildingManager {
|
||||
|
||||
Condemned condemn = building.getCondemned().get(player.getObjectUUID());
|
||||
|
||||
if (condemn != null && condemn.isActive())
|
||||
if (condemn != null && condemn.active)
|
||||
return false;
|
||||
|
||||
if (player.getGuild() != null) {
|
||||
|
||||
Condemned guildCondemn = building.getCondemned().get(player.getGuild().getObjectUUID());
|
||||
|
||||
if (guildCondemn != null && guildCondemn.isActive())
|
||||
if (guildCondemn != null && guildCondemn.active)
|
||||
return false;
|
||||
|
||||
Condemned nationCondemn = building.getCondemned().get(player.getGuild().getNation().getObjectUUID());
|
||||
return nationCondemn == null || !nationCondemn.isActive() || nationCondemn.getFriendType() != Condemned.NATION;
|
||||
return nationCondemn == null || !nationCondemn.active || nationCondemn.friendType != Condemned.NATION;
|
||||
} else {
|
||||
//TODO ADD ERRANT KOS CHECK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user