casualshammy / NameplateCooldowns

This addon for World of Warcraft will show you cooldowns of an enemies above their nameplates
https://wow.curseforge.com/projects/nameplatecooldowns
Other
5 stars 3 forks source link

GetSpellInfo #151

Closed ryulinho closed 1 month ago

ryulinho commented 2 months ago

WoW version Retail, Classic, WotLK...

Retail 11.0.2

Describe the bug A clear and concise description of what the bug is.

2x NameplateCooldowns/src/utilities.lua:94: attempt to call upvalue 'GetSpellInfo' (a nil value) [string "@NameplateCooldowns/src/utilities.lua"]:94: in function <NameplateCooldowns/src/utilities.lua:93> [string "@NameplateCooldowns/NameplateCooldowns.lua"]:183: in function BuildCooldownValues' [string "@NameplateCooldowns/NameplateCooldowns.lua"]:210: in function <...aceNameplateCooldowns/NameplateCooldowns.lua:207> [string "@NameplateCooldowns/NameplateCooldowns.lua"]:882: in function?' [string "@NameplateCooldowns/NameplateCooldowns.lua"]:777: in function <...aceNameplateCooldowns/NameplateCooldowns.lua:777>

Locals: t =

{ } key = 199483 (temporary) = nil (temporary) = 199483 (*temporary) = "attempt to call upvalue 'GetSpellInfo' (a nil value)" GetSpellInfo = nil

GetSpellInfo is deprecated; see https://warcraft.wiki.gg/wiki/API_C_SpellBook.GetSpellInfo

BloodDragon2580 commented 2 months ago

Change the file NameplateCooldowns/src/utilities.lua on line 94: local spellName = GetSpellInfo(key); to local spellName = C_Spell.GetSpellInfo(key);

And on line 86: local texture = GetSpellTexture(key); to local texture = C_Spell.GetSpellTexture(key);

casualshammy commented 2 months ago

Change the file NameplateCooldowns/src/utilities.lua on line 94: local spellName = GetSpellInfo(key); to local spellName = C_Spell.GetSpellInfo(key);

And on line 86: local texture = GetSpellTexture(key); to local texture = C_Spell.GetSpellTexture(key);

Don't do this, you may lose all addon settings. C_Spell.GetSpellInfo is not a just replacement of GetSpellInfo, it returns table

BloodDragon2580 commented 2 months ago

On my side it works without loosing anything.

casualshammy commented 2 months ago

I've pushed version 110002.1-release.

BloodDragon2580 commented 2 months ago

I've pushed version 110002.1-release.

Thx