summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-29 12:41:16 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-29 12:41:16 +0000
commit257315e53a493c10e5931eccca0daf51dd01fa54 (patch)
treeb20522d10e6ae73f52c792fccaaa568b804e905d
parent73ced774f2fee93de2881356144ba539d3396118 (diff)
downloadhercules-257315e53a493c10e5931eccca0daf51dd01fa54.tar.gz
hercules-257315e53a493c10e5931eccca0daf51dd01fa54.tar.bz2
hercules-257315e53a493c10e5931eccca0daf51dd01fa54.tar.xz
hercules-257315e53a493c10e5931eccca0daf51dd01fa54.zip
* Updated script commands 'npcshopitem', 'npcshopadditem' and 'npcshopdelitem' to support cashshops as well (bugreport:4928).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14836 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--doc/script_commands.txt11
-rw-r--r--src/map/script.c6
3 files changed, 11 insertions, 7 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 0c44c479f..c67753689 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -1,6 +1,7 @@
Date Added
2011/05/29
+ * Updated script commands 'npcshopitem', 'npcshopadditem' and 'npcshopdelitem' to support cashshops as well (bugreport:4928). [Ai4rei]
* Fixed players could add themselves to their friendslist through their clones or WPE (bugreport:4909). [Ai4rei]
* Fixed bonus 'bHPDrainValue' on left hand would work as right hand bonus, when specified with 'bonus' rather than 'bonus2' (bugreport:4939, since r6221). [Ai4rei]
2011/05/23
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index a8f3fb63c..e0730cd3b 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -4,7 +4,7 @@
//= A reference manual for the eAthena scripting language.
//= Commands are sorted depending on their functionality.
//===== Version ===========================================
-//= 3.42.20110508
+//= 3.43.20110529
//=========================================================
//= 1.0 - First release, filled will as much info as I could
//= remember or figure out, most likely there are errors,
@@ -174,6 +174,9 @@
//= 3.42.20110508
//= Updated description of all instance commands to reflect actual behavior.
//= [Ai4rei]
+//= 3.43.20110529
+//= Updated 'npcshopitem', 'npcshopadditem' and 'npcshopdelitem' to support
+//= cashshops as well. [Ai4rei]
//=========================================================
This document is a reference manual for all the scripting commands and functions
@@ -5660,7 +5663,7 @@ npcshopitem was used. After rechecking the source, I found what caused this.
*npcshopitem "<name>",<item id>,<price>{,<item id>,<price>{,<item id>,<price>{,...}}}
-This command lets you override the contents of an existing NPC shop. The
+This command lets you override the contents of an existing NPC shop or cashshop. The
current sell list will be wiped, and only the items specified with the price
specified will be for sale.
@@ -5673,7 +5676,7 @@ Note that you cannot use -1 to specify default selling price!
*npcshopadditem "<name>",<item id>,<price>{,<item id>,<price>{,<item id>,<price>{,...}}}
This command will add more items at the end of the selling list for the
-specified NPC shop. If you specify an item already for sell, that item will
+specified NPC shop or cashshop. If you specify an item already for sell, that item will
appear twice on the sell list.
The function returns 1 if shop was updated successfully, or 0 if not found.
@@ -5684,7 +5687,7 @@ Note that you cannot use -1 to specify default selling price!
*npcshopdelitem "<name>",<item id>{,<item id>{,<item id>{,...}}}
-This command will remove items from the specified NPC shop.
+This command will remove items from the specified NPC shop or cashshop.
If the item to remove exists more than once on the shop, all instances will be
removed.
diff --git a/src/map/script.c b/src/map/script.c
index a33b58341..44bac8c9d 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -12875,7 +12875,7 @@ BUILDIN_FUNC(npcshopitem)
int n, i;
int amount;
- if( !nd || nd->subtype != SHOP )
+ if( !nd || ( nd->subtype != SHOP && nd->subtype != CASHSHOP ) )
{ //Not found.
script_pushint(st,0);
return 0;
@@ -12904,7 +12904,7 @@ BUILDIN_FUNC(npcshopadditem)
int n, i;
int amount;
- if( !nd || nd->subtype != SHOP )
+ if( !nd || ( nd->subtype != SHOP && nd->subtype != CASHSHOP ) )
{ //Not found.
script_pushint(st,0);
return 0;
@@ -12935,7 +12935,7 @@ BUILDIN_FUNC(npcshopdelitem)
int amount;
int size;
- if( !nd || nd->subtype != SHOP )
+ if( !nd || ( nd->subtype != SHOP && nd->subtype != CASHSHOP ) )
{ //Not found.
script_pushint(st,0);
return 0;