上传竞技场代码

This commit is contained in:
liwei 2023-08-04 16:30:47 +08:00
parent 70cb9f1150
commit 13fd75e2e9

View File

@ -104,9 +104,21 @@ func (this *Arena) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (re
ticket int32 ticket int32
err error err error
) )
result = make(map[comm.ReddotType]*pb.ReddotItem)
if model, err = this.modelArena.getpandataModel(); err != nil { if model, err = this.modelArena.getpandataModel(); err != nil {
this.Errorln(err) this.Errorln(err)
result[comm.Reddot22100] = &pb.ReddotItem{
Rid: int32(comm.Reddot22100),
Activated: false,
}
result[comm.Reddot22102] = &pb.ReddotItem{
Rid: int32(comm.Reddot22102),
Activated: false,
}
result[comm.Reddot22202] = &pb.ReddotItem{
Rid: int32(comm.Reddot22202),
Activated: false,
}
return return
} }
@ -117,11 +129,11 @@ func (this *Arena) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (re
for _, v := range rid { for _, v := range rid {
switch v { switch v {
case comm.Reddot22100: case comm.Reddot22100:
result[comm.Reddot22102] = &pb.ReddotItem{ result[comm.Reddot22100] = &pb.ReddotItem{
Rid: int32(comm.Reddot22102), Rid: int32(comm.Reddot22100),
} }
if ticket == this.ModuleTools.GetGlobalConf().ArenaTicketCos.N { if ticket == this.ModuleTools.GetGlobalConf().ArenaTicketCos.N {
result[comm.Reddot22102].Activated = true result[comm.Reddot22100].Activated = true
} }
break break
case comm.Reddot22102: case comm.Reddot22102:
@ -132,8 +144,8 @@ func (this *Arena) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (re
break break
case comm.Reddot22202: case comm.Reddot22202:
result[comm.Reddot22102] = &pb.ReddotItem{ result[comm.Reddot22202] = &pb.ReddotItem{
Rid: int32(comm.Reddot22102), Rid: int32(comm.Reddot22202),
Activated: true, Activated: true,
Progress: ticket, Progress: ticket,
} }