소스 검색

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 년 전
부모
커밋
d3b99e6dc1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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 );