From 6ccf15330e181ee4ce3bb061a52e1c2667b182a5 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Fri, 4 Feb 2022 16:17:30 +0100 Subject: [PATCH] Added support for unlimited supplies in market shops (#6571) Fixes #6569 Thanks to @JohnnyPlayy, @Balferian and @Toshiro90 Co-authored-by: Aleos --- doc/script_commands.txt | 20 ++++--- sql-files/main.sql | 2 +- sql-files/upgrades/upgrade_20220204.sql | 3 + src/map/clif.cpp | 73 +++++++++++++++++-------- src/map/npc.cpp | 68 ++++++++++++----------- src/map/npc.hpp | 24 ++------ src/map/script.cpp | 18 +++++- 7 files changed, 124 insertions(+), 84 deletions(-) create mode 100644 sql-files/upgrades/upgrade_20220204.sql diff --git a/doc/script_commands.txt b/doc/script_commands.txt index d85b9e2e0f..5c19218c2e 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -291,7 +291,7 @@ these floating NPC objects are for. More on that below. -%TAB%pointshop%TAB%%TAB%,{:},:{,:...} ,,,%TAB%pointshop%TAB%%TAB%,{:},:{,:...} -,,,%TAB%marketshop%TAB%%TAB%,::{,::...} +,,,%TAB%marketshop%TAB%%TAB%,::{,::...} Note: Additionally barter shops can be defined in npc/barters.yml @@ -320,6 +320,9 @@ temporary character variables, permanent local account variables or permanent gl variables. These variables must be of integer type, not string. 'discount' flag is an optional value which makes the price at that shop become affected by discount skill. +"marketshop" can have limited quantity of an item in stock. +Use -1 in the stock field to have unlimited stock in a marketshop. + ** Define an warp/shop/cashshop/itemshop/pointshop/NPC duplicate. warp/warp2: ,,,%TAB%duplicate(