feat: Add item type ``FindChest`` (#3)

This commit is contained in:
Lethe
2025-01-21 23:51:35 +08:00
committed by GitHub
parent 1fc63e507c
commit 32724dea08
2 changed files with 4 additions and 1 deletions

View File

@@ -127,7 +127,9 @@ public class CommandGiveall : ICommand
var materialList = GameData.ItemConfigData.Values;
var items = new List<ItemData>();
foreach (var material in materialList)
if (material.ItemMainType == ItemMainTypeEnum.Material || material.ItemSubType == ItemSubTypeEnum.Food)
if (material.ItemMainType == ItemMainTypeEnum.Material ||
material.ItemSubType == ItemSubTypeEnum.Food ||
material.ItemSubType == ItemSubTypeEnum.FindChest)
items.Add(new ItemData
{
ItemId = material.ID,

View File

@@ -76,6 +76,7 @@ public class InventoryManager(PlayerInstance player) : BasePlayerManager(player)
break;
case ItemSubTypeEnum.Food:
case ItemSubTypeEnum.Book:
case ItemSubTypeEnum.FindChest:
itemData = await PutItem(itemId, count);
break;
}