From b426bc18f4ffa1159f1680c6ecc5c460ff54ce76 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 10 May 2006 13:43:00 +0000 Subject: - Changed wedding costumes to use setoption rather than changebase. - Modified setoption so that flag 1 or no flag adds an option, and flag 0 removes it. - Updated script_commands with the new behaviour. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6548 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index 4cc2ab5b8..dc7fa0153 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -5079,7 +5079,7 @@ int buildin_setoption(struct script_state *st) { int type; struct map_session_data *sd; - int flag=0; + int flag=1; type=conv_num(st,& (st->stack->stack_data[st->start+2])); if(st->end>st->start+3 ) @@ -5087,19 +5087,13 @@ int buildin_setoption(struct script_state *st) sd=script_rid2sd(st); if (!sd) return 0; - - switch (flag) { - case 1: //Add option - pc_setoption(sd,sd->sc.option|type); - break; - case 2: //Remove option - pc_setoption(sd,sd->sc.option&~type); - break; - default: //Set option - pc_setoption(sd,type); - break; - } + if (flag) {//Add option + if (type&OPTION_WEDDING && !battle_config.wedding_modifydisplay) + type&=~OPTION_WEDDING; //Do not show the wedding sprites + pc_setoption(sd,sd->sc.option|type); + } else//Remove option + pc_setoption(sd,sd->sc.option&~type); return 0; } -- cgit v1.2.3-70-g09d2