Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Luna Nova
VuhDo
Commits
308ef46e
Commit
308ef46e
authored
2 years ago
by
Ivaria
Browse files
Options
Download
Email Patches
Plain Diff
Add talent cache maps for new large Dragonflight talent trees
parent
c88bf00b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
12 deletions
+36
-12
VuhDoSpellEstimator.lua
VuhDoSpellEstimator.lua
+3
-2
VuhDoToolbox.lua
VuhDoToolbox.lua
+33
-10
No files found.
VuhDoSpellEstimator.lua
View file @
308ef46e
...
...
@@ -124,8 +124,9 @@ function VUHDO_initFromSpellbook()
if
tHotCfg
[
""
..
tCnt
][
"others"
]
then
VUHDO_ACTIVE_HOTS_OTHERS
[
tHotName
]
=
true
;
end
end
end
VUHDO_setKnowsSwiftmend
(
VUHDO_isSpellKnown
(
VUHDO_SPELL_ID
.
SWIFTMEND
));
-- toggle whether we should track Holy Priest "Trail of Light"
VUHDO_initTalentSpellCaches
();
VUHDO_setKnowsSwiftmend
(
VUHDO_isSpellKnown
(
VUHDO_SPELL_ID
.
SWIFTMEND
));
VUHDO_setKnowsTrailOfLight
(
VUHDO_isTalentKnown
(
VUHDO_SPELL_ID
.
TRAIL_OF_LIGHT
));
end
This diff is collapsed.
Click to expand it.
VuhDoToolbox.lua
View file @
308ef46e
...
...
@@ -39,6 +39,15 @@ local pairs = pairs;
local
type
=
type
;
local
abs
=
abs
;
-- talent cache maps for new large Dragonflight talent trees
local
VUHDO_TALENT_SPELL_ID_CACHE
=
{
-- [<spell ID>] = <spell name>,
};
local
VUHDO_TALENT_SPELL_NAME_CACHE
=
{
-- [<spell name>] = <spell ID>,
};
local
sEmpty
=
{
};
setmetatable
(
sEmpty
,
{
__newindex
=
function
(
aTable
,
aKey
,
aValue
)
VUHDO_xMsg
(
"WARNING: newindex on dummy array: "
,
aKey
,
aValue
);
end
});
...
...
@@ -539,7 +548,8 @@ end
--
function
VUHDO_getTalentSpellId
(
aTalentName
)
function
VUHDO_initTalentSpellCaches
()
local
tActiveConfigId
=
C_ClassTalents
.
GetActiveConfigID
();
-- on initial PLAYER_ENTER_WORLD talents are not yet available
...
...
@@ -547,6 +557,9 @@ function VUHDO_getTalentSpellId(aTalentName)
return
;
end
twipe
(
VUHDO_TALENT_SPELL_ID_CACHE
);
twipe
(
VUHDO_TALENT_SPELL_NAME_CACHE
);
local
tConfigInfo
=
C_Traits
.
GetConfigInfo
(
tActiveConfigId
);
for
_
,
tTreeId
in
pairs
(
tConfigInfo
.
treeIDs
)
do
...
...
@@ -559,23 +572,33 @@ function VUHDO_getTalentSpellId(aTalentName)
local
tEntryInfo
=
C_Traits
.
GetEntryInfo
(
tActiveConfigId
,
tNodeInfo
.
entryIDs
[
1
]);
local
tDefinitionInfo
=
C_Traits
.
GetDefinitionInfo
(
tEntryInfo
.
definitionID
);
if
type
(
aTalentName
)
==
"number"
and
tDefinitionInfo
.
spellID
==
aTalentName
then
return
tDefinitionInfo
.
spellID
;
else
local
tSpellName
=
GetSpellInfo
(
tDefinitionInfo
.
spellID
);
local
tSpellName
=
GetSpellInfo
(
tDefinitionInfo
.
spellID
);
if
tSpellName
==
aTalentName
then
return
tDefinitionInfo
.
spellID
;
end
end
VUHDO_TALENT_SPELL_ID_CACHE
[
tDefinitionInfo
.
spellID
]
=
tSpellName
;
VUHDO_TALENT_SPELL_NAME_CACHE
[
tSpellName
]
=
tDefinitionInfo
.
spellID
;
end
end
end
return
nil
;
return
;
end
--
function
VUHDO_getTalentSpellId
(
aTalentName
)
if
type
(
aTalentName
)
==
"number"
then
return
VUHDO_TALENT_SPELL_ID_CACHE
[
aTalentName
]
or
nil
;
else
return
VUHDO_TALENT_SPELL_NAME_CACHE
[
aTalentName
]
or
nil
;
end
end
--
function
VUHDO_isTalentKnown
(
aTalentName
)
return
VUHDO_getTalentSpellId
(
aTalentName
)
and
true
or
false
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment