feat(map): 实现地图加载和玩家进入地图功能

- 在 Player 结构中添加 MapId 字段,用于记录当前所在地图 ID
- 新增地图配置解析功能,支持从 XML 文件中读取地图信息
- 实现玩家进入地图的逻辑,包括设置玩家位置和广播通知
- 更新登录逻辑,在玩家登录时自动进入默认地图
- 重构地图相关的数据结构和接口,为后续地图功能扩展做准备
This commit is contained in:
2025-08-15 22:44:28 +08:00
parent 0751ae2705
commit 5e277defb7
15 changed files with 348 additions and 108 deletions

View 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"` //切换地图
}