chore: Fixes variable types for possible performance issues (#2172)

This commit is contained in:
Kamron Batman 2025-05-01 21:54:41 -07:00 • committed by GitHub
parent 6d43f2549c
commit da517f56c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
82 changed files with 332 additions and 343 deletions

View file

@ -72,19 +72,18 @@ namespace Server.Multis
{
if (item is PackingBox packingBox)
{
Container box = packingBox;
var subItems = box.Items;
var subItems = packingBox.Items;
if (subItems.Count < MaxItemsPerSubcontainer)
{
box.DropItem(dropped);
packingBox.DropItem(dropped);
return;
}
}
}
// 3. Drop the item into a new container
Container subContainer = new PackingBox();
var subContainer = new PackingBox();
subContainer.DropItem(dropped);
var location = GetFreeLocation();