diff options
-rw-r--r-- | Changelog-Trunk.txt | 3 | ||||
-rw-r--r-- | db/const.txt | 1 | ||||
-rw-r--r-- | src/map/script.c | 5 |
3 files changed, 8 insertions, 1 deletions
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; } /*========================================== |