feat(map): 实现地图加载和玩家进入地图功能
- 在 Player 结构中添加 MapId 字段,用于记录当前所在地图 ID - 新增地图配置解析功能,支持从 XML 文件中读取地图信息 - 实现玩家进入地图的逻辑,包括设置玩家位置和广播通知 - 更新登录逻辑,在玩家登录时自动进入默认地图 - 重构地图相关的数据结构和接口,为后续地图功能扩展做准备
This commit is contained in:
12
logic/service/maps/mapout.go
Normal file
12
logic/service/maps/mapout.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package maps
|
||||
|
||||
import "blazing/common/socket/handler"
|
||||
|
||||
type LeaveMapOutboundInfo struct {
|
||||
// 米米号
|
||||
UserID uint32 `struc:"uint32" fieldDesc:"米米号" json:"user_id"`
|
||||
}
|
||||
|
||||
type LeaveMapInboundInfo struct {
|
||||
Head handler.TomeeHeader `cmd:"2002" struc:"[0]pad"` //切换地图
|
||||
}
|
||||
Reference in New Issue
Block a user