aboutsummaryrefslogtreecommitdiff
path: root/src/game/StatSystem.cpp
diff options
context:
space:
mode:
authorKudlaty <none@none>2009-10-31 01:50:52 +0100
committerKudlaty <none@none>2009-10-31 01:50:52 +0100
commit98d53f6a9d32462283cac9e43d31f8a0c132c53b (patch)
tree46e938328f91125b38dcbf6b49a553c18f93e35e /src/game/StatSystem.cpp
parenta5937d9d13f5071c1b54dc1c3fa9530a2494e778 (diff)
Fix Feeding Frenzy, Cobra Reflexes, Cornered. Now they are active only when victim hp is below certain percentage. Patch by thenecromancer, updated by krz
--HG-- branch : trunk
Diffstat (limited to 'src/game/StatSystem.cpp')
-rw-r--r--src/game/StatSystem.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp
index afda92829a3..7a57f62d416 100644
--- a/src/game/StatSystem.cpp
+++ b/src/game/StatSystem.cpp
@@ -1174,6 +1174,21 @@ void Guardian::UpdateDamagePhysical(WeaponAttackType attType)
}
}
+ 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);
}