Merge branch 'magicbox1.5' of http://repo.magicbane.com/MagicBane/Server into magicbox1.5
This commit is contained in:
+520
-524
File diff suppressed because it is too large
Load Diff
@@ -47,10 +47,15 @@ public class MobileFSMManager {
|
|||||||
};
|
};
|
||||||
|
|
||||||
alive = true;
|
alive = true;
|
||||||
|
|
||||||
//assign the AI varibales base don difficulty scaling from config file:
|
//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");
|
Thread t = new Thread(worker, "MobileFSMManager");
|
||||||
t.start();
|
t.start();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,11 @@ public enum ConfigManager {
|
|||||||
MB_WORLD_MAINTENANCE,
|
MB_WORLD_MAINTENANCE,
|
||||||
MB_WORLD_GREETING,
|
MB_WORLD_GREETING,
|
||||||
MB_WORLD_KEYCLONE_MAX,
|
MB_WORLD_KEYCLONE_MAX,
|
||||||
|
MB_USE_RUINS,
|
||||||
|
|
||||||
|
// Mobile AI modifiers
|
||||||
|
MB_AI_CAST_FREQUENCY,
|
||||||
|
MB_AI_AGGRO_RANGE,
|
||||||
|
|
||||||
//drop rates
|
//drop rates
|
||||||
MB_NORMAL_EXP_RATE,
|
MB_NORMAL_EXP_RATE,
|
||||||
@@ -86,9 +91,7 @@ public enum ConfigManager {
|
|||||||
MB_MAGICBOT_FORTOFIX,
|
MB_MAGICBOT_FORTOFIX,
|
||||||
MB_MAGICBOT_RECRUIT,
|
MB_MAGICBOT_RECRUIT,
|
||||||
MB_MAGICBOT_MAGICBOX,
|
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
|
// Map to hold our config pulled in from the environment
|
||||||
// We also use the config to point to the current message pump
|
// We also use the config to point to the current message pump
|
||||||
|
|||||||
@@ -103,8 +103,7 @@ public enum ZoneManager {
|
|||||||
|
|
||||||
ZoneManager.zonesByID.put(zoneID, zone);
|
ZoneManager.zonesByID.put(zoneID, zone);
|
||||||
|
|
||||||
if (zone != null)
|
ZoneManager.zonesByUUID.put(zone.getObjectUUID(), zone);
|
||||||
ZoneManager.zonesByUUID.put(zone.getObjectUUID(), zone);
|
|
||||||
|
|
||||||
ZoneManager.zonesByName.put(zone.getName().toLowerCase(), zone);
|
ZoneManager.zonesByName.put(zone.getName().toLowerCase(), zone);
|
||||||
|
|
||||||
@@ -144,6 +143,10 @@ public enum ZoneManager {
|
|||||||
return ZoneManager.zonesByID.get(zoneID);
|
return ZoneManager.zonesByID.get(zoneID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Zone getZoneByName(final String zoneName) {
|
||||||
|
return ZoneManager.zonesByName.get(zoneName);
|
||||||
|
}
|
||||||
|
|
||||||
public static final Collection<Zone> getAllZones() {
|
public static final Collection<Zone> getAllZones() {
|
||||||
return ZoneManager.zonesByUUID.values();
|
return ZoneManager.zonesByUUID.values();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -879,14 +879,11 @@ public class PlayerCharacter extends AbstractCharacter {
|
|||||||
|
|
||||||
//handle rented room binds.
|
//handle rented room binds.
|
||||||
|
|
||||||
|
|
||||||
if (bindBuilding == null){
|
if (bindBuilding == null){
|
||||||
bindLocation = Enum.Ruins.getRandomRuin().getLocation();
|
bindLocation = Enum.Ruins.getRandomRuin().getLocation();
|
||||||
return bindLocation;
|
return bindLocation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bindLocation = BuildingManager.GetBindLocationForBuilding(bindBuilding);
|
bindLocation = BuildingManager.GetBindLocationForBuilding(bindBuilding);
|
||||||
|
|
||||||
if (bindLocation == null)
|
if (bindLocation == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user