refactor: 重构宠物背包逻辑到玩家服务
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-04-05 05:47:25 +08:00
committed by cnb
parent bceb7965f7
commit e71971d0b4
7 changed files with 175 additions and 192 deletions

View File

@@ -33,12 +33,16 @@ func (h Controller) GetUserBagPetInfo(
data *pet.GetUserBagPetInfoInboundEmpty,
player *player.Player) (result *pet.GetUserBagPetInfoOutboundInfo,
err errorcode.ErrorCode) {
return buildUserBagPetInfo(player), 0
return player.GetUserBagPetInfo(), 0
}
type GetPetListInboundEmpty struct {
Head common.TomeeHeader `cmd:"2303" struc:"skip"`
}
// GetPetList 获取当前主背包列表
func (h Controller) GetPetList(
data *pet.GetPetListInboundEmpty,
data *GetPetListInboundEmpty,
player *player.Player) (result *pet.GetPetListOutboundInfo,
err errorcode.ErrorCode) {
return buildPetListOutboundInfo(player.Info.PetList), 0