清理代码注释和优化返回值处理
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
type Player struct {
|
||||
MainConn Conn
|
||||
UserID uint32 //用户ID
|
||||
IsLogin bool //是否登录 //TODO 待实现登录包为第一个包,后续再发其他的包
|
||||
IsLogin bool //是否登录
|
||||
mu sync.Mutex
|
||||
|
||||
loginChan chan struct{} // 登录完成通知通道
|
||||
|
||||
@@ -26,7 +26,7 @@ func (h *Controller) Login(data *login.InInfo, c *entity.Conn) (result *login.Pl
|
||||
|
||||
} else {
|
||||
err = errorcode.ErrorCodes.ErrLoginServerError
|
||||
return
|
||||
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user