```
feat(nono): 添加玩家宠物治疗功能 新增 PlayerPetCure 控制器方法和对应的入参、出参结构体, 用于处理宠物治疗逻辑。同时为 SwitchFlyingInboundInfo 结构体 补充了缺失的注释说明。 ```
This commit is contained in:
@@ -49,3 +49,12 @@ func (h *Controller) SwitchFlying(data *nono.SwitchFlyingInboundInfo, c *player.
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (h *Controller) PlayerPetCure(data *nono.PetCureInboundInfo, c *player.Player) (result *nono.PetCureOutboundEmpty, err errorcode.ErrorCode) { //这个时候player应该是空的
|
||||
|
||||
for i := 0; i < len(c.Info.PetList); i++ {
|
||||
c.Info.PetList[i].Cure()
|
||||
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -88,8 +88,14 @@ type NonoFollowOutInfo struct {
|
||||
type SwitchFlyingInboundInfo struct {
|
||||
Head player.TomeeHeader `cmd:"2112" struc:"[0]pad"`
|
||||
Type uint32 `description:"开关, 0为取消飞行模式, 大于0为开启飞行模式" codec:"auto" uint:"true"` // 对应@FieldDescription、@UInt、@AutoCodec
|
||||
} // SwitchFlyingOutboundInfo 对应Java的SwitchFlyingOutboundInfo类
|
||||
}
|
||||
type SwitchFlyingOutboundInfo struct {
|
||||
UserId uint32 `description:"玩家账号ID" codec:"auto" uint:"true"` // 对应@FieldDescription、@UInt、@AutoCodec
|
||||
Type uint32 `description:"开关, 0为取消飞行模式, 大于0为开启飞行模式" codec:"auto" uint:"true"` // 对应@FieldDescription、@UInt、@AutoCodec
|
||||
}
|
||||
type PetCureInboundInfo struct {
|
||||
Head player.TomeeHeader `cmd:"2306" struc:"[0]pad"`
|
||||
Type uint32 `description:"开关, 0为取消飞行模式, 大于0为开启飞行模式" codec:"auto" uint:"true"` // 对应@FieldDescription、@UInt、@AutoCodec
|
||||
}
|
||||
type PetCureOutboundEmpty struct {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user