Jump to content

[patch] [8263] Master Shapeshifter


Guest Neveragain

Recommended Posts

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

It fixes the Master Shapeshifter talent.

For which repository revision was the patch created?

8262

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

Don't know.

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

Me.

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index cbf381b..0518071 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -5383,16 +5383,19 @@ void Aura::HandleShapeshiftBoosts(bool apply)
    uint32 spellId = 0;
    uint32 spellId2 = 0;
    uint32 HotWSpellId = 0;
+    uint32 MasterShaperSpellId = 0;

    switch(GetModifier()->m_miscvalue)
    {
        case FORM_CAT:
            spellId = 3025;
            HotWSpellId = 24900;
+            MasterShaperSpellId = 48420;
            break;
        case FORM_TREE:
            spellId = 5420;
            spellId2 = 34123;
+            MasterShaperSpellId = 48422;
            break;
        case FORM_TRAVEL:
            spellId = 5419;
@@ -5404,11 +5407,13 @@ void Aura::HandleShapeshiftBoosts(bool apply)
            spellId = 1178;
            spellId2 = 21178;
            HotWSpellId = 24899;
+            MasterShaperSpellId = 48418;
            break;
        case FORM_DIREBEAR:
            spellId = 9635;
            spellId2 = 21178;
            HotWSpellId = 24899;
+            MasterShaperSpellId = 48418;
            break;
        case FORM_BATTLESTANCE:
            spellId = 21156;
@@ -5423,6 +5428,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
            spellId = 24905;
            // aura from effect trigger spell
            spellId2 = 24907;
+            MasterShaperSpellId = 48421;
            break;
        case FORM_FLIGHT:
            spellId = 33948;
@@ -5471,6 +5477,21 @@ void Aura::HandleShapeshiftBoosts(bool apply)
                if (spellInfo->Stances & (1<<form))
                    m_target->CastSpell(m_target, itr->first, true, NULL, this);
            }
+
+            // Master Shapeshifter
+            if (MasterShaperSpellId)
+            {
+                Unit::AuraList const& ShapeShifterAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
+                for(Unit::AuraList::const_iterator i = ShapeShifterAuras.begin(); i != ShapeShifterAuras.end(); i++)
+                {
+                    if ((*i)->GetSpellProto()->SpellIconID == 2851)
+                    {
+                        int32 ShiftMod = (*i)->GetModifier()->m_amount;
+                        m_target->CastCustomSpell(m_target, MasterShaperSpellId, &ShiftMod, NULL, NULL, true);
+                    }
+                }
+            }
+
            //LotP
            if (((Player*)m_target)->HasSpell(17007))
            {
@@ -5501,6 +5522,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
    {
        m_target->RemoveAurasDueToSpell(spellId);
        m_target->RemoveAurasDueToSpell(spellId2);
+        m_target->RemoveAurasDueToSpell(MasterShaperSpellId);

        Unit::AuraMap& tAuras = m_target->GetAuras();
        for (Unit::AuraMap::iterator itr = tAuras.begin(); itr != tAuras.end()

Link to comment
Share on other sites

fatal: corrupt patch at line 76.

Count the lines of context at the end of the patch. If there are three (default number), just add a new line without any spaces and try applying again. This is just a quirk of posting patches on forums, blank lines are not added. Patch applied fine for me.

Link to comment
Share on other sites

In loop by ShapeShifterAuras you need break at success.

Another case ofc put it in Unit::HandleDummyAuraProc as suggested in

http://getmangos.ru/forum/showthread.php?t=19663&highlight=Master+Shapeshifter

But i think in case: (1) not set proc flags in spell.dbc and expection add at apply and remove at !apply cleary show that it better

proccess as you suggest in Aura::HandleShapeshiftBoosts...

In [8263]. Thank you :)

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