Показать сообщение отдельно
Старый 18.12.2009, 16:16   #18
Mr.Grom
Not a Junior!
 
Аватар для Mr.Grom
 
Регистрация: 07.11.2009
Сообщений: 10
Сказал(а) спасибо: 4
Поблагодарили 45 раз(а) в 12 сообщениях
Mr.Grom Скоро придёт к известности
По умолчанию

Тестим
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 *itemuint8 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(itemapply);
+        
ApplyItemEquipSpell(item,apply);
+        
ApplyEnchantment(itemapply);
+
+        
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(slotapply);
 
-    
sLog.outDebug("_ApplyItemMods complete.");
 }
 
 
void Player::_ApplyItemBonuses(ItemPrototype const *protouint8 slotbool applybool only_level_scale /*= false*/
Поправил.

Последний раз редактировалось Mr.Grom; 19.12.2009 в 13:42.
Mr.Grom вне форума   Ответить с цитированием