瀏覽代碼

- Added a check in script command "set_option" so that invoking "set_option(0)" removes Cart/Peco/Falcon, as expected by scripts.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7381 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 年之前
父節點
當前提交
3ce9e8c6e6
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 2 0
      Changelog-Trunk.txt
  2. 4 1
      src/map/script.c

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ 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/05/28
+	* Added a check in script command "set_option" so that invoking
+	  "set_option(0)" removes Cart/Peco/Falcon, as expected by scripts. [Skotlex]
 	* Added trade-range check on trade start. [Skotlex]
 	* Added inf2 4096 (INF2_ALLOW_ENEMY) which is to be used in conjunction
 	  with INF2_PARTY_ONLY/INF2_GUILD_ONLY when said skill should ALSO be allowed

+ 4 - 1
src/map/script.c

@@ -5285,7 +5285,10 @@ int buildin_setoption(struct script_state *st)
 	type=conv_num(st,& (st->stack->stack_data[st->start+2]));
 	if(st->end>st->start+3 )
 		flag=conv_num(st,&(st->stack->stack_data[st->start+3]) );
-	
+	else if (!type) { //Request to remove everything.
+		flag = 0;
+		type = OPTION_CART|OPTION_FALCON|OPTION_RIDING;
+	}
 	sd=script_rid2sd(st);
 	if (!sd) return 0;