From d075ec0676d74b13aca524239cca52c5f93047e1 Mon Sep 17 00:00:00 2001 From: 1 <1@72wo.cn> Date: Mon, 11 Aug 2025 07:25:18 +0000 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E4=BB=A3=E7=A0=81=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E5=92=8C=E4=BC=98=E5=8C=96=E8=BF=94=E5=9B=9E=E5=80=BC?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/data/entity/player.go | 2 +- logic/controller/login.go | 2 +- logic/controller/maphot.go | 4 ++-- logic/controller/systemtime.go | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) 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 }