mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-26 22:00:49 +00:00
nil check for totems
- No more totem errors...
This commit is contained in:
+2
-1
@@ -27,11 +27,12 @@ pfUI:RegisterModule("totems", "vanilla:tbc", function ()
|
|||||||
totems.OnEnter = function(self)
|
totems.OnEnter = function(self)
|
||||||
if not this.id then return end
|
if not this.id then return end
|
||||||
local active, name, start, duration, icon = GetTotemInfo(this.id)
|
local active, name, start, duration, icon = GetTotemInfo(this.id)
|
||||||
|
if not name or not active then return end -- Prüfen ob name gültig ist
|
||||||
local color = slots[this.id]
|
local color = slots[this.id]
|
||||||
GameTooltip:SetOwner(this, "ANCHOR_LEFT")
|
GameTooltip:SetOwner(this, "ANCHOR_LEFT")
|
||||||
GameTooltip:SetText(name, color.r+.2, color.g+.2, color.b+.2)
|
GameTooltip:SetText(name, color.r+.2, color.g+.2, color.b+.2)
|
||||||
GameTooltip:Show()
|
GameTooltip:Show()
|
||||||
end
|
end
|
||||||
|
|
||||||
totems.OnLeave = function(self)
|
totems.OnLeave = function(self)
|
||||||
GameTooltip:Hide()
|
GameTooltip:Hide()
|
||||||
|
|||||||
Reference in New Issue
Block a user