summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-12-16 19:34:58 +0100
committerGitHub <noreply@github.com>2018-12-16 19:34:58 +0100
commit914da2d2410ac32e22d825f633b617cc22f84050 (patch)
treecfd33a2785ff673a73b0992b219273fb2f28240d /src/map
parent65eacabdc302d02a80bef578fb83b58c5203463e (diff)
parentbf54e86c244ca1cd3be9da5fcacb40b406dc970f (diff)
downloadhercules-914da2d2410ac32e22d825f633b617cc22f84050.tar.gz
hercules-914da2d2410ac32e22d825f633b617cc22f84050.tar.bz2
hercules-914da2d2410ac32e22d825f633b617cc22f84050.tar.xz
hercules-914da2d2410ac32e22d825f633b617cc22f84050.zip
Merge pull request #2298 from guilherme-gm/201810-abracadabra
Fixes delayed-consume items not being consumed after using Abracadabra
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 95c10cbe7..5410ae96a 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5319,6 +5319,10 @@ static int pc_useitem(struct map_session_data *sd, int n)
if(sd->catch_target_class != -1) //Abort pet catching.
sd->catch_target_class = -1;
+ // Removes abracadabra/randomize spell flag for delayed consume items or item doesn't get consumed
+ if (sd->inventory_data[n]->flag.delay_consume)
+ sd->state.abra_flag = 0;
+
amount = sd->status.inventory[n].amount;
//Check if the item is to be consumed immediately [Skotlex]
if (sd->inventory_data[n]->flag.delay_consume || sd->inventory_data[n]->flag.keepafteruse)