<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>CallbackHandler-1.0.lua</filename>
    </added>
    <added>
      <filename>LibDataBroker-1.1/LibDataBroker-1.1.lua</filename>
    </added>
    <added>
      <filename>LibStub.lua</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -3,6 +3,7 @@
 local SLOTIDS, FONTSIZE = {}, 12
 for _,slot in pairs({&quot;Head&quot;, &quot;Shoulder&quot;, &quot;Chest&quot;, &quot;Waist&quot;, &quot;Legs&quot;, &quot;Feet&quot;, &quot;Wrist&quot;, &quot;Hands&quot;, &quot;MainHand&quot;, &quot;SecondaryHand&quot;, &quot;Ranged&quot;}) do SLOTIDS[slot] = GetInventorySlotInfo(slot .. &quot;Slot&quot;) end
 local frame = CreateFrame(&quot;Frame&quot;, nil, CharacterFrame)
+local dataobj = LibStub:GetLibrary(&quot;LibDataBroker-1.1&quot;):NewDataObject(&quot;tekability&quot;, {text = &quot;100%&quot;})
 
 
 local function RYGColorGradient(perc)
@@ -30,8 +31,8 @@ local fontstrings = setmetatable({}, {
 })
 
 
-function frame:OnEvent(event)
-	if event == &quot;ADDON_LOADED&quot; then
+function frame:OnEvent(event, addon)
+	if event == &quot;ADDON_LOADED&quot; and addon:lower() ~= &quot;tekability&quot; then
 		for i,fstr in pairs(fontstrings) do
 			-- Re-apply the font, so that we catch any changes to NumberFontNormal by addons like ClearFont
 			local font, _, flags = NumberFontNormal:GetFont()
@@ -42,10 +43,12 @@ function frame:OnEvent(event)
 
 	if not CharacterFrame:IsVisible() then return end
 
+	local s1, s2 = 0, 0
 	for slot,id in pairs(SLOTIDS) do
 		local v1, v2 = GetInventoryItemDurability(id)
 
 		if v1 and v2 and v2 ~= 0 then
+			s1, s2 = s1 + v1, s2 + v2
 			local str = fontstrings[slot]
 			str:SetTextColor(RYGColorGradient(v1/v2))
 			str:SetText(string.format(&quot;%d%%&quot;, v1/v2*100))
@@ -54,17 +57,49 @@ function frame:OnEvent(event)
 			if str then str:SetText(nil) end
 		end
 	end
+
+	if s2 &gt; 0 then
+		local r,g,b = RYGColorGradient(s1/s2)
+		dataobj.text = string.format(&quot;|cff%02x%02x%02x%d%%&quot;, r*255, g*255, b*255, s1/s2*100)
+	else dataobj.text = &quot;---&quot; end
 end
 
 
 frame:SetScript(&quot;OnEvent&quot;, frame.OnEvent)
 frame:RegisterEvent(&quot;ADDON_LOADED&quot;)
-frame:SetScript(&quot;OnHide&quot;, function() frame:UnregisterEvent(&quot;UNIT_INVENTORY_CHANGED&quot;) end)
-frame:SetScript(&quot;OnShow&quot;, function()
-	frame:RegisterEvent(&quot;UNIT_INVENTORY_CHANGED&quot;)
-	frame:GetScript(&quot;OnEvent&quot;)(&quot;UNIT_INVENTORY_CHANGED&quot;)
-end)
+frame:RegisterEvent(&quot;UNIT_INVENTORY_CHANGED&quot;)
+
+
+------------------------
+--      Tooltip!      --
+------------------------
+
+local function GetTipAnchor(frame)
+	local x,y = frame:GetCenter()
+	if not x or not y then return &quot;TOPLEFT&quot;, &quot;BOTTOMLEFT&quot; end
+	local hhalf = (x &gt; UIParent:GetWidth()*2/3) and &quot;RIGHT&quot; or (x &lt; UIParent:GetWidth()/3) and &quot;LEFT&quot; or &quot;&quot;
+	local vhalf = (y &gt; UIParent:GetHeight()/2) and &quot;TOP&quot; or &quot;BOTTOM&quot;
+	return vhalf..hhalf, frame, (vhalf == &quot;TOP&quot; and &quot;BOTTOM&quot; or &quot;TOP&quot;)..hhalf
+end
+
+
+function dataobj.OnLeave() GameTooltip:Hide() end
+
+
+function dataobj.OnEnter(self)
+ 	GameTooltip:SetOwner(self, &quot;ANCHOR_NONE&quot;)
+	GameTooltip:SetPoint(GetTipAnchor(self))
+	GameTooltip:ClearLines()
 
+	GameTooltip:AddLine(&quot;tekability&quot;)
 
--- Handle LoD
-if CharacterFrame:IsVisible() then frame:GetScript(&quot;OnShow&quot;)() end
+	for slot,id in pairs(SLOTIDS) do
+		local v1, v2 = GetInventoryItemDurability(id)
+
+		if v1 and v2 and v2 ~= 0 then
+			GameTooltip:AddDoubleLine(slot, string.format(&quot;%d%%&quot;, v1/v2*100), 1, 1, 1, RYGColorGradient(v1/v2))
+		end
+	end
+
+	GameTooltip:Show()
+end</diff>
      <filename>tekability.lua</filename>
    </modified>
    <modified>
      <diff>@@ -4,13 +4,17 @@
 ## Notes: Simple item durability readout in the character frame.
 ## Author: Tekkub Stoutwrithe
 ## Version: Alpha
-## X-Credits: Fizzle by phyber
-## X-Website: http://code.google.com/p/tekkub-wow/
+## X-Website: http://www.tekkub.net/
 ## X-Email: tekkub-wow@googlegroups.com
 ## X-Category: Inventory
+## X-Credits: Fizzle by phyber
 
 ## LoadManagers: AddonLoader
 ## X-LoadOn-Hooks: CharacterFrame_OnShow
 ## X-LoadOn-CharacterFrame_OnShow: LoadAddOn('tekability')
 
+LibStub.lua
+CallbackHandler-1.0.lua
+LibDataBroker-1.1\LibDataBroker-1.1.lua
+
 tekability.lua</diff>
      <filename>tekability.toc</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>5ea927aa250b416efe03567a26dc915ed437cba7</id>
    </parent>
  </parents>
  <author>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </author>
  <url>http://github.com/tekkub/tekability/commit/3ff679fa3a40d7d3845bb662daecc90a2cc9eb2e</url>
  <id>3ff679fa3a40d7d3845bb662daecc90a2cc9eb2e</id>
  <committed-date>2008-07-12T14:24:58-07:00</committed-date>
  <authored-date>2008-07-12T14:24:58-07:00</authored-date>
  <message>Add LDB feed</message>
  <tree>ab82d1c97f2025176ff38e1686b51af64c4cbf26</tree>
  <committer>
    <name>Tekkub</name>
    <email>tekkub@gmail.com</email>
  </committer>
</commit>
