发公告

This commit is contained in:
meixiongfeng 2022-12-28 19:01:21 +08:00
parent 0c60f0d2ac
commit 003aeb8814
2 changed files with 17 additions and 0 deletions

View File

@ -36,6 +36,7 @@ import (
19bingo:recharge,10
20bingo:cleanitem
21bingo:allequip
21bingo:chat,1
*/
//参数校验
func (this *apiComp) CmdCheck(session comm.IUserSession, req *pb.GMCmdReq) (code pb.ErrorCode) {

View File

@ -405,6 +405,22 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
return
}
this.Debug("使用bingo命令:uid = %s ",
log.Field{Key: "uid", Value: session.GetUserId()},
log.Field{Key: "0", Value: datas[0]},
)
} else if len(datas) == 2 && (datas[0] == "chat") {
// num, err := strconv.Atoi(datas[1])
// if err != nil {
// code = pb.ErrorCode_ReqParameterError
// return
// }
if module, err := this.service.GetModule(comm.ModuleChat); err == nil {
if code = module.(comm.IChat).SendSysChatToWorld(comm.ChatSystem10, nil, 5, 0, "xxx", "25001"); code != pb.ErrorCode_Success {
return
}
}
this.Debug("使用bingo命令:uid = %s ",
log.Field{Key: "uid", Value: session.GetUserId()},
log.Field{Key: "0", Value: datas[0]},