From f22ed65a51ed1aab080f718815b83fde3606306d Mon Sep 17 00:00:00 2001 From: milimoe Date: Sun, 8 Dec 2024 02:07:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=A8=20Item=20=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E5=99=A8=E7=9A=84=E5=B1=9E=E6=80=A7=EF=BC=9B=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=A3=85=E5=A4=87=E7=89=A9=E5=93=81=E6=97=B6=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=97=A7=E7=9A=84=E7=89=A9=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OshimaCore/Controllers/FunGameController.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OshimaCore/Controllers/FunGameController.cs b/OshimaCore/Controllers/FunGameController.cs index 252ec72..9c60647 100644 --- a/OshimaCore/Controllers/FunGameController.cs +++ b/OshimaCore/Controllers/FunGameController.cs @@ -18,7 +18,6 @@ namespace Oshima.Core.Controllers private const int drawCardReduce = 2000; private const int drawCardReduce_Material = 10; private const string noSaved = "你还没有创建存档!请发送【创建存档】创建。"; - private readonly ItemType[] itemCanEquip = [ItemType.MagicCardPack, ItemType.Weapon, ItemType.Armor, ItemType.Shoes, ItemType.Accessory]; private readonly ItemType[] itemCanUsed = [ItemType.Consumable, ItemType.MagicCard, ItemType.SpecialItem, ItemType.GiftBox, ItemType.Others]; [HttpGet("test")] @@ -514,7 +513,7 @@ namespace Oshima.Core.Controllers string str = $"{itemCount}. [{ItemSet.GetQualityTypeName(first.QualityType)}|{ItemSet.GetItemTypeName(first.ItemType)}] {first.Name}\r\n"; str += $"物品描述:{first.Description}\r\n"; str += $"物品序号:{string.Join(",", objs.Select(i => items.IndexOf(i) + 1))}\r\n"; - str += $"拥有数量:{objs.Count}(" + (itemCanEquip.Contains(first.ItemType) ? $"可装备数量:{objs.Count(i => i.Character is null)}," : "") + + str += $"拥有数量:{objs.Count}(" + (first.IsEquipment ? $"可装备数量:{objs.Count(i => i.Character is null)}," : "") + (itemCanUsed.Contains(first.ItemType) ? $"可使用数量:{objs.Count(i => i.RemainUseTimes > 0)}," : "") + $"可出售数量:{objs.Count(i => i.IsSellable)},可交易数量:{objs.Count(i => i.IsTradable)})"; list.Add(str); @@ -594,7 +593,7 @@ namespace Oshima.Core.Controllers string str = $"{itemCount}. [{ItemSet.GetQualityTypeName(first.QualityType)}|{ItemSet.GetItemTypeName(first.ItemType)}] {first.Name}\r\n"; str += $"物品描述:{first.Description}\r\n"; str += $"物品序号:{string.Join(",", objs.Select(i => items.IndexOf(i) + 1))}\r\n"; - str += $"拥有数量:{objs.Count}(" + (itemCanEquip.Contains(first.ItemType) ? $"可装备数量:{objs.Count(i => i.Character is null)}," : "") + + str += $"拥有数量:{objs.Count}(" + (first.IsEquipment ? $"可装备数量:{objs.Count(i => i.Character is null)}," : "") + (itemCanUsed.Contains(first.ItemType) ? $"可使用数量:{objs.Count(i => i.RemainUseTimes > 0)}," : "") + $"可出售数量:{objs.Count(i => i.IsSellable)},可交易数量:{objs.Count(i => i.IsTradable)})"; list.Add(str);