diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/char_sql/int_guild.c | 2 | ||||
-rw-r--r-- | src/map/pc.c | 26 |
2 files changed, 22 insertions, 6 deletions
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c index 8f9e50acf..1a1ce718a 100644 --- a/src/char_sql/int_guild.c +++ b/src/char_sql/int_guild.c @@ -1604,7 +1604,7 @@ int mapif_parse_BreakGuild(int fd,int guild_id) inter_log("guild %s (id=%d) broken" RETCODE,g->name,guild_id);
//Remove the guild from memory. [Skotlex]
- g = idb_remove(guild_db_, guild_id);
+ idb_remove(guild_db_, guild_id);
return 0;
}
diff --git a/src/map/pc.c b/src/map/pc.c index 2b2037e9b..7808bdd9c 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5508,7 +5508,6 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) pc_setglobalreg (sd, "jobchange_level", sd->change_level); sd->status.class_ = job; - status_set_viewdata(&sd->bl, job); fame_flag = pc_famerank(sd->status.char_id,sd->class_&MAPID_UPPERMASK); sd->class_ = (unsigned short)b_class; sd->status.job_level=1; @@ -5523,16 +5522,33 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) pc_unequipitem(sd,sd->equip_index[i],2); // ?”õŠO‚µ } + //Change look + status_set_viewdata(&sd->bl, job); clif_changelook(&sd->bl,LOOK_BASE,sd->vd.class_); // move sprite update to prevent client crashes with incompatible equipment [Valaris] - if(sd->vd.cloth_color) clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); + + //Update skill tree. + pc_calc_skilltree(sd); + clif_skillinfoblock(sd); + + //Remove peco/cart/falcon + i = sd->sc.option; + if(i&OPTION_RIDING && !pc_checkskill(sd, KN_RIDING)) + i&=~OPTION_RIDING; + if(i&OPTION_CART && !pc_checkskill(sd, MC_PUSHCART)) + i&=~OPTION_CART; + if(i&OPTION_FALCON && !pc_checkskill(sd, HT_FALCON)) + i&=~OPTION_FALCON; + + if(i != sd->sc.option) + pc_setoption(sd, i); + + if(sd->hd && merc_is_hom_active(sd->hd) && !pc_checkskill(sd, AM_CALLHOMUN)) + merc_hom_vaporize(sd, 0); if(sd->status.manner < 0) clif_changestatus(&sd->bl,SP_MANNER,sd->status.manner); - - if(pc_isriding(sd)) //Remove Peco Status to prevent display <> class problems. - pc_setoption(sd,sd->sc.option&~OPTION_RIDING); status_calc_pc(sd,0); pc_checkallowskill(sd); |