Fixed an issue when no weapon equipped.
Taracque [03-01-14 - 09:25]
Fixed an issue when no weapon equipped.
diff --git a/DKCrutch.lua b/DKCrutch.lua
index e3570d2..4d75c4a 100755
--- a/DKCrutch.lua
+++ b/DKCrutch.lua
@@ -125,7 +125,7 @@ function DKCrutch.events.PLAYER_EQUIPMENT_CHANGED()
DKCrutch.hasT15_4pcs = DKCrutch:HasSetBonus( 138347, 4 );
_, itemSlot = GetInventorySlotInfo("MainHandSlot");
- if (itemSlot) then
+ if (itemSlot) and (GetInventoryItemID("player", itemSlot)) then
_, _, _, _, _, _, _, _, itemType = GetItemInfo( GetInventoryItemID("player", itemSlot));
DKCrutch.dualWield = (itemType == "INVTYPE_WEAPON");
end