From 91722af07d0111f439c3c5f860db7af7cda938b5 Mon Sep 17 00:00:00 2001 From: Taracque Date: Wed, 29 May 2013 08:18:01 +0200 Subject: [PATCH] Dual Wield detected (frost priority will be adjusted by this) --- DKCrutch.lua | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/DKCrutch.lua b/DKCrutch.lua index d1a789e..0813a33 100755 --- a/DKCrutch.lua +++ b/DKCrutch.lua @@ -21,6 +21,7 @@ DKCrutch.depletedCount = 0 DKCrutch.events = {} DKCrutch.lastUpdate = GetTime(); DKCrutch.hasT15_4pcs = false; +DKCrutch.dualWield = false; DKCrutch.SpellList = { ["Outbreak"] = GetSpellInfo(77575), ["Icy Touch"] = GetSpellInfo(45477), @@ -120,13 +121,19 @@ function DKCrutch.events.PLAYER_ALIVE() end function DKCrutch.events.PLAYER_EQUIPMENT_CHANGED() + local _, itemType; + DKCrutch.hasT15_4pcs = DKCrutch:HasSetBonus( 138347, 4 ); + + _, _, _, _, _, _, _, _, itemType = GetItemInfo( GetInventoryItemID("player", GetInventorySlotInfo("MainHandSlot"))); + DKCrutch.dualWield = (itemType == "INVTYPE_WEAPON"); end function DKCrutch.events.PLAYER_ENTERING_WORLD() - DKCrutch.playerGUID = UnitGUID("player") - DKCrutch:detectTalent() - DKCrutch.hasT15_4pcs = DKCrutch:HasSetBonus( 138347, 4 ); + DKCrutch.playerGUID = UnitGUID("player"); + DKCrutch:detectTalent(); + + DKCrutch.events.PLAYER_EQUIPMENT_CHANGED(); end function DKCrutch.events.ACTIVE_TALENT_GROUP_CHANGED() -- 1.7.9.5