From dbf164bfb2a2508c1d97b4663b08d63e0770f71c Mon Sep 17 00:00:00 2001 From: MagicBot Date: Wed, 30 Aug 2023 15:47:08 -0400 Subject: [PATCH] bonus code removal --- .../client/handlers/OrderNPCMsgHandler.java | 8 -------- src/engine/objects/Mob.java | 19 ++++++------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/src/engine/net/client/handlers/OrderNPCMsgHandler.java b/src/engine/net/client/handlers/OrderNPCMsgHandler.java index a56ecaa1..ec62bd25 100644 --- a/src/engine/net/client/handlers/OrderNPCMsgHandler.java +++ b/src/engine/net/client/handlers/OrderNPCMsgHandler.java @@ -212,10 +212,6 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler { return; } - for (AbstractCharacter guard : building.getHirelings().keySet()) { - if (guard.getObjectType() == GameObjectType.Mob) - ((Mob) guard).setPatrolPointIndex(0); - } } else if (building.getPatrolPoints() != null) ClearPatrolPoints(building.getObjectUUID()); @@ -223,10 +219,6 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler { AddSentryPoints(building.getObjectUUID(), orderNpcMsg.getSentryPoints()); } else if (building.getSentryPoints() != null) ClearSentryPoints(building.getObjectUUID()); - - // Dispatch dispatch = Dispatch.borrow(pc, msg); - // DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY); - } private static void processUpgradeNPC(PlayerCharacter player, AbstractCharacter abstractCharacter) { diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index c9853696..b33d7368 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -893,15 +893,16 @@ public class Mob extends AbstractIntelligenceAgent { try { //resync corpses - //this.setLoc(this.getMovementLoc()); + if (this.behaviourType.equals(MobBehaviourType.SiegeEngine)) { this.deathTime = System.currentTimeMillis(); - //this.state = STATE.Dead; + try { this.clearEffects(); } catch (Exception e) { Logger.error(e.getMessage()); } + this.setCombatTarget(null); this.hasLoot = false; this.playerAgroMap.clear(); @@ -911,7 +912,6 @@ public class Mob extends AbstractIntelligenceAgent { if (this.isPet()) { - PlayerCharacter petOwner = (PlayerCharacter) this.guardCaptain; if (petOwner != null) { @@ -927,25 +927,21 @@ public class Mob extends AbstractIntelligenceAgent { } } else if (this.isPet() || this.isNecroPet()) { - //this.state = STATE.Disabled; this.setCombatTarget(null); this.hasLoot = false; - - //if (this.parentZone != null) - //this.parentZone.zoneMobSet.remove(this); ZoneManager.getSeaFloor().zoneMobSet.remove(this); + try { this.clearEffects(); } catch (Exception e) { Logger.error(e.getMessage()); } + this.playerAgroMap.clear(); WorldGrid.RemoveWorldObject(this); DbManager.removeFromCache(this); - - PlayerCharacter petOwner = (PlayerCharacter) this.guardCaptain; if (petOwner != null) { @@ -959,6 +955,7 @@ public class Mob extends AbstractIntelligenceAgent { } else { //cleanup effects + playerAgroMap.clear(); if (!this.isPlayerGuard && this.equip != null) @@ -1055,7 +1052,6 @@ public class Mob extends AbstractIntelligenceAgent { @Override public void updateDatabase() { - // DbManager.MobQueries.updateDatabase(this); } public void refresh() { @@ -1837,9 +1833,6 @@ public class Mob extends AbstractIntelligenceAgent { return isPlayerGuard; } - public void setPatrolPointIndex(int patrolPointIndex) { - } - public int getLastMobPowerToken() { return lastMobPowerToken; }