diff options
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 1b7d94ca9..4dc36be6d 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -293,7 +293,11 @@ unsigned char clif_bl_type(struct block_list *bl) case BL_NPC: vd = status->get_viewdata(bl); nullpo_retr(CLUT_NPC, vd); +#if PACKETVER >= 20170726 + return CLUT_EVENT; +#else return pc->db_checkid(vd->class) ? CLUT_PC : CLUT_EVENT; +#endif case BL_PET: vd = status->get_viewdata(bl); nullpo_retr(CLUT_NPC, vd); @@ -3341,17 +3345,22 @@ void clif_changelook(struct block_list *bl,int type,int val) #if PACKETVER < 4 clif->sendlook(bl, bl->id, type, val, 0, target); #else - if(type == LOOK_WEAPON || type == LOOK_SHIELD) { - nullpo_retv(vd); - type = LOOK_WEAPON; - val = vd->weapon; - val2 = vd->shield; - } - if (clif->isdisguised(bl)) { - clif->sendlook(bl, bl->id, type, val, val2, AREA_WOS); - clif->sendlook(bl, -bl->id, type, val, val2, SELF); + if (bl->type != BL_NPC) { + if(type == LOOK_WEAPON || type == LOOK_SHIELD) { + nullpo_retv(vd); + type = LOOK_WEAPON; + val = vd->weapon; + val2 = vd->shield; + } + if (clif->isdisguised(bl)) { + clif->sendlook(bl, bl->id, type, val, val2, AREA_WOS); + clif->sendlook(bl, -bl->id, type, val, val2, SELF); + } else { + clif->sendlook(bl, bl->id, type, val, val2, target); + } } else { - clif->sendlook(bl, bl->id, type, val, val2, target); + struct npc_data *nd = BL_UCAST(BL_NPC, bl); + npc->refresh(nd); } #endif } |