refactor: 重构宠物仓库列表获取逻辑

This commit is contained in:
xinian
2026-04-05 05:32:39 +08:00
committed by cnb
parent c3f052ef30
commit bceb7965f7
5 changed files with 53 additions and 21 deletions

View File

@@ -2,6 +2,7 @@ package controller
import (
"blazing/common/socket/errorcode"
"blazing/logic/service/common"
"blazing/logic/service/pet"
"blazing/logic/service/player"
"blazing/modules/player/model"
@@ -43,13 +44,17 @@ func (h Controller) GetPetList(
return buildPetListOutboundInfo(player.Info.PetList), 0
}
type GetPetListFreeInboundEmpty struct {
Head common.TomeeHeader `cmd:"2320" struc:"skip"`
}
// GetPetReleaseList 获取仓库可放生列表
func (h Controller) GetPetReleaseList(
data *pet.GetPetListFreeInboundEmpty,
data *GetPetListFreeInboundEmpty,
player *player.Player) (result *pet.GetPetListOutboundInfo,
err errorcode.ErrorCode) {
return buildPetListOutboundInfo(buildWarehousePetList(player)), 0
return buildPetListOutboundInfo(player.WarehousePetList()), 0
}
// PlayerShowPet 精灵展示