From bd702168b2867f92fd9f0a8d29f69414a7273d77 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Tue, 22 Nov 2022 11:00:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E8=A7=89=E9=86=92=E6=9D=90?= =?UTF-8?q?=E6=96=99=E5=90=88=E6=88=90=E6=B6=88=E8=80=97=E9=87=91=E5=B8=81?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/chat/module.go | 5 +++-- modules/items/api_useItem.go | 2 +- modules/moonfantasy/modelDream.go | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/chat/module.go b/modules/chat/module.go index 376d72919..c6f7010f9 100644 --- a/modules/chat/module.go +++ b/modules/chat/module.go @@ -11,6 +11,7 @@ import ( "go_dreamfactory/lego/utils/codec/json" "go_dreamfactory/modules" "go_dreamfactory/pb" + "go_dreamfactory/sys/configure" "time" "google.golang.org/protobuf/types/known/anypb" @@ -82,7 +83,7 @@ func (this *Chat) OnInstallComp() { //Event------------------------------------------------------------------------------------------------------------ func (this *Chat) EventUserOffline(session comm.IUserSession) { if err := this.modelChat.removeCrossChannelMember(session); err != nil { - this.Debug("EventUserOffline:", log.Fields{ "uid": session.GetUserId(),"err":err.Error()}) + this.Debug("EventUserOffline:", log.Fields{"uid": session.GetUserId(), "err": err.Error()}) } } @@ -226,7 +227,7 @@ func (this *Chat) SendSysChatToWorld(ctype comm.ChatSystemType, appenddata inter Channel: pb.ChatChannel_System, Ctype: pb.ChatType_Text, Stag: this.service.GetTag(), - Ctime: time.Now().Unix(), + Ctime: configure.Now().Unix(), Content: fmt.Sprintf(st.Text, agrs...), Display: st.Display, } diff --git a/modules/items/api_useItem.go b/modules/items/api_useItem.go index 5ae37100c..ac65ed1bb 100644 --- a/modules/items/api_useItem.go +++ b/modules/items/api_useItem.go @@ -139,7 +139,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq) N: v.N * int32(req.Amount), }) } - if code = this.module.ConsumeRes(session, itemcf.SynthetizeDeplete, true); code != pb.ErrorCode_Success { + if code = this.module.ConsumeRes(session, sale, true); code != pb.ErrorCode_Success { return } diff --git a/modules/moonfantasy/modelDream.go b/modules/moonfantasy/modelDream.go index 23cbf44ed..370ad77ee 100644 --- a/modules/moonfantasy/modelDream.go +++ b/modules/moonfantasy/modelDream.go @@ -127,6 +127,7 @@ func (this *modelDreamComp) trigger(session comm.IUserSession) { Avatar: user.Avatar, Uname: user.Name, Slv: user.Lv, + Ctime: configure.Now().Unix(), Stag: session.GetServiecTag(), Content: mdata.Monster, AppendStr: mdata.Id,