summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-05-17 16:45:56 -0300
committershennetsind <ind@henn.et>2013-05-17 16:45:56 -0300
commit2cd97f154f781bee35f47d884af47de396a7877e (patch)
tree62d8f18c720cd4b3e51ac8084b5e40ef342af649 /src/map/clif.c
parent770c20207331dc328a34688c59ecc7636b6e59a9 (diff)
downloadhercules-2cd97f154f781bee35f47d884af47de396a7877e.tar.gz
hercules-2cd97f154f781bee35f47d884af47de396a7877e.tar.bz2
hercules-2cd97f154f781bee35f47d884af47de396a7877e.tar.xz
hercules-2cd97f154f781bee35f47d884af47de396a7877e.zip
Fixed Bug #7171 Item #2
http://hercules.ws/board/tracker/issue-7171-fontcolor-error/ Special Thanks to Beret~! Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 0c5143ffd..2f69ce2fd 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1136,9 +1136,9 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) {
p.isBoss = 0;
}
#endif
- clif->send(&p,sizeof(p),bl,target);
-
if( disguised(bl) ) {
+ if( sd->status.class_ != sd->disguise )
+ clif->send(&p,sizeof(p),bl,target);
#if PACKETVER >= 20071106
p.objecttype = pcdb_checkid(status_get_viewdata(bl)->class_) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE
p.GID = -bl->id;
@@ -1146,7 +1146,8 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) {
p.GID = -bl->id;
#endif
clif->send(&p,sizeof(p),bl,SELF);
- }
+ } else
+ clif->send(&p,sizeof(p),bl,target);
}
@@ -9836,10 +9837,11 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd)
}
int clif_undisguise_timer(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data * sd;
- if( (sd = map_id2sd(id)) && sd->fontcolor && sd->disguise == sd->status.class_ ) {
- pc_disguise(sd,-1);
+ if( (sd = map_id2sd(id)) ) {
+ sd->fontcolor_tid = INVALID_TIMER;
+ if( sd->fontcolor && sd->disguise == sd->status.class_ )
+ pc_disguise(sd,-1);
}
- sd->fontcolor_tid = INVALID_TIMER;
return 0;
}
@@ -9880,10 +9882,10 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd)
unsigned char mylen = 1;
if( sd->disguise == -1 ) {
+ sd->fontcolor_tid = add_timer(gettick()+5000, clif->undisguise_timer, sd->bl.id, 0);
pc_disguise(sd,sd->status.class_);
if( pc_isdead(sd) )
clif_clearunit_single(-sd->bl.id, CLR_DEAD, sd->fd);
- sd->fontcolor_tid = add_timer(gettick()+5000, clif->undisguise_timer, sd->bl.id, 0);
} else if ( sd->disguise == sd->status.class_ && sd->fontcolor_tid != INVALID_TIMER ) {
const struct TimerData *timer;
if( (timer = get_timer(sd->fontcolor_tid)) ) {