summaryrefslogtreecommitdiff
path: root/src/emap/send.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-02-13 20:25:24 +0300
committerAndrei Karas <akaras@inbox.ru>2018-02-13 20:25:24 +0300
commita72ce61cd2dd4981259a8b9a16801222b9775f08 (patch)
tree37f14d021b8d97b9594d64966691072ebed6ea07 /src/emap/send.c
parent502a2ab29dcc530969f0dbe0958bbea536391aad (diff)
downloadplugin-a72ce61cd2dd4981259a8b9a16801222b9775f08.tar.gz
plugin-a72ce61cd2dd4981259a8b9a16801222b9775f08.tar.bz2
plugin-a72ce61cd2dd4981259a8b9a16801222b9775f08.tar.xz
plugin-a72ce61cd2dd4981259a8b9a16801222b9775f08.zip
Send clan id in packet 0xb0a.
Diffstat (limited to 'src/emap/send.c')
-rw-r--r--src/emap/send.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/emap/send.c b/src/emap/send.c
index 71f7d9e..d87000b 100644
--- a/src/emap/send.c
+++ b/src/emap/send.c
@@ -208,7 +208,9 @@ void send_pc_info(struct block_list* bl1,
return;
int len = 14;
- if (bl1 == bl2 || tdata->clientVersion >= 21)
+ if (tdata->clientVersion >= 24)
+ len = 20;
+ else if (bl1 == bl2 || tdata->clientVersion >= 21)
len = 16;
char buf[len];
WBUFW (buf, 0) = 0xb0a + evolPacketOffset;
@@ -221,6 +223,14 @@ void send_pc_info(struct block_list* bl1,
WBUFW (buf, 12) = data->mount;
if (bl1 == bl2 || tdata->clientVersion >= 21)
WBUFW (buf, 14) = data->language;
+ if (tdata->clientVersion >= 24)
+ {
+ int clanId = 0;
+ struct clan *const clan = tsd->clan;
+ if (clan != NULL)
+ clanId = clan->clan_id;
+ WBUFL (buf, 16) = clanId;
+ }
clif->send(&buf, (int)sizeof(buf), bl2, target);
}