mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-15 00:07:13 +00:00
fix(inventory): an inventory group holds at most 1000 LOTs, as the client
LWOInventoryComponent_Common::msgUpdateInventoryGroupContents (0x00ce1f50) ignores an ADD to an unlocked group that already holds 1000 LOTs. The server had no cap, so a modified client could grow the charxml without limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -88,3 +88,11 @@ TEST_F(InventoryGroupTests, ClearEmptiesAGroup) {
|
||||
ASSERT_EQ(Groups().size(), 1u);
|
||||
EXPECT_TRUE(Groups()[0].lots.empty());
|
||||
}
|
||||
|
||||
TEST_F(InventoryGroupTests, AGroupHoldsAtMost1000Lots) {
|
||||
Group("ADD", "user_group1", u"bricks");
|
||||
for (LOT lot = 1; lot <= 1001; lot++) Contents("ADD", "user_group1", lot);
|
||||
|
||||
EXPECT_EQ(Groups()[0].lots.size(), 1000u);
|
||||
EXPECT_FALSE(Groups()[0].lots.contains(1001));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user