| 1813 | } |
| 1814 | |
| 1815 | std::vector<const CCommunity *> CServerBrowser::CurrentCommunities() const |
| 1816 | { |
| 1817 | if(m_ServerlistType == IServerBrowser::TYPE_INTERNET || m_ServerlistType == IServerBrowser::TYPE_FAVORITES) |
| 1818 | { |
| 1819 | return SelectedCommunities(); |
| 1820 | } |
| 1821 | else if(m_ServerlistType >= IServerBrowser::TYPE_FAVORITE_COMMUNITY_1 && m_ServerlistType <= IServerBrowser::TYPE_FAVORITE_COMMUNITY_5) |
| 1822 | { |
| 1823 | const size_t CommunityIndex = m_ServerlistType - IServerBrowser::TYPE_FAVORITE_COMMUNITY_1; |
| 1824 | std::vector<const CCommunity *> vpFavoriteCommunities = FavoriteCommunities(); |
| 1825 | dbg_assert(CommunityIndex < vpFavoriteCommunities.size(), "Invalid favorite community serverbrowser type"); |
| 1826 | return {vpFavoriteCommunities[CommunityIndex]}; |
| 1827 | } |
| 1828 | else |
| 1829 | { |
| 1830 | return {}; |
| 1831 | } |
| 1832 | } |
| 1833 | |
| 1834 | unsigned CServerBrowser::CurrentCommunitiesHash() const |
| 1835 | { |