mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
Implement 267 SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL aura
Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
d57baebef9
commit
81a866fba7
2 changed files with 10 additions and 3 deletions
|
|
@ -8227,6 +8227,13 @@ bool Unit::IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) con
|
|||
for(SpellImmuneList::const_iterator itr = list.begin(); itr != list.end(); ++itr)
|
||||
if(itr->type == aura)
|
||||
return true;
|
||||
// Check for immune to application of harmful magical effects
|
||||
AuraList const& immuneAuraApply = GetAurasByType(SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL);
|
||||
for(AuraList::const_iterator iter = immuneAuraApply.begin(); iter != immuneAuraApply.end(); ++iter)
|
||||
if (spellInfo->Dispel == DISPEL_MAGIC && // Magic debuff
|
||||
((*iter)->GetModifier()->m_miscvalue & GetSpellSchoolMask(spellInfo)) && // Check school
|
||||
!IsPositiveEffect(spellInfo->Id, index)) // Harmful
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue