diff options
Diffstat (limited to 'src/game/SocialMgr.cpp')
-rw-r--r-- | src/game/SocialMgr.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/game/SocialMgr.cpp b/src/game/SocialMgr.cpp index fb0e1574d08..d94cd422f11 100644 --- a/src/game/SocialMgr.cpp +++ b/src/game/SocialMgr.cpp @@ -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); } |