ソースを参照

Adds safety check for Barter Shops (#6995)

* Fixes #6895.
* Adds a safety check for multiple non-stackable items being used as the purchase type.
Thanks to @samers1!
Aleos 3 年 前
コミット
18050028e3
1 ファイル変更1 行追加1 行削除
  1. 1 1
      src/map/npc.cpp

+ 1 - 1
src/map/npc.cpp

@@ -3120,7 +3120,7 @@ e_purchase_result npc_barter_purchase( struct map_session_data& sd, std::shared_
 					return e_purchase_result::PURCHASE_FAIL_GOODS;
 				}
 			}else{
-				for( int i = 0; i < requirement->amount; i++ ){
+				for( int i = 0; i < (requirement->amount * amount); i++ ){
 					int j;
 
 					for( j = 0; j < MAX_INVENTORY; j++ ){