[10957] Implement auras SPELL_AURA_MOD_DISARM_OFFHAND (254) and SPELL_AURA_MOD_DISARM_RANGED (278).

Thanks to Qsa prepare for mangos.

Note: single unsure case: is block chance must be show or set to 0 in shield disarm time.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
QAston 2011-01-04 05:20:56 +03:00 committed by VladimirMangos
parent 883e88fad5
commit 4fe41fb335
9 changed files with 76 additions and 30 deletions

View file

@ -431,20 +431,21 @@ void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, fl
float weapon_mindamage = GetWeaponDamageRange(attType, MINDAMAGE);
float weapon_maxdamage = GetWeaponDamageRange(attType, MAXDAMAGE);
if (IsInFeralForm()) //check if player is druid and in cat or bear forms
if (IsInFeralForm()) // check if player is druid and in cat or bear forms, non main hand attacks not allowed for this mode so not check attack type
{
uint32 lvl = getLevel();
if ( lvl > 60 ) lvl = 60;
if (lvl > 60)
lvl = 60;
weapon_mindamage = lvl*0.85f*att_speed;
weapon_maxdamage = lvl*1.25f*att_speed;
}
else if (!IsUseEquippedWeapon(attType==BASE_ATTACK)) //check if player not in form but still can't use weapon (broken/etc)
else if (!IsUseEquipedWeapon(attType)) // check if player not in form but still can't use weapon (broken/etc)
{
weapon_mindamage = BASE_MINDAMAGE;
weapon_maxdamage = BASE_MAXDAMAGE;
}
else if(attType == RANGED_ATTACK) //add ammo DPS to ranged damage
else if (attType == RANGED_ATTACK) // add ammo DPS to ranged damage
{
weapon_mindamage += GetAmmoDPS() * att_speed;
weapon_maxdamage += GetAmmoDPS() * att_speed;