diff options
author | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-05-25 10:32:06 +0000 |
---|---|---|
committer | Inkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-05-25 10:32:06 +0000 |
commit | c966d1aaddd3f0fe455f6ba2bd829f26b75382eb (patch) | |
tree | 22b6f1d99f0a29d286a3097961f29a99a8df8566 /src/map/pc.c | |
parent | 381ebf6a8da1e8d0085b4fdb92d0dd9bf811b2aa (diff) | |
download | hercules-c966d1aaddd3f0fe455f6ba2bd829f26b75382eb.tar.gz hercules-c966d1aaddd3f0fe455f6ba2bd829f26b75382eb.tar.bz2 hercules-c966d1aaddd3f0fe455f6ba2bd829f26b75382eb.tar.xz hercules-c966d1aaddd3f0fe455f6ba2bd829f26b75382eb.zip |
Fixed losing skill list after base change. (bugreport:3106)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13812 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 890cbd0bd..ec2c4b30e 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6108,16 +6108,15 @@ int pc_setoption(struct map_session_data *sd,int type) if (type&OPTION_RIDING && !(p_type&OPTION_RIDING) && (sd->class_&MAPID_BASEMASK) == MAPID_SWORDMAN) { //We are going to mount. [Skotlex] - new_look = -1; clif_status_load(&sd->bl,SI_RIDING,1); status_calc_pc(sd,0); //Mounting/Umounting affects walk and attack speeds. } else if (!(type&OPTION_RIDING) && p_type&OPTION_RIDING && (sd->class_&MAPID_BASEMASK) == MAPID_SWORDMAN) { //We are going to dismount. - new_look = -1; clif_status_load(&sd->bl,SI_RIDING,0); status_calc_pc(sd,0); //Mounting/Umounting affects walk and attack speeds. } + if(type&OPTION_CART && !(p_type&OPTION_CART)) { //Cart On clif_cartlist(sd); @@ -6157,20 +6156,20 @@ int pc_setoption(struct map_session_data *sd,int type) else if (!(type&OPTION_SUMMER) && p_type&OPTION_SUMMER) new_look = -1; - if (sd->disguise) + if (sd->disguise || !new_look) return 0; //Disguises break sprite changes if (new_look < 0) { //Restore normal look. status_set_viewdata(&sd->bl, sd->status.class_); new_look = sd->vd.class_; } - if (new_look) { - //Stop attacking on new view change (to prevent wedding/santa attacks. - pc_stop_attack(sd); - clif_changelook(&sd->bl,LOOK_BASE,new_look); - if (sd->vd.cloth_color) - clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); - } + + pc_stop_attack(sd); //Stop attacking on new view change (to prevent wedding/santa attacks. + clif_changelook(&sd->bl,LOOK_BASE,new_look); + if (sd->vd.cloth_color) + clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); + clif_skillinfoblock(sd); // Skill list needs to be updated after base change. + return 0; } |