Port EQMacEmu's Assist Aggro code

This code also allows you to toggle on Tick Pulling (Aggro:AllowTickPulling)
which was a pulling technique (exploit) fixed sometime in 2006

This code also implements assist caps to cut down on trains (5 by default)
Unsure if live what this number is (it exists) or if it's a per NPC basis

An NPC with Assist Aggro will not call for help, only NPCs with Primary Aggro will
This commit is contained in:
Michael Cook (mackal)
2015-12-18 17:41:57 -05:00
parent f8867ea73d
commit 03592e58f9
7 changed files with 53 additions and 2 deletions
+11 -1
View File
@@ -712,8 +712,18 @@ bool NPC::Process()
}
//Handle assists...
if(assist_timer.Check() && IsEngaged() && !Charmed()) {
if (assist_cap_timer.Check()) {
if (NPCAssistCap() > 0)
DelAssistCap();
else
assist_cap_timer.Disable();
}
if (assist_timer.Check() && IsEngaged() && !Charmed() && !HasAssistAggro() &&
NPCAssistCap() < RuleI(Combat, NPCAssistCap)) {
entity_list.AIYellForHelp(this, GetTarget());
if (NPCAssistCap() > 0 && !assist_cap_timer.Enabled())
assist_cap_timer.Start(RuleI(Combat, NPCAssistCapTimer));
}
if(qGlobals)