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 {
Zone terrain_zone = zone; Zone terrain_zone = zone;
if (zone == null) if (zone == null)
return ZoneManager.getSeaFloor(); return ZoneManager.seaFloor;
if (zone.terrain != null) if (zone.terrain != null)
return zone; return zone;
if (zone.equals(ZoneManager.getSeaFloor())) if (zone.equals(ZoneManager.seaFloor))
return zone; return zone;
while (terrain_zone.terrain == null) while (terrain_zone.terrain == null)

6
src/engine/gameManager/ZoneManager.java

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

2
src/engine/mobileAI/MobAI.java

@ -991,7 +991,7 @@ public class MobAI {
try { try {
if (mob.guardCaptain == null && mob.isNecroPet() == false && mob.isSiege() == false) 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"); mob.killCharacter("no owner");
if (MovementUtilities.canMove(mob) && mob.behaviourType.canRoam) if (MovementUtilities.canMove(mob) && mob.behaviourType.canRoam)

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

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

2
src/engine/objects/Mob.java

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

4
src/engine/objects/Zone.java

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

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

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

Loading…
Cancel
Save