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
|
||||
runresp *pb.BattleRunResp
|
||||
conf *cfg.GameSweepData
|
||||
vikingCfg *cfg.GameVikingBossData
|
||||
user *pb.DBUser
|
||||
bWin bool // 战斗是否胜利
|
||||
atno []*pb.UserAtno // atno 类型
|
||||
@ -58,7 +59,7 @@ func (this *apiComp) Sweep(session comm.IUserSession, req *pb.VikingSweepReq) (e
|
||||
return
|
||||
}
|
||||
|
||||
vikingCfg, err := this.module.configure.GetVikingBossConfigData(req.BossId, req.Difficulty)
|
||||
vikingCfg, err = this.module.configure.GetVikingBossConfigData(req.BossId, req.Difficulty)
|
||||
if err != nil {
|
||||
errdata = &pb.ErrorData{
|
||||
Code: pb.ErrorCode_ConfigNoFound,
|
||||
@ -188,6 +189,11 @@ func (this *apiComp) Sweep(session comm.IUserSession, req *pb.VikingSweepReq) (e
|
||||
}
|
||||
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 {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user