summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2015-02-15 15:10:01 -0200
committershennetsind <ind@henn.et>2015-02-15 15:10:01 -0200
commit909c0644ce45945c8e3fdc5eb77ebdd1a1cb93d0 (patch)
tree4449b30cd4441ce271196876c08fbe0c78675c6e /src/map/script.c
parent1e609ca42e0ab4c7699b55dcfa043891b9a41136 (diff)
downloadhercules-909c0644ce45945c8e3fdc5eb77ebdd1a1cb93d0.tar.gz
hercules-909c0644ce45945c8e3fdc5eb77ebdd1a1cb93d0.tar.bz2
hercules-909c0644ce45945c8e3fdc5eb77ebdd1a1cb93d0.tar.xz
hercules-909c0644ce45945c8e3fdc5eb77ebdd1a1cb93d0.zip
Updated 'delequip' Script Command
delequip will now stop a script when attempting to delete a item in a position the player has no gear. Special Thanks to Michieru, Haruna. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c
index a0b9f80cc..1a6289db3 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -7995,11 +7995,14 @@ BUILDIN(delequip)
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;
}
+
+ ShowError("script:delequip: no item found in position '%d' for player '%s' (AID:%d/CID:%d).\n", num, sd->status.name,sd->status.account_id, sd->status.char_id);
+ st->state = END;
+ clif->scriptclose(sd, st->oid);
- return true;
+ return false;
}
/*==========================================