diff options
author | Haru <haru@dotalux.com> | 2016-07-08 02:50:28 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-07-08 02:50:28 +0200 |
commit | c7b95260fa3f4d77138fa34710f60365f4c86c87 (patch) | |
tree | e0cef7581f33a0e50435ec0d22cf6754f4efe467 /src/map/clif.c | |
parent | 72a06cdfa933534319a99cecc781b56acecce9cd (diff) | |
download | hercules-c7b95260fa3f4d77138fa34710f60365f4c86c87.tar.gz hercules-c7b95260fa3f4d77138fa34710f60365f4c86c87.tar.bz2 hercules-c7b95260fa3f4d77138fa34710f60365f4c86c87.tar.xz hercules-c7b95260fa3f4d77138fa34710f60365f4c86c87.zip |
Fixed a compilation error on packetvers older than 20071106
Fixes #1345
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 66 |
1 files changed, 37 insertions, 29 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 8aa225878..0f6e985fd 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -265,42 +265,50 @@ uint32 clif_refresh_ip(void) return 0; } +unsigned char clif_bl_type(struct block_list *bl) +{ #if PACKETVER >= 20071106 -unsigned char clif_bl_type(struct block_list *bl) { struct view_data *vd; nullpo_retr(CLUT_NPC, bl); switch (bl->type) { - case BL_PC: - vd = status->get_viewdata(bl); - nullpo_retr(CLUT_NPC, vd); - - if (clif->isdisguised(bl) && !pc->db_checkid(vd->class_)) - return CLUT_NPC; - else - return CLUT_PC; - case BL_ITEM: return CLUT_ITEM; - case BL_SKILL: return CLUT_SKILL; - case BL_CHAT: return CLUT_UNKNOW; - case BL_MOB: - vd = status->get_viewdata(bl); - nullpo_retr(CLUT_NPC, vd); - return pc->db_checkid(vd->class_)? CLUT_PC:CLUT_MOB; - case BL_NPC: - vd = status->get_viewdata(bl); - nullpo_retr(CLUT_NPC, vd); - return pc->db_checkid(vd->class_)? CLUT_PC:CLUT_EVENT; - case BL_PET: - vd = status->get_viewdata(bl); - nullpo_retr(CLUT_NPC, vd); - return pc->db_checkid(vd->class_)? CLUT_PC:CLUT_PET; - case BL_HOM: return CLUT_HOMNUCLUS; - case BL_MER: return CLUT_MERCNARY; - case BL_ELEM: return CLUT_ELEMENTAL; - default: return CLUT_NPC; + case BL_PC: + vd = status->get_viewdata(bl); + nullpo_retr(CLUT_NPC, vd); + + if (clif->isdisguised(bl) && !pc->db_checkid(vd->class_)) + return CLUT_NPC; + return CLUT_PC; + case BL_ITEM: + return CLUT_ITEM; + case BL_SKILL: + return CLUT_SKILL; + case BL_CHAT: + return CLUT_UNKNOWN; + case BL_MOB: + vd = status->get_viewdata(bl); + nullpo_retr(CLUT_NPC, vd); + return pc->db_checkid(vd->class_) ? CLUT_PC : CLUT_MOB; + case BL_NPC: + vd = status->get_viewdata(bl); + nullpo_retr(CLUT_NPC, vd); + return pc->db_checkid(vd->class_) ? CLUT_PC : CLUT_EVENT; + case BL_PET: + vd = status->get_viewdata(bl); + nullpo_retr(CLUT_NPC, vd); + return pc->db_checkid(vd->class_) ? CLUT_PC : CLUT_PET; + case BL_HOM: + return CLUT_HOMNUCLUS; + case BL_MER: + return CLUT_MERCNARY; + case BL_ELEM: + return CLUT_ELEMENTAL; + default: + return CLUT_NPC; } -} #endif + return CLUT_UNKNOWN; +} /*========================================== * sub process of clif_send |