diff --git a/AriasServerUtils/ASUModSystem.cs b/AriasServerUtils/ASUModSystem.cs index e5f5662..531f551 100644 --- a/AriasServerUtils/ASUModSystem.cs +++ b/AriasServerUtils/ASUModSystem.cs @@ -88,15 +88,33 @@ namespace AriasServerUtils var invMgr = player.InventoryManager; - + var iBackpackSlotNum = 0; foreach (var type in saveInvTypes) { foreach (var stack in invMgr.GetOwnInventory(type)) { + + if (iBackpackSlotNum >= 4) + { + continue; + } + if (type == GlobalConstants.backpackInvClassName) + { + iBackpackSlotNum++; + } if (stack.Empty) continue; - inv.Items.Add(stack.Itemstack.Clone()); + if (stack.Inventory.ClassName == GlobalConstants.characterInvClassName) + { + if (stack.Itemstack.ItemAttributes?["protectionModifiers"].Exists ?? false) + { + inv.Items.Add(stack.Itemstack.Clone()); + } + } + else + inv.Items.Add(stack.Itemstack.Clone()); API.Logger.Notification($"SAVED STORAGE ITEM TYPE: {stack.Itemstack}"); + } } diff --git a/AriasServerUtils/modinfo.json b/AriasServerUtils/modinfo.json index 78d77da..c91723e 100644 --- a/AriasServerUtils/modinfo.json +++ b/AriasServerUtils/modinfo.json @@ -3,8 +3,8 @@ "modid": "ariasserverutils", "name": "Aria's Server Utilities", "authors": ["zontreck"], - "description": "A collection of server utilities\n\nBuild Date: 01-18-2025 @ 04:23 AM", - "version": "1.0.0-dev.3", + "description": "A collection of server utilities\n\nBuild Date: 01-18-2025 @ 01:00 PM", + "version": "1.0.0-dev.4", "dependencies": { "game": "" }