Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
82e4ce81c6
@ -28,6 +28,7 @@ func (this *apiComp) Sweep(session comm.IUserSession, req *pb.VikingSweepReq) (e
|
|||||||
infos []*pb.BattleInfo
|
infos []*pb.BattleInfo
|
||||||
runresp *pb.BattleRunResp
|
runresp *pb.BattleRunResp
|
||||||
conf *cfg.GameSweepData
|
conf *cfg.GameSweepData
|
||||||
|
vikingCfg *cfg.GameVikingBossData
|
||||||
user *pb.DBUser
|
user *pb.DBUser
|
||||||
bWin bool // 战斗是否胜利
|
bWin bool // 战斗是否胜利
|
||||||
atno []*pb.UserAtno // atno 类型
|
atno []*pb.UserAtno // atno 类型
|
||||||
@ -58,7 +59,7 @@ func (this *apiComp) Sweep(session comm.IUserSession, req *pb.VikingSweepReq) (e
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
vikingCfg, err := this.module.configure.GetVikingBossConfigData(req.BossId, req.Difficulty)
|
vikingCfg, err = this.module.configure.GetVikingBossConfigData(req.BossId, req.Difficulty)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
Code: pb.ErrorCode_ConfigNoFound,
|
Code: pb.ErrorCode_ConfigNoFound,
|
||||||
@ -188,6 +189,11 @@ func (this *apiComp) Sweep(session comm.IUserSession, req *pb.VikingSweepReq) (e
|
|||||||
}
|
}
|
||||||
reward = append(reward, heroupaward...)
|
reward = append(reward, heroupaward...)
|
||||||
}
|
}
|
||||||
|
//消耗资源
|
||||||
|
if errdata = this.module.ConsumeRes(session, consume, true); errdata != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
//发放资源
|
||||||
if errdata, atno = this.module.DispenseAtno(session, reward, true); errdata != nil {
|
if errdata, atno = this.module.DispenseAtno(session, reward, true); errdata != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user