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

View File

@ -1,5 +1,8 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50) EQEMu Changelog (Started on Sept 24, 2003 15:50)
------------------------------------------------------- -------------------------------------------------------
== 12/12/2014 ==
demonstar55: Add special attack 42, Ignore Root Aggro Rules. This allows you to root a mob and have them still use the normal aggro rules (so they will attack the one with most hate, not closest)
== 12/09/2014 == == 12/09/2014 ==
Trevius: (RoF+) Implemented Hero's Forge Armor Models for Items. To use, set herosforgemodel field in the item table to a model number such as 63 (for example). Trevius: (RoF+) Implemented Hero's Forge Armor Models for Items. To use, set herosforgemodel field in the item table to a model number such as 63 (for example).
demonstar55: SoF+ swarm pets will no longer be F8able (without a hack!) demonstar55: SoF+ swarm pets will no longer be F8able (without a hack!)

View File

@ -134,8 +134,8 @@ enum {
DISABLE_MELEE = 39, DISABLE_MELEE = 39,
NPC_CHASE_DISTANCE = 40, NPC_CHASE_DISTANCE = 40,
ALLOW_TO_TANK = 41, ALLOW_TO_TANK = 41,
MAX_SPECIAL_ATTACK = 42 IGNORE_ROOT_AGGRO_RULES = 42,
MAX_SPECIAL_ATTACK = 43
}; };
typedef enum { //fear states typedef enum { //fear states

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 // 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 // from above, so no extra blind checks needed
if (IsRooted() || IsBlind()) if ((IsRooted() && !GetSpecialAbility(IGNORE_ROOT_AGGRO_RULES)) || IsBlind())
SetTarget(hate_list.GetClosest(this)); SetTarget(hate_list.GetClosest(this));
else else
{ {