hotzone duration config, non repeating hotzones
This commit is contained in:
@@ -84,7 +84,8 @@ public enum ConfigManager {
|
||||
MB_MAGICBOT_GAMEVERSION,
|
||||
//drop rates
|
||||
MB_NORMAL_RATE,
|
||||
MB_HOTZONE_RATE;
|
||||
MB_HOTZONE_RATE,
|
||||
MB_HOTZONE_DURATION;
|
||||
// Map to hold our config pulled in from the environment
|
||||
// We also use the config to point to the current message pump
|
||||
// and determine the server type at runtime.
|
||||
|
||||
@@ -44,7 +44,6 @@ public enum ZoneManager {
|
||||
private static Set<Zone> macroZones = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
private static Set<Zone> npcCityZones = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
private static Set<Zone> playerCityZones = Collections.newSetFromMap(new ConcurrentHashMap<>());
|
||||
|
||||
// Find all zones coordinates fit into, starting with Sea Floor
|
||||
|
||||
public static ArrayList<Zone> getAllZonesIn(final Vector3fImmutable loc) {
|
||||
@@ -127,6 +126,7 @@ public enum ZoneManager {
|
||||
if (!zone.isMacroZone())
|
||||
return;
|
||||
ZoneManager.hotzone = zone;
|
||||
zone.hasBeenHotzone = true;
|
||||
}
|
||||
|
||||
public static boolean inHotZone(final Vector3fImmutable loc) {
|
||||
@@ -224,7 +224,10 @@ public enum ZoneManager {
|
||||
|
||||
if (zone.equals(ZoneManager.seaFloor))
|
||||
return false;
|
||||
|
||||
//no duplicate hotzones
|
||||
if(zone.hasBeenHotzone == true){
|
||||
return false;
|
||||
}
|
||||
// return false; //first time setting, accept it
|
||||
// if (this.hotzone.getUUID() == zone.getUUID())
|
||||
// return true; //no same hotzone
|
||||
|
||||
Reference in New Issue
Block a user