mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Fix spell scripts for effect hooks greater than EFFECT_7
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user