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

Method OnEntityEvent

src/server/game/src/AFCGameNetModule.cpp:673–698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671}
672
673int AFCGameNetModule::OnEntityEvent(
674 const AFGUID& self, const std::string& strClassName, const ArkEntityEvent eClassEvent, const AFIDataList& var)
675{
676 switch (eClassEvent)
677 {
678 case ArkEntityEvent::ENTITY_EVT_DESTROY:
679 // save data to db by yourself logic
680 ARK_LOG_INFO("Player Offline, player_id = {}", self);
681 break;
682
683 case ArkEntityEvent::ENTITY_EVT_LOAD_DATA:
684 // load data from db by yourself logic
685 ARK_LOG_INFO("Player online, player_id = {}", self);
686 break;
687
688 case ArkEntityEvent::ENTITY_EVT_ALL_FINISHED:
689 // load data finished from db by yourself logic
690 ARK_LOG_INFO("Player ready, player_id = {}", self);
691 break;
692
693 default:
694 break;
695 }
696
697 return 0;
698}
699
700void AFCGameNetModule::SendMsgPBToGate(const uint16_t nMsgID, google::protobuf::Message& xMsg, const AFGUID& self)
701{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected