战斗校验
This commit is contained in:
parent
5fc2a0bb3f
commit
e9975bb591
@ -64,8 +64,10 @@ func (this *apiComp) ChallengeFinish(session comm.IUserSession, req *pb.GuildGve
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||||
|
if v.Oid != "" {
|
||||||
member.Useheros = append(member.Useheros, v.Oid)
|
member.Useheros = append(member.Useheros, v.Oid)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if member.Boosticket <= 0 {
|
// if member.Boosticket <= 0 {
|
||||||
// errdata = &pb.ErrorData{
|
// errdata = &pb.ErrorData{
|
||||||
@ -122,10 +124,10 @@ func (this *apiComp) ChallengeFinish(session comm.IUserSession, req *pb.GuildGve
|
|||||||
member.Record[req.Boosid] = record
|
member.Record[req.Boosid] = record
|
||||||
go this.module.modelbattlerank.updateRank(req.Boosid, req.Report.Harm, record.User.Uid)
|
go this.module.modelbattlerank.updateRank(req.Boosid, req.Report.Harm, record.User.Uid)
|
||||||
for i, v := range req.Report.Info.Redflist[0].Team {
|
for i, v := range req.Report.Info.Redflist[0].Team {
|
||||||
if int32(i) == req.Report.Info.Redflist[0].Leadpos && v != nil {
|
if int32(i) == req.Report.Info.Redflist[0].Leadpos && v.Oid != "" {
|
||||||
record.CaptainHeroId = v.HeroID
|
record.CaptainHeroId = v.HeroID
|
||||||
}
|
}
|
||||||
if v != nil {
|
if v.Oid != "" {
|
||||||
record.Formation = append(record.Formation, &pb.DBSimpleHero{
|
record.Formation = append(record.Formation, &pb.DBSimpleHero{
|
||||||
HeroId: v.HeroID,
|
HeroId: v.HeroID,
|
||||||
Star: v.Star,
|
Star: v.Star,
|
||||||
|
@ -161,7 +161,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.HuntingCha
|
|||||||
var heroObjs []string
|
var heroObjs []string
|
||||||
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
||||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||||
if !v.Ishelp { // 助战英雄不加经验
|
if v.Oid != "" && !v.Ishelp { // 助战英雄不加经验
|
||||||
heroObjs = append(heroObjs, v.Oid)
|
heroObjs = append(heroObjs, v.Oid)
|
||||||
changExp[v.Oid] = cfgHunting.Heroexp
|
changExp[v.Oid] = cfgHunting.Heroexp
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.MainlineCh
|
|||||||
var heroObjs []string
|
var heroObjs []string
|
||||||
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
||||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||||
if !v.Ishelp { // 助战英雄不加经验
|
if v.Oid != "" && !v.Ishelp { // 助战英雄不加经验
|
||||||
heroObjs = append(heroObjs, v.Oid)
|
heroObjs = append(heroObjs, v.Oid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
|
|||||||
var heroObjs []string
|
var heroObjs []string
|
||||||
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
||||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||||
if !v.Ishelp { // 助战英雄不加经验
|
if v.Oid != "" && !v.Ishelp { // 助战英雄不加经验
|
||||||
heroObjs = append(heroObjs, v.Oid)
|
heroObjs = append(heroObjs, v.Oid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,7 +139,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.PagodaChal
|
|||||||
leadpos := req.Report.Info.Redflist[0].Leadpos
|
leadpos := req.Report.Info.Redflist[0].Leadpos
|
||||||
szLine := make([]*pb.LineUp, 0)
|
szLine := make([]*pb.LineUp, 0)
|
||||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||||
if v != nil {
|
if v.Oid != "" {
|
||||||
szLine = append(szLine, &pb.LineUp{
|
szLine = append(szLine, &pb.LineUp{
|
||||||
Cid: v.HeroID,
|
Cid: v.HeroID,
|
||||||
Star: v.Star,
|
Star: v.Star,
|
||||||
|
@ -97,7 +97,7 @@ func (this *apiComp) ChallengeRaceOver(session comm.IUserSession, req *pb.Pagoda
|
|||||||
var heroObjs []string
|
var heroObjs []string
|
||||||
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
||||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||||
if !v.Ishelp { // 助战英雄不加经验
|
if v.Oid != "" && !v.Ishelp { // 助战英雄不加经验
|
||||||
heroObjs = append(heroObjs, v.Oid)
|
heroObjs = append(heroObjs, v.Oid)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -479,6 +479,7 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
|||||||
if eventConf.EventType == EventType28 { // 必须是战斗类型才可以触发
|
if eventConf.EventType == EventType28 { // 必须是战斗类型才可以触发
|
||||||
var job int32
|
var job int32
|
||||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||||
|
if v.HeroID != "" {
|
||||||
if h, err := this.module.ModuleTools.GetHeroConfig(v.HeroID); err == nil {
|
if h, err := this.module.ModuleTools.GetHeroConfig(v.HeroID); err == nil {
|
||||||
if job == 0 {
|
if job == 0 {
|
||||||
job = h.Job
|
job = h.Job
|
||||||
@ -491,6 +492,7 @@ func (this *apiComp) Event(session comm.IUserSession, req *pb.StonehengeEventReq
|
|||||||
maxHp := v.Property[battle.AttributesTransBase("hp")]
|
maxHp := v.Property[battle.AttributesTransBase("hp")]
|
||||||
totalhp += v.Currhp * 1000 / maxHp
|
totalhp += v.Currhp * 1000 / maxHp
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if job != 0 { // 上阵英雄都为指定职业
|
if job != 0 { // 上阵英雄都为指定职业
|
||||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype216, job, stone.StageID)) //上阵英雄都为指定职业,击败石阵秘境中指定关卡的首领
|
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype216, job, stone.StageID)) //上阵英雄都为指定职业,击败石阵秘境中指定关卡的首领
|
||||||
}
|
}
|
||||||
|
@ -198,6 +198,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
|||||||
var heroObjs []string
|
var heroObjs []string
|
||||||
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
||||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||||
|
if v.HeroID != "" {
|
||||||
if !v.Ishelp { // 助战英雄不加经验
|
if !v.Ishelp { // 助战英雄不加经验
|
||||||
heroObjs = append(heroObjs, v.Oid)
|
heroObjs = append(heroObjs, v.Oid)
|
||||||
} else {
|
} else {
|
||||||
@ -205,6 +206,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
this.module.ModuleHero.AddHerosExp(session, heroObjs, vikingCfg.Heroexp)
|
this.module.ModuleHero.AddHerosExp(session, heroObjs, vikingCfg.Heroexp)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -227,7 +229,7 @@ func (this *apiComp) ChallengeOver(session comm.IUserSession, req *pb.VikingChal
|
|||||||
|
|
||||||
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
if req.Report != nil && req.Report.Info != nil && len(req.Report.Info.Redflist) > 0 {
|
||||||
for _, v := range req.Report.Info.Redflist[0].Team {
|
for _, v := range req.Report.Info.Redflist[0].Team {
|
||||||
if v.Ishelp { // 判断是否有助战
|
if v.Oid != "" && v.Ishelp { // 判断是否有助战
|
||||||
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype79, req.Difficulty, req.BossId))
|
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype79, req.Difficulty, req.BossId))
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user