上传英雄禁用
This commit is contained in:
parent
87c0724b13
commit
ea4cc88714
@ -101,6 +101,7 @@ func (this *Room) disableheros(uid string, index int32) (err error) {
|
||||
for _, v := range this.members {
|
||||
if v.User.Uid != uid {
|
||||
v.Disable = index
|
||||
v.Heros[index] = ""
|
||||
}
|
||||
if v.Disable == -1 {
|
||||
finish = false
|
||||
@ -140,16 +141,18 @@ func (this *Room) selectleader(uid string, index int32) (err error) {
|
||||
Index: index,
|
||||
})
|
||||
if finish {
|
||||
// var (
|
||||
// uinfos []*pb.BaseUserInfo = make([]*pb.BaseUserInfo, 0)
|
||||
// formations []*pb.BattleFormation = make([]*pb.BattleFormation, 0)
|
||||
// )
|
||||
// uinfos = append(uinfos, this.members[0].User, this.members[1].User)
|
||||
// formations = append(formations,
|
||||
// &pb.BattleFormation{Leadpos: this.members[0].Leader, Format: this.members[0].Heros},
|
||||
// &pb.BattleFormation{Leadpos: this.members[1].Leader, Format: this.members[1].Heros},
|
||||
// )
|
||||
// err = this.module.pvp.AddAndStartRoom(this.Id, pb.PlayType_realarena, this.sessions, uinfos, formations)
|
||||
var (
|
||||
uinfos []*pb.BaseUserInfo = make([]*pb.BaseUserInfo, 0)
|
||||
formations []*pb.BattleFormation = make([]*pb.BattleFormation, 0)
|
||||
sessions []comm.IUserSession = make([]comm.IUserSession, 0)
|
||||
)
|
||||
uinfos = append(uinfos, this.members[0].User, this.members[1].User)
|
||||
sessions = append(sessions, this.sessions[0].Clone(), this.sessions[1].Clone())
|
||||
formations = append(formations,
|
||||
&pb.BattleFormation{Leadpos: this.members[0].Leader, Format: this.members[0].Heros},
|
||||
&pb.BattleFormation{Leadpos: this.members[1].Leader, Format: this.members[1].Heros},
|
||||
)
|
||||
err = this.module.pvp.AddAndStartRoom(this.Id, pb.PlayType_realarena, sessions, uinfos, formations)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user