TotemBar v0.3.0
This commit is contained in:
@@ -45,6 +45,24 @@ TotemBar.TOTEMS_BY_ELEMENT = {
|
||||
},
|
||||
}
|
||||
|
||||
-- Pure: the largest number of totems any single element offers. ui.lua sizes
|
||||
-- the hover flyout's icon pool from this. Computed from the data on purpose:
|
||||
-- the pool used to be a hard-coded 6, but Air has SEVEN totems, and with the
|
||||
-- Air slot empty the flyout lists ALL known totems of the element (not "all
|
||||
-- minus the chosen default") -- so the 7th, Tranquil Air Totem, was silently
|
||||
-- dropped and could not be cast or made default from the bar.
|
||||
function TotemBar.maxTotemsPerElement()
|
||||
local maxN = 0
|
||||
for i = 1, table.getn(TotemBar.TOTEM_ELEMENTS) do
|
||||
local list = TotemBar.TOTEMS_BY_ELEMENT[TotemBar.TOTEM_ELEMENTS[i]]
|
||||
local n = (list and table.getn(list)) or 0
|
||||
if n > maxN then
|
||||
maxN = n
|
||||
end
|
||||
end
|
||||
return maxN
|
||||
end
|
||||
|
||||
-- Build the reverse lookup (totem name -> element) once at load time.
|
||||
local elementByName = {}
|
||||
for elemIdx = 1, table.getn(TotemBar.TOTEM_ELEMENTS) do
|
||||
@@ -110,6 +128,12 @@ TotemBar.TOTEM_DURATIONS = {
|
||||
["Grounding Totem"] = 45,
|
||||
["Grace of Air Totem"] = 120,
|
||||
["Nature Resistance Totem"] = 120,
|
||||
-- 5 minutes (spell 6495, TurtleWoW 1.17.2 spell DB). Was missing here
|
||||
-- entirely and fell through to the 120s default -- but that fallback is
|
||||
-- meant as a safe OVERestimate, and for Sentry it cut the timer 180s
|
||||
-- short. pfUI's libtotem has no Sentry entry either, so GetTotemInfo
|
||||
-- could not correct it.
|
||||
["Sentry Totem"] = 300,
|
||||
["Tranquil Air Totem"] = 120,
|
||||
["Windfury Totem"] = 120,
|
||||
["Windwall Totem"] = 120,
|
||||
|
||||
Reference in New Issue
Block a user