mirror of
https://github.com/SWG-Source/src.git
synced 2026-07-13 21:01:08 -04:00
Add max auctions per player cfg option
This commit is contained in:
@@ -769,7 +769,7 @@ bool AuctionMarket::HasOpenAuctionSlots(const NetworkId & playerId)
|
||||
std::map<NetworkId, int>::iterator f = m_auctionCountMap.find(playerId);
|
||||
if (f != m_auctionCountMap.end())
|
||||
{
|
||||
if ((*f).second >= MAX_AUCTIONS_PER_PLAYER)
|
||||
if ((*f).second >= ConfigCommodityServer::getMaxAuctionsPerPlayer())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -63,6 +63,7 @@ void ConfigCommodityServer::install(void)
|
||||
KEY_INT (maxAuctionsPerPage, 100);
|
||||
KEY_INT (minutesBazaarAuctionTimer, 10080);
|
||||
KEY_INT (minutesBazaarItemTimer, 10080);
|
||||
KEY_INT (maxAuctionsPerPlayer, 25);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
@@ -48,6 +48,7 @@ class ConfigCommodityServer
|
||||
int maxAuctionsPerPage;
|
||||
int minutesBazaarAuctionTimer; // max time an item is listed on bazaar
|
||||
int minutesBazaarItemTimer; // max time a bazaar item is held by system after it expires for pickup by the seller (auction time + item time)
|
||||
int maxAuctionsPerPlayer; // max number of auctions a player can have active at any given time
|
||||
};
|
||||
|
||||
static uint16 getCMServerServiceBindPort ();
|
||||
@@ -82,6 +83,7 @@ class ConfigCommodityServer
|
||||
static int getMaxAuctionsPerPage ();
|
||||
static int getMinutesBazaarAuctionTimer ();
|
||||
static int getMinutesBazaarItemTimer ();
|
||||
static int getMaxAuctionsPerPlayer ();
|
||||
|
||||
static void install ();
|
||||
static void remove ();
|
||||
@@ -312,4 +314,10 @@ inline int ConfigCommodityServer::getMinutesBazaarItemTimer() {
|
||||
return data->minutesBazaarItemTimer;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------
|
||||
|
||||
inline int ConfigCommodityServer::getMaxAuctionsPerPlayer() {
|
||||
return data->maxAuctionsPerPlayer;
|
||||
}
|
||||
|
||||
#endif // _ConfigCommodityServer_H
|
||||
|
||||
-2
@@ -12,8 +12,6 @@
|
||||
#define AUCTION_VENDOR_TRANSFER (1 << 12)
|
||||
#define AUCTION_OFFERED_ITEM (1 << 14)
|
||||
|
||||
#define MAX_AUCTIONS_PER_PLAYER 25
|
||||
|
||||
#include "AuctionData.h"
|
||||
|
||||
//#ifndef max
|
||||
|
||||
Reference in New Issue
Block a user