*Do not allow to cast cyclone on divine shielded target.
--HG-- branch : trunk
This commit is contained in:
@@ -799,6 +799,21 @@ bool IsDispelableBySpell(SpellEntry const * dispelSpell, uint32 spellId, bool de
|
|||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
else if (spellproto->Mechanic == MECHANIC_INVULNERABILITY)
|
||||||
|
{
|
||||||
|
if (dispelSpell->AttributesEx & SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((dispelSpell->AttributesEx & SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE)
|
||||||
|
|| (dispelSpell->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY))
|
||||||
|
return !def;
|
||||||
|
}
|
||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-12
@@ -9449,13 +9449,8 @@ bool Unit::IsImmunedToDamage(SpellSchoolMask shoolMask)
|
|||||||
|
|
||||||
bool Unit::IsImmunedToDamage(SpellEntry const* spellInfo)
|
bool Unit::IsImmunedToDamage(SpellEntry const* spellInfo)
|
||||||
{
|
{
|
||||||
if(spellInfo->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
uint32 shoolMask = GetSpellSchoolMask(spellInfo);
|
uint32 shoolMask = GetSpellSchoolMask(spellInfo);
|
||||||
if(!(spellInfo->AttributesEx &
|
if(spellInfo->Id != 42292 && spellInfo->Id !=59752)
|
||||||
(SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE | SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)) // can remove immune (by dispell or immune it)
|
|
||||||
&& spellInfo->Id != 42292)
|
|
||||||
{
|
{
|
||||||
//If m_immuneToSchool type contain this school type, IMMUNE damage.
|
//If m_immuneToSchool type contain this school type, IMMUNE damage.
|
||||||
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
|
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
|
||||||
@@ -9484,17 +9479,12 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo)
|
|||||||
if(itr->type == spellInfo->Id)
|
if(itr->type == spellInfo->Id)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if(spellInfo->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
SpellImmuneList const& dispelList = m_spellImmune[IMMUNITY_DISPEL];
|
SpellImmuneList const& dispelList = m_spellImmune[IMMUNITY_DISPEL];
|
||||||
for(SpellImmuneList::const_iterator itr = dispelList.begin(); itr != dispelList.end(); ++itr)
|
for(SpellImmuneList::const_iterator itr = dispelList.begin(); itr != dispelList.end(); ++itr)
|
||||||
if(itr->type == spellInfo->Dispel)
|
if(itr->type == spellInfo->Dispel)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if(!(spellInfo->AttributesEx &
|
if(spellInfo->Id != 42292 && spellInfo->Id !=59752)
|
||||||
(SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE | SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)) // can remove immune (by dispell or immune it)
|
|
||||||
&& spellInfo->Id != 42292)
|
|
||||||
{
|
{
|
||||||
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
|
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
|
||||||
for(SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr)
|
for(SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr)
|
||||||
|
|||||||
Reference in New Issue
Block a user