1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-02-07 19:40:51 +08:00
parent 7b8276a387
commit cdfbc45887
5 changed files with 36 additions and 28 deletions

View File

@@ -12,25 +12,22 @@ import (
"blazing/logic/service/player"
"blazing/logic/service/space"
"github.com/jinzhu/copier"
)
func (h Controller) EnterMap(data *space.InInfo, c *player.Player) (result *info.SimpleInfo, err errorcode.ErrorCode) { //这个时候player应该是空的
c.Info.MapID = data.MapId //登录地图
c.GetSpace().User.Store(c.Info.UserID, c) //添加玩家
c.Info.MapID = data.MapId //登录地图
c.Info.Pos = data.Point
if cool.Config.ServerInfo.IsDebug != 0 {
println("进入地图", c.Info.UserID, c.Info.MapID)
}
result = info.NewOutInfo()
c.Info.Pos = data.Point
copier.CopyWithOption(result, c.Info, copier.Option{DeepCopy: true})
// copier.CopyWithOption(result, c.Info, copier.Option{DeepCopy: true})
defer c.GetSpace().EnterMap(c)
return result, 0
return nil, -1
}
func (h Controller) GetMapHot(data *maphot.InInfo, c *player.Player) (result *maphot.OutInfo, err errorcode.ErrorCode) {