diff options
author | Machiavelli <none@none> | 2009-06-09 21:56:04 +0200 |
---|---|---|
committer | Machiavelli <none@none> | 2009-06-09 21:56:04 +0200 |
commit | 41baf8b0d34dba1bd579831fe77bcc785f857f9b (patch) | |
tree | 8807108a199e928a40b440529af19c50054ead63 | |
parent | 6578cce47133eb017a7ab6b14c91d6c5b80b226a (diff) |
* Fix bug in formula for Unit::GetAttackTime. This will hopefully fix over proccing of PPM based spells. It will also affect other spells that calculate damage / efficiency based on weapon speed.
--HG--
branch : trunk
-rw-r--r-- | src/game/Unit.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/Unit.h b/src/game/Unit.h index 0f75236b3c5..11b3a6307c2 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1100,7 +1100,12 @@ class TRINITY_DLL_SPEC Unit : public WorldObject void ApplyPowerMod(Powers power, uint32 val, bool apply); void ApplyMaxPowerMod(Powers power, uint32 val, bool apply); - uint32 GetAttackTime(WeaponAttackType att) const { return (uint32)(GetFloatValue(UNIT_FIELD_BASEATTACKTIME+att)/m_modAttackSpeedPct[att]); } + uint32 GetAttackTime(WeaponAttackType att) const + { + float f_BaseAttackTime = GetFloatValue(UNIT_FIELD_BASEATTACKTIME+att) / m_modAttackSpeedPct[att]; + return (uint32)f_BaseAttackTime; + } + void SetAttackTime(WeaponAttackType att, uint32 val) { SetFloatValue(UNIT_FIELD_BASEATTACKTIME+att,val*m_modAttackSpeedPct[att]); } void ApplyAttackTimePercentMod(WeaponAttackType att,float val, bool apply); void ApplyCastTimePercentMod(float val, bool apply); |