Jump to content

[9025] Frozen Power


Guest KAPATEJIb

Recommended Posts

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

Fixes work of this talent

For which repository revision was the patch created?

89**

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

---

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

Beaste (aka Laise)

diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index b1c0786..103f4fb 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -6063,6 +6063,23 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
                return false;
                break;
            }
+            // Frozen Power
+            if (dummySpell->SpellIconID == 3780)
+            {
+                Unit *caster = triggeredByAura->GetCaster();
+
+                if (!procSpell || !caster)
+                    return false;
+
+                float distance = caster->GetDistance(pVictim);
+                int32 chance = triggerAmount;
+
+                if (distance < 15.0f || !roll_chance_i(chance))
+                    return false;
+
+                triggered_spell_id = 63685;
+                break;
+            }
            break;
        }
        case SPELLFAMILY_DEATHKNIGHT:

DELETE FROM `spell_proc_event` WHERE `entry` = 63373;
INSERT INTO `spell_proc_event` VALUES
(63373,0x00,11,0x80000000,0x00000000,0x00000000,0x00010000,0x00000000,0.000000,0.000000,0);

Link to comment
Share on other sites

  • 2 weeks later...
probably the damage part of the spell breaks roots early (race condition)

Yes, it needs something like this or this is the way how I solved it

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index f7ce356..5a53afe 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -2439,6 +2439,7 @@ void Spell::cancel()
void Spell::cast(bool skipCheck)
{
    SetExecutedCurrently(true);
+	bool immidiateHandle = true;

    // update pointers base at GUIDs to prevent access to non-existed already object
    UpdatePointers();
@@ -2488,6 +2489,8 @@ void Spell::cast(bool skipCheck)
                AddPrecastSpell(23230);                     // Blood Fury - Healing Reduction
            else if(m_spellInfo->Id == 20594)               // Stoneskin
                AddTriggeredSpell(65116);                   // Stoneskin - armor 10% for 8 sec
+			else if (m_spellInfo->Id == 14157)
+				immidiateHandle = false;					// Ruthlessness add combo point
            break;
        }
        case SPELLFAMILY_MAGE:
@@ -2556,6 +2567,8 @@ void Spell::cast(bool skipCheck)
            // Heroism
            else if (m_spellInfo->Id == 32182)
                AddPrecastSpell(57723);                     // Exhaustion
+			else if (m_spellInfo->Id == 63685)
+				immidiateHandle = false;					// Frozen Power root effect
            break;
        }
        default:
@@ -2592,7 +2619,7 @@ void Spell::cast(bool skipCheck)
    SendSpellGo();                                          // we must send smsg_spell_go packet before m_castItem delete in TakeCastItem()...

    // Okay, everything is prepared. Now we need to distinguish between immediate and evented delayed spells
-    if (m_spellInfo->speed > 0.0f)
+    if (m_spellInfo->speed > 0.0f || !immidiateHandle)
    {

        // Remove used for cast item if need (it can be already NULL after TakeReagents call

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