对战开始初始化满体力
This commit is contained in:
parent
1d4276e6af
commit
090345b4ac
@ -431,6 +431,8 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
if this.rd1 && this.rd2 { // 两个玩家都准备好了 那么就开始游戏
|
if this.rd1 && this.rd2 { // 两个玩家都准备好了 那么就开始游戏
|
||||||
this.NexPower = this.player1.Uid
|
this.NexPower = this.player1.Uid
|
||||||
this.curPower = this.player1.Uid
|
this.curPower = this.player1.Uid
|
||||||
|
this.player1.Ps = MaxPs
|
||||||
|
this.player2.Ps = MaxPs
|
||||||
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "startgame", &pb.EntertainStartGamePush{
|
if err := this.module.SendMsgSyncToSession(string(this.module.GetType()), "startgame", &pb.EntertainStartGamePush{
|
||||||
User1: this.player1,
|
User1: this.player1,
|
||||||
User2: this.player2,
|
User2: this.player2,
|
||||||
@ -441,6 +443,7 @@ func (this *Room) ReceiveMessage(session comm.IUserSession, stype string, msg pr
|
|||||||
}, this.szSession...); err != nil {
|
}, this.szSession...); err != nil {
|
||||||
this.Errorln(err)
|
this.Errorln(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut)
|
this.operatetimer = timewheel.Add(time.Second*MaxTime, this.operateTimeOut)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user