summaryrefslogtreecommitdiff
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
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
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--db/const.txt1
-rw-r--r--src/map/script.c5
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;
}
/*==========================================