gm 返回错误码处理

This commit is contained in:
liwei1dao 2022-12-15 18:34:03 +08:00
parent 9214c2e63e
commit b25d0223a9

View File

@ -207,6 +207,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
}
module1.(comm.IMoonFantasy).TriggerMF(session, datas[1])
code = pb.ErrorCode_Success
this.Debug("使用bingo命令", log.Fields{"uid": session.GetUserId(), "0": datas[1]})
} else if len(datas) == 2 && (datas[0] == "arena") { // 设置竞技场用户积分
module1, err := this.service.GetModule(comm.ModuleArena)
@ -219,6 +220,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
return
}
module1.(comm.IArena).SetUserIntegral(session, int32(num))
code = pb.ErrorCode_Success
this.Debug("使用bingo命令", log.Fields{"uid": session.GetUserId(), "0": datas[1]})
} else if len(datas) == 2 && (datas[0] == "sociatyexp") { // 设置工会经验
module1, err := this.service.GetModule(comm.ModuleSociaty)
@ -231,6 +233,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
return
}
module1.(comm.ISociaty).BingoSetExp(session, int32(num))
code = pb.ErrorCode_Success
this.Debug("使用bingo命令", log.Fields{"uid": session.GetUserId(), "0": datas[1]})
} else if len(datas) == 2 && (datas[0] == "sociatyactivity") { // 设置工会活跃度
module1, err := this.service.GetModule(comm.ModuleSociaty)
@ -243,6 +246,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
return
}
module1.(comm.ISociaty).BingoSetActivity(session, int32(num))
code = pb.ErrorCode_Success
this.Debug("使用bingo命令", log.Fields{"uid": session.GetUserId(), "0": datas[1]})
} else if len(datas) == 1 && (datas[0] == "alltask") { // 完成所有世界任务
module, err := this.service.GetModule(comm.ModuleWorldtask)