@ -708,7 +708,7 @@ public class MobAI {
@@ -708,7 +708,7 @@ public class MobAI {
if ( ! aiAgent . isAlive ( ) )
return ;
ConcurrentHashMap < Integer , Boolean > loadedPlayers = aiAgent . playerAgroMap ;
ConcurrentHashMap < Integer , Float > loadedPlayers = aiAgent . playerAgroMap ;
for ( Entry playerEntry : loadedPlayers . entrySet ( ) ) {
@ -956,8 +956,8 @@ public class MobAI {
@@ -956,8 +956,8 @@ public class MobAI {
PowersManager . useMobPower ( mob , mob , recall , 40 ) ;
mob . setCombatTarget ( null ) ;
for ( Entry playerEntry : mob . playerAgroMap . entr ySet ( ) )
PlayerCharacter . getFromCache ( ( int ) playerEntry . getKey ( ) ) . setHateValue ( 0 ) ;
for ( Integer playerEntry : mob . playerAgroMap . k eySet( ) )
mob . playerAgroMap . put ( playerEntry , 0f ) ;
}
} catch ( Exception e ) {
Logger . info ( mob . getObjectUUID ( ) + " " + mob . getName ( ) + " Failed At: CheckToSendMobHome" + " " + e . getMessage ( ) ) ;
@ -1204,7 +1204,7 @@ public class MobAI {
@@ -1204,7 +1204,7 @@ public class MobAI {
if ( ! mob . isAlive ( ) )
return ;
ConcurrentHashMap < Integer , Boolean > loadedPlayers = mob . playerAgroMap ;
ConcurrentHashMap < Integer , Float > loadedPlayers = mob . playerAgroMap ;
for ( Entry playerEntry : loadedPlayers . entrySet ( ) ) {
@ -1364,7 +1364,7 @@ public class MobAI {
@@ -1364,7 +1364,7 @@ public class MobAI {
float CurrentHateValue = 0 ;
if ( mob . getCombatTarget ( ) ! = null & & mob . getCombatTarget ( ) . getObjectType ( ) . equals ( Enum . GameObjectType . PlayerCharacter ) )
CurrentHateValue = ( ( PlayerCharacter ) mob . getCombatTarget ( ) ) . getHate Value( ) ;
CurrentHateValue = mob . playerAgroMap . get ( mob . combatTarget . getObjectUUID ( ) ) . float Value( ) ;
AbstractWorldObject mostHatedTarget = null ;
@ -1375,8 +1375,8 @@ public class MobAI {
@@ -1375,8 +1375,8 @@ public class MobAI {
if ( potentialTarget . equals ( mob . getCombatTarget ( ) ) )
continue ;
if ( potentialTarget ! = null & & potentialTarget . getHate Value ( ) > CurrentHateValue & & MovementUtilities . inRangeToAggro ( mob , potentialTarget ) ) {
CurrentHateValue = potentialTarget . getHate Value ( ) ;
if ( potentialTarget ! = null & & mob . playerAgroMap . get ( potentialTarget . getObjectUUID ( ) ) . float Value ( ) > CurrentHateValue & & MovementUtilities . inRangeToAggro ( mob , potentialTarget ) ) {
CurrentHateValue = mob . playerAgroMap . get ( potentialTarget . getObjectUUID ( ) ) . float Value ( ) ;
mostHatedTarget = potentialTarget ;
}