summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-01 22:15:05 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-01 22:15:05 +0300
commitfb3f83b79ea7db00225d406f6e579c08961e2f38 (patch)
treed69b966c5b64bbf7254d564bd0a0c4e510d7e42d
parent98546749a9c8cf8f09d4c3667536e70771bfda1f (diff)
downloadevol-hercules-fb3f83b79ea7db00225d406f6e579c08961e2f38.tar.gz
evol-hercules-fb3f83b79ea7db00225d406f6e579c08961e2f38.tar.bz2
evol-hercules-fb3f83b79ea7db00225d406f6e579c08961e2f38.tar.xz
evol-hercules-fb3f83b79ea7db00225d406f6e579c08961e2f38.zip
hide hidden players from online list if player in list have smaller group level than local player.
-rw-r--r--src/map/map.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 6567337..8b0fd6a 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -70,7 +70,9 @@ void emap_online_list(int fd)
if (!ssd)
return;
+
const bool showVersion = pc_has_permission(ssd, permission_show_client_version_flag);
+ const int gpoupLevel = pc_get_group_level(ssd);
data1->onlinelistlasttime = t;
DBIterator* iter = db_iterator(map->pc_db);
@@ -83,12 +85,13 @@ void emap_online_list(int fd)
if (ptr - buf > 19500)
break;
+ if (pc_isinvisible(sd) && gpoupLevel < pc_get_group_level(sd))
+ continue;
+
struct SessionExt *data = session_get_bysd(sd);
if (!data)
continue;
- // need skip invisible players
-
uint8 state = data->state;
if (sd->status.sex == 1)
state |= 128;