From c6fd91cd1dee1d9789d82357e32336aad52094e7 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sat, 11 Sep 2021 12:33:23 +0200 Subject: [PATCH] Core/Spells: Runic Empowerment will now only select runes which have a base rune that can be activated --- src/server/scripts/Spells/spell_dk.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index bfc127da57..988170a351 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -1167,15 +1167,24 @@ class spell_dk_runic_empowerment : public AuraScript } std::array depletedRunes = { }; + std::array availableBaseRunes = { }; + for (uint8 i = 0; i < MAX_RUNES; ++i) + { if (player->GetRuneCooldown(i)) - ++depletedRunes[player->GetBaseRune(i)]; + { + uint8 baseRune = player->GetBaseRune(i); + ++depletedRunes[baseRune]; + if (baseRune == player->GetCurrentRune(i)) + ++availableBaseRunes[baseRune]; + } + } // Selecting the runes that may proc. A fully depleted rune means that both runes of that type must be on cooldown. std::vector availableEnergizeSpells; for (uint8 runeType = 0; runeType < depletedRunes.size(); ++runeType) { - if (depletedRunes[runeType] < 2) + if (depletedRunes[runeType] < 2 || availableBaseRunes[runeType] == 0) continue; switch (RuneType(runeType))