Core/Items: Implemented new item flag ITEM_FLAG3_DUAL_WIELD_NOT_REQUIRED used by feral and bear artifacts

This commit is contained in:
Shauren
2016-08-18 16:52:33 +02:00
parent d9aca10221
commit df0d8eb9ba
3 changed files with 16 additions and 6 deletions
+4 -2
View File
@@ -375,8 +375,10 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
else
{
UpdateDamagePhysical(BASE_ATTACK);
if (CanDualWield() && haveOffhandWeapon()) //allow update offhand damage only if player knows DualWield Spec and has equipped offhand weapon
UpdateDamagePhysical(OFF_ATTACK);
if (Item* offhand = GetWeaponForAttack(OFF_ATTACK, true))
if (CanDualWield() || offhand->GetTemplate()->GetFlags3() & ITEM_FLAG3_DUAL_WIELD_NOT_REQUIRED)
UpdateDamagePhysical(OFF_ATTACK);
if (HasAuraType(SPELL_AURA_MOD_SPELL_DAMAGE_OF_ATTACK_POWER) ||
HasAuraType(SPELL_AURA_MOD_SPELL_HEALING_OF_ATTACK_POWER) ||
HasAuraType(SPELL_AURA_OVERRIDE_SPELL_POWER_BY_AP_PCT))