fix num talents per tab

This commit is contained in:
Bunny67
2020-06-04 20:48:12 +03:00
parent 032c194ca4
commit 99c1114efb
3 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -2205,7 +2205,7 @@ WeakAuras.event_prototypes = {
display = L["Spell"],
type = "spell",
test = "true",
showExactOption = true,
forceExactOption = true,
},
{
name = "extra Cooldown Progress (Spell)",
@@ -3727,8 +3727,8 @@ WeakAuras.event_prototypes = {
if (trigger.use_talent) then
-- Single selection
local index = trigger.talent and trigger.talent.single;
local tier = index and ceil(index / 30)
local column = index and ((index - 1) % 30 + 1)
local tier = index and ceil(index / MAX_NUM_TALENTS)
local column = index and ((index - 1) % MAX_NUM_TALENTS + 1)
local ret = [[
local tier = %s;
@@ -3754,8 +3754,8 @@ WeakAuras.event_prototypes = {
]]
for index in pairs(trigger.talent.multi) do
local tier, column
local tier = index and ceil(index / 30)
local column = index and ((index - 1) % 30 + 1)
local tier = index and ceil(index / MAX_NUM_TALENTS)
local column = index and ((index - 1) % MAX_NUM_TALENTS + 1)
local ret2 = [[
if (not active) then
tier = %s
+2 -2
View File
@@ -555,8 +555,8 @@ WeakAuras.spec_types_all = {}
WeakAuras.talent_types = {}
for tab = 1, 5 do
for num_talent = 1, 30 do
local talentId = (tab - 1)*30+num_talent
for num_talent = 1, MAX_NUM_TALENTS do
local talentId = (tab - 1)*MAX_NUM_TALENTS+num_talent
WeakAuras.talent_types[talentId] = L["Tab "]..tab.." - "..num_talent
end
end
+1 -1
View File
@@ -1388,7 +1388,7 @@ function WeakAuras.CreateTalentCache()
for tab = 1, GetNumTalentTabs() do
for num_talent = 1, GetNumTalents(tab) do
local talentName, talentIcon = GetTalentInfo(tab, num_talent);
local talentId = (tab - 1)*30+num_talent
local talentId = (tab - 1)*MAX_NUM_TALENTS+num_talent
if (talentName and talentIcon) then
WeakAuras.talent_types_specific[player_class][talentId] = "|T"..talentIcon..":0|t "..talentName
end