LUA Error on some Vendors like "Danky" in my case
fubaWoW opened this issue ยท 1 comments
Actual Behavior
see LUA Error
Steps to Reproduce the Problem
- find Danky
- Open Vendor Window
- Error
LUA Error:
13x !Vendorer\core.lua:1877: Usage: GetItemQualityColor(index)
[string "=[C]"]: in function `GetItemQualityColor'
[string "@!Vendorer\core.lua"]:1877: in function `UpdateMerchantInfo'
[string "@!Vendorer\core.lua"]:1801: in function <!Vendorer\core.lua:1801>
[string "=[C]"]: in function `MerchantFrame_UpdateMerchantInfo'
[string "@FrameXML\MerchantFrame.lua"]:138: in function <FrameXML\MerchantFrame.lua:131>
[string "=[C]"]: in function `MerchantFrame_Update'
[string "@!Vendorer\vendorfilter.lua"]:566: in function `UpdateMerchantItems'
[string "@!Vendorer\vendorfilter.lua"]:612: in function `RefreshFilter'
[string "@!Vendorer\vendorfilter.lua"]:572: in function `ResetFilter'
[string "@!Vendorer\core.lua"]:1728: in function `?'
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:119: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:29: in function <...Ons\Ace3\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
[string "@Ace3\CallbackHandler-1.0\CallbackHandler-1.0-7.lua"]:64: in function `Fire'
[string "@Ace3\AceEvent-3.0\AceEvent-3.0-4.lua"]:120: in function <Ace3\AceEvent-3.0\AceEvent-3.0.lua:119>
Locals:
(*temporary) = nil
already did the "proper" fix in my pull request but cause reasons you changed it and it throws an error again :D
here we go again, change:
return tonumber(currencyID), info;
to
return tonumber(currencyID), info.name, info.quantity, info.iconFileID, info.quantityEarnedThisWeek, info.maxWeeklyQuantity, info.maxQuantity, info.discovered, info.quality;
OR (if you don't like my fix) change ALL the functions where you call Addon:GetCurrencyInfo
because the return value does not match the needed values!
for example:
C_CurrencyInfo.GetCurrencyInfo(515)
while 515 = Darkmoon Prize Ticket), returns this:
[1]={
canEarnPerWeek=false,
quantityEarnedThisWeek=0,
isHeaderExpanded=false,
isTradeable=false,
maxQuantity=0,
iconFileID=134481,
maxWeeklyQuantity=0,
isHeader=false,
name="Darkmoon Prize Ticket",
isTypeUnused=false,
isShowInBackpack=false,
discovered=true,
quantity=5,
quality=1
}
which are 14 values
but your function MUST return this and MUST be this order:
name
quantity
iconFileID
quantityEarnedThisWeek
maxWeeklyQuantity
maxQuantity
discovered
quality
it's just 8 values AND it is in a different order then C_CurrencyInfo.GetCurrencyInfo
return!
so you can not just return info
^^
greetings, fuba
Hello, I created a PR addressing all these issues for DragonFlight! From what I tested, the addon is completely functional.
#32.
Feel free to use the code from my fork that is compatible with DF, making the addon functional again, until the author can approve it!
https://github.com/sebid/Vendorer/archive/refs/heads/master.zip