feat(controller): 增强命令注册逻辑并修复试炼塔关卡限制 - 在命令注册时检查重复方法,如果存在则panic提示错误 - 移除CurrentFreshStage和CurrentStage的默认值设置逻辑 - 添加关卡等级验证,确保用户不能挑战超过最大关卡数的关卡 - 修复试炼之塔和勇者之塔的关卡计算逻辑 fix(item): 修复道具
This commit is contained in:
@@ -3,7 +3,6 @@ package admin
|
||||
import (
|
||||
"blazing/cool"
|
||||
"blazing/modules/config/service"
|
||||
"context"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
@@ -28,16 +27,16 @@ type TimeMapReq struct {
|
||||
g.Meta `path:"/timemap" method:"GET"`
|
||||
}
|
||||
|
||||
func (this *MapController) TimeMap(ctx context.Context, req *TimeMapReq) (res *cool.BaseRes, err error) {
|
||||
res = &cool.BaseRes{}
|
||||
res.Data = service.NewMapService().GetTimeMap()
|
||||
// re := service.NewMapService().GetTimeMap()
|
||||
// for _, v := range re {
|
||||
// v.
|
||||
// func (this *MapController) TimeMap(ctx context.Context, req *TimeMapReq) (res *cool.BaseRes, err error) {
|
||||
// res = &cool.BaseRes{}
|
||||
// res.Data = service.NewMapService().GetTimeMap()
|
||||
// // re := service.NewMapService().GetTimeMap()
|
||||
// // for _, v := range re {
|
||||
// // v.
|
||||
|
||||
// }
|
||||
return res, nil
|
||||
}
|
||||
// // }
|
||||
// return res, nil
|
||||
// }
|
||||
|
||||
// type MapTipReq struct {
|
||||
// g.Meta `path:"/maptip" method:"GET"`
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user