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

Method AddCommonContainerCallBack

src/plugin/kernel/src/AFCKernelModule.cpp:500–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

498}
499
500bool AFCKernelModule::AddCommonContainerCallBack(CONTAINER_EVENT_FUNCTOR&& cb, const int32_t prio)
501{
502 auto pClassMeta = m_pClassModule->FindMeta(AFEntityMetaPlayer::self_name());
503 ARK_ASSERT_RET_VAL(pClassMeta != nullptr, false);
504
505 auto& meta_list = pClassMeta->GetContainerMetaList();
506 for (auto& iter : meta_list)
507 {
508 auto pMeta = iter.second;
509 if (!pMeta)
510 {
511 continue;
512 }
513
514 AddContainerCallBack(
515 AFEntityMetaPlayer::self_name(), pMeta->GetIndex(), std::forward<CONTAINER_EVENT_FUNCTOR>(cb), prio);
516 }
517
518 return true;
519}
520
521bool AFCKernelModule::AddCommonClassEvent(CLASS_EVENT_FUNCTOR&& cb, const int32_t prio)
522{

Callers

nothing calls this directly

Calls 2

FindMetaMethod · 0.45
GetIndexMethod · 0.45

Tested by

no test coverage detected