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

* 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

--HG--
branch : trunk
This commit is contained in:
megamage
2009-07-20 11:51:20 +08:00
parent e95dd86616
commit 833e4e41ab
7 changed files with 36 additions and 31 deletions

View File

@@ -539,7 +539,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)
@@ -548,7 +548,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...