forked from PGR/ascnet
1
0
Fork 0

stage difficulty issue fix

This commit is contained in:
rfi 2023-12-09 21:01:06 +07:00
parent 812c566f39
commit 0fe5f84309
2 changed files with 4 additions and 4 deletions

View File

@ -146,6 +146,8 @@ namespace AscNet.GameServer.Handlers
return; return;
} }
var levelControl = TableReaderV2.Parse<Table.V2.share.fuben.StageLevelControlTable>().Where(x => x.StageId == stageTable.StageId).OrderBy(x => Math.Abs(session.player.PlayerData.Level - x.MaxLevel)).FirstOrDefault();
PreFightResponse rsp = new() PreFightResponse rsp = new()
{ {
Code = 0, Code = 0,
@ -158,7 +160,8 @@ namespace AscNet.GameServer.Handlers
StageId = req.PreFightData.StageId, StageId = req.PreFightData.StageId,
RebootId = Miscs.ParseIntOr(stageTable.RebootId, 0), RebootId = Miscs.ParseIntOr(stageTable.RebootId, 0),
PassTimeLimit = Miscs.ParseIntOr(stageTable.PassTimeLimit, 300), PassTimeLimit = Miscs.ParseIntOr(stageTable.PassTimeLimit, 300),
StarsMark = 0 StarsMark = 0,
MonsterLevel = levelControl?.MonsterLevel ?? new()
} }
}; };

View File

@ -2,8 +2,6 @@
using AscNet.GameServer.Handlers; using AscNet.GameServer.Handlers;
using AscNet.GameServer.Commands; using AscNet.GameServer.Commands;
using AscNet.Logging; using AscNet.Logging;
using AscNet.Common.Util;
using AscNet.Table.V2.share.reward;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace AscNet namespace AscNet
@ -19,7 +17,6 @@ namespace AscNet
#if DEBUG #if DEBUG
if (Common.Common.config.VerboseLevel < Common.VerboseLevel.Debug) if (Common.Common.config.VerboseLevel < Common.VerboseLevel.Debug)
Common.Common.config.VerboseLevel = Common.VerboseLevel.Debug; Common.Common.config.VerboseLevel = Common.VerboseLevel.Debug;
// LoggerFactory.Logger.Debug(JsonConvert.SerializeObject(TableReaderV2.Parse<RewardTable>().Where(x => x.Id == null).SelectMany(x => x.SubIds)));
#endif #endif
PacketFactory.LoadPacketHandlers(); PacketFactory.LoadPacketHandlers();