[Feature] Add Support for Item Previews (#4599)

* [Feature] Add Support for Item Previews

* Update client_packet.cpp
This commit is contained in:
Alex King
2025-01-19 20:18:17 -05:00
committed by GitHub
parent 37a7b7fc41
commit 75698a809f
9 changed files with 1269 additions and 1204 deletions
+8 -1
View File
@@ -5188,7 +5188,14 @@ namespace RoF
//sprintf(hdr.unknown000, "06e0002Y1W00");
snprintf(hdr.unknown000, sizeof(hdr.unknown000), "%016d", item->ID);
strn0cpy(
hdr.unknown000,
fmt::format(
"{:016}\0",
packet_type == ItemPacketInvalid ? 0 : inst->GetSerialNumber()
).c_str(),
sizeof(hdr.unknown000)
);
hdr.stacksize = (inst->IsStackable() ? ((inst->GetCharges() > 1000) ? 0xFFFFFFFF : inst->GetCharges()) : 1);
hdr.unknown004 = 0;