From 286bf9344aa4a0c3c9cacf718a8bbefea5767b58 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 28 Jun 2006 23:10:14 +0000 Subject: - 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7381 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 2 ++ src/map/script.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 0f5a54151..2a6d9fda4 100644 --- a/Changelog-Trunk.txt +++ b/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 diff --git a/src/map/script.c b/src/map/script.c index 692b985b4..3f7b98aaa 100644 --- a/src/map/script.c +++ b/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; -- cgit v1.2.3-70-g09d2