[8185] Allow set visible gm level for in gm list and in who list checks.

* GM.InGMList replaced by GM.InGMList.Level with default value 3 (visible any gm levels)
* GM.InWhoList replaced by GM.InWhoList.Level with default value 3 (visible any gm levels)

Update mangosd.conf if used non default value for old GM.InGMList and GM.InWhoList
This commit is contained in:
VladimirMangos 2009-07-16 02:08:15 +04:00
parent d98cff1e68
commit c129b0a1bd
8 changed files with 36 additions and 32 deletions

View file

@ -446,7 +446,7 @@ void Channel::List(Player* player)
size_t pos = data.wpos();
data << uint32(0); // size of list, placeholder
bool gmInWhoList = sWorld.getConfig(CONFIG_GM_IN_WHO_LIST) || player->GetSession()->GetSecurity() > SEC_PLAYER;
uint32 gmLevelInWhoList = sWorld.getConfig(CONFIG_GM_LEVEL_IN_WHO_LIST);
uint32 count = 0;
for(PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
@ -455,7 +455,8 @@ void Channel::List(Player* player)
// PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters
// MODERATOR, GAME MASTER, ADMINISTRATOR can see all
if (plr && ( plr->GetSession()->GetSecurity() == SEC_PLAYER || (gmInWhoList && plr->IsVisibleGloballyFor(player))))
if (plr && (player->GetSession()->GetSecurity() > SEC_PLAYER || plr->GetSession()->GetSecurity() <= gmLevelInWhoList) &&
plr->IsVisibleGloballyFor(player))
{
data << uint64(i->first);
data << uint8(i->second.flags); // flags seems to be changed...