summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-26 15:12:50 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-26 15:12:50 +0000
commit69078cf4085badd9215003f4ff71b987dfd134f5 (patch)
tree98a7b68748922efd3e26465545461ba506fedb2d /src
parent74aba440337dec8ba2dee9d4a5a124cd00e344ea (diff)
downloadhercules-69078cf4085badd9215003f4ff71b987dfd134f5.tar.gz
hercules-69078cf4085badd9215003f4ff71b987dfd134f5.tar.bz2
hercules-69078cf4085badd9215003f4ff71b987dfd134f5.tar.xz
hercules-69078cf4085badd9215003f4ff71b987dfd134f5.zip
- Added support for "sc_end -1" which will clear all status changes. Added the constant SC_ALL so you can use in scripts "sc_end SC_ALL;" instead.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7895 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-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;
}
/*==========================================