This commit is contained in:
@@ -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) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user