From fa24fdb97db2aca73d94bb584835e9e864c8d085 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 10 May 2013 17:30:54 -0300 Subject: Fixed Bug #7236 @mount http://hercules.ws/board/tracker/issue-7236-mount/ Signed-off-by: shennetsind --- src/map/atcommand.c | 10 +++++----- src/map/clif.c | 4 ++-- src/map/pc.c | 4 ++-- src/map/script.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/map') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 63d20d70d..9fda83546 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -900,7 +900,7 @@ ACMD(hide) nullpo_retr(-1, sd); if (sd->sc.option & OPTION_INVISIBLE) { sd->sc.option &= ~OPTION_INVISIBLE; - if (sd->disguise) + if (sd->disguise != -1 ) status_set_viewdata(&sd->bl, sd->disguise); else status_set_viewdata(&sd->bl, sd->status.class_); @@ -4006,7 +4006,7 @@ ACMD(mount_peco) { nullpo_retr(-1, sd); - if (sd->disguise) { + if (sd->disguise != -1) { clif->message(fd, msg_txt(212)); // Cannot mount while in disguise. return false; } @@ -4840,7 +4840,7 @@ ACMD(disguiseguild) ACMD(undisguise) { nullpo_retr(-1, sd); - if (sd->disguise) { + if (sd->disguise != -1) { pc_disguise(sd, -1); clif->message(fd, msg_txt(124)); // Undisguise applied. } else { @@ -4861,7 +4861,7 @@ ACMD(undisguiseall) { iter = mapit_getallusers(); for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) ) - if( pl_sd->disguise ) + if( pl_sd->disguise != -1 ) pc_disguise(pl_sd, -1); mapit_free(iter); @@ -4894,7 +4894,7 @@ ACMD(undisguiseguild) } for(i = 0; i < g->max_member; i++) - if( (pl_sd = g->member[i].sd) && pl_sd->disguise ) + if( (pl_sd = g->member[i].sd) && pl_sd->disguise != -1 ) pc_disguise(pl_sd, -1); clif->message(fd, msg_txt(124)); // Undisguise applied. diff --git a/src/map/clif.c b/src/map/clif.c index f801c7c99..4edb1541d 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5847,7 +5847,7 @@ void clif_pvpset(struct map_session_data *sd,int pvprank,int pvpnum,int type) else WBUFL(buf,6) = pvprank; WBUFL(buf,10) = pvpnum; - if(sd->sc.option&OPTION_INVISIBLE || sd->disguise) //Causes crashes when a 'mob' with pvp info dies. + if(sd->sc.option&OPTION_INVISIBLE || sd->disguise != -1) //Causes crashes when a 'mob' with pvp info dies. clif->send(buf,packet_len(0x19a),&sd->bl,SELF); else if(!type) clif->send(buf,packet_len(0x19a),&sd->bl,AREA); @@ -8555,7 +8555,7 @@ void clif_charnameack (int fd, struct block_list *bl) struct guild *g = NULL; //Requesting your own "shadow" name. [Skotlex] - if (ssd->fd == fd && ssd->disguise) + if (ssd->fd == fd && ssd->disguise != -1) WBUFL(buf,2) = -bl->id; if( ssd->fakename[0] ) { diff --git a/src/map/pc.c b/src/map/pc.c index 191c05bcd..7d3b5c4a2 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7453,7 +7453,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper) //Change look, if disguised, you need to undisguise //to correctly calculate new job sprite without - if (sd->disguise) + if (sd->disguise != -1) pc_disguise(sd, -1); status_set_viewdata(&sd->bl, job); @@ -7675,7 +7675,7 @@ int pc_setoption(struct map_session_data *sd,int type) else if (!(type&OPTION_FLYING) && p_type&OPTION_FLYING) new_look = -1; - if (sd->disguise || !new_look) + if (sd->disguise != -1 || !new_look) return 0; //Disguises break sprite changes if (new_look < 0) { //Restore normal look. diff --git a/src/map/script.c b/src/map/script.c index 2304a9f42..fd2e2654f 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -9925,7 +9925,7 @@ BUILDIN(changebase) return true; } - if(!sd->disguise && vclass != sd->vd.class_) { + if(sd->disguise == -1 && vclass != sd->vd.class_) { status_set_viewdata(&sd->bl, vclass); //Updated client view. Base, Weapon and Cloth Colors. clif->changelook(&sd->bl,LOOK_BASE,sd->vd.class_); @@ -11787,7 +11787,7 @@ BUILDIN(undisguise) TBL_PC* sd = script_rid2sd(st); if (sd == NULL) return true; - if (sd->disguise) { + if (sd->disguise != -1) { pc_disguise(sd, -1); script_pushint(st,0); } else { -- cgit v1.2.3-70-g09d2