bingo 入口
This commit is contained in:
parent
b00fd416f9
commit
ba4b108a6d
@ -25,6 +25,10 @@ import (
|
|||||||
10、bingo:viking // 解锁维京所有难度
|
10、bingo:viking // 解锁维京所有难度
|
||||||
11、bingo:hunting // 解锁狩猎所有难度
|
11、bingo:hunting // 解锁狩猎所有难度
|
||||||
12、bingo:mainline,1,101 // 难度 id
|
12、bingo:mainline,1,101 // 难度 id
|
||||||
|
13、bingo:moon,1 // 触发月之秘境
|
||||||
|
14、bingo:arena,100 // 设置竞技场用户积分
|
||||||
|
15、bingo:sociatyexp,100 // 设置工会经验
|
||||||
|
15、bingo:sociatyactivity,100 // 设置工会活跃
|
||||||
*/
|
*/
|
||||||
//参数校验
|
//参数校验
|
||||||
func (this *apiComp) CmdCheck(session comm.IUserSession, req *pb.GMCmdReq) (code pb.ErrorCode) {
|
func (this *apiComp) CmdCheck(session comm.IUserSession, req *pb.GMCmdReq) (code pb.ErrorCode) {
|
||||||
|
@ -166,15 +166,15 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
|
|||||||
}
|
}
|
||||||
code = module1.(comm.IPagoda).ModifySeasonPagodaFloor(session, int32(num))
|
code = module1.(comm.IPagoda).ModifySeasonPagodaFloor(session, int32(num))
|
||||||
this.Debug("使用bingo命令:uid = %s ", log.Fields{"uid": session.GetUserId(), "0": datas[0], "N": int32(num)})
|
this.Debug("使用bingo命令:uid = %s ", log.Fields{"uid": session.GetUserId(), "0": datas[0], "N": int32(num)})
|
||||||
} else if len(datas) == 2 && (datas[0] == "viking") { // 解锁远征所有难度
|
} else if len(datas) == 1 && (datas[0] == "viking") { // 解锁远征所有难度
|
||||||
module1, err := this.service.GetModule(comm.ModuleViking)
|
module1, err := this.service.GetModule(comm.ModuleViking)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
code = module1.(comm.IViking).CompleteAllLevel(session)
|
code = module1.(comm.IViking).CompleteAllLevel(session)
|
||||||
this.Debug("使用bingo命令:uid = %s ", log.Fields{"uid": session.GetUserId(), "0": datas[1]})
|
this.Debug("使用bingo命令:uid = %s ", log.Fields{"uid": session.GetUserId()})
|
||||||
} else if len(datas) == 2 && (datas[0] == "hunting") { // 解锁狩猎所有难度
|
} else if len(datas) == 1 && (datas[0] == "hunting") { // 解锁狩猎所有难度
|
||||||
module1, err := this.service.GetModule(comm.ModuleHunting)
|
module1, err := this.service.GetModule(comm.ModuleHunting)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@ -192,7 +192,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
|
|||||||
code = pb.ErrorCode_ReqParameterError
|
code = pb.ErrorCode_ReqParameterError
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
num2, err := strconv.Atoi(datas[1])
|
num2, err := strconv.Atoi(datas[2])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
code = pb.ErrorCode_ReqParameterError
|
code = pb.ErrorCode_ReqParameterError
|
||||||
return
|
return
|
||||||
@ -200,6 +200,50 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC
|
|||||||
code = module1.(comm.IMainline).ModifyMainlineDataByNanduID(session.GetUserId(), int32(num1), int32(num2))
|
code = module1.(comm.IMainline).ModifyMainlineDataByNanduID(session.GetUserId(), int32(num1), int32(num2))
|
||||||
|
|
||||||
this.Debug("使用bingo命令", log.Fields{"uid": session.GetUserId(), "key:": keys[1]})
|
this.Debug("使用bingo命令", log.Fields{"uid": session.GetUserId(), "key:": keys[1]})
|
||||||
|
} else if len(datas) == 2 && (datas[0] == "moon") { // 触发月之秘境
|
||||||
|
module1, err := this.service.GetModule(comm.ModuleMoonfantasy)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
module1.(comm.IMoonFantasy).TriggerMF(session, datas[1])
|
||||||
|
this.Debug("使用bingo命令:uid = %s ", log.Fields{"uid": session.GetUserId(), "0": datas[1]})
|
||||||
|
} else if len(datas) == 2 && (datas[0] == "arena") { // 设置竞技场用户积分
|
||||||
|
module1, err := this.service.GetModule(comm.ModuleArena)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
num, err := strconv.Atoi(datas[1])
|
||||||
|
if err != nil {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
module1.(comm.IArena).SetUserIntegral(session, int32(num))
|
||||||
|
this.Debug("使用bingo命令:uid = %s ", log.Fields{"uid": session.GetUserId(), "0": datas[1]})
|
||||||
|
} else if len(datas) == 2 && (datas[0] == "sociatyexp") { // 设置工会经验
|
||||||
|
module1, err := this.service.GetModule(comm.ModuleSociaty)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
num, err := strconv.Atoi(datas[1])
|
||||||
|
if err != nil {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
module1.(comm.ISociaty).BingoSetExp(session, int32(num))
|
||||||
|
this.Debug("使用bingo命令:uid = %s ", log.Fields{"uid": session.GetUserId(), "0": datas[1]})
|
||||||
|
} else if len(datas) == 2 && (datas[0] == "sociatyactivity") { // 设置工会活跃度
|
||||||
|
module1, err := this.service.GetModule(comm.ModuleSociaty)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
num, err := strconv.Atoi(datas[1])
|
||||||
|
if err != nil {
|
||||||
|
code = pb.ErrorCode_ReqParameterError
|
||||||
|
return
|
||||||
|
}
|
||||||
|
module1.(comm.ISociaty).BingoSetActivity(session, int32(num))
|
||||||
|
this.Debug("使用bingo命令:uid = %s ", log.Fields{"uid": session.GetUserId(), "0": datas[1]})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user