| 112 | //} |
| 113 | |
| 114 | int AFCGameNetModule::OnViewDataNodeEnter(const AFIDataList& argVar, const AFGUID& self) |
| 115 | { |
| 116 | if (argVar.GetCount() <= 0 || self == 0) |
| 117 | { |
| 118 | return 1; |
| 119 | } |
| 120 | |
| 121 | std::shared_ptr<AFIEntity> pEntity = m_pKernelModule->GetEntity(self); |
| 122 | if (nullptr == pEntity) |
| 123 | { |
| 124 | return 0; |
| 125 | } |
| 126 | |
| 127 | AFMsg::multi_entity_data_list msg; |
| 128 | AFMsg::pb_entity* entity = msg.add_data_list(); |
| 129 | entity->set_id(self); |
| 130 | |
| 131 | ArkMaskType mask; |
| 132 | mask[(size_t)ArkDataMask::PF_SYNC_VIEW] = 1; |
| 133 | m_pKernelModule->EntityNodeToPBData(pEntity, entity->mutable_data(), mask); |
| 134 | |
| 135 | for (size_t i = 0; i < argVar.GetCount(); i++) |
| 136 | { |
| 137 | AFGUID identOther = argVar.Int64(i); |
| 138 | |
| 139 | if (self != identOther) |
| 140 | { |
| 141 | SendMsgPBToGate(AFMsg::EGMI_ACK_ENTITY_DATA_NODE_ENTER, msg, identOther); |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | return 0; |
| 146 | } |
| 147 | |
| 148 | int AFCGameNetModule::OnSelfDataNodeEnter(const AFGUID& self) |
| 149 | { |
nothing calls this directly
no test coverage detected