[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

@ -7282,14 +7282,14 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool appl
ApplyFeralAPBonus(feral_bonus, apply);
}
// Druids get feral AP bonus from weapon dps (also use DPS from ScalingStatValue)
if(getClass() == CLASS_DRUID)
if (getClass() == CLASS_DRUID)
{
int32 feral_bonus = proto->getFeralBonus(extraDPS);
if (feral_bonus > 0)
ApplyFeralAPBonus(feral_bonus, apply);
}
if(!IsUseEquippedWeapon(slot==EQUIPMENT_SLOT_MAINHAND))
if (!IsUseEquipedWeapon(attType))
return;
if (proto->Delay)
@ -9095,7 +9095,7 @@ Item* Player::GetWeaponForAttack(WeaponAttackType attackType, bool nonbroken, bo
if (!item || item->GetProto()->Class != ITEM_CLASS_WEAPON)
return NULL;
if (useable && !IsUseEquippedWeapon(attackType==BASE_ATTACK))
if (useable && !IsUseEquipedWeapon(attackType))
return NULL;
if (nonbroken && item->IsBroken())
@ -9110,10 +9110,10 @@ Item* Player::GetShield(bool useable) const
if (!item || item->GetProto()->Class != ITEM_CLASS_ARMOR)
return NULL;
if(!useable)
if (!useable)
return item;
if( item->IsBroken())
if (item->IsBroken() || !IsUseEquipedWeapon(OFF_ATTACK))
return NULL;
return item;