feat(game): 更新试炼之塔和勇者之塔等级验证逻辑 - 修改fight_塔.go中等级验证条件,添加data.Level != 1的特殊处理 - 防止等级1时的错误验证,允许重新挑战第1层 - 保持原有的最大等级限制逻辑 docs(README): 添加新的pprof性能分析命令示例 - 增加针对端口43892的性能分析命令 - 添加300秒CPU数据采样的HTTP可视化命令 - 为性能调试提供更多示例选项
This commit is contained in:
@@ -59,13 +59,13 @@ func (h Controller) FreshChoiceFightLevel(data *fight.C2S_FRESH_CHOICE_FIGHT_LEV
|
||||
if data.Level > 0 {
|
||||
switch data.Head.CMD {
|
||||
case 2428: //试炼之塔
|
||||
if data.Level > uint(c.Info.MaxFreshStage) {
|
||||
if data.Level > uint(c.Info.MaxFreshStage) && data.Level != 1 {
|
||||
return nil, errorcode.ErrorCodes.ErrPokemonNotExists
|
||||
}
|
||||
|
||||
c.Info.CurrentFreshStage = uint32(data.Level)
|
||||
case 2414: //勇者之塔
|
||||
if data.Level > uint(c.Info.MaxStage) {
|
||||
if data.Level > uint(c.Info.MaxStage) && data.Level != 1 {
|
||||
return nil, errorcode.ErrorCodes.ErrPokemonNotExists
|
||||
}
|
||||
c.Info.CurrentStage = uint32(data.Level)
|
||||
|
||||
Reference in New Issue
Block a user