From 69078cf4085badd9215003f4ff71b987dfd134f5 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 26 Jul 2006 15:12:50 +0000 Subject: - 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 --- Changelog-Trunk.txt | 3 +++ db/const.txt | 1 + src/map/script.c | 5 ++++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index e25c3ce1e..e834882b4 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/07/26 + * 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. + [Skotlex] * @pettalk will now fail when muted. [Skotlex] * Enabled changing of equipment while stunned/asleep/petrified/etc [Skotlex] 2006/07/25 diff --git a/db/const.txt b/db/const.txt index 9e544d450..6e4efed1c 100644 --- a/db/const.txt +++ b/db/const.txt @@ -392,6 +392,7 @@ IG_EggGirl 33 IG_GiftBoxChina 34 IG_LottoBox 35 +SC_ALL -1 SC_STONE 0 SC_FREEZE 1 SC_STAN 2 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; } /*========================================== -- cgit v1.2.3-60-g2f50