From 3270ed8c672e0cd74b2b8a0c504f748ddcdcfa5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=94=E5=BF=B5?= <1@72wo.cn> Date: Tue, 21 Oct 2025 23:00:00 +0800 Subject: [PATCH] =?UTF-8?q?```=20feat(nono):=20=E6=B7=BB=E5=8A=A0=E7=8E=A9?= =?UTF-8?q?=E5=AE=B6=E5=AE=A0=E7=89=A9=E6=B2=BB=E7=96=97=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增 PlayerPetCure 控制器方法和对应的入参、出参结构体, 用于处理宠物治疗逻辑。同时为 SwitchFlyingInboundInfo 结构体 补充了缺失的注释说明。 ``` --- logic/controller/nono.go | 9 +++++++++ logic/service/nono/nono.go | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/logic/controller/nono.go b/logic/controller/nono.go index aac6b265..4b3976f8 100644 --- a/logic/controller/nono.go +++ b/logic/controller/nono.go @@ -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 +} diff --git a/logic/service/nono/nono.go b/logic/service/nono/nono.go index c67bb478..74bbd027 100644 --- a/logic/service/nono/nono.go +++ b/logic/service/nono/nono.go @@ -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 { +}