Method inlined

This commit is contained in:
2023-10-09 06:16:25 -04:00
parent 085f79cefd
commit 95558371df
7 changed files with 9 additions and 13 deletions
+2 -2
View File
@@ -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)
+1 -5
View File
@@ -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;
} }
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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();
+2 -2
View File
@@ -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() {
@@ -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();