Name loadout restore pricing directly

This commit is contained in:
Meta Vens 2026-06-29 05:09:15 +01:00
commit 4ca8f86bcf
3 changed files with 24 additions and 16 deletions

View file

@ -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;

View file

@ -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,