mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-15 16:27:14 +00:00
fix(inventory): adding an inventory group that exists does nothing, as the client
LWOInventoryComponent_Common::msgUpdateInventoryGroup (0x00c955b0) ignores an ADD whose group id is already in the inventory. The server added a second group with the same id, saved to the charxml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1998,6 +1998,9 @@ void InventoryComponent::UpdateGroup(const GroupUpdate& groupUpdate) {
|
||||
return group.groupId == groupUpdate.groupId;
|
||||
});
|
||||
|
||||
// As LWOInventoryComponent_Common::msgUpdateInventoryGroup (0x00c955b0): adding a group that exists does nothing
|
||||
if (groupUpdate.command == GroupUpdateCommand::ADD && groupItr != groups.end()) return;
|
||||
|
||||
if (groupUpdate.command != GroupUpdateCommand::ADD && groupItr == groups.end()) {
|
||||
LOG("Group %s not found in inventory %s. Cannot process command.", groupUpdate.groupId.c_str(), StringifiedEnum::ToString(groupUpdate.inventory).data());
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user