Core/Spells: Correct a mistake in HOT aura procs
A crash fix was added in 3e0d2e4944
but the usage of spellProcEvent itself was incorrect, we should instead use spellProto of aura to be procced
This commit is contained in:
@@ -14972,7 +14972,7 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const
|
||||
}
|
||||
|
||||
// Check spellProcEvent data requirements
|
||||
if (!sSpellMgr->IsSpellProcEventCanTriggeredBy(spellProcEvent, EventProcFlag, procSpell, procFlag, procExtra, active))
|
||||
if (!sSpellMgr->IsSpellProcEventCanTriggeredBy(spellProto, spellProcEvent, EventProcFlag, procSpell, procFlag, procExtra, active))
|
||||
return false;
|
||||
// In most cases req get honor or XP from kill
|
||||
if (EventProcFlag & PROC_FLAG_KILL && GetTypeId() == TYPEID_PLAYER)
|
||||
|
||||
@@ -773,7 +773,7 @@ SpellProcEventEntry const* SpellMgr::GetSpellProcEvent(uint32 spellId) const
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellProcEvent, uint32 EventProcFlag, SpellInfo const* procSpell, uint32 procFlags, uint32 procExtra, bool active) const
|
||||
bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellInfo const* spellProto, SpellProcEventEntry const* spellProcEvent, uint32 EventProcFlag, SpellInfo const* procSpell, uint32 procFlags, uint32 procExtra, bool active) const
|
||||
{
|
||||
// No extra req need
|
||||
uint32 procEvent_procEx = PROC_EX_NONE;
|
||||
@@ -790,7 +790,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr
|
||||
|
||||
*Only damaging Dots can proc auras with PROC_FLAG_TAKEN_DAMAGE
|
||||
|
||||
*Only Dots can proc if ONLY has PROC_FLAG_DONE_PERIODIC and spellfamily == 0 or PROC_FLAG_TAKEN_PERIODIC.
|
||||
*Only Dots can proc if ONLY has PROC_FLAG_DONE_PERIODIC or PROC_FLAG_TAKEN_PERIODIC.
|
||||
|
||||
*Hots can proc if ONLY has PROC_FLAG_DONE_PERIODIC and spellfamily != 0
|
||||
|
||||
@@ -806,7 +806,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr
|
||||
* @param procFlags proc_flags of spellProc
|
||||
* @param procExtra proc_EX of procSpell
|
||||
* @param EventProcFlag proc_flags of aura to be procced
|
||||
* @param spellProcEvent SpellProcEventEntry of aura to be procced
|
||||
* @param spellProto SpellInfo of aura to be procced
|
||||
|
||||
*/
|
||||
|
||||
@@ -821,7 +821,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellPr
|
||||
if (EventProcFlag == PROC_FLAG_DONE_PERIODIC)
|
||||
{
|
||||
/// no aura with only PROC_FLAG_DONE_PERIODIC and spellFamilyName == 0 can proc from a HOT.
|
||||
if (!spellProcEvent || !spellProcEvent->spellFamilyName)
|
||||
if (!spellProto->SpellFamilyName)
|
||||
return false;
|
||||
}
|
||||
/// Aura must have positive procflags for a HOT to proc
|
||||
|
||||
@@ -657,7 +657,7 @@ class SpellMgr
|
||||
|
||||
// Spell proc event table
|
||||
SpellProcEventEntry const* GetSpellProcEvent(uint32 spellId) const;
|
||||
bool IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellProcEvent, uint32 EventProcFlag, SpellInfo const* procSpell, uint32 procFlags, uint32 procExtra, bool active) const;
|
||||
bool IsSpellProcEventCanTriggeredBy(SpellInfo const* spellProto, SpellProcEventEntry const* spellProcEvent, uint32 EventProcFlag, SpellInfo const* procSpell, uint32 procFlags, uint32 procExtra, bool active) const;
|
||||
|
||||
// Spell proc table
|
||||
SpellProcEntry const* GetSpellProcEntry(uint32 spellId) const;
|
||||
|
||||
Reference in New Issue
Block a user