@ -47,10 +47,15 @@ public class MobileFSMManager {
};
alive = true;
//assign the AI varibales base don difficulty scaling from config file:
float difficulty = Float.parseFloat(ConfigManager.MB_MOB_DIFFICULTY.getValue());
AI_BASE_AGGRO_RANGE = (int)(100 * difficulty); // range at which aggressive mobs will attack you
float difficulty = Float.parseFloat(ConfigManager.MB_AI_AGGRO_RANGE.getValue());
AI_POWER_DIVISOR = (int)(20 * (1.5f-difficulty)); //duration between mob casts
AI_BASE_AGGRO_RANGE = (int) (100 * difficulty); // range at which aggressive mobs will attack you
difficulty = Float.parseFloat(ConfigManager.MB_AI_CAST_FREQUENCY.getValue());
AI_POWER_DIVISOR = (int) (20 * (1.5f - difficulty)); //duration between mob casts
Thread t = new Thread(worker, "MobileFSMManager");
t.start();
}
@ -61,6 +61,11 @@ public enum ConfigManager {
MB_WORLD_MAINTENANCE,
MB_WORLD_GREETING,
MB_WORLD_KEYCLONE_MAX,
MB_USE_RUINS,
// Mobile AI modifiers
MB_AI_CAST_FREQUENCY,
MB_AI_AGGRO_RANGE,
//drop rates
MB_NORMAL_EXP_RATE,
@ -86,9 +91,7 @@ public enum ConfigManager {
MB_MAGICBOT_FORTOFIX,
MB_MAGICBOT_RECRUIT,
MB_MAGICBOT_MAGICBOX,
MB_MAGICBOT_ADMINLOG,
MB_MAGICBOT_ADMINLOG;
MB_MOB_DIFFICULTY;//0.1(easy) - 1.0(hard)
// Map to hold our config pulled in from the environment
// We also use the config to point to the current message pump
@ -103,8 +103,7 @@ public enum ZoneManager {
ZoneManager.zonesByID.put(zoneID, zone);
if (zone != null)
ZoneManager.zonesByUUID.put(zone.getObjectUUID(), zone);
ZoneManager.zonesByName.put(zone.getName().toLowerCase(), zone);
@ -144,6 +143,10 @@ public enum ZoneManager {
return ZoneManager.zonesByID.get(zoneID);
public static Zone getZoneByName(final String zoneName) {
return ZoneManager.zonesByName.get(zoneName);
public static final Collection<Zone> getAllZones() {
return ZoneManager.zonesByUUID.values();
@ -879,14 +879,11 @@ public class PlayerCharacter extends AbstractCharacter {
//handle rented room binds.
if (bindBuilding == null){
bindLocation = Enum.Ruins.getRandomRuin().getLocation();
return bindLocation;
bindLocation = BuildingManager.GetBindLocationForBuilding(bindBuilding);
if (bindLocation == null)