|
|
@ -76,7 +76,7 @@ public class StandardMob { |
|
|
|
if(enumMobState.Agressive(mob)){ |
|
|
|
if(enumMobState.Agressive(mob)){ |
|
|
|
for(int id : mob.playerAgroMap.keySet()){ |
|
|
|
for(int id : mob.playerAgroMap.keySet()){ |
|
|
|
PlayerCharacter potentialTarget = PlayerCharacter.getFromCache(id); |
|
|
|
PlayerCharacter potentialTarget = PlayerCharacter.getFromCache(id); |
|
|
|
if(!potentialTarget.isAlive() || mob.canSee(potentialTarget)) |
|
|
|
if(!potentialTarget.isAlive() || !mob.canSee(potentialTarget)) |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
if (MovementUtilities.inRangeToAggro(mob, potentialTarget)) { |
|
|
|
if (MovementUtilities.inRangeToAggro(mob, potentialTarget)) { |
|
|
|
mob.setCombatTarget(potentialTarget); |
|
|
|
mob.setCombatTarget(potentialTarget); |
|
|
@ -131,20 +131,14 @@ public class StandardMob { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(MovementUtilities.inRangeDropAggro(mob, (PlayerCharacter) mob.getCombatTarget())){ |
|
|
|
if(!mob.isMoving() && !CombatUtilities.inRangeToAttack(mob,mob.combatTarget)){ |
|
|
|
mob.setCombatTarget(null); |
|
|
|
|
|
|
|
MovementUtilities.aiMove(mob,mob.bindLoc,true); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!CombatUtilities.inRangeToAttack(mob,mob.combatTarget)){ |
|
|
|
|
|
|
|
if (!MovementUtilities.canMove(mob)) |
|
|
|
if (!MovementUtilities.canMove(mob)) |
|
|
|
return; |
|
|
|
return; |
|
|
|
MovementUtilities.aiMove(mob,mob.combatTarget.loc,false); |
|
|
|
MovementUtilities.aiMove(mob,mob.combatTarget.loc,false); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
mob.stopMovement(mob.getMovementLoc()); |
|
|
|
mob.updateLocation(); |
|
|
|
|
|
|
|
|
|
|
|
ItemBase weapon = mob.getWeaponItemBase(true); |
|
|
|
ItemBase weapon = mob.getWeaponItemBase(true); |
|
|
|
boolean mainHand = true; |
|
|
|
boolean mainHand = true; |
|
|
|