Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
efab828c47
@ -78,14 +78,14 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
code = this.DispenseRes(session, []*cfg.Gameatn{ // 添加资源
|
errdata = this.DispenseRes(session, []*cfg.Gameatn{ // 添加资源
|
||||||
{
|
{
|
||||||
A: datas[0],
|
A: datas[0],
|
||||||
T: datas[1],
|
T: datas[1],
|
||||||
N: int32(num),
|
N: int32(num),
|
||||||
},
|
},
|
||||||
}, true)
|
}, true)
|
||||||
if code == pb.ErrorCode_Success { // 成功直接返回
|
if errdata == nil { // 成功直接返回
|
||||||
session.SendMsg(string(this.GetType()), "cmd", &pb.GMCmdResp{IsSucc: true})
|
session.SendMsg(string(this.GetType()), "cmd", &pb.GMCmdResp{IsSucc: true})
|
||||||
}
|
}
|
||||||
this.Debug("使用bingo命令",
|
this.Debug("使用bingo命令",
|
||||||
@ -107,7 +107,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
code = module1.(comm.IPagoda).ModifyPagodaFloor(session, int32(num))
|
errdata = module1.(comm.IPagoda).ModifyPagodaFloor(session, int32(num))
|
||||||
this.Debug("使用bingo命令:uid = %s ",
|
this.Debug("使用bingo命令:uid = %s ",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
log.Field{Key: "0", Value: datas[0]},
|
log.Field{Key: "0", Value: datas[0]},
|
||||||
@ -146,9 +146,9 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
N: 100,
|
N: 100,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
code = this.DispenseRes(session, res, true)
|
errdata = this.DispenseRes(session, res, true)
|
||||||
if errdata != nil {
|
if errdata != nil {
|
||||||
this.Errorf("资源发放失败,%v", code)
|
this.Errorf("资源发放失败,%v", errdata)
|
||||||
}
|
}
|
||||||
this.Debug("使用bingo命令",
|
this.Debug("使用bingo命令",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
@ -187,7 +187,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
code = module1.(comm.IHero).GetAllMaxHero(session)
|
errdata = module1.(comm.IHero).GetAllMaxHero(session)
|
||||||
this.Debug("使用bingo命令:uid = %s ",
|
this.Debug("使用bingo命令:uid = %s ",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
log.Field{Key: "0", Value: datas[0]},
|
log.Field{Key: "0", Value: datas[0]},
|
||||||
@ -196,7 +196,6 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_ConfigNoFound,
|
Code: pb.ErrorCode_ConfigNoFound,
|
||||||
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
Title: pb.ErrorCode_ConfigNoFound.ToString(),
|
||||||
Message: err.Error(),
|
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
} else if len(datas) == 1 && (datas[0] == "viking") { // 解锁远征所有难度
|
} else if len(datas) == 1 && (datas[0] == "viking") { // 解锁远征所有难度
|
||||||
@ -205,7 +204,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
code = module1.(comm.IViking).CompleteAllLevel(session)
|
errdata = module1.(comm.IViking).CompleteAllLevel(session)
|
||||||
this.Debug("使用bingo命令:uid = %s ", log.Field{Key: "uid", Value: session.GetUserId()})
|
this.Debug("使用bingo命令:uid = %s ", log.Field{Key: "uid", Value: session.GetUserId()})
|
||||||
} else if len(datas) == 1 && (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)
|
||||||
@ -213,7 +212,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
code = module1.(comm.IHunting).CompleteAllLevel(session)
|
errdata = module1.(comm.IHunting).CompleteAllLevel(session)
|
||||||
this.Debug("使用bingo命令:uid = %s ",
|
this.Debug("使用bingo命令:uid = %s ",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
log.Field{Key: "0", Value: datas[0]})
|
log.Field{Key: "0", Value: datas[0]})
|
||||||
@ -231,7 +230,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
code = module1.(comm.IMline).ModifyMlineDataByNanduID(session, int32(num1))
|
errdata = module1.(comm.IMline).ModifyMlineDataByNanduID(session, int32(num1))
|
||||||
|
|
||||||
this.Debug("使用bingo命令",
|
this.Debug("使用bingo命令",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
@ -244,12 +243,11 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
}
|
}
|
||||||
|
|
||||||
module1.(comm.IMoonFantasy).TriggerMF(session, datas[1])
|
module1.(comm.IMoonFantasy).TriggerMF(session, datas[1])
|
||||||
code = pb.ErrorCode_Success
|
|
||||||
this.Debug("使用bingo命令",
|
this.Debug("使用bingo命令",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
log.Field{Key: "0", Value: datas[1]},
|
log.Field{Key: "0", Value: datas[1]},
|
||||||
)
|
)
|
||||||
code = pb.ErrorCode_Success
|
|
||||||
} else if len(datas) == 2 && (datas[0] == "arena") { // 设置竞技场用户积分
|
} else if len(datas) == 2 && (datas[0] == "arena") { // 设置竞技场用户积分
|
||||||
module1, err := this.service.GetModule(comm.ModuleArena)
|
module1, err := this.service.GetModule(comm.ModuleArena)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -264,7 +262,6 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
module1.(comm.IArena).SetUserIntegral(session, int32(num))
|
module1.(comm.IArena).SetUserIntegral(session, int32(num))
|
||||||
code = pb.ErrorCode_Success
|
|
||||||
this.Debug("使用bingo命令",
|
this.Debug("使用bingo命令",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
log.Field{Key: "0", Value: datas[1]},
|
log.Field{Key: "0", Value: datas[1]},
|
||||||
@ -283,7 +280,6 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
module1.(comm.ISociaty).BingoSetExp(session, int32(num))
|
module1.(comm.ISociaty).BingoSetExp(session, int32(num))
|
||||||
code = pb.ErrorCode_Success
|
|
||||||
this.Debug("使用bingo命令",
|
this.Debug("使用bingo命令",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
log.Field{Key: "0", Value: datas[1]},
|
log.Field{Key: "0", Value: datas[1]},
|
||||||
@ -302,7 +298,6 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
module1.(comm.ISociaty).BingoSetActivity(session, int32(num))
|
module1.(comm.ISociaty).BingoSetActivity(session, int32(num))
|
||||||
code = pb.ErrorCode_Success
|
|
||||||
this.Debug("使用bingo命令",
|
this.Debug("使用bingo命令",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
log.Field{Key: "0", Value: datas[1]},
|
log.Field{Key: "0", Value: datas[1]},
|
||||||
@ -334,9 +329,9 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
code = this.DispenseRes(session, res, true)
|
errdata = this.DispenseRes(session, res, true)
|
||||||
if errdata != nil {
|
if errdata != nil {
|
||||||
this.Errorf("资源发放失败,%v", code)
|
this.Errorf("资源发放失败,%v", errdata)
|
||||||
}
|
}
|
||||||
this.Debug("使用bingo命令",
|
this.Debug("使用bingo命令",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
@ -357,7 +352,6 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err = module1.(comm.IUser).BingoSetUserLv(session, int32(num)); err == nil {
|
if err = module1.(comm.IUser).BingoSetUserLv(session, int32(num)); err == nil {
|
||||||
code = pb.ErrorCode_Success
|
|
||||||
}
|
}
|
||||||
this.Debug("使用bingo命令:uid = %s ",
|
this.Debug("使用bingo命令:uid = %s ",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
@ -417,14 +411,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
log.Field{Key: "0", Value: datas[0]},
|
log.Field{Key: "0", Value: datas[0]},
|
||||||
)
|
)
|
||||||
} else if len(datas) == 2 && (datas[0] == "chat") {
|
} else if len(datas) == 2 && (datas[0] == "chat") {
|
||||||
// num, err := strconv.Atoi(datas[1])
|
|
||||||
// if err != nil {
|
|
||||||
// errdata = &pb.ErrorData{
|
|
||||||
Code: pb.ErrorCode_ReqParameterError,
|
|
||||||
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
|
||||||
}
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
if module, err := this.service.GetModule(comm.ModuleChat); err == nil {
|
if module, err := this.service.GetModule(comm.ModuleChat); err == nil {
|
||||||
if errdata = module.(comm.IChat).SendSysChatToWorld(comm.ChatSystem10, nil, 5, 0, "xxx", "25001"); errdata != nil {
|
if errdata = module.(comm.IChat).SendSysChatToWorld(comm.ChatSystem10, nil, 5, 0, "xxx", "25001"); errdata != nil {
|
||||||
return
|
return
|
||||||
@ -460,7 +447,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
N: int32(num2),
|
N: int32(num2),
|
||||||
}
|
}
|
||||||
if errdata = this.DispenseRes(session, []*cfg.Gameatn{res}, true); errdata != nil {
|
if errdata = this.DispenseRes(session, []*cfg.Gameatn{res}, true); errdata != nil {
|
||||||
this.Debugf("DispenseRes err :uid = %s,code = %d", datas[0], code)
|
this.Debugf("DispenseRes err :uid = %s,code = %d", datas[0], errdata)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.Debug("使用bingo命令:uid = %s ",
|
this.Debug("使用bingo命令:uid = %s ",
|
||||||
@ -483,7 +470,6 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err = module1.(comm.IUser).BingoSetUserVipLv(session, int32(num)); err == nil {
|
if err = module1.(comm.IUser).BingoSetUserVipLv(session, int32(num)); err == nil {
|
||||||
code = pb.ErrorCode_Success
|
|
||||||
}
|
}
|
||||||
this.Debug("使用bingo命令:uid = %s ",
|
this.Debug("使用bingo命令:uid = %s ",
|
||||||
log.Field{Key: "uid", Value: session.GetUserId()},
|
log.Field{Key: "uid", Value: session.GetUserId()},
|
||||||
|
@ -9,7 +9,10 @@ import (
|
|||||||
// 图鉴任务奖励领取
|
// 图鉴任务奖励领取
|
||||||
func (this *apiComp) TaskAwardCheck(session comm.IUserSession, req *pb.SmithyTaskAwardReq) (errdata *pb.ErrorData) {
|
func (this *apiComp) TaskAwardCheck(session comm.IUserSession, req *pb.SmithyTaskAwardReq) (errdata *pb.ErrorData) {
|
||||||
if req.TaskId == 0 {
|
if req.TaskId == 0 {
|
||||||
return pb.ErrorCode_ReqParameterError
|
errdata = &pb.ErrorData{
|
||||||
|
Code: pb.ErrorCode_ReqParameterError,
|
||||||
|
Title: pb.ErrorCode_ReqParameterError.ToString(),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user