Jump to content

[fix] hunter vs. wild


pasdVn

Recommended Posts

http://www.wowhead.com/?spell=56339

Nothing else but the tooltip says that this aura has also to do anything with the pet. At least I did not find anything:( So here is a very "direct" version. Maybe anyone has a better Idea?

From 79ebf214c709d61078fc920c3616a9c1d628fcce Mon Sep 17 00:00:00 2001
From: pasdVn <[email protected]>
Date: Thu, 19 Feb 2009 10:21:58 +0100
Subject: [PATCH] apply aura 56339 (and ranks) to pet aswell

---
src/game/StatSystem.cpp |    8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index 9d40f59..e1f511f 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -965,7 +965,13 @@ void Pet::UpdateAttackPowerAndDamage(bool ranged)
        {
            bonusAP = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.22f;
            SetBonusDamage( int32(owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.1287f));
-        }
+
+            // hunter vs. wild
+            AuraList const& APofOwnerStat = owner->GetAurasByType(SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT);
+            for( AuraList::const_iterator i = APofOwnerStat.begin(); i != APofOwnerStat.end(); ++i)
+                if( (*i)->GetSpellProto()->SpellIconID == 3647 )
+                    bonusAP += int32(owner->GetStat(Stats((*i)->GetModifier()->m_miscvalue)) * (*i)->GetModifier()->m_amount / 100.0f);
+        }
        //demons benefit from warlocks shadow or fire damage
        else if(getPetType() == SUMMON_PET && owner->getClass() == CLASS_WARLOCK)
        {
-- 
1.6.0.2.1172.ga5ed0

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