mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 10:37:06 +00:00
[10232] Fix mechanic-related check, thanks to VladimirMangos
This commit is contained in:
parent
0065693c4c
commit
d8c1374fcd
6 changed files with 14 additions and 8 deletions
|
|
@ -8748,16 +8748,22 @@ void SpellAuraHolder::RefreshHolder()
|
|||
SendAuraUpdate(false);
|
||||
}
|
||||
|
||||
bool SpellAuraHolder::HasAuraAndMechanicEffect(uint32 mechanic) const
|
||||
bool SpellAuraHolder::HasMechanic(uint32 mechanic) const
|
||||
{
|
||||
if (mechanic == m_spellProto->Mechanic)
|
||||
return true;
|
||||
|
||||
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
if (m_auras[i] && m_spellProto->EffectMechanic[i] == mechanic)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SpellAuraHolder::HasAuraAndMechanicEffectMask(uint32 mechanicMask) const
|
||||
bool SpellAuraHolder::HasMechanicMask(uint32 mechanicMask) const
|
||||
{
|
||||
if (mechanicMask & (1 << (m_spellProto->Mechanic - 1)))
|
||||
return true;
|
||||
|
||||
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
if (m_auras[i] && m_spellProto->EffectMechanic[i] & mechanicMask)
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue