mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
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:
+5
-1
@@ -1735,8 +1735,10 @@ void Mob::AI_Event_Engaged(Mob* attacker, bool iYellForHelp) {
|
||||
if (iYellForHelp) {
|
||||
if(IsPet()) {
|
||||
GetOwner()->AI_Event_Engaged(attacker, iYellForHelp);
|
||||
} else {
|
||||
} else if (!HasAssistAggro() && NPCAssistCap() < RuleI(Combat, NPCAssistCap)) {
|
||||
entity_list.AIYellForHelp(this, attacker);
|
||||
if (NPCAssistCap() > 0 && !assist_cap_timer.Enabled())
|
||||
assist_cap_timer.Start(RuleI(Combat, NPCAssistCapTimer));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1787,6 +1789,8 @@ void Mob::AI_Event_NoLongerEngaged() {
|
||||
|
||||
if(IsNPC())
|
||||
{
|
||||
SetPrimaryAggro(false);
|
||||
SetAssistAggro(false);
|
||||
if(CastToNPC()->GetCombatEvent() && GetHP() > 0)
|
||||
{
|
||||
if(entity_list.GetNPCByID(this->GetID()))
|
||||
|
||||
Reference in New Issue
Block a user