上传pvp代码
This commit is contained in:
parent
a433192d2f
commit
423e11387c
@ -87,11 +87,13 @@ func (this *Pvp) CreatePvp(red, blue *pb.PvpUserInfo, ptype pb.PvpType) (battleI
|
||||
// readytimer: timewheel.Add(time.Second*60, this.readyTimeOut, battleId),
|
||||
}
|
||||
|
||||
if battle.RedSession, ok = this.GetUserSession(red.Uid); ok {
|
||||
if battle.RedSession, ok = this.GetUserSession(red.Uid); !ok {
|
||||
code = pb.ErrorCode_BattleUserOff
|
||||
return
|
||||
}
|
||||
if battle.BlueSession, ok = this.GetUserSession(blue.Uid); ok {
|
||||
if battle.BlueSession, ok = this.GetUserSession(blue.Uid); !ok {
|
||||
code = pb.ErrorCode_BattleUserOff
|
||||
return
|
||||
}
|
||||
this.lock.Lock()
|
||||
this.battles[battle.Id] = battle
|
||||
|
Loading…
Reference in New Issue
Block a user