修了不少东西

This commit is contained in:
FloatGaming
2026-07-16 23:04:59 +08:00
parent 29972d0705
commit 73fe474cc6
134 changed files with 7673 additions and 741 deletions
@@ -97,13 +97,13 @@ public static class StoreExpBottlePurchaseService
if (!HasEnoughCurrency(primaryCost.currencyType, totalCost))
{
failureMessage = LocalizationService.Get("store.error.insufficient_currency", "货币不足");
failureMessage = GetInsufficientCurrencyMessage(primaryCost.currencyType);
return false;
}
if (!TrySpendCurrency(primaryCost.currencyType, totalCost))
{
failureMessage = LocalizationService.Get("store.error.insufficient_currency", "货币不足");
failureMessage = GetInsufficientCurrencyMessage(primaryCost.currencyType);
return false;
}
@@ -224,7 +224,7 @@ public static class StoreExpBottlePurchaseService
var builder = new StringBuilder();
builder.Append("[StorePurchase] 已成功购买:");
builder.Append(itemSO != null ? itemSO.itemName : LocalizationService.Get("item.unknown.store_item", "Unknown Item"));
builder.Append(" | 花费Coins=");
builder.Append(" | 花费算力=");
builder.Append(totalCost);
builder.Append(" | 发放数量=");
builder.Append(grantedCount);
@@ -341,6 +341,11 @@ public static class StoreExpBottlePurchaseService
|| currencyType == storeItemSO.CurrencyType.material;
}
private static string GetInsufficientCurrencyMessage(storeItemSO.CurrencyType currencyType)
{
return currencyType == storeItemSO.CurrencyType.material ? "记忆碎片不足" : "算力不足";
}
private static bool HasEnoughCurrency(storeItemSO.CurrencyType currencyType, int amount)
{
switch (currencyType)