MCPcopy Create free account
hub / github.com/OpenArkStudio/ARK / GetMapOnlineCount

Method GetMapOnlineCount

src/plugin/kernel/src/AFCMapModule.cpp:176–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176int 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
195int AFCMapModule::GetMapOnlineCount(const int map_id, const int map_instance_id)
196{

Callers

nothing calls this directly

Calls 3

GetInstanceMethod · 0.80
find_valueMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected