diff options
author | Tomatoes <diredarknil@gmail.com> | 2015-09-17 13:12:37 -0500 |
---|---|---|
committer | Tomatoes <diredarknil@gmail.com> | 2015-09-26 20:31:10 -0500 |
commit | 817a2ce4f744d75e8526e351b35ed1c787cc5b01 (patch) | |
tree | f31b827ba2efe00658aaf11693cba19ac5fcb06b /src | |
parent | c5cc7cca3e29e176b5ec0405a05c3db8e19c4e93 (diff) |
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!
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |