战斗胜利加英雄经验

This commit is contained in:
meixiongfeng 2022-09-20 21:27:18 +08:00
parent 4c4280ebbd
commit ec54e9030c

View File

@ -101,6 +101,15 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
if code = this.module.DispenseRes(session, res, true); code != pb.ErrorCode_Success { if code = this.module.DispenseRes(session, res, true); code != pb.ErrorCode_Success {
this.module.Debugf("DispenseRes err:+%v", res) this.module.Debugf("DispenseRes err:+%v", res)
} }
// 加经验
if req.Report != nil && len(req.Report.Info.Redflist) > 0 {
for _, v := range req.Report.Info.Redflist[0].Team {
if node.Exp > 0 {
this.module.ModuleHero.AddHeroExp(session, v.Oid, node.Exp)
}
}
}
session.SendMsg(string(this.module.GetType()), MainlineChallengeOverResp, &pb.MainlineChallengeOverResp{Data: mainline}) session.SendMsg(string(this.module.GetType()), MainlineChallengeOverResp, &pb.MainlineChallengeOverResp{Data: mainline})
return return
} }