28 lines
640 B
Go
28 lines
640 B
Go
package entertainment
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"go_dreamfactory/pb"
|
|
)
|
|
|
|
//参数校验
|
|
func (this *apiComp) ReconnectCheck(session comm.IUserSession, req *pb.EntertainReconnectReq) (errdata *pb.ErrorData) {
|
|
if req.Roomid == "" {
|
|
errdata = &pb.ErrorData{
|
|
Code: pb.ErrorCode_ReqParameterError,
|
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
|
}
|
|
}
|
|
|
|
return
|
|
}
|
|
|
|
func (this *apiComp) Reconnect(session comm.IUserSession, req *pb.EntertainReconnectReq) (errdata *pb.ErrorData) {
|
|
//重连消息
|
|
if errdata = this.module.gameMgr.RoomDistribute(req.Roomid, session, "reconnect", req); errdata == nil {
|
|
return
|
|
}
|
|
|
|
return
|
|
}
|