mirror of
https://github.com/oshima-studios/OshimaGameModule.git
synced 2025-05-06 10:49: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;
|
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)
|
foreach (string key in needy.Keys)
|
||||||
{
|
{
|
||||||
int needCount = needy[key];
|
int needCount = needy[key];
|
||||||
if (key == General.GameplayEquilibriumConstant.InGameMaterial)
|
if (key == General.GameplayEquilibriumConstant.InGameMaterial)
|
||||||
{
|
{
|
||||||
if (user.Inventory.Credits >= needCount)
|
if (user.Inventory.Materials >= needCount)
|
||||||
{
|
{
|
||||||
user.Inventory.Credits -= needCount;
|
user.Inventory.Materials -= needCount;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return NetworkUtility.JsonSerialize($"你的{General.GameplayEquilibriumConstant.InGameCurrency}不足 {needCount} 呢,不满足突破条件!");
|
return NetworkUtility.JsonSerialize($"你的{General.GameplayEquilibriumConstant.InGameMaterial}不足 {needCount} 呢,不满足突破条件!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (needCount > 0)
|
if (needCount > 0)
|
||||||
{
|
{
|
||||||
IEnumerable<Item> items = user.Inventory.Items.Where(i => i.Name == key);
|
IEnumerable<Item> items = user.Inventory.Items.Where(i => i.Name == key);
|
||||||
@ -1714,6 +1716,7 @@ namespace Oshima.Core.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
character.OnLevelBreak();
|
character.OnLevelBreak();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user