| 197 | } |
| 198 | |
| 199 | int AFCGameNetModule::OnViewDataTableEnter(const AFIDataList& argVar, const AFGUID& self) |
| 200 | { |
| 201 | if (argVar.GetCount() <= 0 || self == 0) |
| 202 | { |
| 203 | return 1; |
| 204 | } |
| 205 | |
| 206 | std::shared_ptr<AFIEntity> pEntity = m_pKernelModule->GetEntity(self); |
| 207 | |
| 208 | if (nullptr == pEntity) |
| 209 | { |
| 210 | return 1; |
| 211 | } |
| 212 | |
| 213 | AFMsg::multi_entity_data_list msg; |
| 214 | AFMsg::pb_entity* entity = msg.add_data_list(); |
| 215 | entity->set_id(self); |
| 216 | |
| 217 | ArkMaskType mask; |
| 218 | mask[(size_t)ArkDataMask::PF_SYNC_VIEW] = 1; |
| 219 | m_pKernelModule->EntityTableToPBData(pEntity, entity->mutable_data(), mask); |
| 220 | |
| 221 | for (size_t i = 0; i < argVar.GetCount(); i++) |
| 222 | { |
| 223 | AFGUID identOther = argVar.Int64(i); |
| 224 | |
| 225 | if (self != identOther && msg.data_list_size() > 0) |
| 226 | { |
| 227 | SendMsgPBToGate(AFMsg::EGMI_ACK_ENTITY_DATA_TABLE_ENTER, msg, identOther); |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | return 0; |
| 232 | } |
| 233 | |
| 234 | bool AFCGameNetModule::ProcessLeaveGroup(const AFGUID& self, int map_id, int old_inst_id) |
| 235 | { |
nothing calls this directly
no test coverage detected