mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 01:15:35 +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;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ class _SpellScript
|
||||
EffectHook(uint8 _effIndex);
|
||||
virtual ~EffectHook() { }
|
||||
|
||||
uint8 GetAffectedEffectsMask(SpellInfo const* spellInfo);
|
||||
uint32 GetAffectedEffectsMask(SpellInfo const* spellInfo);
|
||||
bool IsEffectAffected(SpellInfo const* spellInfo, uint8 effIndex);
|
||||
virtual bool CheckEffect(SpellInfo const* spellInfo, uint8 effIndex) = 0;
|
||||
std::string EffIndexToString();
|
||||
|
||||
Reference in New Issue
Block a user