summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmistry Haoyan <equinox1991@gmail.com>2019-05-18 03:08:49 +0800
committerEmistry Haoyan <equinox1991@gmail.com>2019-05-18 03:11:05 +0800
commitb31a3a784d7a2150f063eb5259479022dc8aff27 (patch)
treecf1a2558f74eaff9a9291f4858a805741844f09b
parent647a3d2513746a17636bea354ad5a56c1db853e1 (diff)
downloadhercules-b31a3a784d7a2150f063eb5259479022dc8aff27.tar.gz
hercules-b31a3a784d7a2150f063eb5259479022dc8aff27.tar.bz2
hercules-b31a3a784d7a2150f063eb5259479022dc8aff27.tar.xz
hercules-b31a3a784d7a2150f063eb5259479022dc8aff27.zip
Fix *failedremovecards script command.
- only `type == 1` will remove the card. - fixes #2469
-rw-r--r--src/map/script.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 5843ac292..a916db009 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -13915,7 +13915,8 @@ static BUILDIN(failedremovecards)
if (sd->status.inventory[i].card[c] > 0 && itemdb_type(sd->status.inventory[i].card[c]) == IT_CARD) {
cardflag = 1;
- sd->status.inventory[i].card[c] = 0;
+ if (typefail == 1)
+ sd->status.inventory[i].card[c] = 0;
if (typefail == 2) { // add cards to inventory, clear
int flag;