[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
This commit is contained in:
megamage
2008-10-19 12:01:49 -05:00
parent d936f1bbd8
commit a3dea992f5
11 changed files with 1450 additions and 81 deletions
+2
View File
@@ -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 )