summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-11-02 19:30:00 +0300
committerAndrei Karas <akaras@inbox.ru>2017-11-04 23:24:24 +0300
commitff898b1d949aac48c9017e89d5f7ba5e18d65870 (patch)
tree1dd52678af736ede65b36b165b2032bac10b2954 /src/map/clif.c
parent497a25b19d58ace8e450614f0b6cab433a040428 (diff)
downloadhercules-ff898b1d949aac48c9017e89d5f7ba5e18d65870.tar.gz
hercules-ff898b1d949aac48c9017e89d5f7ba5e18d65870.tar.bz2
hercules-ff898b1d949aac48c9017e89d5f7ba5e18d65870.tar.xz
hercules-ff898b1d949aac48c9017e89d5f7ba5e18d65870.zip
Refresh npc after changing fields in setunitdata.
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index f17ee14e6..4dc36be6d 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -3345,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
}