Browse Source

bonus code removal

mobile-class-refactor
MagicBot 1 year ago
parent
commit
dbf164bfb2
  1. 8
      src/engine/net/client/handlers/OrderNPCMsgHandler.java
  2. 19
      src/engine/objects/Mob.java

8
src/engine/net/client/handlers/OrderNPCMsgHandler.java

@ -212,10 +212,6 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
return; return;
} }
for (AbstractCharacter guard : building.getHirelings().keySet()) {
if (guard.getObjectType() == GameObjectType.Mob)
((Mob) guard).setPatrolPointIndex(0);
}
} else if (building.getPatrolPoints() != null) } else if (building.getPatrolPoints() != null)
ClearPatrolPoints(building.getObjectUUID()); ClearPatrolPoints(building.getObjectUUID());
@ -223,10 +219,6 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
AddSentryPoints(building.getObjectUUID(), orderNpcMsg.getSentryPoints()); AddSentryPoints(building.getObjectUUID(), orderNpcMsg.getSentryPoints());
} else if (building.getSentryPoints() != null) } else if (building.getSentryPoints() != null)
ClearSentryPoints(building.getObjectUUID()); ClearSentryPoints(building.getObjectUUID());
// Dispatch dispatch = Dispatch.borrow(pc, msg);
// DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
} }
private static void processUpgradeNPC(PlayerCharacter player, AbstractCharacter abstractCharacter) { private static void processUpgradeNPC(PlayerCharacter player, AbstractCharacter abstractCharacter) {

19
src/engine/objects/Mob.java

@ -893,15 +893,16 @@ public class Mob extends AbstractIntelligenceAgent {
try { try {
//resync corpses //resync corpses
//this.setLoc(this.getMovementLoc());
if (this.behaviourType.equals(MobBehaviourType.SiegeEngine)) { if (this.behaviourType.equals(MobBehaviourType.SiegeEngine)) {
this.deathTime = System.currentTimeMillis(); this.deathTime = System.currentTimeMillis();
//this.state = STATE.Dead;
try { try {
this.clearEffects(); this.clearEffects();
} catch (Exception e) { } catch (Exception e) {
Logger.error(e.getMessage()); Logger.error(e.getMessage());
} }
this.setCombatTarget(null); this.setCombatTarget(null);
this.hasLoot = false; this.hasLoot = false;
this.playerAgroMap.clear(); this.playerAgroMap.clear();
@ -911,7 +912,6 @@ public class Mob extends AbstractIntelligenceAgent {
if (this.isPet()) { if (this.isPet()) {
PlayerCharacter petOwner = (PlayerCharacter) this.guardCaptain; PlayerCharacter petOwner = (PlayerCharacter) this.guardCaptain;
if (petOwner != null) { if (petOwner != null) {
@ -927,25 +927,21 @@ public class Mob extends AbstractIntelligenceAgent {
} }
} else if (this.isPet() || this.isNecroPet()) { } else if (this.isPet() || this.isNecroPet()) {
//this.state = STATE.Disabled;
this.setCombatTarget(null); this.setCombatTarget(null);
this.hasLoot = false; this.hasLoot = false;
//if (this.parentZone != null)
//this.parentZone.zoneMobSet.remove(this);
ZoneManager.getSeaFloor().zoneMobSet.remove(this); ZoneManager.getSeaFloor().zoneMobSet.remove(this);
try { try {
this.clearEffects(); this.clearEffects();
} catch (Exception e) { } catch (Exception e) {
Logger.error(e.getMessage()); Logger.error(e.getMessage());
} }
this.playerAgroMap.clear(); this.playerAgroMap.clear();
WorldGrid.RemoveWorldObject(this); WorldGrid.RemoveWorldObject(this);
DbManager.removeFromCache(this); DbManager.removeFromCache(this);
PlayerCharacter petOwner = (PlayerCharacter) this.guardCaptain; PlayerCharacter petOwner = (PlayerCharacter) this.guardCaptain;
if (petOwner != null) { if (petOwner != null) {
@ -959,6 +955,7 @@ public class Mob extends AbstractIntelligenceAgent {
} else { } else {
//cleanup effects //cleanup effects
playerAgroMap.clear(); playerAgroMap.clear();
if (!this.isPlayerGuard && this.equip != null) if (!this.isPlayerGuard && this.equip != null)
@ -1055,7 +1052,6 @@ public class Mob extends AbstractIntelligenceAgent {
@Override @Override
public void updateDatabase() { public void updateDatabase() {
// DbManager.MobQueries.updateDatabase(this);
} }
public void refresh() { public void refresh() {
@ -1837,9 +1833,6 @@ public class Mob extends AbstractIntelligenceAgent {
return isPlayerGuard; return isPlayerGuard;
} }
public void setPatrolPointIndex(int patrolPointIndex) {
}
public int getLastMobPowerToken() { public int getLastMobPowerToken() {
return lastMobPowerToken; return lastMobPowerToken;
} }

Loading…
Cancel
Save