Closed aromagnoli closed 3 weeks ago
Same behavior when casting a teleport spell as a mage.
At a glance, GetSpellLink and C_SpellBook.GetSpellLinkFromSpellID both seem to have been renamed/moved/removed. :(
Same behavior when casting a teleport spell as a mage.
At a glance, GetSpellLink and C_SpellBook.GetSpellLinkFromSpellID both seem to have been renamed/moved/removed. :(
Both have been removed with 11.0.0 release.
To fix the Lua error:
tagSpellLink = GetSpellLink(spellID)
to tagSpellLink = C_Spell.GetSpellLink(spellID)
tagSpellLink = GetSpellLink(parentSpell)
to tagSpellLink = C_Spell.GetSpellLink(parentSpell)
link = GetSpellLink(extraSpellID)
to link = C_Spell.GetSpellLink(extraSpellID)
Should be fixed in 5.3
Unfortunately still present in 5.3. (I've no idea whether comments on closed issues will notify @Caedilla )
28x RSA/Tools/Monitor.lua:237: attempt to call global 'GetSpellLink' (a nil value)
[string "@RSA/Tools/Monitor.lua"]:237: in function `ProcessSpell'
[string "@RSA/Tools/Monitor.lua"]:452: in function <RSA/Tools/Monitor.lua:413>
Locals:
InCombatSkipped
The same error is also reported on line 271. Both locations are trying to call the old function.
I've been playing with this change locally; it bubbles out the old-versus-new decision to only running once, at load, for the entire file, rather than repeatedly on each call. So far no problems:
$ diff -ub RSA/Tools/Monitor.lua.orig RSA/Tools/Monitor.lua
--- RSA/Tools/Monitor.lua.orig 2024-08-22 00:02:31.845999800 -0400
+++ RSA/Tools/Monitor.lua 2024-08-22 00:04:13.572699100 -0400
@@ -22,6 +22,12 @@
'RESIST',
}
+local GetSpellLink = _G.GetSpellLink
+if not GetSpellLink then
+ GetSpellLink = C_Spell.GetSpellLink
+end
+
+
local function CommCheck(currentSpell)
-- Track group announced spells using RSA.Comm (AddonMessages)
local canAnnounce = true
@@ -220,11 +226,7 @@
local tagSpellLink = cacheTagSpellLink[spellID]
if not tagSpellLink then
- if GetSpellLink then
tagSpellLink = GetSpellLink(spellID)
- else
- tagSpellLink = C_Spell.GetSpellLink(spellID)
- end
cacheTagSpellLink[spellID] = tagSpellLink
end
Description
I expected no errors, but the monitor.lua is throwing some errors.
RSA Version
RSA 5.2
World of Warcraft Flavor
Dragonflight
Lua Error
Reproduction Steps
As a priest.
Cast Power Word: Shield on yourself with the addon loaded.
Screenshots
No response