package controller

import (
	"blazing/common/socket/errorcode"
	"blazing/logic/service"
	"blazing/logic/service/space"
	"context"

	"github.com/gogf/gf/v2/os/glog"
	"github.com/jinzhu/copier"
)

func (h Controller) Walk(data *space.InInfo, c *service.Player) (result *space.OutInfo, err errorcode.ErrorCode) {
	result = &space.OutInfo{}
	err1 := copier.Copy(result, data)
	result.UserID = data.Head.UserID
	glog.Debug(context.Background(), err1)
	data.Broadcast(c.Info.MapID, *result) //走路的广播

	return nil, -1
}
