[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:
1 parent
e95dd86616
commit
833e4e41ab
7 files changed
+36
-31
No files matched your search
+10
-10
@@ -198,7 +198,7 @@ void SocialMgr::GetFriendInfo(Player *player, uint32 friendGUID, FriendInfo &fri
|
||||
uint32 team = player->GetTeam();
|
||||
AccountTypes security = player->GetSession()->GetSecurity();
|
||||
bool allowTwoSideWhoList = sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_WHO_LIST);
|
||||
bool gmInWhoList = sWorld.getConfig(CONFIG_GM_IN_WHO_LIST) || security > SEC_PLAYER;
|
||||
AccountTypes gmLevelInWhoList = AccountTypes (sWorld.getConfig(CONFIG_GM_LEVEL_IN_WHO_LIST));
|
||||
|
||||
PlayerSocialMap::iterator itr = player->GetSocial()->m_playerSocialMap.find(friendGUID);
|
||||
if(itr != player->GetSocial()->m_playerSocialMap.end())
|
||||
@@ -206,10 +206,10 @@ void SocialMgr::GetFriendInfo(Player *player, uint32 friendGUID, FriendInfo &fri
|
||||
|
||||
// PLAYER see his team only and PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters
|
||||
// MODERATOR, GAME MASTER, ADMINISTRATOR can see all
|
||||
if( pFriend && pFriend->GetName() &&
|
||||
( security > SEC_PLAYER ||
|
||||
( pFriend->GetTeam() == team || allowTwoSideWhoList ) &&
|
||||
( pFriend->GetSession()->GetSecurity() == SEC_PLAYER || gmInWhoList && pFriend->IsVisibleGloballyFor(player) )))
|
||||
if (pFriend && pFriend->GetName() &&
|
||||
(security > SEC_PLAYER ||
|
||||
(pFriend->GetTeam() == team || allowTwoSideWhoList) && (pFriend->GetSession()->GetSecurity() <= gmLevelInWhoList)) &&
|
||||
pFriend->IsVisibleGloballyFor(player))
|
||||
{
|
||||
friendInfo.Status = FRIEND_STATUS_ONLINE;
|
||||
if(pFriend->isAFK())
|
||||
@@ -273,7 +273,7 @@ void SocialMgr::BroadcastToFriendListers(Player *player, WorldPacket *packet)
|
||||
uint32 team = player->GetTeam();
|
||||
AccountTypes security = player->GetSession()->GetSecurity();
|
||||
uint32 guid = player->GetGUIDLow();
|
||||
bool gmInWhoList = sWorld.getConfig(CONFIG_GM_IN_WHO_LIST);
|
||||
AccountTypes gmLevelInWhoList = AccountTypes(sWorld.getConfig(CONFIG_GM_LEVEL_IN_WHO_LIST));
|
||||
bool allowTwoSideWhoList = sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_WHO_LIST);
|
||||
|
||||
for(SocialMap::const_iterator itr = m_socialMap.begin(); itr != m_socialMap.end(); ++itr)
|
||||
@@ -285,10 +285,10 @@ void SocialMgr::BroadcastToFriendListers(Player *player, WorldPacket *packet)
|
||||
|
||||
// PLAYER see his team only and PLAYER can't see MODERATOR, GAME MASTER, ADMINISTRATOR characters
|
||||
// MODERATOR, GAME MASTER, ADMINISTRATOR can see all
|
||||
if( pFriend && pFriend->IsInWorld() &&
|
||||
( pFriend->GetSession()->GetSecurity() > SEC_PLAYER ||
|
||||
( pFriend->GetTeam() == team || allowTwoSideWhoList ) &&
|
||||
(security == SEC_PLAYER || gmInWhoList && player->IsVisibleGloballyFor(pFriend) )))
|
||||
if (pFriend && pFriend->IsInWorld() &&
|
||||
(pFriend->GetSession()->GetSecurity() > SEC_PLAYER ||
|
||||
(pFriend->GetTeam() == team || allowTwoSideWhoList) && security <= gmLevelInWhoList) &&
|
||||
player->IsVisibleGloballyFor(pFriend))
|
||||
{
|
||||
pFriend->GetSession()->SendPacket(packet);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user