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

Method GetMapOnlineList

src/plugin/kernel/src/AFCMapModule.cpp:215–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215int AFCMapModule::GetMapOnlineList(const int map_id, AFIDataList& list)
216{
217 auto pMapInfo = map_infos_.find_value(map_id);
218 if (pMapInfo == nullptr)
219 {
220 return 0;
221 }
222
223 auto all_instances = pMapInfo->GetAllInstance();
224 for (auto iter : all_instances)
225 {
226 auto pMapInstance = iter.second;
227 for (auto it : pMapInstance->player_entities_)
228 {
229 list.AddInt64(it.first);
230 }
231 }
232
233 return list.GetCount();
234}
235
236int AFCMapModule::CreateMapInstance(const int map_id)
237{

Callers 1

LogInfoMethod · 0.80

Calls 3

AddInt64Method · 0.80
find_valueMethod · 0.45
GetCountMethod · 0.45

Tested by

no test coverage detected