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

Method GetBroadcastEntityList

src/server/game/src/AFCGameNetModule.cpp:649–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

647}
648
649int AFCGameNetModule::GetBroadcastEntityList(const int map_id, const int inst_id, AFIDataList& valueObject)
650{
651 AFCDataList map_inst_entity_list;
652 m_pMapModule->GetInstEntityList(map_id, inst_id, map_inst_entity_list);
653
654 for (size_t i = 0; i < map_inst_entity_list.GetCount(); i++)
655 {
656 auto pEntity = m_pKernelModule->GetEntity(map_inst_entity_list.Int64(i));
657 if (pEntity == nullptr)
658 {
659 continue;
660 }
661
662 const std::string& strObjClassName = pEntity->GetClassName();
663
664 if (AFEntityMetaPlayer::self_name() == strObjClassName)
665 {
666 valueObject.AddInt64(map_inst_entity_list.Int64(i));
667 }
668 }
669
670 return valueObject.GetCount();
671}
672
673int AFCGameNetModule::OnEntityEvent(
674 const AFGUID& self, const std::string& strClassName, const ArkEntityEvent eClassEvent, const AFIDataList& var)

Callers

nothing calls this directly

Calls 5

GetInstEntityListMethod · 0.80
GetEntityMethod · 0.80
Int64Method · 0.80
AddInt64Method · 0.80
GetCountMethod · 0.45

Tested by

no test coverage detected