Pierre-Sassoulas / grey-handling

Helps you get rid or exchange the right objects when your bags are full in World of Warcraft
https://www.curseforge.com/wow/addons/greyhandling
MIT License
3 stars 2 forks source link

Compatibility with Peddler #25

Closed Pierre-Sassoulas closed 4 years ago

Pierre-Sassoulas commented 5 years ago

Can you add compatibility with Peddler? Should be the same as Scrap.

Pierre-Sassoulas commented 5 years ago

The function local function itemIsToBeSold(itemID, uniqueItemID) is declared as local and is innaccessible.

Pierre-Sassoulas commented 5 years ago

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.

Pierre-Sassoulas commented 5 years ago

Will be possible once https://github.com/Cartas/Peddler/pull/4 is merged.

Jinnai commented 4 years ago

It's merged. Any updates?

Pierre-Sassoulas commented 4 years ago

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.

Pierre-Sassoulas commented 4 years ago

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).

Pierre-Sassoulas commented 4 years ago

Cartas released a new version with the API changes so everything should work with Peddler 1.3 and GreyHandling 1.5.1.