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

Method OnViewDataTableEnter

src/server/game/src/AFCGameNetModule.cpp:199–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199int 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
234bool AFCGameNetModule::ProcessLeaveGroup(const AFGUID& self, int map_id, int old_inst_id)
235{

Callers

nothing calls this directly

Calls 4

GetEntityMethod · 0.80
EntityTableToPBDataMethod · 0.80
Int64Method · 0.80
GetCountMethod · 0.45

Tested by

no test coverage detected