mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user