From c3ff4f2f652b717ef0281dd56128bb29fbdd083b Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Wed, 13 Dec 2023 09:52:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8C=B4=E6=8B=B3=E7=BB=93=E7=AE=97=E7=BB=93?= =?UTF-8?q?=E6=9E=9C=E5=81=9A=E5=BC=82=E6=88=96=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/dispatch/api.go | 4 ++-- modules/monkey/api_updatestar.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/dispatch/api.go b/modules/dispatch/api.go index c4cc19b86..cdfbc3836 100644 --- a/modules/dispatch/api.go +++ b/modules/dispatch/api.go @@ -10,8 +10,8 @@ type apiComp struct { module *Dispatch } -func(this *apiComp) Init(service core.IService, module core.IModule,comp core.IModuleComp, options core.IModuleOptions) (err error){ +func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { _ = this.MCompGate.Init(service, module, comp, options) this.module = module.(*Dispatch) return -} \ No newline at end of file +} diff --git a/modules/monkey/api_updatestar.go b/modules/monkey/api_updatestar.go index 1a8033bdc..b9587fbfc 100644 --- a/modules/monkey/api_updatestar.go +++ b/modules/monkey/api_updatestar.go @@ -52,11 +52,11 @@ func (this *apiComp) UpdateStar(session comm.IUserSession, req *pb.MonkeyUpdateS req.Stage: req.Star, }, } - update["data"] = info.Data } else { if info.Data[conf.Chapter].Award[req.Stage] != req.Star { - info.Data[conf.Chapter].Award[req.Stage] = req.Star + curStar := info.Data[conf.Chapter].Award[req.Stage] // 当前的星 + info.Data[conf.Chapter].Award[req.Stage] = (req.Star ^ curStar) // 做异或操作 update["data"] = info.Data } }