Patch 10 - new API?
Where can I get documentation for the new (possibly) API or changes? EG the talent tress are all different, they are more like Classic TBC/Wrath!
Edit: nevermind, I seem to have found a starting point: https://wowpedia.fandom.com/wiki/Pat....0/API_changes |
They were here ( https://github.com/Gethe/wow-ui-source/tree/beta ) but the FrameXML folder has disappeared in the last few days.
So I ended up extracting the files myself so I at least have access to the source files But yes, the wowpedia page is very useful as I have been having problems getting the new settings system to work in a minimal addon let alone a full one. |
At this stage of my testing, I only want to enumerate the talents. The talent trees resemble Classic/TBC/Wrath, however I cannot use this very simple code:
for i = 1, GetNumTalentTabs() do for j = 1, GetNumTalents(i) do local name , _ , _ , _ ,rank = GetTalentInfo(i, j); if ( rank > 0 ) then lDeathKnightTalents[name] = rank; print(string.format("talent:[%s] - rank:[%d]",name,rank)); end end end So I am now investigating the new API, like this local lTalentConfigID = C_ClassTalents.GetActiveConfigID(); local lConfigInfo = C_Traits.GetConfigInfo(lTalentConfigID); print(string.format("configID:%d - name:%s - treeIDs:%d - %d - %d",lTalentConfigID,lConfigInfo["name"],#lConfigInfo["treeIDs"],lConfigInfo["treeIDs"][1],lConfigInfo["treeIDs"][2])); but am stuck there, there is only one tree ID returned. I would be expecting two. And how to transverse the tree... Just testing |
I found these in the TalentUI lua file which may help you - good luck
Lua Code:
Lua Code:
Where specs is this local table and spec an element in it Lua Code:
|
OK, but it does not show me how to enumerate the talents. Or how to look for a particular talent to be there or not, or what rank. That is all I need.
I have tried going down the C_Traits route but all I got is some nodes and the spell IDs are for Paladins (I am BM hunter). C_Traits is very confusing with a lot of unknown terminology. Any ideas? |
Unfortunately not, most of the code is basing source data from the talent frame being open itself. So, whether or not there is a way to access that level of information without the frame being available I don't know.
This file mentions the Trait stuff in case you hadn't tracked it down yet : https://github.com/Gethe/wow-ui-sour...TalentUtil.lua |
Okay, this bit of code allowed me to get hold of some spec and talent information. At the moment it is coded for the player but there looks like you might be able to use it for inspect purposes as well but not sure where the restrictions might be there. But hopefully it will get you part way there.
wherever the nil is the code had TalentFrame.inspect wherever PLAYER is the code had either PLAYER or talentUnit which was passed into the Update function for the TalentFrame. Lua Code:
The DoStuff function resulted in this Saved Variable Table of Data Lua Code:
|
I have used the traits functions and it works (to tell me what traits you have and at what rank)
Basically you go: Code:
local lConfigID = C_ClassTalents.GetActiveConfigID(); |
Ah cool, I always got nil for configIDs so thought it was needing something else to work :D
|
All times are GMT -6. The time now is 06:01 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI