Compatibility with Peddler
Pierre-Sassoulas opened this issue ยท 7 comments
Will be possible once Cartas/Peddler#4 is merged.
I think I made a mistake when I said that you only needed to add a namespace to make it public. I can't access the Peddler function right now. So I installed a dev version of Peddler locally and I'm going to make a merge request to peddler when I manage to make it works together. I had to refactor my options before being able to choose between Scrap, Peddler and my addon for determining what is junk, and that's what I just did in 1.5.0 so I will be able to test Peddler integration soon.
I close because the code should work in the future, but as long as Peddler does not merge the change and publish the new version of the API I cannot publish a new version myself (or it will be buggy).
Cartas released a new version with the API changes so everything should work with Peddler 1.3
and GreyHandling 1.5.1
.
The function local function itemIsToBeSold(itemID, uniqueItemID)
is declared as local and is innaccessible.
The Peddler's dev accepted to make it public
https://www.curseforge.com/wow/addons/peddler#c139
How do I go about making said function public so that you can access it?
I think you only have to remove the "local" keyword. But in order to do something cleaner you could do :
local function itemIsToBeSold(itemID, uniqueItemID)
=>function Peddler.itemIsToBeSold(itemID, uniqueItemID)
. So we have a Peddler namespace attached to it and it's easier to understand what's happening.