Core/Spells: Fix spell scripts for effect hooks greater than EFFECT_7

This commit is contained in:
Shocker
2015-05-27 18:33:51 +03:00
parent 8c75402199
commit cc3ddf23ce
2 changed files with 5 additions and 5 deletions

View File

@@ -64,9 +64,9 @@ _SpellScript::EffectHook::EffectHook(uint8 _effIndex)
effIndex = _effIndex;
}
uint8 _SpellScript::EffectHook::GetAffectedEffectsMask(SpellInfo const* spellEntry)
uint32 _SpellScript::EffectHook::GetAffectedEffectsMask(SpellInfo const* spellEntry)
{
uint8 mask = 0;
uint32 mask = 0;
if ((effIndex == EFFECT_ALL) || (effIndex == EFFECT_FIRST_FOUND))
{
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
@@ -74,13 +74,13 @@ uint8 _SpellScript::EffectHook::GetAffectedEffectsMask(SpellInfo const* spellEnt
if ((effIndex == EFFECT_FIRST_FOUND) && mask)
return mask;
if (CheckEffect(spellEntry, i))
mask |= (uint8)1<<i;
mask |= 1 << i;
}
}
else
{
if (CheckEffect(spellEntry, effIndex))
mask |= (uint8)1<<effIndex;
mask |= 1 << effIndex;
}
return mask;
}