mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[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:
parent
883e88fad5
commit
4fe41fb335
9 changed files with 76 additions and 30 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue