All pastes #894903 Raw Edit

Untitled

public text v1 · immutable
·published 2008-02-07 12:02 UTC
rendered paste body
Index: game/SpellAuras.cpp
===================================================================
--- game/SpellAuras.cpp	(revision 5121)
+++ game/SpellAuras.cpp	(working copy)
@@ -2217,6 +2217,13 @@
     else
         m_target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISARMED);
 
+	if ( m_target->GetTypeId() == TYPEID_PLAYER )
+	{
+		Item* weaponItem = ((Player*)m_target)->GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_MAINHAND);
+		if ( weaponItem )
+			((Player*)m_target)->_ApplyItemBonuses(weaponItem->GetProto(),EQUIPMENT_SLOT_MAINHAND,!Apply);
+	}
+
     m_target->UpdateDamagePhysical(BASE_ATTACK);
 }