* AhBot Pricing: Make things more clear
* Change default value to BuyPrice and add some more information to how two sided AH works
* Sync c++ configs with .conf ones
Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
(cherry picked from commit 812c2af4da)
The names are a bit unhandy. Rename them (shorter but still meaningful).
GetGameTimeSystemPoint() -> GetSystemTime()
GetGameTimeSteadyPoint() -> Now()
Also add 2 new typedefs:
typedef std::chrono::steady_clock::time_point TimePoint;
typedef std::chrono::system_clock::time_point SystemTimePoint;
Closes#25042
(cherry picked from commit 896b68d5c2)
- Use AuctionHouseBot.Class.* for what they really are, priorities, factor them when calculating item amount per class, changed enums to CONFIG_AHBOT_CLASS_*_PRIORITY to reflect this change
- Don't factor in the priority calc empty item lists:
* Let's say you had AuctionHouseBot.Class.Glyph set to 10, sum of AuctionHouseBot.Class.* is 20, and AuctionHouseBot.Items.Amount.White is 5000
* If there were no glyphs on the item list, you automatically lost 50% of the total item amount, meaning only 2500 of original 5000 were alloted to fill
- Fixed AuctionHouseBot.AH.Price.Ratio to be an actual percentage factor
- Separated containers in SellerConfiguration, each one better reflects what kind of data is stored there, now we won't use magic index 0 from _ItemInfo :P
- General cleanup, removal of bad voodoo and magical numbers
- Use unordered_sets for loading item lists, as they were only used to check for item presence
(cherry picked from commit 7f8bfe68d0)
- Actions will not be dependent on processing moment
- Increased GameObjects cooldown resolution to milliseconds, fixes arming time of traps to be exactly one second and not something from range (1000, 1999)
- Created GameTime namespace and UpdateTime class and moved there some code out of world
(cherrypicked from 7567cafec8)
Apply an exponential formula to define the chance to bid/buyout an auction depending on auction price and item price ratio. The formula can be adjusted changing the new AuctionHouseBot.Buyer.ChanceFactor config parameter
Chance = 100 ^ (1 + (1 - (auction_price / item_price) / k)
k is the config parameter AuctionHouseBot.Buyer.ChanceFactor, the higher the number the higher chance to buy overpriced auctions.
(cherry picked from commit 177b6319d1)
Conflicts:
src/server/game/AuctionHouseBot/AuctionHouseBotBuyer.cpp
Correct AuctionHouseType definition to log the right AH type.
Handle auctions without bidder but with a bid as bought by the AH Bot
Closes#14124
(cherry picked from commit 2eee1b349f)
Conflicts:
src/server/game/AuctionHouse/AuctionHouseMgr.cpp
Warning: CMake must be rerun
Apply if you have crashes
Rewrite Seller prices, add random properties and implement some suggestions on price calculations
Core/AHBot: Update to latest suggestions
Fix SQLs after merge, split the AH bot to spearate headers and cpps, fix the config default values
Remove case 8 from GetBuyModifier. It was not correct
Fix Gray Grey GRAY typos
Change message config name
Fix non pch build
Fix switch ident, also earlier removed whitespace. Add missing include for non pch build
Fix possible crash: if (forplayer || GetOwnerGUID()) changed to if (forplayer)
Apply Nayd.diff - Code style fixes
Fix leftovers from nayd
Correct SQL transaction and change one SQL query to C++ instead
Make loot items distinct