Files
bl/logic/controller/room.go
昔念 621a9d3858 refactor(socket): 重构 socket 模块
- 移除 common/data/socket 目录下的大部分文件
- 新增 service 目录,将 Player 和 Conn 结构体移至该目录
- 更新 LogicClient 中的方法签名,使用 service 包的类型
- 重构 Controller 中的方法,适应新的 service 包结构
2025-09-04 02:00:57 +08:00

33 lines
1.1 KiB
Go

package controller
import (
"blazing/common/socket/errorcode"
"blazing/logic/service"
"blazing/logic/service/room"
)
// 获取基地物品
func (h Controller) OnFitmentUsering(data *room.FitmentUseringInboundInfo, c *service.Player) (result *room.FitmentUseringOutboundInfo, err errorcode.ErrorCode) {
result = &room.FitmentUseringOutboundInfo{UserId: c.Info.UserID, RoomId: data.TargetUserID}
result.Fitments = make([]room.FitmentShowInfo, 0)
result.Fitments = append(result.Fitments, room.FitmentShowInfo{Id: 500001, Status: 1, X: 1, Y: 1, Dir: 1})
return
}
// 获取基地展示精灵
func (h Controller) OnGetRoomPetShowInfo(data *room.PetRoomListInboundInfo, c *service.Player) (result *room.PetRoomListOutboundInfo, err errorcode.ErrorCode) {
result = &room.PetRoomListOutboundInfo{}
result.Pets = make([]room.PetShowInfo, 0)
return
}
// 获取自己房间的家具
func (h Controller) OnGetFitmentAll(data *room.FitmentAllInboundEmpty, c *service.Player) (result *room.FitmentAllOutboundInfo, err errorcode.ErrorCode) {
result = &room.FitmentAllOutboundInfo{}
result.Fitments = make([]room.FitmentItemInfo, 0)
return
}