From 817a2ce4f744d75e8526e351b35ed1c787cc5b01 Mon Sep 17 00:00:00 2001 From: Tomatoes Date: Thu, 17 Sep 2015 13:12:37 -0500 Subject: Server/Game/AuctionHouse Fixes world config value of less than 1 being ignored by deposit formula. Had problems with the last commits and pr, sorry Update AuctionHouseMgr.cpp Adds another check to config to handle values over 1 and properly adjust the minimum higher. Thanks jackpoz! --- src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 4b48f1f341b..7c708cb1ae9 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -66,7 +66,7 @@ uint32 AuctionHouseMgr::GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 uint32 MSV = pItem->GetTemplate()->SellPrice; if (MSV <= 0) - return AH_MINIMUM_DEPOSIT; + return AH_MINIMUM_DEPOSIT * sWorld->getRate(RATE_AUCTION_DEPOSIT); float multiplier = CalculatePct(float(entry->depositPercent), 3); uint32 timeHr = (((time / 60) / 60) / 12); @@ -77,8 +77,8 @@ uint32 AuctionHouseMgr::GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 TC_LOG_DEBUG("auctionHouse", "Multiplier: %f", multiplier); TC_LOG_DEBUG("auctionHouse", "Deposit: %u", deposit); - if (deposit < AH_MINIMUM_DEPOSIT) - return AH_MINIMUM_DEPOSIT; + if (deposit < AH_MINIMUM_DEPOSIT * sWorld->getRate(RATE_AUCTION_DEPOSIT)) + return AH_MINIMUM_DEPOSIT * sWorld->getRate(RATE_AUCTION_DEPOSIT); else return deposit; } -- cgit v1.2.3