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

@@ -73,11 +73,9 @@ func Start(serverid uint16) {
// go func() {
t := rpc.StartClient(serverid, uint16(port), new(controller.LogicClient))
//TODO 待实现掉线重新连接login
controller.Maincontroller.RPCClient = *t //将RPC赋值Start
controller.Maincontroller.Port = uint16(port) //赋值服务器ID
//}()
//go rpc.StartClient(uint16(serverid), &controller.Maincontroller)
service.NewLoginServiceService().SetServerID(serverid, gconv.Uint16(port), t)
socket.