feat(parity): replicate batch items pickup, dragon soul refine packet, target sync, and attackability (pass35)

This commit is contained in:
shen
2026-10-08 02:11:08 -07:00
parent 9a635932d6
commit efd3a44fa0
6 changed files with 181 additions and 5 deletions
+25
View File
@@ -1305,6 +1305,31 @@ bool PythonNetworkStream::SendItemPickUpPacket(uint32_t vid) {
return true;
}
bool PythonNetworkStream::SendItemsPickUpPacket(const std::vector<uint32_t>& itemVector) {
if(!main_actor_can_act(m_dwMainActorVID)) return true;
if (itemVector.empty()) return true;
TPacketCGItemsPickUp p{};
p.header = HEADER_CG_ITEMS_PICKUP;
p.count = static_cast<uint32_t>(itemVector.size());
Send(&p, sizeof(p));
for (uint32_t vid : itemVector) {
Send(&vid, sizeof(vid));
}
return true;
}
bool PythonNetworkStream::SendDragonSoulRefinePacket(uint8_t bRefineType, const TItemPos* pos) {
if(!main_actor_can_act(m_dwMainActorVID)) return true;
TPacketCGDragonSoulRefine p{};
p.header = HEADER_CG_DRAGON_SOUL_REFINE;
p.bSubType = bRefineType;
if (pos) {
std::copy_n(pos, DS_REFINE_WINDOW_MAX_NUM, p.ItemGrid);
}
Send(&p, sizeof(p));
return true;
}
bool PythonNetworkStream::SendItemDropPacket(uint8_t window, uint16_t cell, uint32_t gold) {
if(!main_actor_can_act(m_dwMainActorVID)) return true;
TPacketCGItemDrop p;