Added character fragments

To address the issue where RspLogin was becoming too large to allow logins, I changed the system to send a portion of the information via NtfSyncPlayer.
This commit is contained in:
Kei-Luna
2026-04-27 08:54:32 +09:00
parent b88e27e66e
commit 22029d195a
6 changed files with 37 additions and 4 deletions

View File

@@ -138,11 +138,14 @@ public class InventoryManager(PlayerInstance player) : BasePlayerManager(player)
return InventoryData.Items.Values.FirstOrDefault(x => x.TemplateId == templateId);
}
private static uint GetSuppliesMaxCount(SuppliesExcel suppliesData) =>
suppliesData.Genre == 5 && suppliesData.Detail == 4 ? 999999u : 99999u;
public async ValueTask<BaseGameItemInfo?> AddSuppliesItem(SuppliesExcel suppliesData, uint count)
{
var templateId = GameResourceTemplateId.FromGdpl(suppliesData.Genre, suppliesData.Detail, suppliesData.Particular, suppliesData.Level);
uint maxCount = suppliesData.GMnum > 0 ? suppliesData.GMnum : 99999;
uint maxCount = GetSuppliesMaxCount(suppliesData);
uint giveCount = Math.Min(count, maxCount);
var existing = InventoryData.Items.Values.FirstOrDefault(x => x.TemplateId == templateId);