update
This commit is contained in:
parent
d41fec6475
commit
a6194027a6
@ -26,15 +26,15 @@ func (this *apiComp) LatticeFinish(session comm.IUserSession, req *pb.UiGameLatt
|
|||||||
atno []*pb.UserAtno
|
atno []*pb.UserAtno
|
||||||
)
|
)
|
||||||
list, _ := this.module.modelLattice.getLatticeList(session.GetUserId(), req.Hdid)
|
list, _ := this.module.modelLattice.getLatticeList(session.GetUserId(), req.Hdid)
|
||||||
if conf, err := this.module.configure.GetLatticeConsumConf(); err != nil {
|
conf, err := this.module.configure.GetLatticeConsumConf()
|
||||||
|
if err != nil {
|
||||||
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(),
|
Message: err.Error(),
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
} else {
|
}
|
||||||
list, _ := this.module.modelLattice.getLatticeList(session.GetUserId(), req.Hdid)
|
|
||||||
if list.BReward {
|
if list.BReward {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_ActivityRepatReward,
|
Code: pb.ErrorCode_ActivityRepatReward,
|
||||||
@ -51,7 +51,6 @@ func (this *apiComp) LatticeFinish(session comm.IUserSession, req *pb.UiGameLatt
|
|||||||
update := make(map[string]interface{}, 0)
|
update := make(map[string]interface{}, 0)
|
||||||
update["bReward"] = list.BReward
|
update["bReward"] = list.BReward
|
||||||
this.module.modelLattice.modifyLatticeListByObjId(session.GetUserId(), update) // 修改进度
|
this.module.modelLattice.modifyLatticeListByObjId(session.GetUserId(), update) // 修改进度
|
||||||
}
|
|
||||||
|
|
||||||
session.SendMsg(string(this.module.GetType()), "latticefinish", &pb.UiGameLatticeFinishResp{
|
session.SendMsg(string(this.module.GetType()), "latticefinish", &pb.UiGameLatticeFinishResp{
|
||||||
Data: list,
|
Data: list,
|
||||||
|
@ -21,15 +21,16 @@ func (this *apiComp) PuzzleReward(session comm.IUserSession, req *pb.UiGamePuzzl
|
|||||||
atno []*pb.UserAtno
|
atno []*pb.UserAtno
|
||||||
)
|
)
|
||||||
list, _ := this.module.modelPuzzle.getPuzzleList(session.GetUserId(), req.Hdid)
|
list, _ := this.module.modelPuzzle.getPuzzleList(session.GetUserId(), req.Hdid)
|
||||||
if conf, err := this.module.configure.GetPuzzleConf(req.PuzzleId); err != nil {
|
conf, err := this.module.configure.GetPuzzleConf(req.PuzzleId)
|
||||||
|
if err != nil {
|
||||||
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(),
|
Message: err.Error(),
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
} else {
|
}
|
||||||
list, _ := this.module.modelPuzzle.getPuzzleList(session.GetUserId(), req.Hdid)
|
|
||||||
if _, ok := list.Gotarr[req.PuzzleId]; ok {
|
if _, ok := list.Gotarr[req.PuzzleId]; ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -42,7 +43,6 @@ func (this *apiComp) PuzzleReward(session comm.IUserSession, req *pb.UiGamePuzzl
|
|||||||
update := make(map[string]interface{}, 0)
|
update := make(map[string]interface{}, 0)
|
||||||
update["gotarr"] = list.Gotarr
|
update["gotarr"] = list.Gotarr
|
||||||
this.module.modelPuzzle.modifyPuzzleListByObjId(session.GetUserId(), update) // 修改进度
|
this.module.modelPuzzle.modifyPuzzleListByObjId(session.GetUserId(), update) // 修改进度
|
||||||
}
|
|
||||||
|
|
||||||
session.SendMsg(string(this.module.GetType()), "puzzlereward", &pb.UiGamePuzzleRewardResp{
|
session.SendMsg(string(this.module.GetType()), "puzzlereward", &pb.UiGamePuzzleRewardResp{
|
||||||
Data: list,
|
Data: list,
|
||||||
|
Loading…
Reference in New Issue
Block a user