diff --git a/common/data/entity/player.go b/common/data/entity/player.go index 1b6e0977..31edc6b0 100644 --- a/common/data/entity/player.go +++ b/common/data/entity/player.go @@ -12,7 +12,7 @@ import ( type Player struct { MainConn Conn UserID uint32 //用户ID - IsLogin bool //是否登录 //TODO 待实现登录包为第一个包,后续再发其他的包 + IsLogin bool //是否登录 mu sync.Mutex loginChan chan struct{} // 登录完成通知通道 diff --git a/logic/controller/login.go b/logic/controller/login.go index 1bc4a11d..d09f3b01 100644 --- a/logic/controller/login.go +++ b/logic/controller/login.go @@ -26,7 +26,7 @@ func (h *Controller) Login(data *login.InInfo, c *entity.Conn) (result *login.Pl } else { err = errorcode.ErrorCodes.ErrLoginServerError - return + } return } diff --git a/logic/controller/maphot.go b/logic/controller/maphot.go index d577a481..c6227207 100644 --- a/logic/controller/maphot.go +++ b/logic/controller/maphot.go @@ -8,11 +8,11 @@ import ( func (h Controller) MapHot(data *maphot.InInfo, c *entity.Player) (result *maphot.OutInfo, err errorcode.ErrorCode) { - data.Def() + result = &maphot.OutInfo{ HotInfos: make([]maphot.MapHotInfo, 0), } - return + return } diff --git a/logic/controller/systemtime.go b/logic/controller/systemtime.go index d6483a34..08c926ba 100644 --- a/logic/controller/systemtime.go +++ b/logic/controller/systemtime.go @@ -7,7 +7,6 @@ import ( ) func (h Controller) SystemTimeInfo(data *systemtime.InInfo, c *entity.Player) (result *systemtime.OutInfo, err errorcode.ErrorCode) { - result = systemtime.NewOutInfo() - return + return systemtime.NewOutInfo(), 0 }