fix: the model vault uses the models' inventory groups, as the client

LWOInventoryComponent_Common::msgUpdateInventoryGroup (0x00c955b0) and msgUpdateInventoryGroupContents (0x00ce1f50) look the inventory type up in m_VaultToPlayerInventory first, which maps VAULT_MODELS to MODELS. The server refused group updates for the model vault.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-10-16 20:09:54 -05:00
parent 13be051af9
commit 4dcd8b8204
4 changed files with 64 additions and 2 deletions

View File

@@ -1688,12 +1688,14 @@ bool InventoryComponent::SetSkill(BehaviorSlot slot, uint32_t skillId) {
void InventoryComponent::UpdateGroup(const GroupUpdate& groupUpdate) {
if (groupUpdate.groupId.empty()) return;
if (groupUpdate.inventory != eInventoryType::BRICKS && groupUpdate.inventory != eInventoryType::MODELS) {
// The model vault shares the models' groups (the client's m_VaultToPlayerInventory: VAULT_MODELS -> MODELS)
const auto inventory = groupUpdate.inventory == eInventoryType::VAULT_MODELS ? eInventoryType::MODELS : groupUpdate.inventory;
if (inventory != eInventoryType::BRICKS && inventory != eInventoryType::MODELS) {
LOG("Invalid inventory type for grouping %s", StringifiedEnum::ToString(groupUpdate.inventory).data());
return;
}
auto& groups = m_Groups[groupUpdate.inventory];
auto& groups = m_Groups[inventory];
auto groupItr = std::ranges::find_if(groups, [&groupUpdate](const Group& group) {
return group.groupId == groupUpdate.groupId;
});

View File

@@ -409,6 +409,8 @@ public:
void UpdateGroup(const GroupUpdate& groupUpdate);
const std::map<eInventoryType, std::vector<Group>>& GetGroups() const { return m_Groups; }
std::unordered_map<LWOOBJID, DatabasePet>& GetPetsMut() { return m_Pets; };
void FixInvisibleItems();