Browse Source

Fixed market response packet when purchase fails (#7751)

The item list was still sent to the client even when the purchase failed because p->result is no longer 0 in PACKETVER >= 20190807.
Jittapan Pluemsumran 2 năm trước cách đây
mục cha
commit
d3b99e6dc1
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/map/clif.cpp

+ 1 - 1
src/map/clif.cpp

@@ -2374,7 +2374,7 @@ void clif_npc_market_purchase_ack( map_session_data *sd, e_purchase_result res,
 	p->result = ( res == e_purchase_result::PURCHASE_SUCCEED ? 1 : 0 );
 #endif
 
-	if( p->result ){
+	if( res == e_purchase_result::PURCHASE_SUCCEED ){
 		for( int i = 0, j, count = 0; i < list.size(); i++ ){
 			ARR_FIND( 0, nd->u.shop.count, j, list[i].nameid == nd->u.shop.shop_item[j].nameid );