Browse Source

guard minion spawning work

master
FatBoy-DOTC 2 years ago
parent
commit
914575a360
  1. 8
      src/engine/ai/MobileFSM.java
  2. 6
      src/engine/gameManager/NPCManager.java

8
src/engine/ai/MobileFSM.java

@ -502,21 +502,17 @@ public class MobileFSM {
} }
if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()){ if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardMinion.ordinal()){
//this is a player slotted guard minion //this is a player slotted guard minion
if(mob.isAlive() == false){ if(mob.isAlive() == false || mob.despawned){
CheckForRespawn(mob); CheckForRespawn(mob);
return; return;
} }
CheckToSendMobHome(mob); CheckToSendMobHome(mob);
if(mob.npcOwner.isAlive() == false){ if(mob.npcOwner.isAlive() == false){
CheckForPlayerGuardAggro(mob); CheckForPlayerGuardAggro(mob);
CheckMobMovement(mob);
if(mob.getCombatTarget() != null){
CheckForAttack(mob);
}
return; return;
} }
CheckMobMovement(mob);
if(mob.getCombatTarget() != null){ if(mob.getCombatTarget() != null){
CheckMobMovement(mob);
CheckForAttack(mob); CheckForAttack(mob);
} }
return; return;

6
src/engine/gameManager/NPCManager.java

@ -319,13 +319,11 @@ public enum NPCManager {
slot += guardCaptain.siegeMinionMap.size() + 1; slot += guardCaptain.siegeMinionMap.size() + 1;
guardCaptain.siegeMinionMap.put(mob, slot); guardCaptain.siegeMinionMap.put(mob, slot);
//mob.setInBuildingLoc(guardCaptain.building, guardCaptain); mob.setInBuildingLoc(guardCaptain.building, guardCaptain);
//mob.setBindLoc(loc.add(mob.inBuildingLoc)); mob.setBindLoc(loc.add(mob.inBuildingLoc));
mob.deathTime = System.currentTimeMillis(); mob.deathTime = System.currentTimeMillis();
mob.spawnTime = 900; mob.spawnTime = 900;
mob.npcOwner = guardCaptain; mob.npcOwner = guardCaptain;
mob.setBindLoc(guardCaptain.building.getLoc());
MovementManager.translocate(mob,guardCaptain.building.getLoc(),null);
mob.BehaviourType = Enum.MobBehaviourType.GuardMinion; mob.BehaviourType = Enum.MobBehaviourType.GuardMinion;
return mob; return mob;
} }

Loading…
Cancel
Save