diff options
author | megamage <none@none> | 2008-10-19 12:01:49 -0500 |
---|---|---|
committer | megamage <none@none> | 2008-10-19 12:01:49 -0500 |
commit | a3dea992f5d2b204a681146c6bfd74258ad27d43 (patch) | |
tree | 0058223f6bc07aeb973b2ec1b8ab1f2b3e97986b /src/game/Unit.cpp | |
parent | d936f1bbd8559b5757a84c13a289f42a86133408 (diff) |
[svn] Recalculate attack time in Unit::ApplyAttackTimePercentMod function.
Add Felmyst script.
Add Eredar twins script. Script provided by BroodWyrm.
Update Brutallus script. Patch provided by riddick. (Burn temporarily disabled)
Update void reaver script. Patch provided by Bagsac.
Fix a bug that Najentus causes server crash.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index bcac14b77aa..ddce852a728 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10647,6 +10647,7 @@ Unit* Unit::SelectNearbyTarget() const void Unit::ApplyAttackTimePercentMod( WeaponAttackType att,float val, bool apply ) { + float remainingTimePct = (float)m_attackTimer[att] / (GetAttackTime(att) * m_modAttackSpeedPct[att]); if(val > 0) { ApplyPercentModFloatVar(m_modAttackSpeedPct[att], val, !apply); @@ -10657,6 +10658,7 @@ void Unit::ApplyAttackTimePercentMod( WeaponAttackType att,float val, bool apply ApplyPercentModFloatVar(m_modAttackSpeedPct[att], -val, apply); ApplyPercentModFloatValue(UNIT_FIELD_BASEATTACKTIME+att,-val,apply); } + m_attackTimer[att] = uint32(GetAttackTime(att) * m_modAttackSpeedPct[att] * remainingTimePct); } void Unit::ApplyCastTimePercentMod(float val, bool apply ) |