summaryrefslogtreecommitdiff
path: root/src/emap/send.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-26 20:35:19 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-26 20:35:19 +0300
commit2a1492c2bdc85f2917775987d4f72660fcfed4b0 (patch)
tree8fb936eb86bcbeffd6d31b7ece9e540604f4dde3 /src/emap/send.c
parent3f3657e0279b4f7b111906870e8b974359cc7463 (diff)
downloadplugin-2a1492c2bdc85f2917775987d4f72660fcfed4b0.tar.gz
plugin-2a1492c2bdc85f2917775987d4f72660fcfed4b0.tar.bz2
plugin-2a1492c2bdc85f2917775987d4f72660fcfed4b0.tar.xz
plugin-2a1492c2bdc85f2917775987d4f72660fcfed4b0.zip
Add script command setskin. For set npc dialog skin on client.
Diffstat (limited to 'src/emap/send.c')
-rw-r--r--src/emap/send.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/emap/send.c b/src/emap/send.c
index 815464a..3984421 100644
--- a/src/emap/send.c
+++ b/src/emap/send.c
@@ -436,3 +436,20 @@ void send_setwall_single(int fd, int m, int layer, int x1, int y1, int x2, int y
mapindex->getmapname_ext(map->list[m].custom_name ? map->list[map->list[m].instance_src_map].name : map->list[m].name,(char*)WFIFOP(fd, 18));
WFIFOSET(fd, 34);
}
+
+void send_pc_skin(int fd, int npcId, const char *const skin)
+{
+ if (!skin)
+ return;
+ struct SessionExt *data = session_get(fd);
+ if (!data || data->clientVersion < 15)
+ return;
+
+ const int sz = strlen(skin) + 9;
+ WFIFOHEAD (fd, sz);
+ WFIFOW(fd, 0) = 0xb1c;
+ WFIFOW(fd, 2) = sz;
+ WFIFOL(fd, 4) = npcId;
+ strcpy((char*)WFIFOP (fd, 8), skin);
+ WFIFOSET(fd, sz);
+}