上传pvp逻辑代码
This commit is contained in:
parent
600d011f15
commit
9823de2ac5
@ -228,7 +228,20 @@ func (this *Pvp) readyTimeOut(task *timewheel.Task, args ...interface{}) {
|
||||
}, battle.RedSession, battle.BlueSession); err != nil {
|
||||
this.Errorln(err)
|
||||
}
|
||||
go this.practice.ChallengeResults(battle.Id, battle.Red.Uid, battle.Blue.Uid, 0)
|
||||
|
||||
switch battle.Ptype {
|
||||
case pb.PvpType_friends:
|
||||
var winside int32 = 0
|
||||
if battle.Redformation != nil {
|
||||
winside = 1
|
||||
}
|
||||
if battle.Blueformation != nil {
|
||||
winside = 2
|
||||
}
|
||||
go this.practice.ChallengeResults(battle.Id, battle.Red.Uid, battle.Blue.Uid, winside)
|
||||
break
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user