guards no longer ignore early exit. FSM will not run if no players are online. mobs will use translocate instead of recall power.
This commit is contained in:
@@ -331,7 +331,7 @@ public class MobileFSM {
|
|||||||
CheckForRespawn(mob);
|
CheckForRespawn(mob);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (mob.playerAgroMap.isEmpty() && mob.isPlayerGuard == false)
|
if (mob.playerAgroMap.isEmpty())
|
||||||
//no players loaded, no need to proceed
|
//no players loaded, no need to proceed
|
||||||
return;
|
return;
|
||||||
if (mob.isCombat() && mob.getCombatTarget() == null) {
|
if (mob.isCombat() && mob.getCombatTarget() == null) {
|
||||||
@@ -492,21 +492,19 @@ public class MobileFSM {
|
|||||||
if (mob.isPlayerGuard() && !mob.despawned) {
|
if (mob.isPlayerGuard() && !mob.despawned) {
|
||||||
City current = ZoneManager.getCityAtLocation(mob.getLoc());
|
City current = ZoneManager.getCityAtLocation(mob.getLoc());
|
||||||
if (current == null || current.equals(mob.getGuild().getOwnedCity()) == false || mob.playerAgroMap.isEmpty()) {
|
if (current == null || current.equals(mob.getGuild().getOwnedCity()) == false || mob.playerAgroMap.isEmpty()) {
|
||||||
PowersBase recall = PowersManager.getPowerByToken(-1994153779);
|
MovementManager.translocate(mob,mob.getBindLoc(),null);
|
||||||
PowersManager.useMobPower(mob, mob, recall, 40);
|
|
||||||
mob.setCombatTarget(null);
|
mob.setCombatTarget(null);
|
||||||
if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardCaptain.ordinal() && mob.isAlive()){
|
if(mob.BehaviourType.ordinal() == Enum.MobBehaviourType.GuardCaptain.ordinal() && mob.isAlive()){
|
||||||
//guard captain pulls his minions home with him
|
//guard captain pulls his minions home with him
|
||||||
for (Entry<Mob, Integer> minion : mob.siegeMinionMap.entrySet()) {
|
for (Entry<Mob, Integer> minion : mob.siegeMinionMap.entrySet()) {
|
||||||
PowersManager.useMobPower(minion.getKey(), minion.getKey(), recall, 40);
|
MovementManager.translocate(minion.getKey(),mob.getBindLoc(),null);
|
||||||
minion.getKey().setCombatTarget(null);
|
minion.getKey().setCombatTarget(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(MovementUtilities.inRangeOfBindLocation(mob) == false) {
|
else if(MovementUtilities.inRangeOfBindLocation(mob) == false) {
|
||||||
PowersBase recall = PowersManager.getPowerByToken(-1994153779);
|
MovementManager.translocate(mob,mob.getBindLoc(),null);
|
||||||
PowersManager.useMobPower(mob, mob, recall, 40);
|
|
||||||
mob.setCombatTarget(null);
|
mob.setCombatTarget(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
package engine.ai;
|
package engine.ai;
|
||||||
|
import engine.gameManager.SessionManager;
|
||||||
import engine.gameManager.ZoneManager;
|
import engine.gameManager.ZoneManager;
|
||||||
import engine.objects.Mob;
|
import engine.objects.Mob;
|
||||||
import engine.objects.Zone;
|
import engine.objects.Zone;
|
||||||
@@ -88,7 +89,7 @@ public class MobileFSMManager {
|
|||||||
for (Mob mob : zone.zoneMobSet) {
|
for (Mob mob : zone.zoneMobSet) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (mob != null)
|
if (mob != null && SessionManager.getActivePlayerCharacterCount() > 0)
|
||||||
MobileFSM.DetermineAction(mob);
|
MobileFSM.DetermineAction(mob);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Logger.error("Mob: " + mob.getName() + " UUID: " + mob.getObjectUUID() + " ERROR: " + e);
|
Logger.error("Mob: " + mob.getName() + " UUID: " + mob.getObjectUUID() + " ERROR: " + e);
|
||||||
|
|||||||
Reference in New Issue
Block a user