mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-13 21:49:49 +01:00
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!
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user