diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-10 13:43:00 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-10 13:43:00 +0000 |
commit | b426bc18f4ffa1159f1680c6ecc5c460ff54ce76 (patch) | |
tree | 0f7a9c38bed31851a7c96d20d0c744dbb1666457 /src/map/script.c | |
parent | 34dcd020f521100ae212a78d64685fffa9a7ada4 (diff) | |
download | hercules-b426bc18f4ffa1159f1680c6ecc5c460ff54ce76.tar.gz hercules-b426bc18f4ffa1159f1680c6ecc5c460ff54ce76.tar.bz2 hercules-b426bc18f4ffa1159f1680c6ecc5c460ff54ce76.tar.xz hercules-b426bc18f4ffa1159f1680c6ecc5c460ff54ce76.zip |
- 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
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 20 |
1 files changed, 7 insertions, 13 deletions
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;
}
|