[11288] Check IsPositiveEffect in IsPositiveSpell only for existed effects.

Thanks to NoFantasy for problem research.

Also make IsPositiveEffect use SpellEntry* arg instead spell id.
This commit is contained in:
VladimirMangos 2011-03-26 03:05:48 +03:00
parent dae28ae93a
commit 989d229968
9 changed files with 24 additions and 21 deletions

View file

@ -783,7 +783,7 @@ void Spell::prepareDataForTriggerSystem()
// avoid triggering negative hit for only positive targets
m_negativeEffectMask = 0x0;
for (int i = 0; i < MAX_EFFECT_INDEX; ++i)
if (!IsPositiveEffect(m_spellInfo->Id, SpellEffectIndex(i)))
if (!IsPositiveEffect(m_spellInfo, SpellEffectIndex(i)))
m_negativeEffectMask |= (1<<i);
// Hunter traps spells (for Entrapment trigger)
@ -1832,7 +1832,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
SpellTargets targetB = SPELL_TARGETS_AOE_DAMAGE;
// Select friendly targets for positive effect
if (IsPositiveEffect(m_spellInfo->Id, effIndex))
if (IsPositiveEffect(m_spellInfo, effIndex))
targetB = SPELL_TARGETS_FRIENDLY;
UnitList tempTargetUnitMap;