AlexFolland / AutoGear

WoW convenience addon that automatically handles gear looting and equipping
https://curseforge.com/wow/addons/autogear
Other
8 stars 11 forks source link

GetGossipActiveQuests error in 1.14.4.51056 #49

Closed ferib closed 1 year ago

ferib commented 1 year ago

I get this error when talking to a quest giver.

Message: Interface/AddOns/AutoGear/AutoGear.lua:2268: attempt to call global 'GetGossipActiveQuests' (a nil value)
Time: Sun Aug 27 14:17:03 2023
Count: 3
Stack: Interface/AddOns/AutoGear/AutoGear.lua:2268: attempt to call global 'GetGossipActiveQuests' (a nil value)
[string "=[C]"]: in function `GetGossipActiveQuests'
[string "@Interface/AddOns/AutoGear/AutoGear.lua"]:2268: in function <Interface/AddOns/AutoGear/AutoGear.lua:2251>

Locals: (*temporary) = <function> defined =[C]:-1

Looking into the API at https://wowpedia.fandom.com/wiki/API_GetGossipActiveQuests I suspect GetGossipActiveQuests must be swapped out with C_GossipInfo.GetActiveQuests. Can confirm /dump API_C_GossipInfo.GetActiveQuests give a function.

ferib commented 1 year ago

I tried to replace the one on 2268 just to be greeted by another one

Message: Interface/AddOns/AutoGear/AutoGear.lua:2287: attempt to call global 'GetGossipAvailableQuests' (a nil value)
Time: Sun Aug 27 14:24:22 2023
Count: 3
Stack: Interface/AddOns/AutoGear/AutoGear.lua:2287: attempt to call global 'GetGossipAvailableQuests' (a nil value)
[string "=[C]"]: in function `GetGossipAvailableQuests'
[string "@Interface/AddOns/AutoGear/AutoGear.lua"]:2287: in function <Interface/AddOns/AutoGear/AutoGear.lua:2251>

Locals: (*temporary) = <function> defined =[C]:-1

I see you made use of the below version check to differentiate Classic Era (Classic) with Classic WotLK (ClassicRetail)

if (TOC_VERSION_CURRENT >= TOC_VERSION_SL or (TOC_VERSION_CURRENT >= 30401 and TOC_VERSION_CURRENT < TOC_VERSION_CATA)) then

My understanding is that, starting at 1.14.4.51001, the Classic branch got merged with the ClassicRetail branch. Therefore this line can be removed and all can be treated the same as ClassicRetail.

AlexFolland commented 1 year ago

Thanks for the report and the pull request with the fix. I've squashed the commits and merged the pull request as one commit.