From f28c887b9288c10dee31dc8d02fad444913524a0 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 18 May 2024 14:58:52 -0500 Subject: [PATCH] inline method --- src/engine/InterestManagement/InterestManager.java | 8 +------- .../client/handlers/ArcLoginNotifyMsgHandler.java | 2 +- .../client/handlers/RequestEnterWorldHandler.java | 2 +- src/engine/objects/PlayerCharacter.java | 12 ++---------- src/engine/server/world/WorldServer.java | 5 ++--- 5 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/engine/InterestManagement/InterestManager.java b/src/engine/InterestManagement/InterestManager.java index e1438824..afb78d92 100644 --- a/src/engine/InterestManagement/InterestManager.java +++ b/src/engine/InterestManagement/InterestManager.java @@ -8,14 +8,10 @@ package engine.InterestManagement; -import com.sun.corba.se.spi.orbutil.fsm.ActionBase; -import com.sun.corba.se.spi.orbutil.fsm.FSM; -import com.sun.corba.se.spi.orbutil.fsm.Input; import engine.Enum; import engine.Enum.DispatchChannel; import engine.Enum.GameObjectType; import engine.gameManager.GroupManager; -import engine.gameManager.PowersManager; import engine.gameManager.SessionManager; import engine.job.JobScheduler; import engine.jobs.RefreshGroupJob; @@ -28,13 +24,11 @@ import engine.net.client.msg.LoadStructureMsg; import engine.net.client.msg.MoveToPointMsg; import engine.net.client.msg.UnloadObjectsMsg; import engine.objects.*; -import engine.powers.ActionsBase; import engine.server.MBServerStatics; import org.pmw.tinylog.Logger; import java.util.ArrayList; import java.util.HashSet; -import java.util.Map; import static engine.math.FastMath.sqr; @@ -216,7 +210,7 @@ public enum InterestManager implements Runnable { if (origin == null) continue; - if (!playerCharacter.isEnteredWorld()) + if (!playerCharacter.enteredWorld) continue; if (playerCharacter.getTeleportLock().readLock().tryLock()) { diff --git a/src/engine/net/client/handlers/ArcLoginNotifyMsgHandler.java b/src/engine/net/client/handlers/ArcLoginNotifyMsgHandler.java index eb62ddfb..1e724f70 100644 --- a/src/engine/net/client/handlers/ArcLoginNotifyMsgHandler.java +++ b/src/engine/net/client/handlers/ArcLoginNotifyMsgHandler.java @@ -53,7 +53,7 @@ public class ArcLoginNotifyMsgHandler extends AbstractClientMsgHandler { GroupManager.RefreshOthersGroupList(player); } - player.setEnteredWorld(true); + player.enteredWorld = true; // Set player active player.resetRegenUpdateTime(); player.setActive(true); diff --git a/src/engine/net/client/handlers/RequestEnterWorldHandler.java b/src/engine/net/client/handlers/RequestEnterWorldHandler.java index 18b48254..4737e4ea 100644 --- a/src/engine/net/client/handlers/RequestEnterWorldHandler.java +++ b/src/engine/net/client/handlers/RequestEnterWorldHandler.java @@ -57,7 +57,7 @@ public class RequestEnterWorldHandler extends AbstractClientMsgHandler { return true; } - player.setEnteredWorld(false); + player.enteredWorld = false; Account acc = SessionManager.getAccount(origin); diff --git a/src/engine/objects/PlayerCharacter.java b/src/engine/objects/PlayerCharacter.java index 14d260c8..37626d73 100644 --- a/src/engine/objects/PlayerCharacter.java +++ b/src/engine/objects/PlayerCharacter.java @@ -160,7 +160,7 @@ public class PlayerCharacter extends AbstractCharacter { private boolean asciiLastName = true; private int spamCount = 0; private boolean initialized = false; - private boolean enteredWorld = false; + public boolean enteredWorld = false; private boolean canBreathe = true; private String hash; private ArrayList guildHistory = new ArrayList<>(); @@ -4852,7 +4852,7 @@ public class PlayerCharacter extends AbstractCharacter { //if(this.isBoxed && this.containsEffect(429611355) == false) {//pathfinding // PowersManager.applyPower(this, this, Vector3fImmutable.ZERO, 429611355, 40, false); //} - if(this.isEnteredWorld() && this.isActive() && this.isAlive()){ + if(enteredWorld && this.isActive() && this.isAlive()){ if( this.getLevel() < 10) { this.setLevel((short) 10); boolean hasConc = false; @@ -5554,14 +5554,6 @@ public class PlayerCharacter extends AbstractCharacter { this.centerHeight = centerHeight; } - public boolean isEnteredWorld() { - return enteredWorld; - } - - public void setEnteredWorld(boolean enteredWorld) { - this.enteredWorld = enteredWorld; - } - public long getChannelMute() { return channelMute; } diff --git a/src/engine/server/world/WorldServer.java b/src/engine/server/world/WorldServer.java index 48c8dbd1..7b7d3839 100644 --- a/src/engine/server/world/WorldServer.java +++ b/src/engine/server/world/WorldServer.java @@ -23,7 +23,6 @@ import engine.gameManager.*; import engine.job.JobContainer; import engine.job.JobScheduler; import engine.jobs.LogoutCharacterJob; -import engine.math.Vector3fImmutable; import engine.mobileAI.Threads.MobAIThread; import engine.mobileAI.Threads.MobRespawnThread; import engine.net.Dispatch; @@ -834,9 +833,9 @@ public class WorldServer { loadedMob.playerAgroMap.remove(player.getObjectUUID()); } player.getTimestamps().put("logout", System.currentTimeMillis()); - player.setEnteredWorld(false); + player.enteredWorld = false; - // remove from simulation and zero current loc + // remove from simulation and zero current loc WorldGrid.RemoveWorldObject(player);