guards hate value change target

This commit is contained in:
2023-08-08 11:51:04 -05:00
parent 59c976c073
commit 6e255d9c75
2 changed files with 8 additions and 2 deletions
+7 -1
View File
@@ -1073,7 +1073,13 @@ public class MobAI {
try {
if (!mob.npcOwner.isAlive() && mob.getCombatTarget() == null) {
CheckForPlayerGuardAggro(mob);
if(mob.getCombatTarget() == null) {
CheckForPlayerGuardAggro(mob);
}else {
AbstractWorldObject newTarget = ChangeTargetFromHateValue(mob);
if (newTarget != null)
mob.setCombatTarget(newTarget);
}
}else {
if (mob.npcOwner.getCombatTarget() != null)
mob.setCombatTarget(mob.npcOwner.getCombatTarget());