소스 검색

- 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://svn.code.sf.net/p/rathena/svn/trunk@7895 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 년 전
부모
커밋
7cd47130d0
3개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 0
      Changelog-Trunk.txt
  2. 1 0
      db/const.txt
  3. 4 1
      src/map/script.c

+ 3 - 0
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

+ 1 - 0
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

+ 4 - 1
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;
 }
 /*==========================================