上传梦境配置
This commit is contained in:
parent
729dd3823c
commit
aa6d1d2134
@ -1,12 +1,27 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"dreamland_pro": 500,
|
"dreamland_pro": 1000,
|
||||||
"open": true
|
"open": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"dreamland_pro": 100,
|
"dreamland_pro": 1000,
|
||||||
"open": false
|
"open": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"dreamland_pro": 1000,
|
||||||
|
"open": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"dreamland_pro": 1000,
|
||||||
|
"open": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"dreamland_pro": 1000,
|
||||||
|
"open": true
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -1,36 +1,43 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"msgid": "notify",
|
"msgid": "notify",
|
||||||
|
"open": true,
|
||||||
"routrules": "~/worker",
|
"routrules": "~/worker",
|
||||||
"describe": "公告系统"
|
"describe": "公告系统"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"msgid": "forum",
|
"msgid": "forum",
|
||||||
|
"open": true,
|
||||||
"routrules": "~/worker",
|
"routrules": "~/worker",
|
||||||
"describe": "论坛系统"
|
"describe": "论坛系统"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"msgid": "chat.chanagechannel",
|
"msgid": "chat.chanagechannel",
|
||||||
|
"open": true,
|
||||||
"routrules": "~/worker",
|
"routrules": "~/worker",
|
||||||
"describe": "聊天系统"
|
"describe": "聊天系统"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"msgid": "chat.crosschannel",
|
"msgid": "chat.crosschannel",
|
||||||
|
"open": true,
|
||||||
"routrules": "~/worker",
|
"routrules": "~/worker",
|
||||||
"describe": "聊天系统"
|
"describe": "聊天系统"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"msgid": "chat.getcrosslist",
|
"msgid": "chat.getcrosslist",
|
||||||
|
"open": true,
|
||||||
"routrules": "~/worker",
|
"routrules": "~/worker",
|
||||||
"describe": "聊天系统"
|
"describe": "聊天系统"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"msgid": "chat.sendcross",
|
"msgid": "chat.sendcross",
|
||||||
|
"open": true,
|
||||||
"routrules": "~/worker",
|
"routrules": "~/worker",
|
||||||
"describe": "聊天系统"
|
"describe": "聊天系统"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"msgid": "moonfantasy",
|
"msgid": "moonfantasy",
|
||||||
|
"open": false,
|
||||||
"routrules": "~/worker",
|
"routrules": "~/worker",
|
||||||
"describe": "月之秘境"
|
"describe": "月之秘境"
|
||||||
}
|
}
|
||||||
|
@ -36,13 +36,15 @@ func (this *configureComp) GetMsgDistribute(msgmid, msguid string) (rule string,
|
|||||||
ok = false
|
ok = false
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
if item, ok = v.(*cfg.GameMsgdistrib).GetDataMap()[msgmid]; ok {
|
if item, ok = v.(*cfg.GameMsgdistrib).GetDataMap()[msgmid]; ok && item.Open {
|
||||||
rule = item.Routrules
|
rule = item.Routrules
|
||||||
} else {
|
} else {
|
||||||
msgid := strings.ToLower(fmt.Sprintf("%s.%s", msgmid, msguid))
|
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
|
rule = item.Routrules
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
ok = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
package cfg
|
package cfg
|
||||||
|
|
||||||
type GameMsgdistrib struct {
|
type GameMsgdistrib struct {
|
||||||
_dataMap map[string]*GameMsgdistribData
|
_dataMap map[string]*GameMsgdistribData
|
||||||
_dataList []*GameMsgdistribData
|
_dataList []*GameMsgdistribData
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewGameMsgdistrib(_buf []map[string]interface{}) (*GameMsgdistrib, error) {
|
func NewGameMsgdistrib(_buf []map[string]interface{}) (*GameMsgdistrib, error) {
|
||||||
@ -24,19 +24,17 @@ func NewGameMsgdistrib(_buf []map[string]interface{}) (*GameMsgdistrib, error) {
|
|||||||
dataMap[_v.Msgid] = _v
|
dataMap[_v.Msgid] = _v
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return &GameMsgdistrib{_dataList:_dataList, _dataMap:dataMap}, nil
|
return &GameMsgdistrib{_dataList: _dataList, _dataMap: dataMap}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table *GameMsgdistrib) GetDataMap() map[string]*GameMsgdistribData {
|
func (table *GameMsgdistrib) GetDataMap() map[string]*GameMsgdistribData {
|
||||||
return table._dataMap
|
return table._dataMap
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table *GameMsgdistrib) GetDataList() []*GameMsgdistribData {
|
func (table *GameMsgdistrib) GetDataList() []*GameMsgdistribData {
|
||||||
return table._dataList
|
return table._dataList
|
||||||
}
|
}
|
||||||
|
|
||||||
func (table *GameMsgdistrib) Get(key string) *GameMsgdistribData {
|
func (table *GameMsgdistrib) Get(key string) *GameMsgdistribData {
|
||||||
return table._dataMap[key]
|
return table._dataMap[key]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ import "errors"
|
|||||||
|
|
||||||
type GameMsgdistribData struct {
|
type GameMsgdistribData struct {
|
||||||
Msgid string
|
Msgid string
|
||||||
|
Open bool
|
||||||
Routrules string
|
Routrules string
|
||||||
Describe string
|
Describe string
|
||||||
}
|
}
|
||||||
@ -24,6 +25,7 @@ func (*GameMsgdistribData) GetTypeId() int32 {
|
|||||||
|
|
||||||
func (_v *GameMsgdistribData)Deserialize(_buf map[string]interface{}) (err error) {
|
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.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.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 } }
|
{ var _ok_ bool; if _v.Describe, _ok_ = _buf["describe"].(string); !_ok_ { err = errors.New("describe error"); return } }
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user