Implement IGNORE_ROOT_AGGRO_RULES (special attack 42)

This allows you to have a mob be rooted but still try to attack the
target with the most amount of hate instead of attacking the closest
This commit is contained in:
Michael Cook (mackal)
2014-12-12 18:55:43 -05:00
parent 0e54019fd5
commit 118d587064
3 changed files with 6 additions and 3 deletions
+2 -2
View File
@@ -134,8 +134,8 @@ enum {
DISABLE_MELEE = 39,
NPC_CHASE_DISTANCE = 40,
ALLOW_TO_TANK = 41,
MAX_SPECIAL_ATTACK = 42
IGNORE_ROOT_AGGRO_RULES = 42,
MAX_SPECIAL_ATTACK = 43
};
typedef enum { //fear states
+1 -1
View File
@@ -1088,7 +1088,7 @@ void Mob::AI_Process() {
{
// we are prevented from getting here if we are blind and don't have a target in range
// from above, so no extra blind checks needed
if (IsRooted() || IsBlind())
if ((IsRooted() && !GetSpecialAbility(IGNORE_ROOT_AGGRO_RULES)) || IsBlind())
SetTarget(hate_list.GetClosest(this));
else
{