*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
+2 -2
View File
@@ -11078,7 +11078,7 @@ bool Unit::IsImmunedToDamage(SpellEntry const* spellInfo)
//If m_immuneToSchool type contain this school type, IMMUNE damage.
SpellImmuneList const& schoolList = m_spellImmune[IMMUNITY_SCHOOL];
for (SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr)
if (itr->type & shoolMask &&!IsDispelableBySpell(spellInfo, itr->spellId))
if (itr->type & shoolMask && !CanSpellPierceImmuneAura(spellInfo, sSpellStore.LookupEntry(itr->spellId)))
return true;
}
@@ -11136,7 +11136,7 @@ bool Unit::IsImmunedToSpell(SpellEntry const* spellInfo)
for (SpellImmuneList::const_iterator itr = schoolList.begin(); itr != schoolList.end(); ++itr)
if ((itr->type & GetSpellSchoolMask(spellInfo))
&& !(IsPositiveSpell(itr->spellId) && IsPositiveSpell(spellInfo->Id))
&& !IsDispelableBySpell(spellInfo, itr->spellId))
&& !CanSpellPierceImmuneAura(spellInfo, sSpellStore.LookupEntry(itr->spellId)))
return true;
}
@@ -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);
@@ -336,9 +336,11 @@ struct instance_zulfarrak : public ScriptedInstance
//pop a add from list, send him up the stairs...
for (uint32 addCount = 0; addCount<count && !addsAtBase.empty(); addCount++)
{
Creature* add = instance->GetCreature(*addsAtBase.begin());
if (Creature* add = instance->GetCreature(*addsAtBase.begin()))
{
add->GetMotionMaster()->MovePath(PATH_ADDS,false);
movedadds.push_back(add->GetGUID());
}
addsAtBase.erase(addsAtBase.begin());
}
}