diff options
author | Ovahlord <dreadkiller@gmx.de> | 2024-12-20 17:16:32 +0100 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2024-12-20 17:16:32 +0100 |
commit | d353eb35a683e861d64f8ad72079406da3b7fef1 (patch) | |
tree | df62ba84ff56dd879af3d24df44d9bc7806ef07f /src | |
parent | 03f98136fefb4d1b70852e7090bd2fa6ba511892 (diff) |
Core/Spells: corrected SPELL_EFFECT_ACTIVATE_RUNE behavior for Classic
* this fixes blood rune activation
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index d74013183bf..2512ff80dd1 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -5941,15 +5941,12 @@ void Spell::EffectActivateRune() m_runesState = player->GetRunesState(); uint32 count = damage; - int32 miscValue = (1 << effectInfo->MiscValue); - - // Death Runes may also activate Blood Runes (Blood Tap) - if (miscValue & (1 << AsUnderlyingType(RuneType::Death))) - miscValue |= (1 << AsUnderlyingType(RuneType::Blood)); + RuneType runeType = static_cast<RuneType>(effectInfo->MiscValue); for (uint32 i = 0; i < MAX_RUNES && count > 0; ++i) { - if ((1 << AsUnderlyingType(player->GetCurrentRune(i))) & miscValue && G3D::fuzzyNe(player->GetRuneCooldown(i), 0.0f)) + // We will check for base and current rune because some spell effects also activate Death Runes while specifying Blood Runes in their misc value + if ((player->GetBaseRune(i) == runeType || player->GetCurrentRune(i) == runeType) && G3D::fuzzyNe(player->GetRuneCooldown(i), 0.0f)) { player->SetRuneCooldown(i, 0.0f); --count; |