Core/Auras: Fixed iterator invalidation crash with procs using SPELL_ATTR0_PROC_FAILURE_BURNS_CHARGE attribute
Port From (https://github.com/TrinityCore/TrinityCore/commit/15451ce699540c7d175f4a24d257778dedb0e3d7)
This commit is contained in:
@@ -1544,7 +1544,7 @@ namespace Game.Entities
|
|||||||
if (procEntry != null)
|
if (procEntry != null)
|
||||||
{
|
{
|
||||||
aurApp.GetBase().PrepareProcChargeDrop(procEntry, eventInfo);
|
aurApp.GetBase().PrepareProcChargeDrop(procEntry, eventInfo);
|
||||||
aurApp.GetBase().ConsumeProcCharges(procEntry);
|
aurasTriggeringProc.Add(Tuple.Create(0u, aurApp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1883,6 +1883,8 @@ namespace Game.Spells
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void TriggerProcOnEvent(uint procEffectMask, AuraApplication aurApp, ProcEventInfo eventInfo)
|
public void TriggerProcOnEvent(uint procEffectMask, AuraApplication aurApp, ProcEventInfo eventInfo)
|
||||||
|
{
|
||||||
|
if (procEffectMask != 0)
|
||||||
{
|
{
|
||||||
bool prevented = CallScriptProcHandlers(aurApp, eventInfo);
|
bool prevented = CallScriptProcHandlers(aurApp, eventInfo);
|
||||||
if (!prevented)
|
if (!prevented)
|
||||||
@@ -1899,6 +1901,7 @@ namespace Game.Spells
|
|||||||
|
|
||||||
CallScriptAfterProcHandlers(aurApp, eventInfo);
|
CallScriptAfterProcHandlers(aurApp, eventInfo);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ConsumeProcCharges(Global.SpellMgr.GetSpellProcEntry(GetSpellInfo()));
|
ConsumeProcCharges(Global.SpellMgr.GetSpellProcEntry(GetSpellInfo()));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user