From 824b8661837f83c2fab3c1a858151a9bca2dc59a Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 25 May 2023 18:49:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/json/game_mail.json | 2 +- bin/json/game_rdtaskcondi.json | 14 +++++++------- lego/sys/rpcx/selector.go | 4 ++++ modules/worldtask/module.go | 3 +++ 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/bin/json/game_mail.json b/bin/json/game_mail.json index 84ae95167..d242bbf23 100644 --- a/bin/json/game_mail.json +++ b/bin/json/game_mail.json @@ -244,7 +244,7 @@ }, "recipient": { "key": "mail_mail_recipient_12", - "text": "亲爱的的玩家你在跑商中荣获第{0}名:这是您的排名奖励请查收" + "text": "亲爱的{0}:" }, "content": { "key": "mail_mail_content_12", diff --git a/bin/json/game_rdtaskcondi.json b/bin/json/game_rdtaskcondi.json index 0eab587d3..237cf8e91 100644 --- a/bin/json/game_rdtaskcondi.json +++ b/bin/json/game_rdtaskcondi.json @@ -6617,10 +6617,10 @@ "data": 2, "type_sp": 1, "tasktxt": { - "key": "加入公会", - "text": "加入公会" + "key": "创建工会", + "text": "创建工会" }, - "type": 109, + "type": 188, "valid": 0, "NPC": 10361, "data1": 1, @@ -6668,14 +6668,14 @@ "data": 2, "type_sp": 1, "tasktxt": { - "key": "收集5个冷水药剂", - "text": "收集5个冷水药剂" + "key": "收集5个垃圾菜", + "text": "收集5个垃圾菜" }, "type": 187, "valid": 0, "NPC": 10391, "data1": 5, - "data2": 0, + "data2": 132000, "data3": 0, "data4": 0, "data5": 0 @@ -12778,7 +12778,7 @@ "valid": 0, "NPC": 0, "data1": 5, - "data2": 0, + "data2": 132000, "data3": 0, "data4": 0, "data5": 0 diff --git a/lego/sys/rpcx/selector.go b/lego/sys/rpcx/selector.go index b1acd4800..363ae7de6 100644 --- a/lego/sys/rpcx/selector.go +++ b/lego/sys/rpcx/selector.go @@ -5,6 +5,7 @@ import ( "go_dreamfactory/lego/sys/log" "regexp" "strings" + "sync" "github.com/smallnest/rpcx/share" "github.com/valyala/fastrand" @@ -39,6 +40,7 @@ type Selector struct { updateServerEvent func(map[string]*ServiceNode) servers map[string]*ServiceNode serversType map[string][]*ServiceNode + lock sync.Mutex i map[string]int } @@ -54,7 +56,9 @@ func (this *Selector) Select(ctx context.Context, servicePath, serviceMethod str i = 0 } i = i % len(nodes) + this.lock.Lock() this.i[service[0]] = i + 1 + this.lock.Unlock() return nodes[i].ServiceAddr } } else if leng == 2 { diff --git a/modules/worldtask/module.go b/modules/worldtask/module.go index 038504d2c..3292ca49d 100644 --- a/modules/worldtask/module.go +++ b/modules/worldtask/module.go @@ -56,6 +56,9 @@ func (this *Worldtask) Start() (err error) { // 任务条件达成通知 func (this *Worldtask) TaskCondFinishNotify(session comm.IUserSession, condId int32) error { + + this.Debug("世界任务完成条件通知", log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "condId", Value: condId}) + uid := session.GetUserId() // 玩家世界任务 userTask, err := this.modelWorldtask.getWorldtask(uid)