arkayenro / arkinventory

A World of Warcraft Inventory mod for Retail, Burning Crusade, and Classic
108 stars 14 forks source link

Request: Rules based on TSM db #1267

Open truecallingAD opened 4 years ago

truecallingAD commented 4 years ago

Hi @arkayenro ,

It would be really great to be able to configure rules based on TSM dbminbuyout/dbmarket/dbmarketavg (in retail WoW). Standard use case for me would be that I'm on a farming char, and plenty BoEs drop, but I want to be able to easily distinguish what is worth selling on ah.

Second part to this is I would love to be able to have a total value (based on one of the dbvalues) showup as a sort of "title" to a bar.

Many thanks, /Truecalling-Argent Dawn EU

arkayenro commented 4 years ago

first part, can tsm put those items in one of its groups? i think that would be the cosest i could get

second part cant happen, sorry

truecallingAD commented 4 years ago

I asked TSM team and they said they can't create dynamic groups based on dbvalues (all groups are static). Best that can happen in that respect is using itemids, at which point I could just create an arkinventory category...hah.

Thanks anyways, might have to get my coding hat on.

RamyRafik commented 4 years ago

This does what you are asking for, but it's no longer in development (latest was for 7.0.3) https://www.curseforge.com/wow/addons/arkinventoryrules_tsmvalue It just needs few updates to use TSM 4 API instead of 3

arkayenro commented 4 years ago

thats the problem with using values that change

most of the rule functions rely on item data that never changes because recalculating an items category data is costly (like really laggy slow unplayable costly) so its cached knowing that i can just pull it from there instead of recalculating it all the time

i can "cheat" and allow some things to change, but thats only because i include that thing into the cache id for an item so while it can change i've probably cached it already. i do this for bag ids (and slot ids although im not sure why).

you can check the ArkInventory.ObjectIDRule and ArkInventory.ObjectIDCategory in the ArkInventoryStorage.lua file to see what the ruleid is (it might be in the debug data as well, cant remember)

price is not something i can include in the cache id at all, it changes too much, and would suck up a tonne of memory (not that that matters too much but some people get narky over using lots of it)

RamyRafik commented 4 years ago

Thanks for response. AFAIK, TSM prices don't change within a game session. The only way to change them is through TSM desktop app (which modifies TSM addon config files), and restarting/reloading the game. So, I think caching the price once per session will always be correct.