rendered paste body# HG changeset patch
# User thenecromancer
# Date 1252940062 -7200
# Branch trunk
# Node ID 521031034c94ce5773f80f1501eb334dd2f0ca69
# Parent 6f8ef87b0ba33a5c8be47f077b0370089545e8a2
Make Cobra Reflexes nurf pet damage
diff -r 6f8ef87b0ba3 -r 521031034c94 src/game/SpellAuras.cpp
--- a/src/game/SpellAuras.cpp Mon Sep 14 16:39:28 2009 +0200
+++ b/src/game/SpellAuras.cpp Mon Sep 14 16:54:22 2009 +0200
@@ -5327,10 +5327,8 @@
void AuraEffect::HandleModAttackSpeed(bool apply, bool Real, bool /*changeAmount*/)
{
- if(!m_target->isAlive() )
- return;
-
m_target->ApplyAttackTimePercentMod(BASE_ATTACK,m_amount,apply);
+ m_target->UpdateDamagePhysical(BASE_ATTACK);
}
void AuraEffect::HandleHaste(bool apply, bool Real, bool /*changeAmount*/)
diff -r 6f8ef87b0ba3 -r 521031034c94 src/game/StatSystem.cpp
--- a/src/game/StatSystem.cpp Mon Sep 14 16:39:28 2009 +0200
+++ b/src/game/StatSystem.cpp Mon Sep 14 16:54:22 2009 +0200
@@ -1321,6 +1321,22 @@
}
}
+
+ Unit::AuraEffectList const& mDummy = GetAurasByType(SPELL_AURA_MOD_ATTACKSPEED);
+ for(Unit::AuraEffectList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
+ {
+ switch ((*itr)->GetSpellProto()->Id)
+ {
+ case 61682:
+ case 61683:
+ mindamage = mindamage * (100.0f-float((*itr)->GetAmount()))/100.0f;
+ maxdamage = maxdamage * (100.0f-float((*itr)->GetAmount()))/100.0f;
+ break;
+ default:
+ break;
+ }
+ }
+
SetStatFloatValue(UNIT_FIELD_MINDAMAGE, mindamage);
SetStatFloatValue(UNIT_FIELD_MAXDAMAGE, maxdamage);
}