Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
538 changes: 269 additions & 269 deletions wotlk/Talented/DevTools_Dump.lua

Large diffs are not rendered by default.

150 changes: 77 additions & 73 deletions wotlk/Talented/IndexMatching.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local L = LibStub("AceLocale-3.0"):GetLocale("Talented")

function Talented:convertOrderedTalentIndexToWowIndex(classNameToLookup, talentSpecNumber, orderedTalentIndex)
-- return Talented_Data[classNameToLookup][talentSpecNumber].talents[orderedTalentIndex].info.wowTreeIndex
return indexToWowIndex[classNameToLookup][talentSpecNumber][orderedTalentIndex]
return indexToWowIndex[classNameToLookup][talentSpecNumber][orderedTalentIndex]
end

function Talented:convertWowTalentIndexToOrderedIndex(classNameToLookup, talentSpecNumber, wowTalentIndex)
Expand All @@ -16,91 +16,95 @@ function Talented:convertWowTalentIndexToOrderedIndex(classNameToLookup, talentS
-- return index
-- end
-- end
local list = indexToWowIndex[classNameToLookup][talentSpecNumber]
for k, v in pairs(list) do
if v==wowTalentIndex then
return k
end
end
return nil
local list = indexToWowIndex[classNameToLookup][talentSpecNumber]
for k, v in pairs(list) do
if v==wowTalentIndex then
return k
end
end
return nil
end

function Talented:OrderedLearnTalent(class, tab, index, isPet)
mappedIndex = Talented:convertOrderedTalentIndexToWowIndex(class, tab, index)
return LearnTalent(tab, mappedIndex, isPet)
local mappedIndex = Talented:convertOrderedTalentIndexToWowIndex(class, tab, index)
local talentGroup = GetActiveTalentGroup(nil, isPet)
return LearnTalent(tab, mappedIndex, isPet, talentGroup)
end

function Talented:OrderedGetTalentInfo(class, tab, index, isInspect, isPet, talentGroup)
--isInspect: the talents of the player we are inspecting, instead of player talents
--isPet: pet talents, instead of player talents
--talentGroup: 1 for primary talents, 2 for secondary talents, nil for current talents
mappedIndex = Talented:convertOrderedTalentIndexToWowIndex(class, tab, index)
-- print(class, tab, index, "|", tab, mappedIndex, isInspect, isPet, talentGroup)
return GetTalentInfo(tab, mappedIndex, isInspect, isPet, talentGroup)
--isInspect: the talents of the player we are inspecting, instead of player talents
--isPet: pet talents, instead of player talents
--talentGroup: 1 for primary talents, 2 for secondary talents, nil for current talents
local mappedIndex = Talented:convertOrderedTalentIndexToWowIndex(class, tab, index)
talentGroup = talentGroup or GetActiveTalentGroup(isInspect, isPet)
-- print(class, tab, index, "|", tab, mappedIndex, isInspect, isPet, talentGroup)
return GetTalentInfo(tab, mappedIndex, isInspect, isPet, talentGroup)
end

function Talented:OrderedTalentPrereqs(class, tab, index)
mappedIndex = Talented:convertOrderedTalentIndexToWowIndex(class, tab, index)
return GetTalentPrereqs(tab, mappedIndex)
--n.b. return values are tier, column, isLearnable. They don't need to be mapped back.
local mappedIndex = Talented:convertOrderedTalentIndexToWowIndex(class, tab, index)
return GetTalentPrereqs(tab, mappedIndex)
--n.b. return values are tier, column, isLearnable. They don't need to be mapped back.
end
indexToWowIndex = {
DEATHKNIGHT = {
{3, 8, 21, 2, 9, 27, 4, 6, 25, 5, 22, 12, 20, 11, 10, 7, 26, 18, 13, 1, 28, 14, 23, 17, 15, 16, 24, 19},
{19, 15, 1, 20, 3, 16, 22, 26, 24, 23, 7, 2, 9, 18, 6, 27, 11, 10, 28, 14, 17, 29, 25, 5, 12, 4, 21, 13, 8},
{24, 1, 27, 5, 2, 19, 3, 15, 23, 7, 21, 12, 29, 8, 13, 17, 30, 16, 10, 6, 31, 28, 18, 25, 4, 14, 11, 22, 26, 20, 9}
},
DRUID = {
{1, 26, 5, 18, 2, 4, 8, 28, 3, 10, 6, 12, 7, 27, 14, 9, 13, 11, 19, 15, 20, 16, 22, 21, 17, 23, 25, 24},
{3, 2, 6, 11, 1, 12, 15, 5, 8, 9, 7, 22, 4, 10, 16, 29, 13, 18, 14, 21, 17, 28, 19, 24, 26, 20, 25, 23, 30, 27},
{1, 3, 2, 4, 12, 6, 9, 7, 21, 14, 10, 11, 8, 13, 16, 5, 20, 15, 18, 17, 24, 25, 19, 26, 27, 22, 23}
},
HUNTER = {
{2, 8, 14, 1, 11, 15, 3, 23, 12, 4, 10, 7, 6, 9, 16, 13, 17, 5, 18, 21, 19, 25, 20, 22, 26, 24},
{1, 27, 4, 15, 3, 9, 18, 6, 5, 19, 8, 2, 10, 11, 7, 14, 13, 21, 12, 20, 16, 22, 23, 17, 24, 25, 26},
{14, 21, 12, 6, 2, 3, 16, 13, 20, 7, 5, 28, 4, 27, 9, 8, 1, 15, 18, 11, 17, 19, 22, 23, 10, 24, 25, 26}
},
MAGE = {
{1, 3, 5, 9, 15, 2, 7, 6, 25, 29, 8, 12, 14, 30, 16, 10, 4, 18, 13, 17, 19, 11, 24, 23, 20, 21, 28, 26, 22, 27},
{5, 15, 4, 12, 28, 9, 6, 8, 7, 1, 3, 2, 16, 17, 11, 10, 18, 13, 20, 14, 19, 23, 21, 24, 22, 25, 26, 27},
{2, 1, 4, 15, 12, 17, 7, 3, 11, 5, 16, 8, 9, 14, 6, 18, 19, 10, 28, 13, 20, 21, 23, 24, 22, 25, 26, 27}
},
PALADIN = {
{1, 10, 5, 7, 14, 3, 9, 4, 8, 6, 25, 15, 2, 11, 16, 13, 18, 12, 17, 21, 19, 20, 26, 24, 22, 23},
{9, 18, 13, 4, 12, 24, 10, 3, 25, 11, 2, 8, 5, 14, 6, 26, 7, 15, 1, 16, 20, 17, 19, 23, 22, 21},
{3, 4, 10, 8, 1, 12, 6, 9, 13, 11, 19, 14, 5, 15, 2, 16, 25, 7, 17, 18, 21, 22, 20, 26, 23, 24}
},
PRIEST = {
{4, 25, 12, 7, 6, 1, 8, 9, 5, 15, 3, 10, 28, 13, 11, 16, 17, 20, 2, 18, 27, 23, 21, 22, 19, 26, 14, 24},
{8, 6, 2, 9, 12, 11, 15, 1, 14, 7, 4, 10, 13, 3, 18, 5, 20, 16, 17, 27, 19, 24, 22, 21, 23, 25, 26},
{4, 26, 2, 5, 7, 3, 13, 6, 10, 8, 14, 1, 12, 9, 15, 16, 19, 27, 11, 17, 21, 20, 23, 18, 24, 22, 25}
},
ROGUE = {
{7, 4, 3, 5, 24, 8, 14, 9, 2, 15, 1, 19, 11, 10, 21, 13, 6, 22, 12, 20, 25, 17, 16, 18, 23, 26, 27},
{7, 6, 11, 23, 5, 1, 8, 15, 2, 10, 12, 4, 16, 3, 13, 14, 17, 19, 18, 9, 20, 24, 22, 25, 21, 26, 27, 28},
{28, 1, 6, 15, 7, 2, 5, 11, 14, 4, 3, 8, 16, 10, 9, 13, 20, 17, 18, 12, 22, 19, 23, 24, 21, 25, 26, 27}
},
SHAMAN = {
{4, 3, 1, 11, 14, 9, 8, 5, 6, 13, 12, 2, 15, 16, 10, 7, 22, 25, 19, 17, 20, 18, 21, 24, 23},
{6, 27, 9, 5, 8, 3, 4, 7, 12, 1, 2, 10, 15, 11, 26, 16, 14, 29, 19, 17, 13, 22, 28, 21, 18, 20, 23, 24, 25},
{4, 13, 7, 14, 11, 3, 5, 2, 1, 6, 12, 15, 9, 16, 10, 20, 8, 26, 22, 18, 17, 23, 19, 21, 24, 25}
},
WARLOCK = {
{15, 5, 3, 6, 14, 7, 4, 27, 1, 12, 8, 2, 21, 20, 10, 13, 22, 11, 25, 18, 9, 17, 16, 23, 19, 28, 24, 26},
{1, 2, 3, 23, 4, 5, 8, 9, 15, 6, 17, 12, 7, 14, 11, 10, 16, 20, 21, 13, 19, 27, 22, 18, 24, 25, 26},
{3, 2, 12, 21, 1, 13, 5, 9, 14, 6, 7, 20, 4, 11, 19, 8, 10, 18, 15, 17, 23, 22, 16, 26, 24, 25}
},
WARRIOR = {
{3, 9, 6, 5, 17, 7, 10, 16, 18, 1, 15, 29, 11, 12, 4, 2, 13, 8, 24, 21, 14, 26, 30, 31, 23, 25, 20, 19, 22, 28, 27},
{27, 5, 4, 8, 6, 10, 7, 12, 1, 16, 14, 2, 18, 9, 15, 13, 3, 21, 11, 17, 22, 19, 25, 20, 23, 26, 24},
{4, 15, 3, 5, 1, 13, 7, 18, 2, 27, 11, 6, 10, 12, 9, 14, 16, 8, 19, 17, 21, 25, 20, 24, 22, 26, 23}
},
Tenacity = {{ 2,17,3,4,7,8,16,5,1,6,10,20,9,11,14,13,15,12,18,19 }},
Cunning = {{ 1,16,3,4,6,19,13,5,7,8,17,9,11,14,12,15,10,21,20,22 }},
Ferocity = {{ 2,3,5,6,7,9,8,11,1,12,4,16,10,14,15,13,17,21,20 }}
DEATHKNIGHT = {
{3, 8, 21, 2, 9, 27, 4, 6, 25, 5, 22, 12, 20, 11, 10, 7, 26, 18, 13, 1, 28, 14, 23, 17, 15, 16, 24, 19},
{19, 15, 1, 20, 3, 16, 22, 26, 24, 23, 7, 2, 9, 18, 6, 27, 11, 10, 28, 14, 17, 29, 25, 5, 12, 4, 21, 13, 8},
{24, 1, 27, 5, 2, 19, 3, 15, 23, 7, 21, 12, 29, 8, 13, 17, 30, 16, 10, 6, 31, 28, 18, 25, 4, 14, 11, 22, 26, 20, 9}
},
DRUID = {
{1, 26, 5, 18, 2, 4, 8, 28, 3, 10, 6, 12, 7, 27, 14, 9, 13, 11, 19, 15, 20, 16, 22, 21, 17, 23, 25, 24},
{3, 2, 6, 11, 1, 12, 15, 5, 8, 9, 7, 22, 4, 10, 16, 29, 13, 18, 14, 21, 17, 28, 19, 24, 26, 20, 25, 23, 30, 27},
{1, 3, 2, 4, 12, 6, 9, 7, 21, 14, 10, 11, 8, 13, 16, 5, 20, 15, 18, 17, 24, 25, 19, 26, 27, 22, 23}
},
HUNTER = {
{2, 8, 14, 1, 11, 15, 3, 23, 12, 4, 10, 7, 6, 9, 16, 13, 17, 5, 18, 21, 19, 25, 20, 22, 26, 24},
{1, 27, 4, 15, 3, 9, 18, 6, 5, 19, 8, 2, 10, 11, 7, 14, 13, 21, 12, 20, 16, 22, 23, 17, 24, 25, 26},
{14, 21, 12, 6, 2, 3, 16, 13, 20, 7, 5, 28, 4, 27, 9, 8, 1, 15, 18, 11, 17, 19, 22, 23, 10, 24, 25, 26}
},
MAGE = {
{1, 3, 5, 9, 15, 2, 7, 6, 25, 29, 8, 12, 14, 30, 16, 10, 4, 18, 13, 17, 19, 11, 24, 23, 20, 21, 28, 26, 22, 27},
{5, 15, 4, 12, 28, 9, 6, 8, 7, 1, 3, 2, 16, 17, 11, 10, 18, 13, 20, 14, 19, 23, 21, 24, 22, 25, 26, 27},
{2, 1, 4, 15, 12, 17, 7, 3, 11, 5, 16, 8, 9, 14, 6, 18, 19, 10, 28, 13, 20, 21, 23, 24, 22, 25, 26, 27}
},
PALADIN = {
{1, 10, 5, 7, 14, 3, 9, 4, 8, 6, 25, 15, 2, 11, 16, 13, 18, 12, 17, 21, 19, 20, 26, 24, 22, 23},
{9, 18, 13, 4, 12, 24, 10, 3, 25, 11, 2, 8, 5, 14, 6, 26, 7, 15, 1, 16, 20, 17, 19, 23, 22, 21},
{3, 4, 10, 8, 1, 12, 6, 9, 13, 11, 19, 14, 5, 15, 2, 16, 25, 7, 17, 18, 21, 22, 20, 26, 23, 24}
},
PRIEST = {
{4, 25, 12, 7, 6, 1, 8, 9, 5, 15, 3, 10, 28, 13, 11, 16, 17, 20, 2, 18, 27, 23, 21, 22, 19, 26, 14, 24},
{8, 6, 2, 9, 12, 11, 15, 1, 14, 7, 4, 10, 13, 3, 18, 5, 20, 16, 17, 27, 19, 24, 22, 21, 23, 25, 26},
{4, 26, 2, 5, 7, 3, 13, 6, 10, 8, 14, 1, 12, 9, 15, 16, 19, 27, 11, 17, 21, 20, 23, 18, 24, 22, 25}
},
ROGUE = {
{7, 4, 3, 5, 24, 8, 14, 9, 2, 15, 1, 19, 11, 10, 21, 13, 6, 22, 12, 20, 25, 17, 16, 18, 23, 26, 27},
{7, 6, 11, 23, 5, 1, 8, 15, 2, 10, 12, 4, 16, 3, 13, 14, 17, 19, 18, 9, 20, 24, 22, 25, 21, 26, 27, 28},
{28, 1, 6, 15, 7, 2, 5, 11, 14, 4, 3, 8, 16, 10, 9, 13, 20, 17, 18, 12, 22, 19, 23, 24, 21, 25, 26, 27}
},
SHAMAN = {
{4, 3, 1, 11, 14, 9, 8, 5, 6, 13, 12, 2, 15, 16, 10, 7, 22, 25, 19, 17, 20, 18, 21, 24, 23},
{6, 27, 9, 5, 8, 3, 4, 7, 12, 1, 2, 10, 15, 11, 26, 16, 14, 29, 19, 17, 13, 22, 28, 21, 18, 20, 23, 24, 25},
{4, 13, 7, 14, 11, 3, 5, 2, 1, 6, 12, 15, 9, 16, 10, 20, 8, 26, 22, 18, 17, 23, 19, 21, 24, 25}
},
WARLOCK = {
{15, 5, 3, 6, 14, 7, 4, 27, 1, 12, 8, 2, 21, 20, 10, 13, 22, 11, 25, 18, 9, 17, 16, 23, 19, 28, 24, 26},
{1, 2, 3, 23, 4, 5, 8, 9, 15, 6, 17, 12, 7, 14, 11, 10, 16, 20, 21, 13, 19, 27, 22, 18, 24, 25, 26},
{3, 2, 12, 21, 1, 13, 5, 9, 14, 6, 7, 20, 4, 11, 19, 8, 10, 18, 15, 17, 23, 22, 16, 26, 24, 25}
},
WARRIOR = {
{3, 9, 6, 5, 17, 7, 10, 16, 18, 1, 15, 29, 11, 12, 4, 2, 13, 8, 24, 21, 14, 26, 30, 31, 23, 25, 20, 19, 22, 28, 27},
{27, 5, 4, 8, 6, 10, 7, 12, 1, 16, 14, 2, 18, 9, 15, 13, 3, 21, 11, 17, 22, 19, 25, 20, 23, 26, 24},
{4, 15, 3, 5, 1, 13, 7, 18, 2, 27, 11, 6, 10, 12, 9, 14, 16, 8, 19, 17, 21, 25, 20, 24, 22, 26, 23}
},
Tenacity = {{ 2,17,3,4,7,8,16,5,1,6,10,20,9,11,14,13,15,12,18,19 }},
-- TODO: Maybe only for WoTLK Chinese Client
-- Cunning = {{ 1,16,3,4,6,19,13,5,7,8,17,9,11,14,12,15,10,21,20,22 }},
Cunning = {{ 1,2,3,4,6,18,13,5,7,8,17,9,11,14,12,15,10,21,20,22 }},
Ferocity = {{ 2,3,5,6,7,9,8,11,1,12,4,16,10,14,15,13,17,21,20 }}
}
--How to acquire these?
-- Play each class in turn -- and get a pet of each kind on a hunter -- and run
-- /script Talented:PrintSortedWoWIndices()
-- /script Talented:PrintSortedWoWIndices()
-- That will produce the indices.
-- You may also need to get the spellIDs and put them into spelldata.lua. The easiest way is to look at the page source of the list of abilities in WoWHead (e.g. view-source:https://www.wowhead.com/wotlk/spells/pet-abilities/hunter/generic#0+1+20 ) and map the names to the IDs with some code.
14 changes: 11 additions & 3 deletions wotlk/Talented/Locales/zhCN.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
local L = LibStub:GetLibrary("AceLocale-3.0"):NewLocale("Talented", "zhCN")
if not L then return end

L['CONFIRM_TALENT_WIPE_TEXT'] = "你想遗忘你所有的天赋吗?这将取消召唤任何被控制的宠物,并且每次费用都会增加。";

L["Talented - Talent Editor"] = "Talented - 天赋编辑器"

L["Layout options"] = "样式选项"
Expand Down Expand Up @@ -32,7 +34,7 @@ L["Output URL in Chat"] = "输出链接到聊天框"
L["Directly outputs the URL in Chat instead of using a Dialog."] = "直接输出链接到聊天框。"

L["Inspected Characters"] = "观察过的玩家"
--~ L["Talent trees of inspected characters."] = ""
--~ L["Talent trees of inspected characters."] = "观察过的玩家的天赋树"
L["Edit template"] = "编辑模板"
L["Edit talents"] = "编辑天赋"
L["Toggle edition of the template."] = "编辑天赋模板。"
Expand All @@ -52,7 +54,7 @@ L["Effective tooltip information not available"] = "无有效鼠标提示信息"
L["You have %d talent |4point:points; left"] = "您还有%d点天赋点数剩余"
L["Are you sure that you want to learn \"%s (%d/%d)\" ?"] = "是否确认学习\“%s (%d/%d)\”?"

--~ L["Open the Talented options panel."] = ""
--~ L["Open the Talented options panel."] = "打开 Talented 选项面板"

--~ L["View Current Spec"] = "查看当前配置方案"
L["View the Current spec in the Talented frame."] = "在天赋面板上查看当前配置方案。"
Expand Down Expand Up @@ -92,10 +94,10 @@ L["Error while applying talents! some of the request talents were not set!"] = "
L["Error! Talented window has been closed during template application. Please reapply later."] = "天赋面板在应用过程中被关闭!请稍候重新应用。"
L["Talent application has been cancelled. %d talent points remaining."] = "应用天赋操作取消,剩余%d天赋点数。"
L["Template applied successfully, %d talent points remaining."] = "成功应用模板,剩余%d天赋点数。"
L["Warning - no action was taken, or we ran out of talent points."] = true --TODO: Localise!
L["Talented_Data is outdated. It was created for %q, but current build is %q. Please update."] = "Talented_Data 已过期。创建数据属于%q版本,但当前客户端版本是%q。请进行升级。"
L["Loading outdated data. |cffff1010WARNING:|r Recent changes in talent trees might not be included in this data."] = "加载过期数据。 |cffff1010警告:|r最新的天赋树改动可能不包含在该数据中。"
L["\"%s\" does not appear to be a valid URL!"] = "\"%s\"看起来不是一个有效的链接!"
L["Warning - no action was taken, or we ran out of talent points."] = true --TODO: Localise!

L["Import template ..."] = "导入模板…"
L["Enter the complete URL of a template from Blizzard talent calculator or wowhead."] = "请粘帖从暴雪官方或 Wowhead 的天赋模拟器获得的天赋配置链接。"
Expand Down Expand Up @@ -130,6 +132,9 @@ L[" (alt)"] = "(alt)"
L["The following templates are no longer valid and have been removed:"] = "以下模板已失效并已被删除:"
L["The following templates were converted from a previous version of the addon. Ensure that none are 'invalid' (below); retrieve the backup of your config file from the WTF folder if so."] = true

L["The template '%s' is no longer valid and has been removed."] = "模版 '%s' 失效,已被移除。"
L["The template '%s' had inconsistencies and has been fixed. Please check it before applying."] = "模板 '%s' 冲突,现已修复。请在应用前检查。"

L["Lock frame"] = "锁定框体"
L["Can not apply, unknown template \"%s\""] = "不能接受,未知模板\"%s\""

Expand All @@ -145,6 +150,8 @@ L["Display options"] = "显示选项"
L["Add bottom offset"] = "添加底部偏移"
L["Add some space below the talents to show the bottom information."] = "在天赋下面添加间距以显示底部信息。"

L["Right-click to activate this spec"] = "右击激活此天赋"

--~ L["Mode of operation."] = ""

--~ L["Toggle editing of the template."] = ""
Expand Down Expand Up @@ -200,6 +207,7 @@ L["Add some space below the talents to show the bottom information."] = "在天
--~ L["Clone selected"] = ""
--~ L["Make a copy of the current template."] = ""

--Locales for new template options
L["Template"] = "方案"
L["New Template"] = "新建方案"
L["Create a new Template."] = "建立一个新的天赋方案"
Expand Down
3 changes: 1 addition & 2 deletions wotlk/Talented/apply.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ function Talented:ApplyCurrentTemplate()
end

function Talented:ApplyNextTalentPoint()

-- Debug variable to check progress
local found = false

Expand Down Expand Up @@ -108,7 +107,7 @@ function Talented:CheckTalentPointsApplied()
for tab, tree in ipairs(self:UncompressSpellData(template.class)) do
local ttab = template[tab]
for index = 1, #tree do
local delta = ttab[index] - select(5, Talented:OrderedGetTalentInfo(template.class, tab, index, nil, pet))
local delta = ttab[index] - select(5, Talented:OrderedGetTalentInfo(template.class, tab, index, nil, pet, group))
if delta > 0 then
failed = true
break
Expand Down
70 changes: 35 additions & 35 deletions wotlk/Talented/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ end
function Talented:MakeTarget(targetName)
local tar = self.db.char.targets[targetName]
local name = nil; local class = nil
if tar then
name = tar.name
class = tar.class
end
if tar then
name = tar.name
class = tar.class
end

local src = tar and self.db.global.templates[class] and self.db.global.templates[class][name]
if not src then
Expand Down Expand Up @@ -193,11 +193,11 @@ do

function Talented:CreateEmptyTemplate(class)
class = class or select(2, UnitClass"player")

local template = new(self.db.global.templates, L["Empty"], class)
local info = self:UncompressSpellData(class)
if not info then return end

for tab, tree in ipairs(info) do
local t = {}
template[tab] = t
Expand Down Expand Up @@ -320,17 +320,17 @@ function Talented:PLAYER_TALENT_UPDATE()
end

function Talented:CONFIRM_TALENT_WIPE(_, cost)
StaticPopupDialogs["CONFIRM_TALENT_WIPE"].text = L['CONFIRM_TALENT_WIPE_TEXT'] --the problem: text for CONFIRM_TALENT_WIPE are nil, eventualy in conjunction of unregisterevent from uiparent??? now let us set the text manually...
StaticPopupDialogs["CONFIRM_TALENT_WIPE"].text = L['CONFIRM_TALENT_WIPE_TEXT'] --the problem: text for CONFIRM_TALENT_WIPE are nil, eventualy in conjunction of unregisterevent from uiparent??? now let us set the text manually...
local dialog = StaticPopup_Show("CONFIRM_TALENT_WIPE")
if dialog then
MoneyFrame_Update(dialog:GetName().."MoneyFrame", cost)
local frame = self.base
if not frame or not frame:IsVisible() then
if not frame or not frame:IsVisible() then
self:Update()
-- ShowUIPanel(self.base)
self.base:Show()
end
dialog:SetFrameStrata('FULLSCREEN_DIALOG')
dialog:SetFrameStrata('FULLSCREEN_DIALOG')
end
end

Expand Down Expand Up @@ -382,39 +382,39 @@ function Talented:Update()
end

function Talented:is_class(class)
for index, value in ipairs(classes) do
if class == value then
return true
end
end
return false
for index, value in ipairs(classes) do
if class == value then
return true
end
end
return false
end

function Talented:MakeSubArrays(db)
local madeArrays = 0
for index, class in ipairs(classes) do
if db[class] == nil then
for index, class in ipairs(classes) do
if db[class] == nil then
db[class] = {}
madeArrays = 1
--If there is an existing template named after the class...
elseif type(db[class]) == "string" then
--rename the template
local count = 1
local name = class
name = format("%s (%d)", name, count)
while db[name] do
count = count + 1
template.name = format("%s (%d)", name, count)
end

--THEN make the class sub-array
db[name] = db[class]

--If there is an existing template named after the class...
elseif type(db[class]) == "string" then
--rename the template
local count = 1
local name = class
name = format("%s (%d)", name, count)
while db[name] do
count = count + 1
template.name = format("%s (%d)", name, count)
end

--THEN make the class sub-array
db[name] = db[class]
db[class] = {}
madeArrays = 1
end
end
end

return madeArrays
end

Expand All @@ -426,7 +426,7 @@ function Talented:LoadTemplates()
local invalid = {}
for class, classdb in pairs(db) do
assert(self:is_class(class))

for name, code in pairs(classdb) do
if type(code) == "string" then
db[class][name] = {
Expand All @@ -440,7 +440,7 @@ function Talented:LoadTemplates()
end
end
end

if next(invalid) then
table.sort(invalid)
self:Print(L["The following templates are no longer valid and have been removed:"])
Expand Down
Loading