Fixed barter packetversion checks
This commit is contained in:
parent
50d7c4052f
commit
e2c15afd9d
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user