diff options
author | gumi <git@gumi.ca> | 2020-05-20 17:04:04 +0000 |
---|---|---|
committer | Helianthella <mekolat+github@gmail.com> | 2020-05-20 17:29:54 +0000 |
commit | 12d81c4f8fff03eb01636a0eb99c6fccf1c13726 (patch) | |
tree | 667f5867d34dcf451872945e80d29dffbd32fbf0 /src/emap/map.c | |
parent | 40fa6d72362f1aea9f67e628b10c510234aa2f23 (diff) | |
download | evol-hercules-onlinelist2.tar.gz evol-hercules-onlinelist2.tar.bz2 evol-hercules-onlinelist2.tar.xz evol-hercules-onlinelist2.zip |
add support for SMSG_ONLINE_LIST2onlinelist2
Diffstat (limited to 'src/emap/map.c')
-rw-r--r-- | src/emap/map.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/emap/map.c b/src/emap/map.c index 1c60e8b..473fb2a 100644 --- a/src/emap/map.c +++ b/src/emap/map.c @@ -153,7 +153,8 @@ void emap_online_list(int fd) else state = (state | BEINGFLAG_GENDER_HIDDEN) & ~BEINGFLAG_GENDER_MALE; - if (pc_has_permission(sd, permission_send_gm_flag)) + if (pc_has_permission(sd, permission_send_gm_flag) + && data1->clientVersion < 27) state |= BEINGFLAG_GM; else state &= ~BEINGFLAG_GM; @@ -164,8 +165,10 @@ void emap_online_list(int fd) *ptr = sd->status.base_level; ptr ++; - if (showVersion) + if (showVersion && data1->clientVersion < 27) *ptr = data->clientVersion; + else if (data1->clientVersion >= 27) + *ptr = pc_get_group_level(sd); else *ptr = 0; ptr ++; @@ -177,7 +180,11 @@ void emap_online_list(int fd) } dbi_destroy(iter); - send_online_list(fd, buf, (unsigned int)(ptr - buf)); + + if (data1->clientVersion >= 27) + send_online_list2(fd, buf, (unsigned int)(ptr - buf)); + else + send_online_list(fd, buf, (unsigned int)(ptr - buf)); aFree(buf); } |