Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: No enchanting materials exists on AH #73

Open
ChrisFredriksson opened this issue Sep 12, 2023 · 8 comments
Open

Bug: No enchanting materials exists on AH #73

ChrisFredriksson opened this issue Sep 12, 2023 · 8 comments

Comments

@ChrisFredriksson
Copy link

Current Behaviour

Can't find any enchanting material on AH; Strange Dust, Dream Dust, Greater Magic Essence and so on.. No materials found on AH.

None of these are listed in the DB table "mod_auctionhousebot_disabled_items".

Expected Behaviour

All enchanting materials except the ones specified in DB table "mod_auctionhousebot_disabled_items".

Steps to reproduce the problem

Launch server with AHBot module

Extra Notes

I have set minitems to 140 000 and maxitems to 150 000.

AC rev. hash/commit

AzerothCore rev. 1209d61565cb+ 2023-08-11 22:20:06 +0000 (master branch)

Operating system

Debian 12 x64

Custom changes or Modules

AutoBalance
IndividualProgression
SoloLFG
NPCBots

@dedmen
Copy link

dedmen commented Oct 31, 2023

Example 11137
has a BuyPrice of 4000, and a SellPrice of 0.

As the bot by default uses SellPrice, it seeing a price of zero might make it not work.

https://github.com/georgzoeller/mod-ah-bot/blob/master/src/AuctionHouseBot.cpp#L868

Here we exit if the SellPrice is zero.
Problem is, you cannot fix it by switching to BuyPrice. Well it would fix enchant mats, but that will break other things that cannot be purchased from vendor, and don't have a buy price.

There needs to be a fallback where it will use the BuyPrice if the SellPrice is zero.

@ChrisFredriksson
Copy link
Author

Aha! I didn't even think of checking the source...! lol..

Well, either one could reprogram it, after all it is C so, I should be able to do it quite easily.. or, more "easy" approach could be to add sell prices to the mats.. sure then you can sell them to a vendor I guess, but I don't really care about that.. Of course, not pure blizzlike behavior, but could get around to having those mats on AH at least, for now..

What's your thought on that?

@dedmen
Copy link

dedmen commented Nov 1, 2023

I would like to have a fallback, if sellPrice doesn't exist, then use buyprice.
I plan to work on a extra price database, so one can import prices from real servers gathered with Auctioneer addon.
So instead of this vendor price calculation, have actual real world prices, which would also solve that problem.

@lanarchy
Copy link

Agreed, a fallback would be awesome! Or an override field we can add items to such as copper ores, and whatnot.

@Akaitatsu
Copy link

When I was researching #74 I noticed that some of these items have buy and sell prices set to 0. So, even falling back won't work. If you set prices, I am interested to see what you set them to.

@lanarchy
Copy link

Would there be any real downside to changing anything with a price of 0 to a price of 1? That way they should at least populate the auction house and then we can go from there to dial the price in.
I will see if I can go through some of the common trade good items and try to price them appropriately and let people know when I have time.

@dedmen
Copy link

dedmen commented Nov 15, 2023

I am interested to see what you set them to.

I run this fork
https://github.com/DedmenWoW/mod-ah-bot/blob/master/src/ItemIndex.cpp#L35

With data I exported from my Auctioneer addon data from a bigger server.
mod_auctionhousebot_priceOverride.txt

@Akaitatsu
Copy link

Akaitatsu commented Nov 16, 2023

Your code looks much better than what I have been wading through in the main repo. I have only looked through it briefly though, and I don't see the script for your override table. One other suggestion that we've mentioned in here is to fall back to the buy/sell price if the preferred base price is 0. Here is what I implemented yesterday for my tiny (max 3 players) server.

            // Buy Count is used later when the buy price is for multiple items (arrows, bullets, etc.)
            uint32 buyCount = 1;
            // Favor SellMethod (Use Buy Price), but fall back if price is 0
            if (SellMethod)
            {
                if (prototype->BuyPrice > 0)
                {
                    buyoutPrice = prototype->BuyPrice;
                    buyCount = prototype->BuyCount;
                }
                else
                    buyoutPrice = prototype->SellPrice * 4;
            }
            else
            {
                if (prototype->SellPrice > 0)
                    buyoutPrice = prototype->SellPrice;
                else
                {
                    // Adjust base price rounding up
                    buyoutPrice = (prototype->BuyPrice + 4 - 1) / 4;
                    buyCount = prototype->BuyCount;
                }
            }

I am still researching the data to come up with a query that will pull items that aren't showing up for an unknown reason. I think there are some loot tables missing items but I am not sure.

Edit: I just learned about DBC data and how some of it is in the DBC files and that only overrides are in the DBC tables. Since AH Bot depends on references to item templates being in the database, anything that isn't overridden in the DBC tables is going to be skipped. We might also need an "include" table so we can specify items we want in the AH but the bot can't find in the database. Examples:

  • 8067 - Crafted Light Shot
  • 13935 - Baked Salmon
  • 5095 - Rainbow Fin Albacore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants