Conflicts:
	bin/json/game_msgdistrib.json
This commit is contained in:
liwei 2022-10-20 11:24:51 +08:00
commit 9819200093
7 changed files with 962 additions and 50 deletions

View File

@ -17,7 +17,7 @@
3 3
], ],
"startid": 10001, "startid": 10001,
"rightend": 10008, "rightend": 10001008,
"special_stroyprize": [ "special_stroyprize": [
{ {
"a": "attr", "a": "attr",
@ -26,9 +26,9 @@
} }
], ],
"endid": [ "endid": [
10009, 10001009,
10010, 10001013,
10011 10001014
], ],
"stroyprize": [ "stroyprize": [
{ {
@ -65,7 +65,7 @@
3 3
], ],
"startid": 10001, "startid": 10001,
"rightend": 10008, "rightend": 10001008,
"special_stroyprize": [ "special_stroyprize": [
{ {
"a": "attr", "a": "attr",
@ -74,9 +74,9 @@
} }
], ],
"endid": [ "endid": [
10009, 10001009,
10010, 10001013,
10011 10001014
], ],
"stroyprize": [ "stroyprize": [
{ {
@ -113,7 +113,7 @@
3 3
], ],
"startid": 10001, "startid": 10001,
"rightend": 10008, "rightend": 10001008,
"special_stroyprize": [ "special_stroyprize": [
{ {
"a": "attr", "a": "attr",
@ -122,9 +122,9 @@
} }
], ],
"endid": [ "endid": [
10009, 10001009,
10010, 10001013,
10011 10001014
], ],
"stroyprize": [ "stroyprize": [
{ {
@ -161,7 +161,7 @@
3 3
], ],
"startid": 10001, "startid": 10001,
"rightend": 10008, "rightend": 10001008,
"special_stroyprize": [ "special_stroyprize": [
{ {
"a": "attr", "a": "attr",
@ -170,9 +170,9 @@
} }
], ],
"endid": [ "endid": [
10009, 10001009,
10010, 10001013,
10011 10001014
], ],
"stroyprize": [ "stroyprize": [
{ {

View File

@ -1,46 +1,46 @@
[ [
{ {
"startid": 10008, "startid": 10001008,
"library_title": { "library_title": {
"key": "library_title_10008", "key": "library_title_10001008",
"text": "library_title_library_title_10008" "text": "library_title_library_title_10001008"
}, },
"library_outcome": { "library_outcome": {
"key": "library_outcome_10008", "key": "library_outcome_10001008",
"text": "library_outcome_library_title_10008" "text": "library_outcome_library_title_10001008"
} }
}, },
{ {
"startid": 10009, "startid": 10001009,
"library_title": { "library_title": {
"key": "library_title_10009", "key": "library_title_10001009",
"text": "library_title_library_title_10009" "text": "library_title_library_title_10001009"
}, },
"library_outcome": { "library_outcome": {
"key": "library_outcome_10009", "key": "library_outcome_10001009",
"text": "library_outcome_library_title_10009" "text": "library_outcome_library_title_10001009"
} }
}, },
{ {
"startid": 10010, "startid": 10001013,
"library_title": { "library_title": {
"key": "library_title_10010", "key": "library_title_10001013",
"text": "library_title_library_title_10010" "text": "library_title_library_title_10001013"
}, },
"library_outcome": { "library_outcome": {
"key": "library_outcome_10010", "key": "library_outcome_10001013",
"text": "library_outcome_library_title_10010" "text": "library_outcome_library_title_10001013"
} }
}, },
{ {
"startid": 10011, "startid": 10001014,
"library_title": { "library_title": {
"key": "library_title_10011", "key": "library_title_10001014",
"text": "library_title_library_title_10011" "text": "library_title_library_title_10001014"
}, },
"library_outcome": { "library_outcome": {
"key": "library_outcome_10011", "key": "library_outcome_10001014",
"text": "library_outcome_library_title_10011" "text": "library_outcome_library_title_10001014"
} }
} }
] ]

View File

@ -33,5 +33,113 @@
"msgid": "moonfantasy", "msgid": "moonfantasy",
"routrules": "~/worker", "routrules": "~/worker",
"describe": "月之秘境" "describe": "月之秘境"
},
{
"msgid": "hero.info",
"open": true,
"routrules": "~/worker",
"describe": "查询英雄详细"
},
{
"msgid": "friend.apply",
"open": true,
"routrules": "~/worker",
"describe": "好友申请"
},
{
"msgid": "friend.agree",
"open": true,
"routrules": "~/worker",
"describe": "同意"
},
{
"msgid": "friend.refuse",
"open": true,
"routrules": "~/worker",
"describe": "拒绝"
},
{
"msgid": "friend.list",
"open": true,
"routrules": "~/worker",
"describe": "好友列表"
},
{
"msgid": "friend.applylist",
"open": true,
"routrules": "~/worker",
"describe": "好友申请列表"
},
{
"msgid": "friend.addblack",
"open": true,
"routrules": "~/worker",
"describe": "加黑名单"
},
{
"msgid": "friend.delblack",
"open": true,
"routrules": "~/worker",
"describe": "删除黑名单"
},
{
"msgid": "friend.blacklist",
"open": true,
"routrules": "~/worker",
"describe": "黑名单列表"
},
{
"msgid": "friend.zan",
"open": true,
"routrules": "~/worker",
"describe": "好友点赞"
},
{
"msgid": "friend.zanreceive",
"open": true,
"routrules": "~/worker",
"describe": "接收点赞"
},
{
"msgid": "friend.zanlist",
"open": true,
"routrules": "~/worker",
"describe": "点赞列表"
},
{
"msgid": "friend.assisthero",
"open": true,
"routrules": "~/worker",
"describe": "英雄助战"
},
{
"msgid": "friend.assistlist",
"open": true,
"routrules": "~/worker",
"describe": "助战列表"
},
{
"msgid": "friend.getreward",
"open": true,
"routrules": "~/worker",
"describe": "获取奖励"
},
{
"msgid": "friend.del",
"open": true,
"routrules": "~/worker",
"describe": "删除好友"
},
{
"msgid": "friend.search",
"open": true,
"routrules": "~/worker",
"describe": "搜索好友"
},
{
"msgid": "friend.randlist",
"open": true,
"routrules": "~/worker",
"describe": "好友推荐"
} }
] ]

View File

@ -12206,5 +12206,798 @@
"perf": "", "perf": "",
"cg": "", "cg": "",
"skip": true "skip": true
},
{
"id": 10001001,
"groupid": 10001,
"before": -1,
"next": 10001002,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "什么?你找我聊天?",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001002,
"groupid": 10001,
"before": 10001001,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "现在没空。我有别的事,你一会来找我吧。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [
10001003,
10001004
],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001003,
"groupid": 10001,
"before": 10001002,
"next": 10001005,
"type": 5,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "别的事是什么事?",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001004,
"groupid": 10001,
"before": 10001002,
"next": 10001010,
"type": 5,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "你个卖面条的能有啥事?",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001005,
"groupid": 10001,
"before": 10001003,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "我正要去翡翠宫看乌龟大师选神龙大侠,你可以去翡翠宫找我。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [
10001006,
10001007
],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001006,
"groupid": 10001,
"before": 10001005,
"next": 10001008,
"type": 5,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "我和你一起去。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001007,
"groupid": 10001,
"before": 10001005,
"next": 10001009,
"type": 5,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "等你回来。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001008,
"groupid": 10001,
"before": 10001006,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "那一起去吧。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001009,
"groupid": 10001,
"before": 10001006,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "一会儿见。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001010,
"groupid": 10001,
"before": 10001004,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "卖面条也是非常高尚的职业!",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [
10001011,
10001012
],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001011,
"groupid": 10001,
"before": 10001010,
"next": 10001013,
"type": 5,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "别卖面条了,你是神龙大侠!",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001012,
"groupid": 10001,
"before": 10001010,
"next": 10001014,
"type": 5,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "啊对对对。",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001013,
"groupid": 10001,
"before": 10001011,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "你怎么剧透呢!",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
},
{
"id": 10001014,
"groupid": 10001,
"before": 10001012,
"next": -1,
"type": 2,
"bg": "jqdh_bg01",
"place": 0,
"speak": "14007",
"listen": "",
"des": "你小子是来搞事的吧...",
"modelstatetarget": "",
"modelstate": 0,
"modelaction": "",
"speakstate": "",
"listenstate": "",
"chose": [],
"turn": 0,
"show": 0,
"move": "",
"action": "",
"sound": "",
"positionR": {
"x": 0.5,
"y": 0.5,
"z": 0
},
"positionL": {
"x": 0,
"y": 0,
"z": 0
},
"revolveR": {
"x": 0,
"y": -180,
"z": 0
},
"revolveL": {
"x": 0,
"y": -180,
"z": 0
},
"sizeR": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"sizeL": {
"x": 0.8,
"y": 0.8,
"z": 0.8
},
"perf": "",
"cg": "",
"skip": true
} }
] ]

View File

@ -38,7 +38,7 @@ type RPCX struct {
func (this *RPCX) Start() (err error) { func (this *RPCX) Start() (err error) {
this.service.Start() this.service.Start()
this.client.Start() this.client.Start()
return return
} }
@ -54,16 +54,20 @@ func (this *RPCX) GetServiceTags() []string {
} }
func (this *RPCX) RegisterFunction(fn interface{}) (err error) { func (this *RPCX) RegisterFunction(fn interface{}) (err error) {
this.service.RegisterFunction(fn) this.service.RegisterFunction(fn)
this.client.RegisterFunction(fn)
return return
} }
func (this *RPCX) RegisterFunctionName(name string, fn interface{}) (err error) { func (this *RPCX) RegisterFunctionName(name string, fn interface{}) (err error) {
this.service.RegisterFunctionName(name, fn) this.service.RegisterFunctionName(name, fn)
this.client.RegisterFunctionName(name, fn)
return return
} }
func (this *RPCX) UnregisterAll() (err error) { func (this *RPCX) UnregisterAll() (err error) {
return this.service.UnregisterAll() err = this.service.UnregisterAll()
err = this.client.UnregisterAll()
return
} }
//同步调用 //同步调用

View File

@ -11,7 +11,6 @@ import (
"go_dreamfactory/utils" "go_dreamfactory/utils"
"go.mongodb.org/mongo-driver/bson" "go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
) )
func NewModule() core.IModule { func NewModule() core.IModule {
@ -356,10 +355,10 @@ func (this *Hero) QueryCrossHeroinfo(oid string) (hero *pb.DBHero, err error) {
"_id": oid, "_id": oid,
}) })
hero = &pb.DBHero{} hero = &pb.DBHero{}
if err = sr.Decode(hero); err != nil { if err = sr.Decode(hero); err == nil {
if err != mongo.ErrNoDocuments { return
return } else {
} this.modelHero.moduleHero.Errorf("find hero error: %v", err)
} }
} }
} else { // 不是跨服就查本服 } else { // 不是跨服就查本服
@ -368,9 +367,8 @@ func (this *Hero) QueryCrossHeroinfo(oid string) (hero *pb.DBHero, err error) {
}); res == nil { }); res == nil {
hero = &pb.DBHero{} hero = &pb.DBHero{}
if err = res.Decode(hero); err != nil { if err = res.Decode(hero); err != nil {
if err != mongo.ErrNoDocuments { this.modelHero.moduleHero.Errorf("find hero error: %v", err)
return return
}
} }
} }
} }

View File

@ -3,6 +3,7 @@ package timer
import ( import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/modules" "go_dreamfactory/modules"
"time"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
"go_dreamfactory/lego/sys/cron" "go_dreamfactory/lego/sys/cron"
@ -12,6 +13,7 @@ type SeasonPagoda struct {
modules.MCompModel modules.MCompModel
service core.IService service core.IService
dbName string dbName string
module *Timer
} }
//组件初始化接口 //组件初始化接口
@ -19,16 +21,23 @@ func (this *SeasonPagoda) Init(service core.IService, module core.IModule, comp
this.TableName = comm.TableSeasonPagoda this.TableName = comm.TableSeasonPagoda
this.MCompModel.Init(service, module, comp, options) this.MCompModel.Init(service, module, comp, options)
this.service = service this.service = service
this.module = module.(*Timer)
return return
} }
func (this *SeasonPagoda) Start() (err error) { func (this *SeasonPagoda) Start() (err error) {
err = this.MCompModel.Start() err = this.MCompModel.Start()
cron.AddFunc("0 0 23 L * ?", this.Timer) //每月最后一天23点执行一次 cron.AddFunc("0 0 23 L * ?", this.TimerSeasonOver) //每月最后一天23点执行一次
cron.AddFunc("0 0 5 /* * ?", this.TimerSeasonStar) //每月第一天5点执行一次
return return
} }
// 处理排行榜排序 // // 赛季塔结束
func (this *SeasonPagoda) Timer() { func (this *SeasonPagoda) TimerSeasonOver() {
this.module.Debugf("TimerSeasonOver:%d", time.Now().Unix())
}
// 赛季塔开始
func (this *SeasonPagoda) TimerSeasonStar() {
this.module.Debugf("TimerSeasonStar:%d", time.Now().Unix())
} }