Properly fix problems with applying/removing mods on disarmed items.

--HG--
branch : trunk
This commit is contained in:
silinoron
2010-08-07 16:40:33 -07:00
parent 5aa6bb2169
commit 36fffd9550

View File

@@ -7217,13 +7217,6 @@ void Player::_ApplyItemMods(Item *item, uint8 slot,bool apply)
if (!proto)
return;
// don't apply/remove mods if the weapon is disarmed
if (item->GetSlot() == EQUIPMENT_SLOT_MAINHAND && HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISARMED))
return;
if (proto->Socket[0].Color) //only (un)equipping of items with sockets can influence metagems, so no need to waste time with normal items
CorrectMetaGemEnchants(slot, apply);
// not apply/remove mods for broken item
if (item->IsBroken())
return;
@@ -7236,6 +7229,9 @@ void Player::_ApplyItemMods(Item *item, uint8 slot,bool apply)
if (!CanUseAttackType(attacktype))
return;
if (proto->Socket[0].Color) //only (un)equipping of items with sockets can influence metagems, so no need to waste time with normal items
CorrectMetaGemEnchants(slot, apply);
if (attacktype < MAX_ATTACK)
_ApplyWeaponDependentAuraMods(item,WeaponAttackType(attacktype),apply);