Selaa lähdekoodia

Fixed barter packetversion checks

Lemongrass3110 3 vuotta sitten
vanhempi
commit
e2c15afd9d
4 muutettua tiedostoa jossa 7 lisäystä ja 7 poistoa
  1. 1 1
      conf/battle/feature.conf
  2. 2 2
      src/map/battle.cpp
  3. 3 3
      src/map/clif.cpp
  4. 1 1
      src/map/clif_packetdb.hpp

+ 1 - 1
conf/battle/feature.conf

@@ -113,7 +113,7 @@ feature.attendance: on
 feature.privateairship: on
 
 // Barter Shop System (Note 1)
-// Requires: 2018-07-04RagexeRE or later
+// Requires: 2019-01-16RagexeRE or later
 feature.barter: on
 
 // Extended Barter Shop System (Note 1)

+ 2 - 2
src/map/battle.cpp

@@ -10267,9 +10267,9 @@ void battle_adjust_conf()
 	}
 #endif
 
-#if !( PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114 )
+#if !( PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226 )
 	if( battle_config.feature_barter ){
-		ShowWarning("conf/battle/feature.conf barter shop system is enabled but it requires PACKETVER 2018-07-04 or newer, disabling...\n");
+		ShowWarning("conf/battle/feature.conf barter shop system is enabled but it requires PACKETVER 2019-01-16 or newer, disabling...\n");
 		battle_config.feature_barter = 0;
 	}
 #endif

+ 3 - 3
src/map/clif.cpp

@@ -22739,7 +22739,7 @@ void clif_parse_inventory_expansion_reject( int fd, struct map_session_data* sd
 }
 
 void clif_barter_open( struct map_session_data& sd, struct npc_data& nd ){
-#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
 	if( nd.subtype != NPCTYPE_BARTER || nd.u.barter.extended || sd.state.barter_open ){
 		return;
 	}
@@ -22796,7 +22796,7 @@ void clif_barter_open( struct map_session_data& sd, struct npc_data& nd ){
 }
 
 void clif_parse_barter_close( int fd, struct map_session_data* sd ){
-#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
 	if( sd->state.barter_open ){
 		sd->npc_shopid = 0;
 		sd->state.barter_open = false;
@@ -22805,7 +22805,7 @@ void clif_parse_barter_close( int fd, struct map_session_data* sd ){
 }
 
 void clif_parse_barter_buy( int fd, struct map_session_data* sd ){
-#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
 	// No shop open
 	if( sd->npc_shopid == 0 || !sd->state.barter_open ){
 		return;

+ 1 - 1
src/map/clif_packetdb.hpp

@@ -2417,7 +2417,7 @@
 	parseable_packet( HEADER_CZ_INVENTORY_EXPAND_REJECTED, sizeof( struct PACKET_CZ_INVENTORY_EXPAND_REJECTED ), clif_parse_inventory_expansion_reject, 0 );
 #endif
 
-#if PACKETVER_MAIN_NUM >= 20181121 || PACKETVER_RE_NUM >= 20180704 || PACKETVER_ZERO_NUM >= 20181114
+#if PACKETVER_MAIN_NUM >= 20190116 || PACKETVER_RE_NUM >= 20190116 || PACKETVER_ZERO_NUM >= 20181226
 	parseable_packet( HEADER_CZ_NPC_BARTER_PURCHASE, -1, clif_parse_barter_buy, 0 );
 	parseable_packet( HEADER_CZ_NPC_BARTER_CLOSE, sizeof( struct PACKET_CZ_NPC_BARTER_CLOSE ), clif_parse_barter_close, 0 );
 #endif