summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-06-01 15:58:56 +0200
committerGitHub <noreply@github.com>2019-06-01 15:58:56 +0200
commit0514a2b066d89e66efab5afb5dfe453b2039f11d (patch)
treeeade44c1fa682432ecb825a4b16eb08903635cb9
parent50a0952e62fe590bddd9eb0c3d65c913b938354d (diff)
parentb31a3a784d7a2150f063eb5259479022dc8aff27 (diff)
downloadhercules-0514a2b066d89e66efab5afb5dfe453b2039f11d.tar.gz
hercules-0514a2b066d89e66efab5afb5dfe453b2039f11d.tar.bz2
hercules-0514a2b066d89e66efab5afb5dfe453b2039f11d.tar.xz
hercules-0514a2b066d89e66efab5afb5dfe453b2039f11d.zip
Merge pull request #2477 from Emistry/issue_2469
Fix *failedremovecards script command.
-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 5563737f5..98c485e65 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -13916,7 +13916,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;