@ -48,7 +48,12 @@ public class MobAI {
@@ -48,7 +48,12 @@ public class MobAI {
mob . setCombatTarget ( null ) ;
return ;
}
if ( target . getObjectType ( ) = = Enum . GameObjectType . PlayerCharacter ) {
if ( ( ( PlayerCharacter ) target ) . getHidden ( ) > 0 ) {
mob . setCombatTarget ( null ) ;
return ;
}
}
if ( target . getObjectType ( ) = = Enum . GameObjectType . PlayerCharacter & & canCast ( mob ) ) {
if ( mob . isPlayerGuard ( ) = = false & & MobCast ( mob ) ) {
@ -736,7 +741,7 @@ public class MobAI {
@@ -736,7 +741,7 @@ public class MobAI {
//Player is Dead, Mob no longer needs to attempt to aggro. Remove them from aggro map.
if ( ! loadedPlayer . isAlive ( ) ) {
if ( ! loadedPlayer . isAlive ( ) | | loadedPlayer . getHidden ( ) > 0 ) {
loadedPlayers . remove ( playerID ) ;
continue ;
}
@ -978,7 +983,12 @@ public class MobAI {
@@ -978,7 +983,12 @@ public class MobAI {
private static void chaseTarget ( Mob mob ) {
try {
if ( mob . combatTarget . getObjectType ( ) = = Enum . GameObjectType . PlayerCharacter ) {
if ( ( ( PlayerCharacter ) mob . combatTarget ) . getHidden ( ) > 0 ) {
mob . setCombatTarget ( null ) ;
return ;
}
}
float rangeSquared = mob . getRange ( ) * mob . getRange ( ) ;
float distanceSquared = mob . getLoc ( ) . distanceSquared2D ( mob . getCombatTarget ( ) . getLoc ( ) ) ;