Quantcast

Fixed durability color callback

p3lim-52096 [11-06-08 - 16:39]
Fixed durability color callback

git-svn-id: svn://svn.wowinterface.com/pMinimap-54/trunk@54 ae24c21f-2f0c-4c94-9256-0092abe71e0d
Filename
pMinimap_Durability/pMinimap_Durability.lua
diff --git a/pMinimap_Durability/pMinimap_Durability.lua b/pMinimap_Durability/pMinimap_Durability.lua
index 8d821f3..61cd994 100644
--- a/pMinimap_Durability/pMinimap_Durability.lua
+++ b/pMinimap_Durability/pMinimap_Durability.lua
@@ -1 +1 @@
-function pMinimap:UPDATE_INVENTORY_ALERTS()
	local maxStatus = 0
	for id in pairs(INVENTORY_ALERT_STATUS_SLOTS) do
		local status = GetInventoryAlertStatus(id)
		if(status > maxStatus) then
			maxStatus = status
		end
	end

	local color = INVENTORY_ALERT_COLORS[maxStatus]
	if(color) then
		Minimap:SetBackdropColor(color.r, color.g, color.b)
	else
		Minimap:SetBackdropColor(unpack(pMinimapDB2))
	end
end

pMinimap:RegisterEvent('UPDATE_INVENTORY_ALERTS')
pMinimap.UPDATE_INVENTORY_ALERTS()

DurabilityFrame:SetAlpha(0)
\ No newline at end of file
+function pMinimap:UPDATE_INVENTORY_ALERTS()
	local maxStatus = 0
	for id in pairs(INVENTORY_ALERT_STATUS_SLOTS) do
		local status = GetInventoryAlertStatus(id)
		if(status > maxStatus) then
			maxStatus = status
		end
	end

	local color = INVENTORY_ALERT_COLORS[maxStatus]
	if(color) then
		Minimap:SetBackdropColor(color.r, color.g, color.b)
	else
		Minimap:SetBackdropColor(unpack(pMinimapDB2.colors))
	end
end

pMinimap:RegisterEvent('UPDATE_INVENTORY_ALERTS')
pMinimap.UPDATE_INVENTORY_ALERTS()

DurabilityFrame:SetAlpha(0)
\ No newline at end of file