kvakvs / wow-Restocker

0 stars 3 forks source link

Data Storage Request #9

Open Gogo1951 opened 3 years ago

Gogo1951 commented 3 years ago

Feel free to close this as dumb...

Currently data is stored like this:

        {
            ["itemLink"] = "|cffa335ee|Hitem:29434::::::::70::::::::|h[Badge of Justice]|h|r",
            ["itemName"] = "Badge of Justice",
            ["itemID"] = 29434,
            ["amount"] = 0,
        }, -- [23]

As someone who likes to manually edit add-on data... to help keep them in sync across various toons... I'd love it if items were just stored as a list that was a little easier to work with. That way I could like import all the LW items, and set the quantity to 0 so I always have them in my bank, before running to my mail box to dump them into TSM's auto mailing.

While I can easily copy existing entries, the data format makes it harder to add items outside of the in-game interface.

What I'd love is to have the list be more...

[realm] [character] [items] ITEM_ID, ITEM_QUANTITY; -- COMMENT OF ITEM NAME

Would you take a PR to refactor the way data is stored and then have the add-on do a lookup on login to retrieve the item names based on the IDs so it wouldn't have to store them in saved variables? Might be kind of cool to have a tooltip on the items as well, instead of just having them all set to white text. Let me know, happy to help if you're open!