Core/Spells: Don't grant runic power when death knight abilities that do it using negative power cost miss and the spell has SPELL_ATTR1_DISCOUNT_POWER_ON_MISS

(cherry picked from commit 76ab2007c0)
This commit is contained in:
Shauren
2025-01-12 00:24:45 +01:00
committed by Ovahlord
parent efb8ccc079
commit b195f45635

View File

@@ -5444,6 +5444,11 @@ void Spell::TakePower()
{
if (!hit)
{
// skipping granting power through negative cost only when spell has SPELL_ATTR1_DISCOUNT_POWER_ON_MISS is correct behavior
// tested with 206931 - Blooddrinker
if (cost.Amount < 0)
continue;
//lower spell cost on fail (by talent aura)
if (Player* modOwner = unitCaster->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo, SpellModOp::PowerCostOnMiss, cost.Amount);