forked from MagicBane/Server
Sight check moved out of cancast.
This commit is contained in:
@@ -50,6 +50,12 @@ public class MobAI {
|
||||
return;
|
||||
}
|
||||
|
||||
if (target.getObjectType().equals(Enum.GameObjectType.PlayerCharacter) &&
|
||||
!mob.canSee((AbstractCharacter) target)) {
|
||||
mob.setCombatTarget(null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (target.getObjectType() == Enum.GameObjectType.PlayerCharacter && canCast(mob)) {
|
||||
|
||||
if (mob.isPlayerGuard() == false && MobCast(mob)) {
|
||||
@@ -324,11 +330,6 @@ public class MobAI {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!mob.canSee((AbstractCharacter) mob.getCombatTarget())) {
|
||||
mob.setCombatTarget(null);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Mobile has no powers defined in mobbase or contract..
|
||||
|
||||
if (PowersManager.getPowersForRune(mob.getMobBaseID()).isEmpty() &&
|
||||
|
||||
Reference in New Issue
Block a user