From 7bfa6ca01cc876b8a6426df0cdd30765be367a15 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 21 Jun 2006 03:56:29 +0000 Subject: - Some cleaning up of OPTION related code. OPTION_XMAS and OPTION_FLYING really ARE the same value clientside! (totally stupid), therefore I've opted from removing the flying animation since it really just displays as Xmas for others (and the correct fix involves adding a bunch of class-change packets...) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7270 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 5 +++++ src/map/clif.c | 10 +++++----- src/map/pc.c | 10 ++++++++++ src/map/status.h | 5 +++-- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 65e8b3dfe..066345a2f 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,11 @@ 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/06/20 + * Some cleaning up of OPTION related code. OPTION_XMAS and OPTION_FLYING + really ARE the same value clientside! (totally stupid), therefore I've + opted from removing the flying animation since it really just displays as + Xmas for others (and the correct fix involves adding a bunch of + class-change packets...) [Skotlex] * Updated skill_require_db to place the Zeny requirements of ZenyNage and Fling. [Skotlex] * Fixed crash when non-players use ZenyNage. Added the correct Zeny check diff --git a/src/map/clif.c b/src/map/clif.c index 9236fea2f..cc7b16d76 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -756,7 +756,7 @@ void clif_get_weapon_view(TBL_PC* sd, unsigned short *rhand, unsigned short *lha struct item_data *id; #endif - if(sd->sc.option&OPTION_WEDDING || sd->vd.class_ == JOB_XMAS) + if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS)) { *rhand = *lhand = 0; return; @@ -8661,7 +8661,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type, if (clif_cant_act(sd) || sd->sc.option&OPTION_HIDE) return; - if(sd->sc.option&OPTION_WEDDING || sd->vd.class_ == JOB_XMAS) + if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS)) return; if (!battle_config.sdelay_attack_enable && pc_checkskill(sd, SA_FREECAST) <= 0) { @@ -9507,7 +9507,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) { return; } - if(sd->sc.option&OPTION_WEDDING || sd->vd.class_ == JOB_XMAS) + if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS)) return; if (sd->invincible_timer != -1) @@ -9597,7 +9597,7 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, int skilll return; } - if(sd->sc.option&OPTION_WEDDING || sd->vd.class_ == JOB_XMAS) + if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS)) return; if (sd->invincible_timer != -1) @@ -9661,7 +9661,7 @@ void clif_parse_UseSkillMap(int fd,struct map_session_data *sd) if (clif_cant_act(sd)) return; - if(sd->sc.option&OPTION_WEDDING || sd->vd.class_ == JOB_XMAS) + if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS)) return; if(sd->invincible_timer != -1) diff --git a/src/map/pc.c b/src/map/pc.c index 18d255da7..8e1ed1d25 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5492,6 +5492,16 @@ int pc_setoption(struct map_session_data *sd,int type) clif_status_load(&sd->bl,SI_FALCON,1); else if (!(type&OPTION_FALCON) && p_type&OPTION_FALCON) //Falcon OFF clif_status_load(&sd->bl,SI_FALCON,0); + + if (type&OPTION_FLYING && !(p_type&OPTION_FLYING)) + clif_changelook(&sd->bl,LOOK_BASE,JOB_STAR_GLADIATOR2); + else if (!(type&OPTION_FLYING) && p_type&OPTION_FLYING) + { + status_set_viewdata(&sd->bl, sd->status.class_); + clif_changelook(&sd->bl,LOOK_BASE,sd->vd.class_); + if(sd->status.clothes_color) + clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->status.clothes_color); + } if (type&OPTION_WEDDING && !(p_type&OPTION_WEDDING)) clif_changelook(&sd->bl,LOOK_BASE,JOB_WEDDING); diff --git a/src/map/status.h b/src/map/status.h index b02aeeec6..877c9c4ad 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -470,10 +470,11 @@ enum { #define OPTION_WEDDING 0x00001000 #define OPTION_RUWACH 0x00002000 #define OPTION_CHASEWALK 0x00004000 -#define OPTION_FLYING 0x00008000 +#define OPTION_XMAS 0x00008000 +//Note that clientside Flying is 0x8000, the SAME as Xmas!! +#define OPTION_FLYING 0x0020000 //TODO: Get these Missing options... #define OPTION_SIGHTTRASHER 0x00010000 -#define OPTION_XMAS 0x0020000 #define OPTION_CART (OPTION_CART1|OPTION_CART2|OPTION_CART3|OPTION_CART4|OPTION_CART5) -- cgit v1.2.3-70-g09d2