| 671 | } |
| 672 | |
| 673 | int 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 | |
| 700 | void AFCGameNetModule::SendMsgPBToGate(const uint16_t nMsgID, google::protobuf::Message& xMsg, const AFGUID& self) |
| 701 | { |
nothing calls this directly
no outgoing calls
no test coverage detected