Тестим
PHP код:
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 441db45..39190a5 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -6684,36 +6684,39 @@ void Player::DuelComplete(DuelCompleteType type)
void Player::_ApplyItemMods(Item *item, uint8 slot,bool apply)
{
- if(slot >= INVENTORY_SLOT_BAG_END || !item)
- return;
-
- // not apply/remove mods for broken item
- if(item->IsBroken())
+ if (slot >= INVENTORY_SLOT_BAG_END || !item)
return;
ItemPrototype const *proto = item->GetProto();
-
- if(!proto)
+ if (!proto)
return;
- sLog.outDetail("applying mods for item %u ",item->GetGUIDLow());
+ // not apply/remove mods for broken item
+ if (!item->IsBroken())
+ {
+ sLog.outDetail("applying mods for item %u ",item->GetGUIDLow());
+ uint8 attacktype = Player::GetAttackBySlot(slot);
- uint32 attacktype = Player::GetAttackBySlot(slot);
- if(attacktype < MAX_ATTACK)
- _ApplyWeaponDependentAuraMods(item,WeaponAttackType(attacktype),apply);
+ //check disarm only on mod apply to allow remove item mods
+ /*if (!CanUseAttackType(attacktype))
+ return;*/
+ if (attacktype < MAX_ATTACK)
+ _ApplyWeaponDependentAuraMods(item,WeaponAttackType(attacktype),apply);
- _ApplyItemBonuses(proto,slot,apply);
+ _ApplyItemBonuses(proto,slot,apply);
- if( slot==EQUIPMENT_SLOT_RANGED )
- _ApplyAmmoBonuses();
+ if (slot==EQUIPMENT_SLOT_RANGED)
+ _ApplyAmmoBonuses();
- ApplyItemEquipSpell(item,apply);
- ApplyEnchantment(item, apply);
+ ApplyItemEquipSpell(item,apply);
+ ApplyEnchantment(item, apply);
+
+ sLog.outDebug("_ApplyItemMods complete.");
+ }
- if(proto->Socket***91;0***93;.Color) //only (un)equipping of items with sockets can influence metagems, so no need to waste time with normal items
+ if (proto->Socket***91;0***93;.Color) //only (un)equipping of items with sockets can influence metagems, so no need to waste time with normal items
CorrectMetaGemEnchants(slot, apply);
- sLog.outDebug("_ApplyItemMods complete.");
}
void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool apply, bool only_level_scale /*= false*/)
Поправил.