mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-19 02:05:28 +00:00
fix(inventory): UpdateInventoryGroupContents CLEAR empties the group, as the client
LWOInventoryComponent_Common::msgUpdateInventoryGroupContents (0x00ce1f50) takes ADD, REMOVE and CLEAR; CLEAR removes every LOT from the group. The server logged CLEAR as an invalid action and kept the LOTs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -78,3 +78,13 @@ TEST_F(InventoryGroupTests, TheModelVaultUsesTheModelsGroups) {
|
||||
EXPECT_EQ(Groups(eInventoryType::MODELS)[0].lots.size(), 1u);
|
||||
EXPECT_FALSE(inventory->GetGroups().contains(eInventoryType::VAULT_MODELS));
|
||||
}
|
||||
|
||||
TEST_F(InventoryGroupTests, ClearEmptiesAGroup) {
|
||||
Group("ADD", "user_group1", u"bricks");
|
||||
Contents("ADD", "user_group1", 3001);
|
||||
Contents("ADD", "user_group1", 3002);
|
||||
Contents("CLEAR", "user_group1", 0);
|
||||
|
||||
ASSERT_EQ(Groups().size(), 1u);
|
||||
EXPECT_TRUE(Groups()[0].lots.empty());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user