Name loadout restore pricing directly
This commit is contained in:
parent
bfa56b8de6
commit
4ca8f86bcf
3 changed files with 24 additions and 16 deletions
|
|
@ -130,17 +130,17 @@ namespace GameCult.Aetheria.State.Verse
|
|||
durability);
|
||||
}
|
||||
|
||||
public static bool TryProjectLoadoutTemplatePrice(
|
||||
public static bool TryPriceLoadoutTemplate(
|
||||
AetheriaRuntimeLoadoutTemplateSnapshot? template,
|
||||
AetheriaRuntimeCatalogSnapshot? catalog,
|
||||
AetheriaRuntimeTradeValueSettings? settings,
|
||||
out int price)
|
||||
{
|
||||
price = 0;
|
||||
return TryProjectEntityLoadoutPrice(template?.RootEntity, catalog, settings, out price);
|
||||
return TryPriceEntityLoadout(template?.RootEntity, catalog, settings, out price);
|
||||
}
|
||||
|
||||
private static bool TryProjectEntityLoadoutPrice(
|
||||
private static bool TryPriceEntityLoadout(
|
||||
AetheriaRuntimeEntityLoadoutSnapshot? entity,
|
||||
AetheriaRuntimeCatalogSnapshot? catalog,
|
||||
AetheriaRuntimeTradeValueSettings? settings,
|
||||
|
|
@ -164,7 +164,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
|
||||
foreach (var child in entity.Children ?? Array.Empty<AetheriaRuntimeEntityLoadoutSnapshot>())
|
||||
{
|
||||
if (!TryProjectEntityLoadoutPrice(child, catalog, settings, out var childPrice))
|
||||
if (!TryPriceEntityLoadout(child, catalog, settings, out var childPrice))
|
||||
return false;
|
||||
|
||||
price += childPrice;
|
||||
|
|
|
|||
|
|
@ -1199,7 +1199,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
for (var templateIndex = 0; templateIndex < templates.Count; templateIndex++)
|
||||
{
|
||||
var template = templates[templateIndex];
|
||||
var canPrice = AetheriaRuntimeDaemonTradeItemQueries.TryProjectLoadoutTemplatePrice(
|
||||
var canPrice = AetheriaRuntimeDaemonTradeItemQueries.TryPriceLoadoutTemplate(
|
||||
template,
|
||||
catalog,
|
||||
catalog?.TradeValueSettings,
|
||||
|
|
|
|||
Loading…
Reference in a new issue