fix(entity): models get their item component, as the client makes it

The client makes the registry's item component for models too (only a pet takes it away); DLU skipped it and the model component wrote the item block itself, for the 30 model LOTs without an item row as well, and with the object id as ug_id. Live (Raven Bluff property capture): the item block carries the userModelID for brick built models (LOT 14) and 0 for reward models (LOT 8069). 1,455 LOTs gain the item component; nothing else changes (LoaderSnapshotTest).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-10-01 06:27:36 -05:00
parent b2192e158c
commit cc337a298d
4 changed files with 33 additions and 18 deletions

View File

@@ -1,11 +1,11 @@
#include "ItemComponent.h"
void ItemComponent::Serialize(RakNet::BitStream& outBitStream, bool isConstruction) {
// Live wrote the user-generated-content info on every construction of an object with only an item component:
// no UGC id, moderation status NoStatus, no description.
// Live wrote the user-generated-content info on every construction: the model's userModelID (a brick built model,
// LOT 14), else no UGC id (items, reward models such as LOT 8069), moderation status NoStatus, no description.
outBitStream.Write(isConstruction);
if (isConstruction) {
outBitStream.Write<LWOOBJID>(LWOOBJID_EMPTY); // ug_id
outBitStream.Write<LWOOBJID>(m_Parent->GetVarAs<LWOOBJID>(u"userModelID")); // ug_id
outBitStream.Write<uint32_t>(0); // ug_moderation_status NoStatus
outBitStream.Write0(); // ug_description
}