summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-04-05 13:02:12 -0300
committershennetsind <ind@henn.et>2013-04-05 13:02:12 -0300
commit79ab86b005e6f12ddddd5a4a11774a13933bfcb8 (patch)
tree3bb425e3497f9dfb0b18c274040a04757f704002 /src/map/clif.c
parent15c812751a755108e119de52a5f756cbeba60fc8 (diff)
downloadhercules-79ab86b005e6f12ddddd5a4a11774a13933bfcb8.tar.gz
hercules-79ab86b005e6f12ddddd5a4a11774a13933bfcb8.tar.bz2
hercules-79ab86b005e6f12ddddd5a4a11774a13933bfcb8.tar.xz
hercules-79ab86b005e6f12ddddd5a4a11774a13933bfcb8.zip
Fixed @fontcolor crashing
Special Thanks to Zopokx, Euphy, Fatalis and Frost http://hercules.ws/board/topic/318-accident-fontcolor/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c5
1 files changed, 3 insertions, 2 deletions
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;
}