Jump to content

[fix]Survival of the Fittest(Armor)


Auntie Mangos

Recommended Posts

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

adds armor increase part for Bear/Dire Bear forms

For which repository revision was the patch created?

9348

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

http://getmangos.eu/community/showthread.php?7049-[bug][7460]-Druid-talent-Survival-of-the-Fittest

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 0272644..775fc79 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -5848,7 +5848,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
            if (MasterShaperSpellId)
            {
                Unit::AuraList const& ShapeShifterAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
-                for(Unit::AuraList::const_iterator i = ShapeShifterAuras.begin(); i != ShapeShifterAuras.end(); i++)
+                for(Unit::AuraList::const_iterator i = ShapeShifterAuras.begin(); i != ShapeShifterAuras.end(); ++i)
                {
                    if ((*i)->GetSpellProto()->SpellIconID == 2851)
                    {
@@ -5879,7 +5879,7 @@ void Aura::HandleShapeshiftBoosts(bool apply)
            if (form == FORM_MOONKIN)
            {
                Unit::AuraList const& dummyAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
-                for(Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); i++)
+                for(Unit::AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i)
                {
                    if ((*i)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_DRUID &&
                        (*i)->GetSpellProto()->SpellIconID == 2855)
@@ -5901,7 +5901,24 @@ void Aura::HandleShapeshiftBoosts(bool apply)
                    }
                }
            }
-
+            
+            // Survival of the Fittest (Armor part)
+            if (form == FORM_BEAR || form == FORM_DIREBEAR)
+            {
+                Unit::AuraList const& modAuras = m_target->GetAurasByType(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE);
+                for (Unit::AuraList::const_iterator i = modAuras.begin(); i != modAuras.end(); ++i)
+                {
+                    if ((*i)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_DRUID &&
+                        (*i)->GetSpellProto()->SpellIconID == 961)
+                    {
+                        int32 bp = (*i)->GetSpellProto()->CalculateSimpleValue(2);
+                        if (bp)
+                            m_target->CastCustomSpell(m_target, 62069, &bp, NULL, NULL, true, NULL, this);
+                        break;
+                    }
+                }
+            }
+            
            // Heart of the Wild
            if (HotWSpellId)
            {

Link to comment
Share on other sites

  • 40 years later...
Guest
This topic is now closed to further replies.
×
×
  • 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