diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-01-12 00:24:45 +0100 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2025-01-12 01:13:21 +0100 |
commit | b195f45635b1fe16d1b4ced0eb9bd80dfbd8f186 (patch) | |
tree | 7309084f7dc4327a2d043485f727eec18e910083 /src | |
parent | efb8ccc07922c97fa44911a5176d8dc7d721b6ff (diff) |
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 76ab2007c0540542b892dd66e9287b394c54ee42)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index b79a5ad6b13..887ae7660b4 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -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); |