mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-29 13:22:48 +01:00
*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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user