Jump to content

[9244][fix]Rime


Guest laise

Recommended Posts

What bug does the patch fix? What features does the patch add?

fixes Rime - proc, cd removing and rune cost part for Howling Blast

For which repository revision was the patch created?

9236

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

haven't seen any

Who has been writing this patch? Please include either forum user names or email addresses.

me

                 diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 91777de..01dee9e 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -3757,8 +3757,21 @@ SpellCastResult Spell::CheckRuneCost(uint32 runeCostID)
    for(uint32 i = 0; i < MAX_RUNES; ++i)
    {
        RuneType rune = plr->GetCurrentRune(i);
-        if((plr->GetRuneCooldown(i) == 0) && (runeCost[rune] > 0))
-            runeCost[rune]--;
+        if (runeCost[rune] > 0)
+        {   
+            int32 runeCostTemp = runeCost[rune] * 10000;
+            if(Player* modOwner = plr->GetSpellModOwner())
+                modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_COST, runeCostTemp, this);
+
+            if (runeCostTemp <= 0)
+            {
+                runeCost[rune]--;
+                continue;
+            }
+
+            if(plr->GetRuneCooldown(i) == 0)
+                runeCost[rune]--;
+        }
    }

    for(uint32 i = 0; i < RUNE_DEATH; ++i)
@@ -3800,15 +3813,28 @@ void Spell::TakeRunePower()
    for(uint32 i = 0; i < MAX_RUNES; ++i)
    {
        RuneType rune = plr->GetCurrentRune(i);
-        if((plr->GetRuneCooldown(i) == 0) && (runeCost[rune] > 0))
-        {
-            plr->SetRuneCooldown(i, RUNE_COOLDOWN);         // 5*2=10 sec
-            
+        if (runeCost[rune] > 0)
+        {
+            int32 runeCostTemp = runeCost[rune] * 10000;
+            if(Player* modOwner = plr->GetSpellModOwner())
+                modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_COST, runeCostTemp, this);
+
+            if (runeCostTemp <= 0)
+            {
+                runeCost[rune]--;
+                continue;
+            }
+
+            if(plr->GetRuneCooldown(i) == 0)
+            {
+                plr->SetRuneCooldown(i, RUNE_COOLDOWN);         // 5*2=10 sec
+                
-            runeCost[rune]--;
-        }
+                runeCost[rune]--;
+            }
+        }
    }

    runeCost[RUNE_DEATH] = runeCost[RUNE_BLOOD] + runeCost[RUNE_UNHOLY] + runeCost[RUNE_FROST];
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index dc1efb2..58eff5e 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -7719,6 +7719,13 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
                return false;
            break;
        }
+        // Freezing Fog (Rime triggered)
+        case 59052:
+        {
+            if (GetTypeId() == TYPEID_PLAYER)
+                ((Player*)this)->RemoveSpellCategoryCooldown(1248, true);
+            break;
+        }
        // Druid - Savage Defense
        case 62606:
        {

sql:

DELETE FROM spell_proc_event WHERE entry IN (49188,56822,59057);
INSERT INTO `spell_proc_event` VALUES
(49188, 0, 15, 0, 0x20000, 0, 0, 0, 0, 0, 0);
INSERT INTO `spell_chain` VALUES
(49188, 0, 49188, 1, 0);
INSERT INTO `spell_chain` VALUES
(56822, 49188, 49188, 2, 0);
INSERT INTO `spell_chain` VALUES
(59057, 56822, 49188, 3, 0);

Link to comment
Share on other sites

×
×
  • 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