go_dreamfactory/modules/gm/api_cmd.go
2022-12-08 15:51:07 +08:00

53 lines
1.6 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package gm
import (
"go_dreamfactory/comm"
"go_dreamfactory/pb"
"google.golang.org/protobuf/proto"
)
/* GM 在控制台输入的字符串类型
//bingo:item,10001,1
//bingo:attr,gold,1000000
//bingo:equi,xxx,1 // xxx 装备id
2、修改主线关卡进度bingo:mapid,102102代表关卡位置
3、修改心魔塔进度bingo:pataid,1010代表层数
4、修改玩家经验值bingo:attr,exp,10001000代表新增的经验值 //
5、跳过随机任务 bingo:worldtask,1,1001
6、bingo:Iamyoudad
7、bingo:vip,yueka_1,1 // 月卡类型
8、bingo:manhero // 获取所有满星满级满觉醒的英雄
9、bingo:season,10 赛季塔层数
10、bingo:viking // 解锁维京所有难度
11、bingo:hunting // 解锁狩猎所有难度
12、bingo:mainline,1,101 // 难度 id
13、bingo:moon,1 // 触发月之秘境
14、bingo:arena,100 // 设置竞技场用户积分
15、bingo:sociatyexp,100 // 设置工会经验
15、bingo:sociatyactivity,100 // 设置工会活跃
15、bingo:alltask // bingo所有任务
*/
//参数校验
func (this *apiComp) CmdCheck(session comm.IUserSession, req *pb.GMCmdReq) (code pb.ErrorCode) {
if len(req.Cmod) == 0 {
code = pb.ErrorCode_ReqParameterError
}
return
}
///解析GM 指令
func (this *apiComp) Cmd(session comm.IUserSession, req *pb.GMCmdReq) (code pb.ErrorCode, data proto.Message) {
if code = this.CmdCheck(session, req); code != pb.ErrorCode_Success {
return
}
this.module.CreateCmd(session, req.Cmod)
//this.module.ModuleHero.GetSpecifiedHero(session.GetUserId(), heroid, star, lv)
session.SendMsg(string(this.module.GetType()), "cmd", &pb.GMCmdResp{IsSucc: false})
return
}