parent
42f27f355d
commit
190e7a016a
1 changed files with 6 additions and 7 deletions
13
MyAddon.lua
13
MyAddon.lua
|
@ -34,6 +34,10 @@ MyAddon.taunts = {
|
||||||
[1161] = true, -- Challenging Shout
|
[1161] = true, -- Challenging Shout
|
||||||
[204079] = true -- Final Stand
|
[204079] = true -- Final Stand
|
||||||
}
|
}
|
||||||
|
MyAddon.slots = {
|
||||||
|
"HeadSlot", "ShoulderSlot", "ChestSlot", "WristSlot", "HandsSlot",
|
||||||
|
"WaistSlot", "LegsSlot", "FeetSlot", "MainHandSlot", "SecondaryHandSlot"
|
||||||
|
}
|
||||||
|
|
||||||
function MyAddon.OnEvent(self, event, ...)
|
function MyAddon.OnEvent(self, event, ...)
|
||||||
events[event](self, ...)
|
events[event](self, ...)
|
||||||
|
@ -137,13 +141,8 @@ function MyAddon.activateGoliath()
|
||||||
end
|
end
|
||||||
|
|
||||||
function MyAddon.needsRepair()
|
function MyAddon.needsRepair()
|
||||||
local slots = {
|
for slot = 1, #MyAddon.slots do
|
||||||
"HeadSlot", "ShoulderSlot", "ChestSlot", "WristSlot", "HandsSlot",
|
local id = GetInventorySlotInfo(MyAddon.slots[slot])
|
||||||
"WaistSlot", "LegsSlot", "FeetSlot", "MainHandSlot", "SecondaryHandSlot"
|
|
||||||
}
|
|
||||||
|
|
||||||
for slot = 1, #slots do
|
|
||||||
local id = GetInventorySlotInfo(slots[slot])
|
|
||||||
local cur, max = GetInventoryItemDurability(id)
|
local cur, max = GetInventoryItemDurability(id)
|
||||||
|
|
||||||
if max and cur ~= max then return true end
|
if max and cur ~= max then return true end
|
||||||
|
|
Loading…
Reference in a new issue