From 075bc5af11d62a9c4265942501836422194cbb6e Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 5 Apr 2006 00:23:18 +0000 Subject: - Added inter config connection_ping_interval which specifies interval in hours at which mysql_ping's must be done on all connection handles to keep the mysql connection alive. Defaults to 0 (disabled) - Removed login sql handle from the map server as it isn't used for anything. - Made the login sql handle on the char-sql server be used only when gm_read_method 1 is enabled. - Small fixes to npc_enable, added BL_NPC handling on status_get_sc. - Added a path_search check in map_random_dir, so that the random direction picked up doesn't goes through walls and all that. - Some changes to close-confine, status start will fail when the source is not found or it doesn't has sc-data. - pc_setoption no longer changes the character's class when mounting/dismounting, it only changes the view-class. - The peco-crash-fix from the char servers is still needed. This packet must be wrong! We likely need to sniff it. - Modified the char-txt server to modify the class of mounted characters to their non-mounted version. Added an upgrade_svn file to handle the class update on the sql tables. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5902 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 46 ++++++++++++++-------------------------------- 1 file changed, 14 insertions(+), 32 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 3854fe267..752917f61 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -5613,49 +5613,33 @@ int pc_setoption(struct map_session_data *sd,int type) switch (sd->status.class_) { case JOB_KNIGHT: - sd->status.class_ = sd->vd.class_ = JOB_KNIGHT2; + clif_changelook(&sd->bl,LOOK_BASE,JOB_KNIGHT2); break; case JOB_CRUSADER: - sd->status.class_ = sd->vd.class_ = JOB_CRUSADER2; + clif_changelook(&sd->bl,LOOK_BASE,JOB_CRUSADER2); break; case JOB_LORD_KNIGHT: - sd->status.class_ = sd->vd.class_ = JOB_LORD_KNIGHT2; + clif_changelook(&sd->bl,LOOK_BASE,JOB_LORD_KNIGHT2); break; case JOB_PALADIN: - sd->status.class_ = sd->vd.class_ = JOB_PALADIN2; + clif_changelook(&sd->bl,LOOK_BASE,JOB_PALADIN2); break; case JOB_BABY_KNIGHT: - sd->status.class_ = sd->vd.class_ = JOB_BABY_KNIGHT2; + clif_changelook(&sd->bl,LOOK_BASE,JOB_BABY_KNIGHT2); break; case JOB_BABY_CRUSADER: - sd->status.class_ = sd->vd.class_ = JOB_BABY_CRUSADER2; + clif_changelook(&sd->bl,LOOK_BASE,JOB_BABY_CRUSADER2); break; } + clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); 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) && sd->sc.option&OPTION_RIDING && (sd->class_&MAPID_BASEMASK) == MAPID_SWORDMAN) { //We are going to dismount. - switch (sd->status.class_) - { - case JOB_KNIGHT2: - sd->status.class_ = sd->vd.class_ = JOB_KNIGHT; - break; - case JOB_CRUSADER2: - sd->status.class_ = sd->vd.class_ = JOB_CRUSADER; - break; - case JOB_LORD_KNIGHT2: - sd->status.class_ = sd->vd.class_ = JOB_LORD_KNIGHT; - break; - case JOB_PALADIN2: - sd->status.class_ = sd->vd.class_ = JOB_PALADIN; - break; - case JOB_BABY_KNIGHT2: - sd->status.class_ = sd->vd.class_ = JOB_BABY_KNIGHT; - break; - case JOB_BABY_CRUSADER2: - sd->status.class_ = sd->vd.class_ = JOB_BABY_CRUSADER; - break; + if (sd->vd.class_ != sd->status.class_) { + clif_changelook(&sd->bl,LOOK_BASE,sd->status.class_); + clif_changelook(&sd->bl,LOOK_CLOTHES_COLOR,sd->vd.cloth_color); } clif_status_load(&sd->bl,SI_RIDING,0); status_calc_pc(sd,0); //Mounting/Umounting affects walk and attack speeds. @@ -5669,13 +5653,11 @@ int pc_setoption(struct map_session_data *sd,int type) if (type&OPTION_FLYING && !(sd->sc.option&OPTION_FLYING)) //Flying ON { if (sd->status.class_==JOB_STAR_GLADIATOR) - sd->status.class_ = sd->vd.class_ = JOB_STAR_GLADIATOR2; + clif_changelook(&sd->bl,LOOK_BASE,JOB_STAR_GLADIATOR2); } else if (!(type&OPTION_FLYING) && sd->sc.option&OPTION_FLYING) //Flying OFF - { - if (sd->status.class_==JOB_STAR_GLADIATOR2) - sd->status.class_ = sd->vd.class_ = JOB_STAR_GLADIATOR; - } + if (sd->vd.class_ != sd->status.class_) + clif_changelook(&sd->bl,LOOK_BASE,sd->status.class_); sd->sc.option=type; clif_changeoption(&sd->bl); @@ -5727,7 +5709,7 @@ int pc_setcart(struct map_session_data *sd,int type) int pc_setfalcon(struct map_session_data *sd) { if(pc_checkskill(sd,HT_FALCON)>0){ // ファルコンマスタリ?スキル所持 - pc_setoption(sd,sd->sc.option|0x0010); + pc_setoption(sd,sd->sc.option|OPTION_FALCON); } return 0; -- cgit v1.2.3-70-g09d2