diff --git a/src/game/AuctionHouseMgr.cpp b/src/game/AuctionHouseMgr.cpp index 05d172cb6..fe86000e6 100644 --- a/src/game/AuctionHouseMgr.cpp +++ b/src/game/AuctionHouseMgr.cpp @@ -68,9 +68,16 @@ AuctionHouseObject * AuctionHouseMgr::GetAuctionsMap( uint32 factionTemplateId ) uint32 AuctionHouseMgr::GetAuctionDeposit(AuctionHouseEntry const* entry, uint32 time, Item *pItem) { - uint32 deposit = pItem->GetProto()->SellPrice * pItem->GetCount() * (time / MIN_AUCTION_TIME ); + float deposit = float(pItem->GetProto()->SellPrice * pItem->GetCount() * (time / MIN_AUCTION_TIME )); - return uint32(deposit * entry->depositPercent * 3 * sWorld.getConfig(CONFIG_FLOAT_RATE_AUCTION_DEPOSIT) / 100.0f ); + deposit = deposit * entry->depositPercent * 3.0f / 100.0f; + + float min_deposit = float(sWorld.getConfig(CONFIG_UINT32_AUCTION_DEPOSIT_MIN)); + + if (deposit < min_deposit) + deposit = min_deposit; + + return uint32(deposit * sWorld.getConfig(CONFIG_FLOAT_RATE_AUCTION_DEPOSIT)); } //does not clear ram diff --git a/src/game/World.cpp b/src/game/World.cpp index 6aeb6f9ef..bf97ab24e 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -485,6 +485,7 @@ void World::LoadConfigSettings(bool reload) setConfigPos(CONFIG_FLOAT_RATE_AUCTION_TIME, "Rate.Auction.Time", 1.0f); setConfig(CONFIG_FLOAT_RATE_AUCTION_DEPOSIT, "Rate.Auction.Deposit", 1.0f); setConfig(CONFIG_FLOAT_RATE_AUCTION_CUT, "Rate.Auction.Cut", 1.0f); + setConfigPos(CONFIG_UINT32_AUCTION_DEPOSIT_MIN, "Auction.Deposit.Min", 0); setConfig(CONFIG_FLOAT_RATE_HONOR, "Rate.Honor",1.0f); setConfigPos(CONFIG_FLOAT_RATE_MINING_AMOUNT, "Rate.Mining.Amount", 1.0f); setConfigPos(CONFIG_FLOAT_RATE_MINING_NEXT, "Rate.Mining.Next", 1.0f); diff --git a/src/game/World.h b/src/game/World.h index b289b9154..a806d824f 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -129,6 +129,7 @@ enum eConfigUInt32Values CONFIG_UINT32_GROUP_VISIBILITY, CONFIG_UINT32_MAIL_DELIVERY_DELAY, CONFIG_UINT32_UPTIME_UPDATE, + CONFIG_UINT32_AUCTION_DEPOSIT_MIN, CONFIG_UINT32_SKILL_CHANCE_ORANGE, CONFIG_UINT32_SKILL_CHANCE_YELLOW, CONFIG_UINT32_SKILL_CHANCE_GREEN, diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 58d337a00..9d9ffb23d 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -1163,6 +1163,10 @@ Visibility.Distance.Grey.Object = 10 # Rate.Auction.Cut # Auction rates (auction time, deposit get at auction start, auction cut from price at auction end) # +# Auction.Deposit.Min +# Mininumum auction deposit size in copper +# Default: 0 +# # Rate.Honor # Honor gain rate # @@ -1274,6 +1278,7 @@ Rate.Damage.Fall = 1 Rate.Auction.Time = 1 Rate.Auction.Deposit = 1 Rate.Auction.Cut = 1 +Auction.Deposit.Min = 0 Rate.Honor = 1 Rate.Mining.Amount = 1 Rate.Mining.Next = 1 diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 0095e4755..36d31d2f3 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "10116" + #define REVISION_NR "10117" #endif // __REVISION_NR_H__