为 RepoForm 添加出售功能,ShopNode 只承载玩家购买组件的逻辑
This commit is contained in:
@@ -123,18 +123,7 @@ namespace GeometryTD.CustomComponent
|
||||
|
||||
private int ResolveRandomPrice(RarityType rarity, Random random)
|
||||
{
|
||||
for (int i = 0; i < _shopPriceRows.Count; i++)
|
||||
{
|
||||
DRShopPrice row = _shopPriceRows[i];
|
||||
if (row != null && row.Rarity == rarity)
|
||||
{
|
||||
int min = Mathf.Max(0, row.MinPrice);
|
||||
int max = Mathf.Max(min, row.MaxPrice);
|
||||
return random.Next(min, max + 1);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ShopPriceRuleService.ResolveRandomBuyPrice(_shopPriceRows, rarity, random);
|
||||
}
|
||||
|
||||
private static IconAreaContext BuildIconAreaContext(TowerCompItemData item)
|
||||
|
||||
Reference in New Issue
Block a user