mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-04-22 20:09:35 +08:00
修改bug
This commit is contained in:
parent
0c85db384d
commit
3c1cb897af
@ -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();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user