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

Method OnEntityListLeave

src/server/game/src/AFCGameNetModule.cpp:412–443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410}
411
412int AFCGameNetModule::OnEntityListLeave(const AFIDataList& self, const AFIDataList& argVar)
413{
414 if (self.GetCount() <= 0 || argVar.GetCount() <= 0)
415 {
416 return 1;
417 }
418
419 AFMsg::AckEntityLeaveList xEntityLeaveInfoList;
420
421 for (size_t i = 0; i < argVar.GetCount(); i++)
422 {
423 AFGUID identOld = argVar.Int64(i);
424
425 // Exclude empty entity
426 if (identOld != 0)
427 {
428 xEntityLeaveInfoList.add_entity_list(identOld);
429 }
430 }
431
432 for (size_t i = 0; i < self.GetCount(); i++)
433 {
434 AFGUID ident = self.Int64(i);
435
436 if (ident != 0)
437 {
438 SendMsgPBToGate(AFMsg::EGMI_ACK_ENTITY_LEAVE, xEntityLeaveInfoList, ident);
439 }
440 }
441
442 return 0;
443}
444
445int AFCGameNetModule::CommonClassDestoryEvent(const AFGUID& self)
446{

Callers

nothing calls this directly

Calls 2

Int64Method · 0.80
GetCountMethod · 0.45

Tested by

no test coverage detected