| 174 | } |
| 175 | |
| 176 | int AFCMapModule::GetMapOnlineCount(const int map_id) |
| 177 | { |
| 178 | int online_count = 0; |
| 179 | |
| 180 | auto pMapInfo = map_infos_.find_value(map_id); |
| 181 | if (pMapInfo == nullptr) |
| 182 | { |
| 183 | return online_count; |
| 184 | } |
| 185 | |
| 186 | auto all_instances = pMapInfo->GetAllInstance(); |
| 187 | for (auto iter : all_instances) |
| 188 | { |
| 189 | online_count += iter.second->player_entities_.size(); |
| 190 | } |
| 191 | |
| 192 | return online_count; |
| 193 | } |
| 194 | |
| 195 | int AFCMapModule::GetMapOnlineCount(const int map_id, const int map_instance_id) |
| 196 | { |
nothing calls this directly
no test coverage detected