Some changes to immunities
--HG-- branch : trunk
This commit is contained in:
@@ -293,7 +293,7 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = {
|
|||||||
#define SPELL_ATTR_EX_UNK13 0x00002000 // 13
|
#define SPELL_ATTR_EX_UNK13 0x00002000 // 13
|
||||||
#define SPELL_ATTR_EX_STACK_FOR_DIFF_CASTERS 0x00004000 // 14
|
#define SPELL_ATTR_EX_STACK_FOR_DIFF_CASTERS 0x00004000 // 14
|
||||||
#define SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY 0x00008000 // 15 remove auras on immunity
|
#define SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY 0x00008000 // 15 remove auras on immunity
|
||||||
#define SPELL_ATTR_EX_UNK16 0x00010000 // 16 on immuniy
|
#define SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE 0x00010000 // 16 on immuniy
|
||||||
#define SPELL_ATTR_EX_UNAUTOCASTABLE_BY_PET 0x00020000 // 17
|
#define SPELL_ATTR_EX_UNAUTOCASTABLE_BY_PET 0x00020000 // 17
|
||||||
#define SPELL_ATTR_EX_UNK18 0x00040000 // 18
|
#define SPELL_ATTR_EX_UNK18 0x00040000 // 18
|
||||||
#define SPELL_ATTR_EX_CANT_TARGET_SELF 0x00080000 // 19 Applies only to unit target - for example Divine Intervention (19752)
|
#define SPELL_ATTR_EX_CANT_TARGET_SELF 0x00080000 // 19 Applies only to unit target - for example Divine Intervention (19752)
|
||||||
|
|||||||
@@ -3161,7 +3161,8 @@ bool IsDispelableBySpell(SpellEntry const * dispelSpell, uint32 spellId, bool de
|
|||||||
SpellEntry const *spellproto = sSpellStore.LookupEntry(spellId);
|
SpellEntry const *spellproto = sSpellStore.LookupEntry(spellId);
|
||||||
if (!spellproto) return false;
|
if (!spellproto) return false;
|
||||||
|
|
||||||
if (spellproto->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
|
// Cyclone etc..
|
||||||
|
if (spellproto->AttributesEx & SPELL_ATTR_EX_UNAFFECTED_BY_SCHOOL_IMMUNE)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(dispelSpell->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
|
if(dispelSpell->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY)
|
||||||
|
|||||||
@@ -10738,6 +10738,9 @@ 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->Id != 42292 && spellInfo->Id !=59752)
|
if (spellInfo->Id != 42292 && spellInfo->Id !=59752)
|
||||||
{
|
{
|
||||||
@@ -10768,6 +10771,9 @@ 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;
|
||||||
|
|
||||||
if (spellInfo->Dispel)
|
if (spellInfo->Dispel)
|
||||||
{
|
{
|
||||||
SpellImmuneList const& dispelList = m_spellImmune[IMMUNITY_DISPEL];
|
SpellImmuneList const& dispelList = m_spellImmune[IMMUNITY_DISPEL];
|
||||||
|
|||||||
Reference in New Issue
Block a user