```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(controller): 增强命令注册逻辑并修复试炼塔关卡限制

- 在命令注册时检查重复方法,如果存在则panic提示错误
- 移除CurrentFreshStage和CurrentStage的默认值设置逻辑
- 添加关卡等级验证,确保用户不能挑战超过最大关卡数的关卡
- 修复试炼之塔和勇者之塔的关卡计算逻辑

fix(item): 修复道具
This commit is contained in:
昔念
2026-03-03 19:28:59 +08:00
parent 103bc0c232
commit 5caa9a1e4f
10 changed files with 98 additions and 36 deletions

View File

@@ -173,11 +173,11 @@ type PlayerInfo struct {
CurrentFreshStage uint32 `struc:"uint32" default:"1" json:"current_fresh_stage"` // 当前试炼层数
MaxFreshStage uint32 `struc:"uint32" json:"max_fresh_stage"` // 最高试炼层
MaxArenaWins uint32 `struc:"uint32" json:"max_arena_wins"` // 星际擂台连胜
TwoTimes uint32 `struc:"uint32" default:"0" json:"two_times"` // 双倍经验加速器剩余使用次数
ThreeTimes uint32 `struc:"uint32" default:"0" json:"three_times"` // 三倍经验加速器剩余使用次数
TwoTimes int32 `struc:"uint32" default:"0" json:"two_times"` // 双倍经验加速器剩余使用次数
ThreeTimes int32 `struc:"uint32" default:"0" json:"three_times"` // 三倍经验加速器剩余使用次数
AutoFight uint32 `struc:"uint32" default:"0" json:"auto_fight"` // 是否自动战斗
AutoFightTime uint32 `struc:"uint32" default:"0" json:"auto_fight_time"` // 自动战斗剩余的场次
EnergyTime uint32 `struc:"uint32" default:"0" json:"energy_time"` // 能量吸收仪剩余次数
EnergyTime int32 `struc:"uint32" default:"0" json:"energy_time"` // 能量吸收仪剩余次数
LearnTimes uint32 `struc:"uint32" default:"0" json:"learn_times"` // 学习力吸收仪剩余次数
MonBattleMedal uint32 `struc:"uint32" default:"0" json:"mon_battle_medal"` // 默认0
RecordCount uint32 `struc:"uint32" default:"0" json:"record_count"` // 默认0