[10218] Restore trinket procs when no specific spell is defined for proc

This commit is contained in:
Laise 2010-07-18 18:53:09 +03:00
parent 7bb8b2bedb
commit c384650af8
4 changed files with 27 additions and 3 deletions

View file

@ -910,6 +910,29 @@ bool Aura::isAffectedOnSpell(SpellEntry const *spell) const
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 )
{
std::set<uint32> affectedSelf;