mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[10218] Restore trinket procs when no specific spell is defined for proc
This commit is contained in:
parent
7bb8b2bedb
commit
c384650af8
4 changed files with 27 additions and 3 deletions
|
|
@ -910,6 +910,29 @@ bool Aura::isAffectedOnSpell(SpellEntry const *spell) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Aura::CanProcFrom(SpellEntry const *spell) const
|
||||||
|
{
|
||||||
|
// Check EffectClassMask
|
||||||
|
uint32 const *ptr = getAuraSpellClassMask();
|
||||||
|
|
||||||
|
// if no class mask defined - allow proc
|
||||||
|
if (!((uint64*)ptr)[0] && !ptr[2])
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Check family name
|
||||||
|
if (spell->SpellFamilyName != GetSpellProto()->SpellFamilyName)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (((uint64*)ptr)[0] & spell->SpellFamilyFlags)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (ptr[2] & spell->SpellFamilyFlags2)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void Aura::ReapplyAffectedPassiveAuras( Unit* target, bool owner_mode )
|
void Aura::ReapplyAffectedPassiveAuras( Unit* target, bool owner_mode )
|
||||||
{
|
{
|
||||||
std::set<uint32> affectedSelf;
|
std::set<uint32> affectedSelf;
|
||||||
|
|
|
||||||
|
|
@ -436,6 +436,7 @@ class MANGOS_DLL_SPEC Aura
|
||||||
|
|
||||||
uint32 const *getAuraSpellClassMask() const { return m_spellAuraHolder->GetSpellProto()->GetEffectSpellClassMask(m_effIndex); }
|
uint32 const *getAuraSpellClassMask() const { return m_spellAuraHolder->GetSpellProto()->GetEffectSpellClassMask(m_effIndex); }
|
||||||
bool isAffectedOnSpell(SpellEntry const *spell) const;
|
bool isAffectedOnSpell(SpellEntry const *spell) const;
|
||||||
|
bool CanProcFrom(SpellEntry const *spell) const;
|
||||||
|
|
||||||
//SpellAuraHolder const* GetHolder() const { return m_spellHolder; }
|
//SpellAuraHolder const* GetHolder() const { return m_spellHolder; }
|
||||||
SpellAuraHolder* GetHolder() { return m_spellAuraHolder; }
|
SpellAuraHolder* GetHolder() { return m_spellAuraHolder; }
|
||||||
|
|
|
||||||
|
|
@ -9519,10 +9519,10 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
||||||
(spellProcEvent->spellFamilyMask2[i] & procSpell->SpellFamilyFlags2) == 0)
|
(spellProcEvent->spellFamilyMask2[i] & procSpell->SpellFamilyFlags2) == 0)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!spellProcEvent->schoolMask && !triggeredByAura->isAffectedOnSpell(procSpell))
|
else if (!spellProcEvent->schoolMask && !triggeredByAura->CanProcFrom(procSpell))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (!triggeredByAura->isAffectedOnSpell(procSpell))
|
else if (!triggeredByAura->CanProcFrom(procSpell))
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10217"
|
#define REVISION_NR "10218"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue