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 { @@ -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 { @@ -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) {

19
src/engine/objects/Mob.java

@ -893,15 +893,16 @@ public class Mob extends AbstractIntelligenceAgent { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -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 { @@ -1837,9 +1833,6 @@ public class Mob extends AbstractIntelligenceAgent {
return isPlayerGuard;
}
public void setPatrolPointIndex(int patrolPointIndex) {
}
public int getLastMobPowerToken() {
return lastMobPowerToken;
}

Loading…
Cancel
Save