mirror of
https://github.com/project-redbud/FunGame-Core.git
synced 2025-12-05 00:06:02 +00:00
商品刷新优化;文本优化
This commit is contained in:
parent
00429c2de0
commit
482f281d36
@ -52,15 +52,15 @@ namespace Milimoe.FunGame.Core.Entity
|
|||||||
builder.AppendLine($"商品描述:{Description}");
|
builder.AppendLine($"商品描述:{Description}");
|
||||||
builder.AppendLine($"商品售价:{(Prices.Count > 0 ? string.Join("、", Prices.Select(kv => $"{kv.Value} {kv.Key}")) : "免费")}");
|
builder.AppendLine($"商品售价:{(Prices.Count > 0 ? string.Join("、", Prices.Select(kv => $"{kv.Value} {kv.Key}")) : "免费")}");
|
||||||
builder.AppendLine($"包含物品:{string.Join("、", Items.Select(i => $"[{ItemSet.GetQualityTypeName(i.QualityType)}|{ItemSet.GetItemTypeName(i.ItemType)}] {i.Name}"))}");
|
builder.AppendLine($"包含物品:{string.Join("、", Items.Select(i => $"[{ItemSet.GetQualityTypeName(i.QualityType)}|{ItemSet.GetItemTypeName(i.ItemType)}] {i.Name}"))}");
|
||||||
builder.AppendLine($"剩余库存:{(Stock == -1 ? "不限" : Stock)}");
|
|
||||||
if (Quota > 0)
|
|
||||||
{
|
|
||||||
int buyCount = 0;
|
int buyCount = 0;
|
||||||
if (user != null)
|
if (user != null)
|
||||||
{
|
{
|
||||||
UsersBuyCount.TryGetValue(user.Id, out buyCount);
|
UsersBuyCount.TryGetValue(user.Id, out buyCount);
|
||||||
}
|
}
|
||||||
builder.AppendLine($"限购数量:{Quota}(已购:{buyCount})");
|
builder.AppendLine($"剩余库存:{(Stock == -1 ? "不限" : Stock)}(已购:{buyCount})");
|
||||||
|
if (Quota > 0)
|
||||||
|
{
|
||||||
|
builder.AppendLine($"限购数量:{Quota}");
|
||||||
}
|
}
|
||||||
return builder.ToString().Trim();
|
return builder.ToString().Trim();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -151,12 +151,13 @@ namespace Milimoe.FunGame.Core.Entity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CopyGoodsToNextRefreshGoods()
|
public void CopyGoodsToNextRefreshGoods(Dictionary<long, Goods>? goods = null)
|
||||||
{
|
{
|
||||||
|
goods ??= Goods;
|
||||||
NextRefreshGoods.Clear();
|
NextRefreshGoods.Clear();
|
||||||
foreach (long goodsId in Goods.Keys)
|
foreach (long goodsId in goods.Keys)
|
||||||
{
|
{
|
||||||
NextRefreshGoods.Add(goodsId, Goods[goodsId]);
|
NextRefreshGoods.Add(goodsId, goods[goodsId]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user