*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
This commit is contained in:
maximius
2009-11-01 17:53:07 -08:00
parent 2b2b2a1d0e
commit b257a28fa9
34 changed files with 1088 additions and 1120 deletions

View File

@@ -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: