diff options
author | maximius <none@none> | 2009-11-01 17:53:07 -0800 |
---|---|---|
committer | maximius <none@none> | 2009-11-01 17:53:07 -0800 |
commit | b257a28fa9a9177df32845db8171d376bd6d4404 (patch) | |
tree | d1093029c66fc36a705aa0f344ba3a4fb77e36d5 /src/game/StatSystem.cpp | |
parent | 2b2b2a1d0ec0e8942b27047f6706f29775a00eb8 (diff) |
*Cleanup, fix many cases of unoptimized loops, potential crashes, excessively large data types, unnecessary or wrong casts, non-standardized function calls, and so on..
*Proper Maexxna Web Spray locations (old locations sent players flying into the air)
--HG--
branch : trunk
Diffstat (limited to 'src/game/StatSystem.cpp')
-rw-r--r-- | src/game/StatSystem.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index 7a57f62d416..8eb38ed830b 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -443,19 +443,20 @@ void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, bo if (IsInFeralForm()) //check if player is druid and in cat or bear forms { - uint32 lvl = getLevel(); - if ( lvl > 60 ) lvl = 60; + uint8 lvl = getLevel(); + if (lvl > 60) + lvl = 60; - weapon_mindamage = lvl*0.85*att_speed; - weapon_maxdamage = lvl*1.25*att_speed; + weapon_mindamage = lvl*0.85f*att_speed; + weapon_maxdamage = lvl*1.25f*att_speed; } else if(!CanUseAttackType(attType)) //check if player not in form but still can't use (disarm case) { //cannot use ranged/off attack, set values to 0 if (attType != BASE_ATTACK) { - min_damage=0; - max_damage=0; + min_damage = 0; + max_damage = 0; return; } weapon_mindamage = BASE_MINDAMAGE; @@ -478,7 +479,7 @@ void Player::UpdateDamagePhysical(WeaponAttackType attType) CalculateMinMaxDamage(attType, false, true, mindamage, maxdamage); - switch(attType) + switch (attType) { case BASE_ATTACK: default: |