修改bug

This commit is contained in:
milimoe 2024-12-19 02:13:24 +08:00
parent 0c85db384d
commit 3c1cb897af
Signed by: milimoe
GPG Key ID: 05D280912DA6C69E

View File

@ -1680,22 +1680,24 @@ namespace Oshima.Core.Controllers
int originalBreak = character.LevelBreak;
if (FunGameService.LevelBreakNeedyList.TryGetValue(originalBreak, out Dictionary<string, int>? needy) && needy != null && needy.Count > 0)
if (FunGameService.LevelBreakNeedyList.TryGetValue(originalBreak + 1, out Dictionary<string, int>? needy) && needy != null && needy.Count > 0)
{
foreach (string key in needy.Keys)
{
int needCount = needy[key];
if (key == General.GameplayEquilibriumConstant.InGameMaterial)
{
if (user.Inventory.Credits >= needCount)
if (user.Inventory.Materials >= needCount)
{
user.Inventory.Credits -= needCount;
user.Inventory.Materials -= needCount;
}
else
{
return NetworkUtility.JsonSerialize($"你的{General.GameplayEquilibriumConstant.InGameCurrency}不足 {needCount} 呢,不满足突破条件!");
return NetworkUtility.JsonSerialize($"你的{General.GameplayEquilibriumConstant.InGameMaterial}不足 {needCount} 呢,不满足突破条件!");
}
}
else
{
if (needCount > 0)
{
IEnumerable<Item> items = user.Inventory.Items.Where(i => i.Name == key);
@ -1714,6 +1716,7 @@ namespace Oshima.Core.Controllers
}
}
}
}
character.OnLevelBreak();