From 79ab86b005e6f12ddddd5a4a11774a13933bfcb8 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 5 Apr 2013 13:02:12 -0300 Subject: Fixed @fontcolor crashing Special Thanks to Zopokx, Euphy, Fatalis and Frost http://hercules.ws/board/topic/318-accident-fontcolor/ Signed-off-by: shennetsind --- src/map/clif.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/clif.c b/src/map/clif.c index 588f6a853..ed7c811a3 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -233,7 +233,7 @@ uint32 clif_refresh_ip(void) { #if PACKETVER >= 20071106 static inline unsigned char clif_bl_type(struct block_list *bl) { switch (bl->type) { - case BL_PC: return disguised(bl) && pcdb_checkid(status_get_viewdata(bl)->class_)? 0x1:0x0; //PC_TYPE + case BL_PC: return (disguised(bl) && !pcdb_checkid(status_get_viewdata(bl)->class_))? 0x1:0x0; //PC_TYPE case BL_ITEM: return 0x2; //ITEM_TYPE case BL_SKILL: return 0x3; //SKILL_TYPE case BL_CHAT: return 0x4; //UNKNOWN_TYPE @@ -9711,10 +9711,11 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd) WFIFOHEAD(fd,mylen + 12); WFIFOW(fd,0) = 0x2C1; WFIFOW(fd,2) = mylen + 12; - WFIFOL(fd,4) = -sd->bl.id; + WFIFOL(fd,4) = sd->bl.id; WFIFOL(fd,8) = hChSys.colors[sd->fontcolor - 1]; safestrncpy((char*)WFIFOP(fd,12), mout, mylen); clif->send(WFIFOP(fd,0), WFIFOW(fd,2), &sd->bl, AREA_WOS); + WFIFOL(fd,4) = -sd->bl.id; WFIFOSET(fd, mylen + 12); return; } -- cgit v1.2.3-70-g09d2