Files
bl/logic/service/maps/walk.go
昔念 5e01837f78 refactor(logic): 重构逻辑层代码
- 移除未使用的 SocketHandler_Tomee.go、ai.go、effect_1.go 文件
- 更新 player 包名引用,替换原 service 包
- 调整 TomeeHeader 和相关处理逻辑至 player 包
- 更新各控制器中的 Player 引用为 player 包中的类型
- 移除冗余的 GetPlayer 方法,使用新逻辑
2025-09-14 01:35:16 +08:00

51 lines
1.2 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package maps
import (
"blazing/logic/service/common"
"blazing/logic/service/player"
"blazing/logic/service/space"
"blazing/modules/blazing/model"
)
type WalkInInfo struct {
Head player.TomeeHeader `cmd:"2101" struc:"[0]pad"` //走路包
// Flag: 0为走1为飞行模式@UInt long
Flag uint32
// Point: 直接给坐标xy
Point model.Pos `fieldDesc:"直接给坐标xy"`
// Reverse2: 暂定 占位字符2
Reverse2 string `struc:"[2]byte"`
}
func (t *WalkInInfo) Broadcast(mapid uint32, o WalkOutInfo) {
//tt := planetmap
//g.Dump(GetSpace(mapid).Len())
space.GetSpace(mapid).Range(func(playerID uint32, player common.PlayerI) bool {
t.Head.Result = 0
tt := t.Head.Pack(&o)
player.SendPack(tt)
//player.Cheak(err)
return true
})
}
// PeopleWalkOutboundInfo PeopleWalkOutboundInfo类实现OutboundMessage接口
type WalkOutInfo struct {
// Flag: 0为走1为飞行模式
Flag uint32 `fieldDesc:"0为走1为飞行模式" codec:"uint"`
// UserID: 走动的人的米米号
UserID uint32 `fieldDesc:"走动的人的米米号" codec:"uint"`
// Point: 直接给坐标xy
Point model.Pos `fieldDesc:"直接给坐标xy"`
// Reserve2: 这个字段同C2S_People_Walk中的reserve2
Reserve2 string `struc:"[2]byte"`
}