*Resurrection sickness and similar debuffs are no longer dispelable.

--HG--
branch : trunk
This commit is contained in:
QAston
2010-07-26 19:27:28 +02:00
parent 66d8255625
commit fc4087cd98
5 changed files with 38 additions and 15 deletions
@@ -4273,7 +4273,7 @@ void AuraEffect::HandleAuraModSchoolImmunity(AuraApplication const * aurApp, uin
{
SpellEntry const *spell = iter->second->GetBase()->GetSpellProto();
if ((GetSpellSchoolMask(spell) & school_mask)//Check for school mask
&& IsDispelableBySpell(GetSpellProto(),spell->Id, true)
&& CanSpellDispelAura(GetSpellProto(),spell)
&& !iter->second->IsPositive() //Don't remove positive spells
&& spell->Id != GetId()) //Don't remove self
{
+28 -8
View File
@@ -3200,20 +3200,40 @@ bool SpellMgr::CanAurasStack(SpellEntry const *spellInfo_1, SpellEntry const *sp
return false;
}
bool IsDispelableBySpell(SpellEntry const * dispelSpell, uint32 spellId, bool def)
bool CanSpellDispelAura(SpellEntry const * dispelSpell, SpellEntry const * aura)
{
if (!dispelSpell) return false;
SpellEntry const *spellproto = sSpellStore.LookupEntry(spellId);
if (!spellproto) return false;
// Cyclone etc..
if (spellproto->AttributesEx & SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE)
// These auras (like ressurection sickness) can't be dispelled
if (aura->Attributes & SPELL_ATTR_NEGATIVE_1)
return false;
// These spells (like Mass Dispel) can dispell all auras
if (dispelSpell->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
return true;
return def;
// These auras (like Divine Shield) can't be dispelled
if (aura->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
return false;
// These auras (Cyclone for example) are not dispelable
if (aura->AttributesEx & SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE)
return false;
return true;
}
bool CanSpellPierceImmuneAura(SpellEntry const * pierceSpell, SpellEntry const * aura)
{
// these spells pierce all avalible spells (Resurrection Sickness for example)
if (pierceSpell->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
return true;
// these spells (Cyclone for example) can pierce all...
if ((pierceSpell->AttributesEx & SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE)
// ...but not these (Divine shield for example)
&& !(aura->AttributesEx & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY))
return true;
return false;
}
void SpellMgr::LoadSpellEnchantProcData()
+2 -1
View File
@@ -330,7 +330,8 @@ inline bool IsNonCombatSpell(SpellEntry const *spellInfo)
bool IsPositiveSpell(uint32 spellId);
bool IsPositiveEffect(uint32 spellId, uint32 effIndex);
bool IsPositiveTarget(uint32 targetA, uint32 targetB);
bool IsDispelableBySpell(SpellEntry const * dispelSpell, uint32 spellId, bool def = false);
bool CanSpellDispelAura(SpellEntry const * dispelSpell, SpellEntry const * aura);
bool CanSpellPierceImmuneAura(SpellEntry const * pierceSpell, SpellEntry const * aura);
bool IsSingleTargetSpell(SpellEntry const *spellInfo);
bool IsSingleTargetSpells(SpellEntry const *spellInfo1, SpellEntry const *spellInfo2);