Cleaned and tidied-up the mechanic immunity handler

--HG--
branch : trunk
This commit is contained in:
Xanadu
2010-03-24 20:35:04 +01:00
parent 99e186c830
commit 2f17cff295
2 changed files with 25 additions and 44 deletions

View File

@@ -939,7 +939,7 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
bool IsPositiveSpell(uint32 spellId)
{
if(!sSpellStore.LookupEntry(spellId)) // non-existing spells such as 61988 (Forbearance)
if(!sSpellStore.LookupEntry(spellId)) // non-existing spells
return false;
return !(spellmgr.GetSpellCustomAttr(spellId) & SPELL_ATTR_CU_NEGATIVE);
}
@@ -3783,6 +3783,10 @@ void SpellMgr::LoadSpellCustomAttr()
spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_CASTER;
count++;
break;
case 25771: // Forbearance - wrong mechanic immunity in DBC since 3.0.x
spellInfo->EffectMiscValue[0] = MECHANIC_IMMUNE_SHIELD;
count++;
break;
default:
break;
}