From 13fd75e2e930f9058127a9dd4b8bf42d9a50a3b9 Mon Sep 17 00:00:00 2001 From: liwei <2211068034@qq.com> Date: Fri, 4 Aug 2023 16:30:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=AB=9E=E6=8A=80=E5=9C=BA?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/arena/module.go | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/arena/module.go b/modules/arena/module.go index 5eab9fc07..4de844bb2 100644 --- a/modules/arena/module.go +++ b/modules/arena/module.go @@ -104,9 +104,21 @@ func (this *Arena) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (re ticket int32 err error ) - + result = make(map[comm.ReddotType]*pb.ReddotItem) if model, err = this.modelArena.getpandataModel(); err != nil { 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 } @@ -117,11 +129,11 @@ func (this *Arena) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (re for _, v := range rid { switch v { case comm.Reddot22100: - result[comm.Reddot22102] = &pb.ReddotItem{ - Rid: int32(comm.Reddot22102), + result[comm.Reddot22100] = &pb.ReddotItem{ + Rid: int32(comm.Reddot22100), } if ticket == this.ModuleTools.GetGlobalConf().ArenaTicketCos.N { - result[comm.Reddot22102].Activated = true + result[comm.Reddot22100].Activated = true } break case comm.Reddot22102: @@ -132,8 +144,8 @@ func (this *Arena) Reddot(session comm.IUserSession, rid ...comm.ReddotType) (re break case comm.Reddot22202: - result[comm.Reddot22102] = &pb.ReddotItem{ - Rid: int32(comm.Reddot22102), + result[comm.Reddot22202] = &pb.ReddotItem{ + Rid: int32(comm.Reddot22202), Activated: true, Progress: ticket, }