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

Port From (https://github.com/TrinityCore/TrinityCore/commit/76ab2007c0540542b892dd66e9287b394c54ee42)
This commit is contained in:
Hondacrx
2025-06-04 09:12:30 -04:00
parent 1fb0ef50cc
commit 3d4118962e
+5
View File
@@ -4741,6 +4741,11 @@ namespace Game.Spells
{
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)
Player modOwner = unitCaster.GetSpellModOwner();
if (modOwner != null)