mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-04-22 03:49:35 +08:00
改成判断 item.Character,方便一些
This commit is contained in:
parent
8b7a13b052
commit
fbc95f5dc1
@ -514,8 +514,8 @@ namespace Oshima.Core.Controllers
|
|||||||
string str = $"{itemCount}. [{ItemSet.GetQualityTypeName(first.QualityType)}|{ItemSet.GetItemTypeName(first.ItemType)}] {first.Name}\r\n";
|
string str = $"{itemCount}. [{ItemSet.GetQualityTypeName(first.QualityType)}|{ItemSet.GetItemTypeName(first.ItemType)}] {first.Name}\r\n";
|
||||||
str += $"物品描述:{first.Description}\r\n";
|
str += $"物品描述:{first.Description}\r\n";
|
||||||
str += $"物品序号:{string.Join(",", objs.Select(i => items.IndexOf(i) + 1))}\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.EquipSlotType == EquipSlotType.None)}," : "") +
|
str += $"拥有数量:{objs.Count}(" + (itemCanEquip.Contains(first.ItemType) ? $"可装备数量:{objs.Count(i => i.Character is null)}," : "") +
|
||||||
(itemCanUsed.Contains(first.ItemType) ? $"可使用数量:{objs.Count(i => i.EquipSlotType == EquipSlotType.None)}," : "") +
|
(itemCanUsed.Contains(first.ItemType) ? $"可使用数量:{objs.Count(i => i.RemainUseTimes > 0)}," : "") +
|
||||||
$"可出售数量:{objs.Count(i => i.IsSellable)},可交易数量:{objs.Count(i => i.IsTradable)})";
|
$"可出售数量:{objs.Count(i => i.IsSellable)},可交易数量:{objs.Count(i => i.IsTradable)})";
|
||||||
list.Add(str);
|
list.Add(str);
|
||||||
}
|
}
|
||||||
@ -594,8 +594,8 @@ namespace Oshima.Core.Controllers
|
|||||||
string str = $"{itemCount}. [{ItemSet.GetQualityTypeName(first.QualityType)}|{ItemSet.GetItemTypeName(first.ItemType)}] {first.Name}\r\n";
|
string str = $"{itemCount}. [{ItemSet.GetQualityTypeName(first.QualityType)}|{ItemSet.GetItemTypeName(first.ItemType)}] {first.Name}\r\n";
|
||||||
str += $"物品描述:{first.Description}\r\n";
|
str += $"物品描述:{first.Description}\r\n";
|
||||||
str += $"物品序号:{string.Join(",", objs.Select(i => items.IndexOf(i) + 1))}\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.EquipSlotType == EquipSlotType.None)}," : "") +
|
str += $"拥有数量:{objs.Count}(" + (itemCanEquip.Contains(first.ItemType) ? $"可装备数量:{objs.Count(i => i.Character is null)}," : "") +
|
||||||
(itemCanUsed.Contains(first.ItemType) ? $"可使用数量:{objs.Count(i => i.EquipSlotType == EquipSlotType.None)}," : "") +
|
(itemCanUsed.Contains(first.ItemType) ? $"可使用数量:{objs.Count(i => i.RemainUseTimes > 0)}," : "") +
|
||||||
$"可出售数量:{objs.Count(i => i.IsSellable)},可交易数量:{objs.Count(i => i.IsTradable)})";
|
$"可出售数量:{objs.Count(i => i.IsSellable)},可交易数量:{objs.Count(i => i.IsTradable)})";
|
||||||
list.Add(str);
|
list.Add(str);
|
||||||
}
|
}
|
||||||
@ -998,9 +998,9 @@ namespace Oshima.Core.Controllers
|
|||||||
{
|
{
|
||||||
return NetworkUtility.JsonSerialize($"这个物品无法被装备!");
|
return NetworkUtility.JsonSerialize($"这个物品无法被装备!");
|
||||||
}
|
}
|
||||||
else if (item.EquipSlotType != EquipSlotType.None)
|
else if (item.Character != null)
|
||||||
{
|
{
|
||||||
return NetworkUtility.JsonSerialize($"这个物品无法被装备!" + (item.Character != null ? $"[ {item.Character.ToStringWithLevelWithOutUser()} ] 已装备此物品。" : ""));
|
return NetworkUtility.JsonSerialize($"这个物品无法被装备![ {item.Character.ToStringWithLevelWithOutUser()} ] 已装备此物品。");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -63,6 +63,7 @@ namespace Oshima.Core.Utils
|
|||||||
item.Id = Convert.ToInt64("16" + Verification.CreateVerifyCode(VerifyCodeType.NumberVerifyCode, 8));
|
item.Id = Convert.ToInt64("16" + Verification.CreateVerifyCode(VerifyCodeType.NumberVerifyCode, 8));
|
||||||
item.Name = GenerateRandomChineseName();
|
item.Name = GenerateRandomChineseName();
|
||||||
item.ItemType = ItemType.MagicCard;
|
item.ItemType = ItemType.MagicCard;
|
||||||
|
item.RemainUseTimes = 1;
|
||||||
|
|
||||||
int total;
|
int total;
|
||||||
if (qualityType != null)
|
if (qualityType != null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user