null spam fix for hamlet guards
This commit is contained in:
1 parent
5a25958aa5
commit
65db64d3df
1 file changed
+5
-2
@@ -99,7 +99,10 @@ public class MobAI {
|
||||
public static void attackPlayer(Mob mob, PlayerCharacter target) {
|
||||
|
||||
try {
|
||||
|
||||
if(target == null || !target.isAlive() || !target.isActive() ) {
|
||||
mob.setCombatTarget(null);
|
||||
return;
|
||||
}
|
||||
if (!mob.canSee(target)) {
|
||||
mob.setCombatTarget(null);
|
||||
return;
|
||||
@@ -121,7 +124,7 @@ public class MobAI {
|
||||
if (mob.isMoving() && mob.getRange() > 20)
|
||||
return;
|
||||
|
||||
CombatManager.combatCycle(mob, mob.combatTarget);
|
||||
CombatManager.combatCycle(mob, target);
|
||||
}
|
||||
|
||||
if (target.getPet() != null)
|
||||
|
||||
Reference in new issue
Block a user