Jump to content

[8465] DK spells with no rune cost need active runes


Guest yavi
 Share

Recommended Posts

Description of the bug?

When a DK uses one of his runepower spells or necrosis while having runes on cooldown, he gets 'out of mana/energy' message and can't cast. (for example icebound fortitude while having frost runes on cooldown)

For which repository revision was the patch created?

8465

Who has been writing this patch?

me

Fix

CheckPower() does check rune cost even if a spell has PowerType != POWER_RUNE. Oddly, spells without rune cost still have costs in SpellRuneCost.dbc, so we get OOM message.

Check Rune cost only if powerType==POWER_RUNE

--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -5030,9 +5030,12 @@ SpellCastResult Spell::CheckPower()
        return SPELL_FAILED_UNKNOWN;
    }

-    SpellCastResult failReason = CheckRuneCost(m_spellInfo->runeCostID);
-    if(failReason != SPELL_CAST_OK)
-        return failReason;
+       if(m_spellInfo->powerType == POWER_RUNE)
+       {
+               SpellCastResult failReason = CheckRuneCost(m_spellInfo->runeCostID);
+               if(failReason != SPELL_CAST_OK)
+                       return failReason;
+       }

    // Check power amount
    Powers powerType = Powers(m_spellInfo->powerType);

Link to comment
Share on other sites

  • 3 weeks later...

Confirm Icebound Fortitude can't be use while having runes on cooldown.

Mind Freeze has the same problem.

MaNGOS/0.14.0 (* * Revision 8507 - *) for Linux_x64 (little-endian)
Using script library: ScriptDev2 (for MaNGOS 8443+) Revision [1399] 2009-09-16 16:05:05 (Unix)
Using World DB: PSDB WotLK (249)
Using creature EventAI: PSDB EventAI & ACID 3.0.0

Best regards.

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use