Quote:
Originally Posted by Coenxai
This is a pretty basic change guys.
You'll need to add the special ability. Here's an example:
Code:
common.h
IGNORE_ROOT_AGGRO_RULES = 42,
CASTING_RESIST_DIFF = 43,
COUNTER_AVOID_DAMAGE = 44,
PROX_AGGRO = 45,
ALWAYS_AGGRO = 46, <-----
MAX_SPECIAL_ATTACK = 47
Then, just add it in where it fits your goal. Such as:
Code:
aggro.cpp
Mob::CheckWillAggro
...
if (RuleB(Aggro, UseLevelAggro) && ((
( GetLevel() >= 18 )
||(GetBodyType() == BT_Undead)
||( mob->IsClient() && mob->CastToClient()->IsSitting() )
||( mob->GetLevelCon(GetLevel()) != CON_GREEN )
||( GetSpecialAbility(ALWAYS_AGGRO) ))
After that, add the special ability to the NPC's that you desire. Voilą.
That function is so abhorrent it deserves an award.
|
Thank You Coenxai!
Would be great our devs would add this to the official source!
BTW the mob doesn't necessarily needs to be Undead
It can be any type of mob that's needs to be always aggro