aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2025-01-12 00:24:45 +0100
committerShauren <shauren.trinity@gmail.com>2025-01-12 00:24:45 +0100
commit76ab2007c0540542b892dd66e9287b394c54ee42 (patch)
tree6f7f32c53829c2cb0f4afce3552c690896d03f1d /src
parentc8869403ab727d1e95bd083aa6ef02a5177f937b (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
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/Spell.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index eb2c17b51ab..300a3155fff 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -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);