配置同步

This commit is contained in:
meixiongfeng 2023-06-02 22:08:29 +08:00
parent 43769fc6fe
commit eaf2c07678
7 changed files with 279 additions and 168 deletions

View File

@ -1,18 +1,18 @@
[ [
{ {
"race": 1, "race": 1,
"id": "14010111" "id": "15000101"
}, },
{ {
"race": 2, "race": 2,
"id": "14010212" "id": "15000102"
}, },
{ {
"race": 3, "race": 3,
"id": "14010313" "id": "15000103"
}, },
{ {
"race": 4, "race": 4,
"id": "14010414" "id": "15000104"
} }
] ]

View File

@ -4270,7 +4270,7 @@
"box_id": 0, "box_id": 0,
"synthetize_num": 0, "synthetize_num": 0,
"access": [ "access": [
10005 123
], ],
"use_skip": 155, "use_skip": 155,
"upper_limit": 999, "upper_limit": 999,
@ -7751,8 +7751,8 @@
"reddottype": 0, "reddottype": 0,
"effects": "", "effects": "",
"modelName": "", "modelName": "",
"box_id": 0, "box_id": 15000201,
"synthetize_num": 0, "synthetize_num": 3,
"access": [ "access": [
168 168
], ],
@ -7788,8 +7788,8 @@
"reddottype": 0, "reddottype": 0,
"effects": "", "effects": "",
"modelName": "", "modelName": "",
"box_id": 0, "box_id": 15000202,
"synthetize_num": 0, "synthetize_num": 3,
"access": [ "access": [
168 168
], ],
@ -7825,8 +7825,8 @@
"reddottype": 0, "reddottype": 0,
"effects": "", "effects": "",
"modelName": "", "modelName": "",
"box_id": 0, "box_id": 15000203,
"synthetize_num": 0, "synthetize_num": 3,
"access": [ "access": [
168 168
], ],
@ -7862,8 +7862,8 @@
"reddottype": 0, "reddottype": 0,
"effects": "", "effects": "",
"modelName": "", "modelName": "",
"box_id": 0, "box_id": 15000204,
"synthetize_num": 0, "synthetize_num": 3,
"access": [ "access": [
168 168
], ],
@ -7899,8 +7899,8 @@
"reddottype": 0, "reddottype": 0,
"effects": "", "effects": "",
"modelName": "", "modelName": "",
"box_id": 0, "box_id": 15000301,
"synthetize_num": 0, "synthetize_num": 3,
"access": [ "access": [
168 168
], ],
@ -7919,7 +7919,13 @@
} }
], ],
"synthetize_deplete": [], "synthetize_deplete": [],
"decompose_deplete": [] "decompose_deplete": [
{
"a": "item",
"t": "15000201",
"n": 4
}
]
}, },
{ {
"id": "15000202", "id": "15000202",
@ -7936,8 +7942,8 @@
"reddottype": 0, "reddottype": 0,
"effects": "", "effects": "",
"modelName": "", "modelName": "",
"box_id": 0, "box_id": 15000302,
"synthetize_num": 0, "synthetize_num": 3,
"access": [ "access": [
168 168
], ],
@ -7956,7 +7962,13 @@
} }
], ],
"synthetize_deplete": [], "synthetize_deplete": [],
"decompose_deplete": [] "decompose_deplete": [
{
"a": "item",
"t": "15000202",
"n": 4
}
]
}, },
{ {
"id": "15000203", "id": "15000203",
@ -7973,8 +7985,8 @@
"reddottype": 0, "reddottype": 0,
"effects": "", "effects": "",
"modelName": "", "modelName": "",
"box_id": 0, "box_id": 15000303,
"synthetize_num": 0, "synthetize_num": 3,
"access": [ "access": [
168 168
], ],
@ -7993,7 +8005,13 @@
} }
], ],
"synthetize_deplete": [], "synthetize_deplete": [],
"decompose_deplete": [] "decompose_deplete": [
{
"a": "item",
"t": "15000203",
"n": 4
}
]
}, },
{ {
"id": "15000204", "id": "15000204",
@ -8010,8 +8028,8 @@
"reddottype": 0, "reddottype": 0,
"effects": "", "effects": "",
"modelName": "", "modelName": "",
"box_id": 0, "box_id": 15000304,
"synthetize_num": 0, "synthetize_num": 3,
"access": [ "access": [
168 168
], ],
@ -8030,7 +8048,13 @@
} }
], ],
"synthetize_deplete": [], "synthetize_deplete": [],
"decompose_deplete": [] "decompose_deplete": [
{
"a": "item",
"t": "15000204",
"n": 4
}
]
}, },
{ {
"id": "15000301", "id": "15000301",
@ -8067,7 +8091,13 @@
} }
], ],
"synthetize_deplete": [], "synthetize_deplete": [],
"decompose_deplete": [] "decompose_deplete": [
{
"a": "item",
"t": "15000301",
"n": 4
}
]
}, },
{ {
"id": "15000302", "id": "15000302",
@ -8104,7 +8134,13 @@
} }
], ],
"synthetize_deplete": [], "synthetize_deplete": [],
"decompose_deplete": [] "decompose_deplete": [
{
"a": "item",
"t": "15000302",
"n": 4
}
]
}, },
{ {
"id": "15000303", "id": "15000303",
@ -8141,7 +8177,13 @@
} }
], ],
"synthetize_deplete": [], "synthetize_deplete": [],
"decompose_deplete": [] "decompose_deplete": [
{
"a": "item",
"t": "15000303",
"n": 4
}
]
}, },
{ {
"id": "15000304", "id": "15000304",
@ -8178,7 +8220,13 @@
} }
], ],
"synthetize_deplete": [], "synthetize_deplete": [],
"decompose_deplete": [] "decompose_deplete": [
{
"a": "item",
"t": "15000304",
"n": 4
}
]
}, },
{ {
"id": "10000007", "id": "10000007",

View File

@ -14,7 +14,8 @@
"npcName": [ "npcName": [
"功能入口-商人" "功能入口-商人"
], ],
"functionicon": "icon_sd" "functionicon": "icon_sd",
"mainscreen": ""
}, },
{ {
"Id": 2, "Id": 2,
@ -31,7 +32,8 @@
"npcName": [ "npcName": [
"功能入口-公告" "功能入口-公告"
], ],
"functionicon": "icon_gg" "functionicon": "icon_gg",
"mainscreen": ""
}, },
{ {
"Id": 3, "Id": 3,
@ -48,7 +50,8 @@
"npcName": [ "npcName": [
"功能入口-邮件" "功能入口-邮件"
], ],
"functionicon": "icon_yj" "functionicon": "icon_yj",
"mainscreen": ""
}, },
{ {
"Id": 4, "Id": 4,
@ -65,211 +68,260 @@
"npcName": [ "npcName": [
"功能入口-捕羊大赛" "功能入口-捕羊大赛"
], ],
"functionicon": "ty_qp_by" "functionicon": "ty_qp_by",
"mainscreen": ""
}, },
{ {
"Id": 6, "Id": 6,
"scene": "GameMain", "scene": "GameMain",
"scenename": {
"key": "navigation_Sheet1_scenename_5",
"text": "中轴城"
},
"sceneicon": "ty_qp_my01",
"functionname": {
"key": "navigation_Sheet1_functionname_5",
"text": "烹饪"
},
"npcName": [
"功能入口-烹饪"
],
"functionicon": "ty_qp_pr",
"mainscreen": ""
},
{
"Id": 7,
"scene": "GameMain",
"scenename": {
"key": "navigation_Sheet1_scenename_6",
"text": "中轴城"
},
"sceneicon": "ty_qp_my01",
"functionname": {
"key": "navigation_Sheet1_functionname_6",
"text": "指挥部"
},
"npcName": [
"传送点-指挥部"
],
"functionicon": "ty_qp_zhb",
"mainscreen": ""
},
{
"Id": 8,
"scene": "GameMain",
"scenename": { "scenename": {
"key": "navigation_Sheet1_scenename_7", "key": "navigation_Sheet1_scenename_7",
"text": "中轴城" "text": "中轴城"
}, },
"sceneicon": "ty_qp_my01", "sceneicon": "ty_qp_my01",
"functionname": { "functionname": {
"key": "navigation_Sheet1_functionname_6", "key": "navigation_Sheet1_functionname_7",
"text": "烹饪" "text": "竞技场"
}, },
"npcName": [ "npcName": [
"功能入口-烹饪" "功能入口-竞技场"
], ],
"functionicon": "ty_qp_pr" "functionicon": "ty_qp_jjc",
"mainscreen": ""
}, },
{ {
"Id": 7, "Id": 9,
"scene": "GameMain", "scene": "GameMain",
"scenename": { "scenename": {
"key": "navigation_Sheet1_scenename_8", "key": "navigation_Sheet1_scenename_8",
"text": "中轴城" "text": "中轴城"
}, },
"sceneicon": "ty_qp_my01", "sceneicon": "ty_qp_my01",
"functionname": {
"key": "navigation_Sheet1_functionname_7",
"text": "指挥部"
},
"npcName": [
"传送点-指挥部"
],
"functionicon": "ty_qp_zhb"
},
{
"Id": 8,
"scene": "GameMain",
"scenename": {
"key": "navigation_Sheet1_scenename_9",
"text": "中轴城"
},
"sceneicon": "ty_qp_my01",
"functionname": { "functionname": {
"key": "navigation_Sheet1_functionname_8", "key": "navigation_Sheet1_functionname_8",
"text": "竞技场"
},
"npcName": [
"功能入口-竞技场"
],
"functionicon": "ty_qp_jjc"
},
{
"Id": 9,
"scene": "GameMain",
"scenename": {
"key": "navigation_Sheet1_scenename_10",
"text": "中轴城"
},
"sceneicon": "ty_qp_my01",
"functionname": {
"key": "navigation_Sheet1_functionname_9",
"text": "工会" "text": "工会"
}, },
"npcName": [ "npcName": [
"功能入口-工会申请", "功能入口-工会申请",
"传送点-公会" "传送点-公会"
], ],
"functionicon": "ty_qp_gh" "functionicon": "ty_qp_gh",
"mainscreen": ""
}, },
{ {
"Id": 10, "Id": 10,
"scene": "SmithyScene", "scene": "SmithyScene",
"scenename": {
"key": "navigation_Sheet1_scenename_9",
"text": "铁匠铺"
},
"sceneicon": "ty_qp_tjp",
"functionname": {
"key": "navigation_Sheet1_functionname_9",
"text": "打造"
},
"npcName": [
"打造"
],
"functionicon": "ty_qp_zm",
"mainscreen": "传送点-铁匠铺"
},
{
"Id": 11,
"scene": "SmithyScene",
"scenename": {
"key": "navigation_Sheet1_scenename_10",
"text": "铁匠铺"
},
"sceneicon": "ty_qp_tjp",
"functionname": {
"key": "navigation_Sheet1_functionname_10",
"text": "锻造炉"
},
"npcName": [
"锻造炉"
],
"functionicon": "ty_qp_wdj",
"mainscreen": "传送点-铁匠铺"
},
{
"Id": 12,
"scene": "SmithyScene",
"scenename": { "scenename": {
"key": "navigation_Sheet1_scenename_11", "key": "navigation_Sheet1_scenename_11",
"text": "铁匠铺" "text": "铁匠铺"
}, },
"sceneicon": "ty_qp_tjp", "sceneicon": "ty_qp_tjp",
"functionname": {
"key": "navigation_Sheet1_functionname_10",
"text": "打造"
},
"npcName": [
"打造"
],
"functionicon": "ty_qp_zm"
},
{
"Id": 11,
"scene": "SmithyScene",
"scenename": {
"key": "navigation_Sheet1_scenename_12",
"text": "铁匠铺"
},
"sceneicon": "ty_qp_tjp",
"functionname": { "functionname": {
"key": "navigation_Sheet1_functionname_11", "key": "navigation_Sheet1_functionname_11",
"text": "锻造炉"
},
"npcName": [
"锻造炉"
],
"functionicon": "ty_qp_wdj"
},
{
"Id": 12,
"scene": "SmithyScene",
"scenename": {
"key": "navigation_Sheet1_scenename_13",
"text": "铁匠铺"
},
"sceneicon": "ty_qp_tjp",
"functionname": {
"key": "navigation_Sheet1_functionname_12",
"text": "手册台" "text": "手册台"
}, },
"npcName": [ "npcName": [
"手册台" "手册台"
], ],
"functionicon": "ty_qp_sj" "functionicon": "ty_qp_sj",
"mainscreen": "传送点-铁匠铺"
}, },
{ {
"Id": 13, "Id": 13,
"scene": "WuGuanScene", "scene": "WuGuanScene",
"scenename": {
"key": "navigation_Sheet1_scenename_12",
"text": "熊猫武馆"
},
"sceneicon": "ty_qp_xmwg",
"functionname": {
"key": "navigation_Sheet1_functionname_12",
"text": "总教习"
},
"npcName": [
"总教习"
],
"functionicon": "ty_qp_jx",
"mainscreen": ""
},
{
"Id": 14,
"scene": "WuGuanScene",
"scenename": {
"key": "navigation_Sheet1_scenename_13",
"text": "熊猫武馆"
},
"sceneicon": "ty_qp_xmwg",
"functionname": {
"key": "navigation_Sheet1_functionname_13",
"text": "阿宝"
},
"npcName": [
"阿宝"
],
"functionicon": "ty_qp_mryj",
"mainscreen": ""
},
{
"Id": 15,
"scene": "WuGuanScene",
"scenename": { "scenename": {
"key": "navigation_Sheet1_scenename_14", "key": "navigation_Sheet1_scenename_14",
"text": "熊猫武馆" "text": "熊猫武馆"
}, },
"sceneicon": "ty_qp_xmwg", "sceneicon": "ty_qp_xmwg",
"functionname": { "functionname": {
"key": "navigation_Sheet1_functionname_13", "key": "navigation_Sheet1_functionname_14",
"text": "总教习" "text": "告示板"
}, },
"npcName": [ "npcName": [
"总教习" "告示板"
], ],
"functionicon": "ty_qp_jx" "functionicon": "ty_qp_gsb",
"mainscreen": ""
}, },
{ {
"Id": 14, "Id": 16,
"scene": "WuGuanScene", "scene": "WuGuanScene",
"scenename": { "scenename": {
"key": "navigation_Sheet1_scenename_15", "key": "navigation_Sheet1_scenename_15",
"text": "熊猫武馆" "text": "熊猫武馆"
}, },
"sceneicon": "ty_qp_xmwg", "sceneicon": "ty_qp_xmwg",
"functionname": {
"key": "navigation_Sheet1_functionname_14",
"text": "阿宝"
},
"npcName": [
"阿宝"
],
"functionicon": "ty_qp_mryj"
},
{
"Id": 15,
"scene": "WuGuanScene",
"scenename": {
"key": "navigation_Sheet1_scenename_16",
"text": "熊猫武馆"
},
"sceneicon": "ty_qp_xmwg",
"functionname": { "functionname": {
"key": "navigation_Sheet1_functionname_15", "key": "navigation_Sheet1_functionname_15",
"text": "告示板" "text": "木桩"
},
"npcName": [
"告示板"
],
"functionicon": "ty_qp_gsb"
},
{
"Id": 16,
"scene": "WuGuanScene",
"scenename": {
"key": "navigation_Sheet1_scenename_17",
"text": "熊猫武馆"
},
"sceneicon": "ty_qp_xmwg",
"functionname": {
"key": "navigation_Sheet1_functionname_16",
"text": "木桩1"
}, },
"npcName": [ "npcName": [
"木桩" "木桩"
], ],
"functionicon": "ty_qp_mz" "functionicon": "ty_qp_mz",
"mainscreen": ""
}, },
{ {
"Id": 17, "Id": 17,
"scene": "GameMain", "scene": "GameMain",
"scenename": { "scenename": {
"key": "navigation_Sheet1_scenename_4", "key": "navigation_Sheet1_scenename_16",
"text": "中轴城" "text": "中轴城"
}, },
"sceneicon": "ty_qp_my01", "sceneicon": "ty_qp_my01",
"functionname": { "functionname": {
"key": "navigation_Sheet1_functionname_17", "key": "navigation_Sheet1_functionname_16",
"text": "羁绊" "text": "羁绊"
}, },
"npcName": [ "npcName": [
"功能入口-藏书馆" "功能入口-藏书馆"
], ],
"functionicon": "ty_qp_hgd" "functionicon": "ty_qp_hgd",
"mainscreen": ""
},
{
"Id": 18,
"scene": "CommandScene",
"scenename": {
"key": "navigation_Sheet1_scenename_17",
"text": "指挥部"
},
"sceneicon": "ty_qp_zhb",
"functionname": {
"key": "navigation_Sheet1_functionname_17",
"text": "旧时光"
},
"npcName": [
"功能入口_旧时光"
],
"functionicon": "ty_qp_jsg",
"mainscreen": ""
},
{
"Id": 19,
"scene": "CommandScene",
"scenename": {
"key": "navigation_Sheet1_scenename_18",
"text": "指挥部"
},
"sceneicon": "ty_qp_zhb",
"functionname": {
"key": "navigation_Sheet1_functionname_18",
"text": "星座图"
},
"npcName": [
"功能入口_主角星座图"
],
"functionicon": "ty_qp_tf",
"mainscreen": ""
} }
] ]

View File

@ -17,7 +17,7 @@
"text": "初来乍到" "text": "初来乍到"
}, },
"npctxt": { "npctxt": {
"key": "worldtask_world_task_npctxt_1", "key": "taskcond_rdtask_condi_npctxt_1",
"text": "和阿宝聊聊" "text": "和阿宝聊聊"
}, },
"npc": 10010, "npc": 10010,
@ -380,7 +380,7 @@
}, },
"npctxt": { "npctxt": {
"key": "taskcond_rdtask_condi_npctxt_9", "key": "taskcond_rdtask_condi_npctxt_9",
"text": "这就是维京人的工艺技术吗,我现在感觉自己的实力确实增长不少。" "text": "和骇客蛛聊聊"
}, },
"npc": 10090, "npc": 10090,
"completetasktxt": { "completetasktxt": {

View File

@ -2,10 +2,10 @@ package comm
import ( import (
"context" "context"
"crypto/rand" "math/rand"
"fmt" "fmt"
"go_dreamfactory/pb" "go_dreamfactory/pb"
"math/big"
"reflect" "reflect"
"strings" "strings"
@ -93,16 +93,15 @@ func ProtoMarshal(rsp proto.Message, msg *pb.UserMessage) (ok bool) {
/// 参数 权重数组 返回值 数组下标 /// 参数 权重数组 返回值 数组下标
func GetRandW(sz []int32) int32 { func GetRandW(sz []int32) int32 {
if len(sz) > 0 { if len(sz) > 0 {
var _totalW int64 // 总权重 var _totalW int32 // 总权重
var _tmpW int64 // 临时权重 var _tmpW int32 // 临时权重
for _, v := range sz { for _, v := range sz {
_totalW += int64(v) _totalW += v
} }
// 随机权重 // 随机权重
n, _ := rand.Int(rand.Reader, big.NewInt(_totalW))
for i, v := range sz { for i, v := range sz {
_tmpW += int64(v) _tmpW += v
if n.Int64() < _tmpW { if rand.Int31n(_totalW) < _tmpW {
return int32(i) return int32(i)
} }
} }
@ -118,8 +117,7 @@ func GetRandNum(min, max int32) int32 {
return min return min
} }
n, _ := rand.Int(rand.Reader, big.NewInt(int64(max-min+1))) //+1 是因为 rand方法范围是[0, max) return rand.Int31n(int32(max-min+1)) + min
return int32(n.Int64()) + min
} }
///通过uid获取用户所在区服 ///通过uid获取用户所在区服

View File

@ -37,9 +37,8 @@ type MCompConfigure struct {
hlock sync.RWMutex hlock sync.RWMutex
_dropMap map[int32][]*cfg.GameDropData // 掉落表 key 是DiropId _dropMap map[int32][]*cfg.GameDropData // 掉落表 key 是DiropId
_sign map[int32]*cfg.GameSignData _sign map[int32]*cfg.GameSignData
// 新掉落表
_group map[int64][]int32 // key 小组ID value cid _group map[int64][]int32 // key 小组ID value cid
// 类型为1 的数据 该大组中的小组为权重掉落必定从N个小组中随机出1个小组 // 类型为1 的数据 该大组中的小组为权重掉落必定从N个小组中随机出1个小组
_lotteryType1 map[int32][]int32 // key 大组ID value cid _lotteryType1 map[int32][]int32 // key 大组ID value cid
// 类型为2 的数据 有多个小组ID // 类型为2 的数据 有多个小组ID
@ -60,13 +59,11 @@ func (this *MCompConfigure) Init(service core.IService, module core.IModule, com
err = this.ModuleCompBase.Init(service, module, comp, options) err = this.ModuleCompBase.Init(service, module, comp, options)
err = this.LoadConfigure(game_global, cfg.NewGameGlobal) err = this.LoadConfigure(game_global, cfg.NewGameGlobal)
err = this.LoadConfigure(game_initial, cfg.NewGameInitial) err = this.LoadConfigure(game_initial, cfg.NewGameInitial)
//err = this.LoadConfigure(game_gamecolor, cfg.NewGameGameColor)
err = this.LoadConfigure(new_hero, cfg.NewGameHero) err = this.LoadConfigure(new_hero, cfg.NewGameHero)
err = this.LoadConfigure(game_playerlv, cfg.NewGamePlayerlv) err = this.LoadConfigure(game_playerlv, cfg.NewGamePlayerlv)
err = this.LoadConfigure(game_signreset, cfg.NewGameSignReset) err = this.LoadConfigure(game_signreset, cfg.NewGameSignReset)
err = this.LoadConfigure(game_equip, cfg.NewGameEquip) err = this.LoadConfigure(game_equip, cfg.NewGameEquip)
//err = this.LoadConfigure(game_sign, cfg.NewGameSign)
err = this.LoadConfigure(game_item, cfg.NewGameItem) err = this.LoadConfigure(game_item, cfg.NewGameItem)
err = this.LoadConfigure(game_vip, cfg.NewGameVip) err = this.LoadConfigure(game_vip, cfg.NewGameVip)
err = this.LoadConfigure(game_lottery, cfg.NewGameLottery) err = this.LoadConfigure(game_lottery, cfg.NewGameLottery)
@ -105,6 +102,20 @@ func (this *MCompConfigure) LoadGroupData() {
key := int64(value.Lotteryid)<<31 + int64(value.Groupid) key := int64(value.Lotteryid)<<31 + int64(value.Groupid)
this._group[key] = append(this._group[key], value.Id) this._group[key] = append(this._group[key], value.Id)
// 数据安全校验
if value.Min > value.Max {
log.Errorf("value.Min:%d > value.Max :%d ", value.Min, value.Max)
return
}
if value.VIPmin > value.VIPmax {
log.Errorf("value.VIPmin:%d > value.VIPmax :%d ", value.VIPmin, value.VIPmax)
return
}
if value.Playerlvmin > value.Playerlvmax {
log.Errorf("value.Playerlvmin:%d > value.Playerlvmax :%d ", value.Playerlvmin, value.Playerlvmax)
return
}
if _, ok := this.Btype[value.Lotteryid]; !ok { if _, ok := this.Btype[value.Lotteryid]; !ok {
this.Btype[value.Lotteryid] = value.Type this.Btype[value.Lotteryid] = value.Type
} }

View File

@ -18,6 +18,7 @@ type GameNavigationData struct {
Functionname string Functionname string
NpcName []string NpcName []string
Functionicon string Functionicon string
Mainscreen string
} }
const TypeId_GameNavigationData = -800652966 const TypeId_GameNavigationData = -800652966
@ -47,6 +48,7 @@ func (_v *GameNavigationData)Deserialize(_buf map[string]interface{}) (err error
} }
{ var _ok_ bool; if _v.Functionicon, _ok_ = _buf["functionicon"].(string); !_ok_ { err = errors.New("functionicon error"); return } } { var _ok_ bool; if _v.Functionicon, _ok_ = _buf["functionicon"].(string); !_ok_ { err = errors.New("functionicon error"); return } }
{ var _ok_ bool; if _v.Mainscreen, _ok_ = _buf["mainscreen"].(string); !_ok_ { err = errors.New("mainscreen error"); return } }
return return
} }