refactor(nono): 优化非诺相关结构体字段命名与初始化方式

将 nono 包中多个结构体的字段初始化方式改为键值对形式,提升可读性。
同时统一字段命名风格,增强代码一致性。

feat(fight): 移除冗余战斗循环逻辑并调整部分依赖引用

删除 fightc.go 中的 battleLoop 方法及相关逻辑,简化战斗流程控制。
移除未使用的包引用,并调整结构体成员顺序以提高清晰度。

refactor(player): 修改数据库字段类型为 jsonb 提升灵活性

将 Player 结构体中的 Data 字段由 text 类型修改为 jsonb 类型,
便于后续进行更灵活的数据存储与查询操作。
```
This commit is contained in:
2025-11-01 18:36:21 +08:00
parent ea4ca98e49
commit 2b3c4b6ccd
8 changed files with 210 additions and 186 deletions

View File

@@ -13,12 +13,12 @@ func (h *Controller) NonoFollowOrHome(data *nono.NonoFollowOrHomeInInfo, c *play
c.Info.NONO.Flag = data.Flag
result = &nono.NonoFollowOutInfo{
data.Head.UserID,
data.Flag,
data.Flag,
"",
0,
0,
UserID: data.Head.UserID,
SuperStage: data.Flag,
Flag: data.Flag,
Nick: "",
Color: 0,
Power: 0,
}
return
@@ -43,8 +43,8 @@ func (h *Controller) GetNonoInfo(data *nono.NonoInboundInfo, c *player.Player) (
func (h *Controller) SwitchFlying(data *nono.SwitchFlyingInboundInfo, c *player.Player) (result *nono.SwitchFlyingOutboundInfo, err errorcode.ErrorCode) { //这个时候player应该是空的
result = &nono.SwitchFlyingOutboundInfo{
data.Head.UserID,
data.Type,
UserId: data.Head.UserID,
Type: data.Type,
}
return