diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-02-24 19:16:44 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-03-11 04:32:22 +0300 |
commit | c676bdd25be81095abec067aa61f18eb1cdbdd87 (patch) | |
tree | 95983cefd0b22cc57de8633ba50e861894ba427e /src/map | |
parent | 82b18787fca15135d02dd9ae14a0f52ddc830636 (diff) | |
download | hercules-c676bdd25be81095abec067aa61f18eb1cdbdd87.tar.gz hercules-c676bdd25be81095abec067aa61f18eb1cdbdd87.tar.bz2 hercules-c676bdd25be81095abec067aa61f18eb1cdbdd87.tar.xz hercules-c676bdd25be81095abec067aa61f18eb1cdbdd87.zip |
Fix friend status update packet for clients 20180221 and newer.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/clif.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index f8f50c7ee..1aee4fc1d 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -14182,6 +14182,7 @@ void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd) /// Toggles a single friend online/offline [Skotlex] (ZC_FRIENDS_STATE). /// 0206 <account id>.L <char id>.L <state>.B +/// 0206 <account id>.L <char id>.L <state>.B <name>.24B /// state: /// 0 = online /// 1 = offline @@ -14201,7 +14202,13 @@ void clif_friendslist_toggle(struct map_session_data *sd,int account_id, int cha WFIFOW(fd, 0) = 0x206; WFIFOL(fd, 2) = sd->status.friends[i].account_id; WFIFOL(fd, 6) = sd->status.friends[i].char_id; - WFIFOB(fd,10) = !online; //Yeah, a 1 here means "logged off", go figure... + WFIFOB(fd, 10) = !online; //Yeah, a 1 here means "logged off", go figure... +#ifndef PACKETVER_ZERO +#if PACKETVER >= 20180307 || (defined(PACKETVER_RE) && PACKETVER >= 20180221) + memcpy(WFIFOP(fd, 11), sd->status.friends[i].name, NAME_LENGTH); +#endif +#endif // PACKETVER_ZERO + WFIFOSET(fd, packet_len(0x206)); } |