| 410 | } |
| 411 | |
| 412 | int AFCGameNetModule::OnEntityListLeave(const AFIDataList& self, const AFIDataList& argVar) |
| 413 | { |
| 414 | if (self.GetCount() <= 0 || argVar.GetCount() <= 0) |
| 415 | { |
| 416 | return 1; |
| 417 | } |
| 418 | |
| 419 | AFMsg::AckEntityLeaveList xEntityLeaveInfoList; |
| 420 | |
| 421 | for (size_t i = 0; i < argVar.GetCount(); i++) |
| 422 | { |
| 423 | AFGUID identOld = argVar.Int64(i); |
| 424 | |
| 425 | // Exclude empty entity |
| 426 | if (identOld != 0) |
| 427 | { |
| 428 | xEntityLeaveInfoList.add_entity_list(identOld); |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | for (size_t i = 0; i < self.GetCount(); i++) |
| 433 | { |
| 434 | AFGUID ident = self.Int64(i); |
| 435 | |
| 436 | if (ident != 0) |
| 437 | { |
| 438 | SendMsgPBToGate(AFMsg::EGMI_ACK_ENTITY_LEAVE, xEntityLeaveInfoList, ident); |
| 439 | } |
| 440 | } |
| 441 | |
| 442 | return 0; |
| 443 | } |
| 444 | |
| 445 | int AFCGameNetModule::CommonClassDestoryEvent(const AFGUID& self) |
| 446 | { |