上传代码

This commit is contained in:
liwei1dao 2023-05-25 18:49:16 +08:00
parent 563ae94a22
commit 824b866183
4 changed files with 15 additions and 8 deletions

View File

@ -244,7 +244,7 @@
}, },
"recipient": { "recipient": {
"key": "mail_mail_recipient_12", "key": "mail_mail_recipient_12",
"text": "亲爱的的玩家你在跑商中荣获第{0}这是您的排名奖励请查收" "text": "亲爱的{0}"
}, },
"content": { "content": {
"key": "mail_mail_content_12", "key": "mail_mail_content_12",

View File

@ -6617,10 +6617,10 @@
"data": 2, "data": 2,
"type_sp": 1, "type_sp": 1,
"tasktxt": { "tasktxt": {
"key": "加入公会", "key": "创建工会",
"text": "加入公会" "text": "创建工会"
}, },
"type": 109, "type": 188,
"valid": 0, "valid": 0,
"NPC": 10361, "NPC": 10361,
"data1": 1, "data1": 1,
@ -6668,14 +6668,14 @@
"data": 2, "data": 2,
"type_sp": 1, "type_sp": 1,
"tasktxt": { "tasktxt": {
"key": "收集5个冷水药剂", "key": "收集5个垃圾菜",
"text": "收集5个冷水药剂" "text": "收集5个垃圾菜"
}, },
"type": 187, "type": 187,
"valid": 0, "valid": 0,
"NPC": 10391, "NPC": 10391,
"data1": 5, "data1": 5,
"data2": 0, "data2": 132000,
"data3": 0, "data3": 0,
"data4": 0, "data4": 0,
"data5": 0 "data5": 0
@ -12778,7 +12778,7 @@
"valid": 0, "valid": 0,
"NPC": 0, "NPC": 0,
"data1": 5, "data1": 5,
"data2": 0, "data2": 132000,
"data3": 0, "data3": 0,
"data4": 0, "data4": 0,
"data5": 0 "data5": 0

View File

@ -5,6 +5,7 @@ import (
"go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/log"
"regexp" "regexp"
"strings" "strings"
"sync"
"github.com/smallnest/rpcx/share" "github.com/smallnest/rpcx/share"
"github.com/valyala/fastrand" "github.com/valyala/fastrand"
@ -39,6 +40,7 @@ type Selector struct {
updateServerEvent func(map[string]*ServiceNode) updateServerEvent func(map[string]*ServiceNode)
servers map[string]*ServiceNode servers map[string]*ServiceNode
serversType map[string][]*ServiceNode serversType map[string][]*ServiceNode
lock sync.Mutex
i map[string]int i map[string]int
} }
@ -54,7 +56,9 @@ func (this *Selector) Select(ctx context.Context, servicePath, serviceMethod str
i = 0 i = 0
} }
i = i % len(nodes) i = i % len(nodes)
this.lock.Lock()
this.i[service[0]] = i + 1 this.i[service[0]] = i + 1
this.lock.Unlock()
return nodes[i].ServiceAddr return nodes[i].ServiceAddr
} }
} else if leng == 2 { } else if leng == 2 {

View File

@ -56,6 +56,9 @@ func (this *Worldtask) Start() (err error) {
// 任务条件达成通知 // 任务条件达成通知
func (this *Worldtask) TaskCondFinishNotify(session comm.IUserSession, condId int32) 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() uid := session.GetUserId()
// 玩家世界任务 // 玩家世界任务
userTask, err := this.modelWorldtask.getWorldtask(uid) userTask, err := this.modelWorldtask.getWorldtask(uid)