Mercurial > wow > askmrrobot
diff ui/Components.lua @ 17:e77e01abce98
Warlords of Draenor pre-patch
author | Adam tegen <adam.tegen@gmail.com> |
---|---|
date | Mon, 13 Oct 2014 21:28:32 -0500 |
parents | ece9167c0d1c |
children |
line wrap: on
line diff
--- a/ui/Components.lua Thu Jul 10 15:32:11 2014 -0700 +++ b/ui/Components.lua Mon Oct 13 21:28:32 2014 -0500 @@ -77,11 +77,6 @@ end end -function AskMrRobot.getItemIdFromLink(item) - if not item then return 0 end - local id = tonumber (item:match ("item:(%d+):%d+:%d+:%d+:%d+:%d+:%-?%d+:%-?%d+:%d+:%d+")) - return (id and id ~= 0 and id or 0) -end -- initialize the Frame class (inherit from a dummy frame) AskMrRobot.Frame = AskMrRobot.inheritsFrom(CreateFrame("Frame")) @@ -97,37 +92,3 @@ -- return the instance of the Frame return o end - -local MAINHAND = nil -local OFFHAND = nil - -AskMrRobot.slotNames = {"HeadSlot", "NeckSlot", "ShoulderSlot", "BackSlot", "ChestSlot", "ShirtSlot", "TabardSlot", "WristSlot", "HandsSlot", "WaistSlot", "LegsSlot", "FeetSlot", "Finger0Slot", "Finger1Slot", "Trinket0Slot", "Trinket1Slot", "MainHandSlot", "SecondaryHandSlot", "AmmoSlot" }; -AskMrRobot.OptimizationSlots = {} -AskMrRobot.slotIdToSlotNum = {} -AskMrRobot.slotIds = {}; -for slotNum = 1, #AskMrRobot.slotNames do - local slotId = GetInventorySlotInfo(AskMrRobot.slotNames[slotNum]) - AskMrRobot.slotIds[slotNum] = slotId - AskMrRobot.slotIdToSlotNum[slotId] = slotNum - local slotName = AskMrRobot.slotNames[slotNum] - if slotName == "MainHandSlot" then - MAINHAND = slotNum - end - if slotName == "SecondaryHandSlot" then - OFFHAND = slotNum - end - if slotName ~= "TabardSlot" and slotName ~= "AmmoSlot" and slotName ~= "ShirtSlot" then - AskMrRobot.OptimizationSlots[slotNum] = true - end - -end - -AskMrRobot.sortedSlots = {[MAINHAND] = 1, [OFFHAND] = 2} - -local i = 3 -for slotNum = 1, #AskMrRobot.slotNames do - if slotNum ~= MAINHAND and slotNum ~= OFFHAND then - AskMrRobot.sortedSlots[slotNum] = i - i = i + 1 - end -end \ No newline at end of file