summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/atcommand.c8
-rw-r--r--src/map/battle.c10
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/clif.c16
4 files changed, 33 insertions, 2 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 4933256a2..10c96e317 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -7956,10 +7956,14 @@ ACMD(feelreset)
/*==========================================
* AUCTION SYSTEM
*------------------------------------------*/
-ACMD(auction)
-{
+ACMD(auction) {
nullpo_ret(sd);
+ if( !battle_config.feature_auction ) {
+ clif->colormes(sd->fd,COLOR_RED,msg_txt(1484));
+ return false;
+ }
+
clif->auction_openwindow(sd);
return true;
diff --git a/src/map/battle.c b/src/map/battle.c
index a0e4e7ebc..91cb98d14 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6475,6 +6475,8 @@ static const struct _battle_data {
{ "snovice_call_type", &battle_config.snovice_call_type, 0, 0, 1, },
{ "guild_notice_changemap", &battle_config.guild_notice_changemap, 2, 0, 2, },
{ "feature.banking", &battle_config.feature_banking, 1, 0, 1, },
+ { "feature.auction", &battle_config.feature_auction, 0, 0, 2, },
+
};
#ifndef STATS_OPT_OUT
@@ -6705,6 +6707,14 @@ void battle_adjust_conf(void) {
}
#endif
+#if PACKETVER > 20120000 /* exact date not known */
+ if( battle_config.feature_auction == 1 ) {
+ ShowWarning("conf/battle/feature.conf:feature.auction is enabled but it is not stable on PACKETVER "EXPAND_AND_QUOTE(PACKETVER)", disabling...\n");
+ ShowWarning("conf/battle/feature.conf:feature.auction change value to '2' to silence this warning and maintain it enabled\n");
+ battle_config.feature_auction = 0;
+ }
+#endif
+
#ifndef CELL_NOSTACK
if (battle_config.cell_stack_limit != 1)
diff --git a/src/map/battle.h b/src/map/battle.h
index f1fa6ddc1..533fa40b0 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -462,6 +462,7 @@ struct Battle_Config {
int guild_notice_changemap;
int feature_banking;
+ int feature_auction;
} battle_config;
// Dammage delayed info
diff --git a/src/map/clif.c b/src/map/clif.c
index 0c21c796c..d1f416146 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -14988,6 +14988,9 @@ void clif_Auction_openwindow(struct map_session_data *sd)
if( sd->state.storage_flag || sd->state.vending || sd->state.buyingstore || sd->state.trading )
return;
+ if( !battle_config.feature_auction )
+ return;
+
WFIFOHEAD(fd,packet_len(0x25f));
WFIFOW(fd,0) = 0x25f;
WFIFOL(fd,2) = 0;
@@ -15077,6 +15080,9 @@ void clif_parse_Auction_setitem(int fd, struct map_session_data *sd)
int amount = RFIFOL(fd,4); // Always 1
struct item_data *item;
+ if( !battle_config.feature_auction )
+ return;
+
if( sd->auction.amount > 0 )
sd->auction.amount = 0;
@@ -15152,6 +15158,9 @@ void clif_parse_Auction_register(int fd, struct map_session_data *sd)
struct auction_data auction;
struct item_data *item;
+ if( !battle_config.feature_auction )
+ return;
+
auction.price = RFIFOL(fd,2);
auction.buynow = RFIFOL(fd,6);
auction.hours = RFIFOW(fd,10);
@@ -15283,6 +15292,9 @@ void clif_parse_Auction_search(int fd, struct map_session_data* sd)
short type = RFIFOW(fd,2), page = RFIFOW(fd,32);
int price = RFIFOL(fd,4); // FIXME: bug #5071
+ if( !battle_config.feature_auction )
+ return;
+
clif->pAuction_cancelreg(fd, sd);
safestrncpy(search_text, (char*)RFIFOP(fd,8), sizeof(search_text));
@@ -15298,6 +15310,10 @@ void clif_parse_Auction_search(int fd, struct map_session_data* sd)
void clif_parse_Auction_buysell(int fd, struct map_session_data* sd)
{
short type = RFIFOW(fd,2) + 6;
+
+ if( !battle_config.feature_auction )
+ return;
+
clif->pAuction_cancelreg(fd, sd);
intif->Auction_requestlist(sd->status.char_id, type, 0, "", 1);