Skip to content

Commit

Permalink
totems: Follow priorities used by Blizzard (#700)
Browse files Browse the repository at this point in the history
  • Loading branch information
p3lim authored Nov 30, 2024
1 parent 4ef3744 commit 68da3d8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions elements/totems.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ OnEnter and OnLeave script handlers will be set to display a Tooltip if the `Tot
local _, ns = ...
local oUF = ns.oUF

local TOTEM_PRIORITIES = _G.STANDARD_TOTEM_PRIORITIES
if(UnitClassBase('player') == 'SHAMAN') then
TOTEM_PRIORITIES = _G.SHAMAN_TOTEM_PRIORITIES
end

local function UpdateTooltip(self)
GameTooltip:SetTotem(self:GetID())
end
Expand Down Expand Up @@ -75,7 +80,7 @@ local function UpdateTotem(self, event, slot)
--]]
if(element.PreUpdate) then element:PreUpdate(slot) end

local totem = element[slot]
local totem = element[TOTEM_PRIORITIES[slot]]
local haveTotem, name, start, duration, icon = GetTotemInfo(slot)
if(haveTotem and duration > 0) then
if(totem.Icon) then
Expand Down Expand Up @@ -135,8 +140,7 @@ local function Enable(self)
element.ForceUpdate = ForceUpdate

for i = 1, #element do
local totem = element[i]

local totem = element[TOTEM_PRIORITIES[i]]
totem:SetID(i)

if(totem:IsMouseEnabled()) then
Expand Down

0 comments on commit 68da3d8

Please sign in to comment.