上传梦境配置

This commit is contained in:
liwei1dao 2022-10-13 14:06:25 +08:00
parent 729dd3823c
commit aa6d1d2134
5 changed files with 37 additions and 13 deletions

View File

@ -1,12 +1,27 @@
[
{
"id": 1,
"dreamland_pro": 500,
"dreamland_pro": 1000,
"open": true
},
{
"id": 2,
"dreamland_pro": 100,
"open": false
"dreamland_pro": 1000,
"open": true
},
{
"id": 3,
"dreamland_pro": 1000,
"open": true
},
{
"id": 4,
"dreamland_pro": 1000,
"open": true
},
{
"id": 5,
"dreamland_pro": 1000,
"open": true
}
]

View File

@ -1,36 +1,43 @@
[
{
"msgid": "notify",
"open": true,
"routrules": "~/worker",
"describe": "公告系统"
},
{
"msgid": "forum",
"open": true,
"routrules": "~/worker",
"describe": "论坛系统"
},
{
"msgid": "chat.chanagechannel",
"open": true,
"routrules": "~/worker",
"describe": "聊天系统"
},
{
"msgid": "chat.crosschannel",
"open": true,
"routrules": "~/worker",
"describe": "聊天系统"
},
{
"msgid": "chat.getcrosslist",
"open": true,
"routrules": "~/worker",
"describe": "聊天系统"
},
{
"msgid": "chat.sendcross",
"open": true,
"routrules": "~/worker",
"describe": "聊天系统"
},
{
"msgid": "moonfantasy",
"open": false,
"routrules": "~/worker",
"describe": "月之秘境"
}

View File

@ -36,13 +36,15 @@ func (this *configureComp) GetMsgDistribute(msgmid, msguid string) (rule string,
ok = false
return
} else {
if item, ok = v.(*cfg.GameMsgdistrib).GetDataMap()[msgmid]; ok {
if item, ok = v.(*cfg.GameMsgdistrib).GetDataMap()[msgmid]; ok && item.Open {
rule = item.Routrules
} else {
msgid := strings.ToLower(fmt.Sprintf("%s.%s", msgmid, msguid))
if item, ok = v.(*cfg.GameMsgdistrib).GetDataMap()[msgid]; ok {
if item, ok = v.(*cfg.GameMsgdistrib).GetDataMap()[msgid]; ok && item.Open {
rule = item.Routrules
return
}
ok = false
}
}
return

View File

@ -38,5 +38,3 @@ func (table *GameMsgdistrib) GetDataList() []*GameMsgdistribData {
func (table *GameMsgdistrib) Get(key string) *GameMsgdistribData {
return table._dataMap[key]
}

View File

@ -12,6 +12,7 @@ import "errors"
type GameMsgdistribData struct {
Msgid string
Open bool
Routrules string
Describe string
}
@ -24,6 +25,7 @@ func (*GameMsgdistribData) GetTypeId() int32 {
func (_v *GameMsgdistribData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; if _v.Msgid, _ok_ = _buf["msgid"].(string); !_ok_ { err = errors.New("msgid error"); return } }
{ var _ok_ bool; if _v.Open, _ok_ = _buf["open"].(bool); !_ok_ { err = errors.New("open error"); return } }
{ var _ok_ bool; if _v.Routrules, _ok_ = _buf["routrules"].(string); !_ok_ { err = errors.New("routrules error"); return } }
{ var _ok_ bool; if _v.Describe, _ok_ = _buf["describe"].(string); !_ok_ { err = errors.New("describe error"); return } }
return