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

This commit is contained in:
Shauren
2025-01-12 00:24:45 +01:00
parent c8869403ab
commit 76ab2007c0

View File

@@ -5572,6 +5572,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);