|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
local WARN_WAIT_SECONDS = 60 * 10
local WARN_DAMAGE_THRESHOLD = 0.50
return object
end
if(DoesItemHaveDurability(BAG_WORN, slotId) and GetItemCondition(BAG_WORN, slotId) <= WARN_DAMAGE_THRESHOLD) then
return true
end
end
if(addOnName == "ZO_Ingame") then
if(secondsRemaining ~= nil) then
else
end
else
end
end
end
EVENT_MANAGER:RegisterForEvent("DurabilityWarner", EVENT_INVENTORY_FULL_UPDATE, OnInventoryFullUpdate)
end
end
EVENT_MANAGER:RegisterForEvent("DurabilityWarner", EVENT_INVENTORY_SINGLE_SLOT_UPDATE, OnInventorySingleSlotUpdate)
EVENT_MANAGER:RegisterForEvent("DurabilityWarner", EVENT_PLAYER_COMBAT_STATE, function() self:UpdateWarning() end)
end
end
if(not isInCombat) then
end
else
end
end
end
end
end
end
end
end
end
if(shouldWarn) then
if(not isInCombat) then
end
end
else
end
end
end
end
--Initialize
|