summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 70b1e7c94..476e9011f 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -6458,8 +6458,11 @@ int buildin_sc_end(struct script_state *st)
if (potion_flag==1 && potion_target)
bl = map_id2bl(potion_target);
- if (bl)
+ if (!bl) return 0;
+ if (type >= 0)
status_change_end(bl,type,-1);
+ else
+ status_change_clear(bl, 2);
return 0;
}
/*==========================================