Browse Source

Method inlined

magicbox-1.5.2
MagicBot 1 year ago
parent
commit
95558371df
  1. 4
      src/engine/InterestManagement/Terrain.java
  2. 6
      src/engine/gameManager/ZoneManager.java
  3. 2
      src/engine/mobileAI/MobAI.java
  4. 2
      src/engine/net/client/msg/WorldDataMsg.java
  5. 2
      src/engine/objects/Mob.java
  6. 4
      src/engine/objects/Zone.java
  7. 2
      src/engine/powers/poweractions/CreateMobPowerAction.java

4
src/engine/InterestManagement/Terrain.java

@ -63,12 +63,12 @@ public class Terrain { @@ -63,12 +63,12 @@ public class Terrain {
Zone terrain_zone = zone;
if (zone == null)
return ZoneManager.getSeaFloor();
return ZoneManager.seaFloor;
if (zone.terrain != null)
return zone;
if (zone.equals(ZoneManager.getSeaFloor()))
if (zone.equals(ZoneManager.seaFloor))
return zone;
while (terrain_zone.terrain == null)

6
src/engine/gameManager/ZoneManager.java

@ -51,7 +51,7 @@ public enum ZoneManager { @@ -51,7 +51,7 @@ public enum ZoneManager {
public static int hotZoneCycle = 0; // Used with HOTZONE_DURATION from config.
/* Instance variables */
private static Zone seaFloor = null;
public static Zone seaFloor = null;
// Find all zones coordinates fit into, starting with Sea Floor
@ -175,10 +175,6 @@ public enum ZoneManager { @@ -175,10 +175,6 @@ public enum ZoneManager {
return (Bounds.collide(loc, ZoneManager.hotZone.bounds));
}
public static Zone getSeaFloor() {
return ZoneManager.seaFloor;
}
public static void setSeaFloor(final Zone value) {
ZoneManager.seaFloor = value;
}

2
src/engine/mobileAI/MobAI.java

@ -991,7 +991,7 @@ public class MobAI { @@ -991,7 +991,7 @@ public class MobAI {
try {
if (mob.guardCaptain == null && mob.isNecroPet() == false && mob.isSiege() == false)
if (ZoneManager.getSeaFloor().zoneMobSet.contains(mob))
if (ZoneManager.seaFloor.zoneMobSet.contains(mob))
mob.killCharacter("no owner");
if (MovementUtilities.canMove(mob) && mob.behaviourType.canRoam)

2
src/engine/net/client/msg/WorldDataMsg.java

@ -73,7 +73,7 @@ public class WorldDataMsg extends ClientNetMsg { @@ -73,7 +73,7 @@ public class WorldDataMsg extends ClientNetMsg {
// TODO replace this return with SerializationException
Zone root = ZoneManager.getSeaFloor();
Zone root = ZoneManager.seaFloor;
if (root == null) {
Logger.error("Failed to find Sea Floor!");
return;

2
src/engine/objects/Mob.java

@ -897,7 +897,7 @@ public class Mob extends AbstractIntelligenceAgent { @@ -897,7 +897,7 @@ public class Mob extends AbstractIntelligenceAgent {
this.setCombatTarget(null);
this.hasLoot = false;
ZoneManager.getSeaFloor().zoneMobSet.remove(this);
ZoneManager.seaFloor.zoneMobSet.remove(this);
try {
this.clearEffects();

4
src/engine/objects/Zone.java

@ -310,7 +310,7 @@ public class Zone extends AbstractGameObject { @@ -310,7 +310,7 @@ public class Zone extends AbstractGameObject {
public boolean isContinent() {
if (this.equals(ZoneManager.getSeaFloor()))
if (this.equals(ZoneManager.seaFloor))
return false;
if (this.getNodes().isEmpty())
@ -319,7 +319,7 @@ public class Zone extends AbstractGameObject { @@ -319,7 +319,7 @@ public class Zone extends AbstractGameObject {
if (this.getNodes().get(0).isMacroZone())
return true;
return this.parent.equals(ZoneManager.getSeaFloor());
return this.parent.equals(ZoneManager.seaFloor);
}
public void setHash() {

2
src/engine/powers/poweractions/CreateMobPowerAction.java

@ -56,7 +56,7 @@ public class CreateMobPowerAction extends AbstractPowerAction { @@ -56,7 +56,7 @@ public class CreateMobPowerAction extends AbstractPowerAction {
PlayerCharacter owner = (PlayerCharacter) source;
Mob currentPet = owner.getPet();
Zone seaFloor = ZoneManager.getSeaFloor();
Zone seaFloor = ZoneManager.seaFloor;
Guild guild = Guild.getErrantGuild();
ClientConnection origin = owner.getClientConnection();

Loading…
Cancel
Save