Skip to content

Commit

Permalink
Merge pull request #6 from kojakk/talentTrackingUpdate
Browse files Browse the repository at this point in the history
Updated MaxDps:CheckTalents in Helper.lua
  • Loading branch information
pwilkowski authored Oct 29, 2022
2 parents 046946a + a9ccb60 commit 942f90b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
24 changes: 18 additions & 6 deletions Helper.lua
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,24 @@ end

function MaxDps:CheckTalents()
self.PlayerTalents = {};

for talentRow = 1, 7 do
for talentCol = 1, 3 do
local _, _, _, sel, _, id = GetTalentInfo(talentRow, talentCol, 1);
if sel then
self.PlayerTalents[id] = 1;

-- last selected configID or fall back to default spec config
local configID = C_ClassTalents.GetActiveConfigID();
local configInfo = C_Traits.GetConfigInfo(configID);
local treeIDs = configInfo.treeIDs;

for _, treeID in ipairs(treeIDs) do
local nodes = C_Traits.GetTreeNodes(treeID);
for _, nodeID in ipairs(nodes) do
local nodeInfo = C_Traits.GetNodeInfo(configID, nodeID)
if nodeInfo.currentRank and nodeInfo.currentRank > 0 then
local entryID = nodeInfo.activeEntry and nodeInfo.activeEntry.entryID and nodeInfo.activeEntry.entryID;
local entryInfo = entryID and C_Traits.GetEntryInfo(configID, entryID);
local definitionInfo = entryInfo and entryInfo.definitionID and C_Traits.GetDefinitionInfo(entryInfo.definitionID);

if definitionInfo ~= nil then
self.PlayerTalents[definitionInfo.spellID] = 1;
end
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions MaxDps.toc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
## Title: MaxDps
## Notes: Rotation helper framework.
## Version: 9.1.5
## Version: 10.0.0
## Author: Kaminaris
## Interface: 90105
## Interface: 100000
## SavedVariables: MaxDpsOptions
## OptionalDependencies: Bartender4, ElvUI, ButtonForge, SVUI_ActionBars, G15Buttons, SyncUI, LUI, Dominos, DiabolicUI, Neuron
## X-Curse-Project-ID: 91970
Expand Down

0 comments on commit 942f90b

Please sign in to comment.