Browse Source

respawn work

master
FatBoy-DOTC 1 year ago
parent
commit
a07ee7903b
  1. 15
      src/engine/ai/MobileFSM.java

15
src/engine/ai/MobileFSM.java

@ -299,13 +299,7 @@ public class MobileFSM { @@ -299,13 +299,7 @@ public class MobileFSM {
public static void DetermineAction(Mob mob) {
if (mob == null)
return;
if (mob.despawned && mob.getMobBase().getLoadID() == 13171) {
//trebuchet spawn handler
CheckForRespawn(mob);
return;
}
if (mob.despawned && mob.isPlayerGuard) {
//override for guards
if(mob.despawned || !mob.isAlive()) {
if (mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()) {
if (mob.npcOwner.isAlive() == false || ((Mob) mob.npcOwner).despawned == true) {
//minions don't respawn while guard captain is dead
@ -314,16 +308,9 @@ public class MobileFSM { @@ -314,16 +308,9 @@ public class MobileFSM {
return;
}
}
}
CheckForRespawn(mob);
//check to send mob home for player guards to prevent exploit of dragging guards away and then teleporting
CheckToSendMobHome(mob);
return;
}
if (!mob.isAlive()) {
//no need to continue if mob is dead, check for respawn and move on
CheckForRespawn(mob);
return;
}
if (mob.playerAgroMap.isEmpty() && mob.isPlayerGuard == false)
//no players loaded, no need to proceed

Loading…
Cancel
Save