replaced MobileFSM.STATE with MobileFSM.MobBehaviourTypes

This commit is contained in:
2023-04-11 19:53:13 -05:00
parent 23a07175e5
commit 98f0928a4b
18 changed files with 276 additions and 1331 deletions
+2 -5
View File
@@ -12,7 +12,6 @@ package engine.net.client;
import engine.Enum.*;
import engine.InterestManagement.WorldGrid;
import engine.ai.MobileFSM.STATE;
import engine.exception.MsgSendException;
import engine.gameManager.*;
import engine.job.JobContainer;
@@ -2026,7 +2025,6 @@ public class ClientMessagePump implements NetMsgHandler {
if (pet.getCombatTarget() == null)
return;
pet.state = STATE.Attack;
}
protected static void petCmd(PetCmdMsg msg, ClientConnection conn) throws MsgSendException {
@@ -2044,15 +2042,14 @@ public class ClientMessagePump implements NetMsgHandler {
if (!pet.isAlive())
return;
if (pet.state == STATE.Disabled)
return;
//if (pet.state == STATE.Disabled)
// return;
int type = msg.getType();
if (type == 1) { //stop attack
pet.setCombatTarget(null);
pc.setCombat(false);
pet.state = STATE.Awake;
}
else if (type == 2) { //dismiss
@@ -3,7 +3,6 @@ package engine.net.client.handlers;
import engine.Enum;
import engine.Enum.DispatchChannel;
import engine.InterestManagement.WorldGrid;
import engine.ai.MobileFSM;
import engine.exception.MsgSendException;
import engine.gameManager.BuildingManager;
import engine.gameManager.DbManager;
@@ -67,7 +66,6 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
if (!npc.getSiegeMinionMap().containsKey(toRemove))
return true;
toRemove.state = MobileFSM.STATE.Disabled;
npc.getSiegeMinionMap().remove(toRemove);
//toRemove.disableIntelligence();
@@ -160,7 +158,6 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
toCreate.setSpawnTime(60 * 15);
toCreate.setTimeToSpawnSiege(System.currentTimeMillis() + (60 * 15 * 1000));
toCreate.setDeathTime(System.currentTimeMillis());
toCreate.state = MobileFSM.STATE.Respawn;
}
}
@@ -199,7 +196,6 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
if (!DbManager.MobQueries.REMOVE_FROM_GUARDS(npc.getObjectUUID(), toRemove.getMobBaseID(), npc.getSiegeMinionMap().get(toRemove)))
return true;
toRemove.state = MobileFSM.STATE.Disabled;
npc.getSiegeMinionMap().remove(toRemove);
//toRemove.disableIntelligence();
@@ -293,7 +289,6 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
if (toCreate != null) {
toCreate.setTimeToSpawnSiege(System.currentTimeMillis() + MBServerStatics.FIFTEEN_MINUTES);
toCreate.setDeathTime(System.currentTimeMillis());
toCreate.state = MobileFSM.STATE.Respawn;
}
}