summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpanikon <panikon@zoho.com>2014-05-07 20:05:37 -0300
committerpanikon <panikon@zoho.com>2014-05-07 20:05:37 -0300
commitdb42e06f31fe98a28dce8cc05c480b897ab8cb99 (patch)
tree89093076e66c68e46be07186fe9a87674ab8485d
parent095c47f5345f63da79495487ca58b7a21800fb6c (diff)
downloadhercules-db42e06f31fe98a28dce8cc05c480b897ab8cb99.tar.gz
hercules-db42e06f31fe98a28dce8cc05c480b897ab8cb99.tar.bz2
hercules-db42e06f31fe98a28dce8cc05c480b897ab8cb99.tar.xz
hercules-db42e06f31fe98a28dce8cc05c480b897ab8cb99.zip
#Fixed issue 8175
*http://hercules.ws/board/tracker/issue-8175-missing-delequip/ *Documentation wrote by @emistry #Added return values for *delequip
-rw-r--r--doc/script_commands.txt10
-rw-r--r--src/map/script.c3
2 files changed, 13 insertions, 0 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 6aa75e82a..bb714d856 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -5091,6 +5091,16 @@ Example:
searchstores 10,1;
---------------------------------------
+
+*delequip <equipment slot>;
+
+This command will destroy whatever is currently equipped in the invoking
+character's specified equipment slot. For a full list of possible equipment
+slots see 'getequipid'.
+
+This command will return 1 if an item was deleted and 0 otherwise.
+
+---------------------------------------
//=====================================
4.1 - End of Player Item-Related Commands
//=====================================
diff --git a/src/map/script.c b/src/map/script.c
index c57b086f4..aea4d978f 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -7969,6 +7969,9 @@ BUILDIN(delequip)
if(i >= 0) {
pc->unequipitem(sd,i,3); //recalculate bonus
pc->delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
+ script_pushint(st,1);
+ } else {
+ script_pushint(st,0);
}
return true;