shirsig / aux-addon

Auction House addOn for Classic (1.13) IMPORTANT: The folder name must be "aux-addon" IMPORTANT: The Vanilla (1.12) version moved here https://github.com/shirsig/aux-addon-vanilla
https://www.curseforge.com/wow/addons/aux
196 stars 42 forks source link

Suggestion: Disenchant tooltip component values #107

Open goudekid opened 7 years ago

goudekid commented 7 years ago

So lets say you're DEing some shield, the tooltip will show 1-2 greater ess, 2-5 dust, and a small chance at a shard- what I would like is if it also showed the current prices (pref daily and overall) for these components so I can see what my odds of a good return are at a glance.

goudekid commented 7 years ago

Went ahead and implemented the functionality myself in my own aux install, no clue how github works but message me if you want it I guess

Seminko commented 6 years ago

How did you do it? Just noticed that the disenchant value is calculated (probably) using 100% of historical value instead of current value.

goudekid commented 6 years ago

How did you do it? Just noticed that the disenchant value is calculated (probably) using 100% of historical value instead of current value.

As I recall, all I had to do was change the var for all the mats from historical to current value somewhere.

Seminko commented 6 years ago

could you be more specific? :)

I guess it might do with these two in filter.lua?

    ['bid-disenchant-profit'] = {
        input_type = 'money',
        validator = function(amount)
            return function(auction_record)
                local disenchant_value = disenchant.value(auction_record.slot, auction_record.quality, auction_record.level)
                return disenchant_value and disenchant_value - auction_record.bid_price >= amount
            end
        end
    },

    ['disenchant-profit'] = {
        input_type = 'money',
        validator = function(amount)
            return function(auction_record)
                local disenchant_value = disenchant.value(auction_record.slot, auction_record.quality, auction_record.level)
                return auction_record.buyout_price > 0 and disenchant_value and disenchant_value - auction_record.buyout_price >= amount
            end
        end
    },
goudekid commented 6 years ago

I would love to be more help than that but I uh... might have deleted my wow folder a while ago with those changes. I haven't played in quite some time and since the classic announcement I didn't really want to play more on pservers.

Edit: Right after posting the above I had a flashback and kind-of maybe remembered how I did it; You have to go to disenchant.lua in the core folder and change every instance of history.market_value(itemid) to whatever the equivalent for a daily value is. (I think just history.value(itemid) )

Seminko commented 6 years ago

What a shame :) oh well

goudekid commented 6 years ago

See my previous comment for your solution maybe, I edited it a few times.

shirsig commented 6 years ago

You can make the disenchant value based on the "current value" by replacing "history.value" with "history.market_value" on line 42. However, be aware that unlike the historical value which is calculated in a way as to make it as reliable as possible the "current value" really is an internal value which i kinda regret ever exposing at all. It is plainly the minimum of the current day which can very easily be completely wrong (possibly way too high if you haven't done a full scan yet on that day or way too low because it can only get lower during the day)

goudekid commented 6 years ago

Even if that is the case- I thank you greatly for exposing it. The average market value basically didn't matter at all to me for the use cases that I had while the daily lowest value was of great use to me and made me a lot of money on my characters on Elysium.

shirsig commented 6 years ago

I wish I could find a better way to get a daily value though. TSM uses a more elaborate one, but it's based on a single full scan. To do the same for a daily value would require storing way too much data on a high pop server with noticeable performance impact, and would also be falsified by multiple scans as identical auctions cannot be identified as such, and using individual full scans is just not very suitable for vanilla imo with how slow scanning is.