上传道具使用修改

This commit is contained in:
liwei1dao 2022-08-01 17:41:29 +08:00
parent fe90ea1ec4
commit 74aad51512
31 changed files with 3387 additions and 528 deletions

View File

@ -3088,35 +3088,35 @@
"text_cn": "基础效果抵抗" "text_cn": "基础效果抵抗"
}, },
{ {
"key": "hero_star_10001", "key": "hero_star_1",
"text_cn": "优秀" "text_cn": "优秀"
}, },
{ {
"key": "hero_star_10002", "key": "hero_star_2",
"text_cn": "稀有" "text_cn": "稀有"
}, },
{ {
"key": "hero_star_10003", "key": "hero_star_3",
"text_cn": "史诗" "text_cn": "史诗"
}, },
{ {
"key": "hero_star_10004", "key": "hero_star_4",
"text_cn": "传说" "text_cn": "传说"
}, },
{ {
"key": "hero_color_10013", "key": "hero_color_1",
"text_cn": "优秀" "text_cn": "优秀"
}, },
{ {
"key": "hero_color_10014", "key": "hero_color_2",
"text_cn": "稀有" "text_cn": "稀有"
}, },
{ {
"key": "hero_color_10015", "key": "hero_color_3",
"text_cn": "史诗" "text_cn": "史诗"
}, },
{ {
"key": "hero_color_10016", "key": "hero_color_4",
"text_cn": "传说" "text_cn": "传说"
}, },
{ {
@ -3138,5 +3138,221 @@
{ {
"key": "hero_job_10021", "key": "hero_job_10021",
"text_cn": "材料" "text_cn": "材料"
},
{
"key": "itemdesc_10001",
"text_cn": "使用后可以强化英雄"
},
{
"key": "itemdesc_10002",
"text_cn": "一块测试功能的石头,他可能是某个不能使用的活动道具"
},
{
"key": "itemdesc_10003",
"text_cn": "集齐50个碎片合成阿宝"
},
{
"key": "itemdesc_10004",
"text_cn": "可以在以下道具中选择任选1个"
},
{
"key": "itemdesc_10005",
"text_cn": "可以在以下道具中随机获取1个"
},
{
"key": "itemdesc_10006",
"text_cn": "打开后可以获得金币"
},
{
"key": "itemdesc_10007",
"text_cn": "使用后获得2小时金币收益"
},
{
"key": "itemdesc_10008",
"text_cn": "使用后获得2小时金币收益但是他会在2分钟内消失"
},
{
"key": "itemdesc_10009",
"text_cn": "这本魔法书被强大的魔法封印了通过第9999关后可以开启"
},
{
"key": "itemdesc_10010",
"text_cn": "似乎是某个失落文明的货币,暂时只有纪念意义"
},
{
"key": "itemdesc_10011",
"text_cn": "表针一动不动,也许有人可以修好它。"
},
{
"key": "itemdesc_10012",
"text_cn": "精致的木材,散发着淡淡的香气"
},
{
"key": "itemdesc_10013",
"text_cn": "把它放在背包里会带来好运"
},
{
"key": "itemdesc_10014",
"text_cn": "你登录了游戏就是冒险家,就会获得这个勋章"
},
{
"key": "itemdesc_10015",
"text_cn": "比幸运草更幸运"
},
{
"key": "itemdesc_10016",
"text_cn": "钻石是人造的,所以不能用来买商城的商品"
},
{
"key": "itemname_10001",
"text_cn": "初级经验精灵"
},
{
"key": "itemname_10002",
"text_cn": "石头"
},
{
"key": "itemname_10003",
"text_cn": "5星阿宝碎片"
},
{
"key": "itemname_10004",
"text_cn": "金币自选箱子"
},
{
"key": "itemname_10005",
"text_cn": "随机金币箱子"
},
{
"key": "itemname_10006",
"text_cn": "金币箱子"
},
{
"key": "itemname_10007",
"text_cn": "2小时金币"
},
{
"key": "itemname_10008",
"text_cn": "特殊2小时金币"
},
{
"key": "itemname_10009",
"text_cn": "被封印的魔法书"
},
{
"key": "itemname_10010",
"text_cn": "古代硬币"
},
{
"key": "itemname_10011",
"text_cn": "坏掉的钟表"
},
{
"key": "itemname_10012",
"text_cn": "木材"
},
{
"key": "itemname_10013",
"text_cn": "四叶草"
},
{
"key": "itemname_10014",
"text_cn": "冒险家勋章"
},
{
"key": "itemname_10015",
"text_cn": "猫猫护身符"
},
{
"key": "itemname_10016",
"text_cn": "人造钻石"
},
{
"key": "server_10001",
"text_cn": "本地测试服"
},
{
"key": "server_10002",
"text_cn": "外网测试服"
},
{
"key": "skillname_190011000",
"text_cn": "阿宝队长技"
},
{
"key": "skillname_190012000",
"text_cn": "熊猫拳"
},
{
"key": "skillname_190013000",
"text_cn": "太极一式"
},
{
"key": "skillname_190011003",
"text_cn": "太极零式"
},
{
"key": "skillname_190014000",
"text_cn": "波比队长技"
},
{
"key": "skillname_190016000",
"text_cn": "和谐音律"
},
{
"key": "skillname_190017000",
"text_cn": "欢悦之舞"
},
{
"key": "skillname_190018000",
"text_cn": "彩虹音符"
},
{
"key": "tips_1001",
"text_cn": "敬请期待"
},
{
"key": "tips_1002",
"text_cn": "暂未开放"
},
{
"key": "nonactivated",
"text_cn": "未激活"
},
{
"key": "activated",
"text_cn": "已激活"
},
{
"key": "opencond_name_10001",
"text_cn": "探险"
},
{
"key": "opencond_name_10002",
"text_cn": "英雄"
},
{
"key": "opencond_name_10003",
"text_cn": "商店"
},
{
"key": "opencond_name_10004",
"text_cn": "好友"
},
{
"key": "opencond_name_10005",
"text_cn": "任务"
},
{
"key": "opencond_prompt_10001",
"text_cn": "通关2-26开启"
},
{
"key": "opencond_prompt_10002",
"text_cn": "暂不开启,敬请期待"
},
{
"key": "opencond_prompt_10003",
"text_cn": "开服第2天开启且通关2-14后开启"
} }
] ]

View File

@ -217,7 +217,7 @@
}, },
{ {
"key": "hero_25001", "key": "hero_25001",
"text_en": "Bao" "text_en": "Po"
}, },
{ {
"key": "hero_25002", "key": "hero_25002",
@ -3088,35 +3088,35 @@
"text_en": "base effect resistance" "text_en": "base effect resistance"
}, },
{ {
"key": "hero_star_10001", "key": "hero_star_1",
"text_en": "Excellent" "text_en": "Excellent"
}, },
{ {
"key": "hero_star_10002", "key": "hero_star_2",
"text_en": "Rare" "text_en": "Rare"
}, },
{ {
"key": "hero_star_10003", "key": "hero_star_3",
"text_en": "Epic" "text_en": "Epic"
}, },
{ {
"key": "hero_star_10004", "key": "hero_star_4",
"text_en": "Legend" "text_en": "Legend"
}, },
{ {
"key": "hero_color_10013", "key": "hero_color_1",
"text_en": "Excellent" "text_en": "Excellent"
}, },
{ {
"key": "hero_color_10014", "key": "hero_color_2",
"text_en": "Rare" "text_en": "Rare"
}, },
{ {
"key": "hero_color_10015", "key": "hero_color_3",
"text_en": "Epic" "text_en": "Epic"
}, },
{ {
"key": "hero_color_10016", "key": "hero_color_4",
"text_en": "Legend" "text_en": "Legend"
}, },
{ {
@ -3138,5 +3138,221 @@
{ {
"key": "hero_job_10021", "key": "hero_job_10021",
"text_en": "Material" "text_en": "Material"
},
{
"key": "itemdesc_10001",
"text_en": "Heroes can be strengthened after use"
},
{
"key": "itemdesc_10002",
"text_en": "A stone for testing functionality, it may be an unusable activity item"
},
{
"key": "itemdesc_10003",
"text_en": "Collect all 50 fragments to make Po"
},
{
"key": "itemdesc_10004",
"text_en": "You can choose any one of the following items"
},
{
"key": "itemdesc_10005",
"text_en": "You can get 1 of the following items at random"
},
{
"key": "itemdesc_10006",
"text_en": "Open to get gold coins"
},
{
"key": "itemdesc_10007",
"text_en": "Get 2 hours of gold coins after use"
},
{
"key": "itemdesc_10008",
"text_en": "Gain 2 hours of gold after use, but he will disappear within 2 minutes"
},
{
"key": "itemdesc_10009",
"text_en": "This magic book is sealed by powerful magic, it can be opened after passing level 9999"
},
{
"key": "itemdesc_10010",
"text_en": "It seems to be the currency of a lost civilization, for the time being, it has only commemorative significance"
},
{
"key": "itemdesc_10011",
"text_en": "The hands don\u0027t move, maybe someone can fix it."
},
{
"key": "itemdesc_10012",
"text_en": "Delicate wood with a light aroma"
},
{
"key": "itemdesc_10013",
"text_en": "Carrying it in a backpack will bring good luck"
},
{
"key": "itemdesc_10014",
"text_en": "You are an adventurer when you log in to the game, and you will get this medal"
},
{
"key": "itemdesc_10015",
"text_en": "luckier than clover"
},
{
"key": "itemdesc_10016",
"text_en": "Diamonds are man-made, so they cannot be used to buy items in the mall"
},
{
"key": "itemname_10001",
"text_en": "Junior Experience Wizard"
},
{
"key": "itemname_10002",
"text_en": "Stone"
},
{
"key": "itemname_10003",
"text_en": "5 Star Po Shard"
},
{
"key": "itemname_10004",
"text_en": "Gold Coin Choice Box"
},
{
"key": "itemname_10005",
"text_en": "Random Gold Coin Box"
},
{
"key": "itemname_10006",
"text_en": "Gold coin box"
},
{
"key": "itemname_10007",
"text_en": "2 hour coins"
},
{
"key": "itemname_10008",
"text_en": "Special 2 Hour Coins"
},
{
"key": "itemname_10009",
"text_en": "Sealed magic book"
},
{
"key": "itemname_10010",
"text_en": "Ancient coins"
},
{
"key": "itemname_10011",
"text_en": "Broken clock"
},
{
"key": "itemname_10012",
"text_en": "Wood"
},
{
"key": "itemname_10013",
"text_en": "Four-leaf clover"
},
{
"key": "itemname_10014",
"text_en": "Adventurer\u0027s Medal"
},
{
"key": "itemname_10015",
"text_en": "Cat cat amulet"
},
{
"key": "itemname_10016",
"text_en": "Artificial diamond"
},
{
"key": "server_10001",
"text_en": "Local test server"
},
{
"key": "server_10002",
"text_en": "Extranet test server"
},
{
"key": "skillname_190011000",
"text_en": "Captain Po\u0027s skills"
},
{
"key": "skillname_190012000",
"text_en": "Panda fist"
},
{
"key": "skillname_190013000",
"text_en": "Tai Chi Form"
},
{
"key": "skillname_190011003",
"text_en": "Tai Chi Zero"
},
{
"key": "skillname_190014000",
"text_en": "Captain Poppy\u0027s skills"
},
{
"key": "skillname_190016000",
"text_en": "Harmony"
},
{
"key": "skillname_190017000",
"text_en": "Dance of joy"
},
{
"key": "skillname_190018000",
"text_en": "Rainbow note"
},
{
"key": "tips_1001",
"text_en": "Stay tuned"
},
{
"key": "tips_1002",
"text_en": "Not yet open"
},
{
"key": "nonactivated",
"text_en": "Nonactivated"
},
{
"key": "activated",
"text_en": "Activated"
},
{
"key": "opencond_name_10001",
"text_en": ""
},
{
"key": "opencond_name_10002",
"text_en": ""
},
{
"key": "opencond_name_10003",
"text_en": ""
},
{
"key": "opencond_name_10004",
"text_en": ""
},
{
"key": "opencond_name_10005",
"text_en": ""
},
{
"key": "opencond_prompt_10001",
"text_en": ""
},
{
"key": "opencond_prompt_10002",
"text_en": ""
},
{
"key": "opencond_prompt_10003",
"text_en": ""
} }
] ]

View File

@ -3088,35 +3088,35 @@
"text_tw": "" "text_tw": ""
}, },
{ {
"key": "hero_star_10001", "key": "hero_star_1",
"text_tw": "" "text_tw": ""
}, },
{ {
"key": "hero_star_10002", "key": "hero_star_2",
"text_tw": "" "text_tw": ""
}, },
{ {
"key": "hero_star_10003", "key": "hero_star_3",
"text_tw": "" "text_tw": ""
}, },
{ {
"key": "hero_star_10004", "key": "hero_star_4",
"text_tw": "" "text_tw": ""
}, },
{ {
"key": "hero_color_10013", "key": "hero_color_1",
"text_tw": "" "text_tw": ""
}, },
{ {
"key": "hero_color_10014", "key": "hero_color_2",
"text_tw": "" "text_tw": ""
}, },
{ {
"key": "hero_color_10015", "key": "hero_color_3",
"text_tw": "" "text_tw": ""
}, },
{ {
"key": "hero_color_10016", "key": "hero_color_4",
"text_tw": "" "text_tw": ""
}, },
{ {
@ -3138,5 +3138,221 @@
{ {
"key": "hero_job_10021", "key": "hero_job_10021",
"text_tw": "" "text_tw": ""
},
{
"key": "itemdesc_10001",
"text_tw": ""
},
{
"key": "itemdesc_10002",
"text_tw": ""
},
{
"key": "itemdesc_10003",
"text_tw": ""
},
{
"key": "itemdesc_10004",
"text_tw": ""
},
{
"key": "itemdesc_10005",
"text_tw": ""
},
{
"key": "itemdesc_10006",
"text_tw": ""
},
{
"key": "itemdesc_10007",
"text_tw": ""
},
{
"key": "itemdesc_10008",
"text_tw": ""
},
{
"key": "itemdesc_10009",
"text_tw": ""
},
{
"key": "itemdesc_10010",
"text_tw": ""
},
{
"key": "itemdesc_10011",
"text_tw": ""
},
{
"key": "itemdesc_10012",
"text_tw": ""
},
{
"key": "itemdesc_10013",
"text_tw": ""
},
{
"key": "itemdesc_10014",
"text_tw": ""
},
{
"key": "itemdesc_10015",
"text_tw": ""
},
{
"key": "itemdesc_10016",
"text_tw": ""
},
{
"key": "itemname_10001",
"text_tw": ""
},
{
"key": "itemname_10002",
"text_tw": ""
},
{
"key": "itemname_10003",
"text_tw": ""
},
{
"key": "itemname_10004",
"text_tw": ""
},
{
"key": "itemname_10005",
"text_tw": ""
},
{
"key": "itemname_10006",
"text_tw": ""
},
{
"key": "itemname_10007",
"text_tw": ""
},
{
"key": "itemname_10008",
"text_tw": ""
},
{
"key": "itemname_10009",
"text_tw": ""
},
{
"key": "itemname_10010",
"text_tw": ""
},
{
"key": "itemname_10011",
"text_tw": ""
},
{
"key": "itemname_10012",
"text_tw": ""
},
{
"key": "itemname_10013",
"text_tw": ""
},
{
"key": "itemname_10014",
"text_tw": ""
},
{
"key": "itemname_10015",
"text_tw": ""
},
{
"key": "itemname_10016",
"text_tw": ""
},
{
"key": "server_10001",
"text_tw": ""
},
{
"key": "server_10002",
"text_tw": ""
},
{
"key": "skillname_190011000",
"text_tw": ""
},
{
"key": "skillname_190012000",
"text_tw": ""
},
{
"key": "skillname_190013000",
"text_tw": ""
},
{
"key": "skillname_190011003",
"text_tw": ""
},
{
"key": "skillname_190014000",
"text_tw": ""
},
{
"key": "skillname_190016000",
"text_tw": ""
},
{
"key": "skillname_190017000",
"text_tw": ""
},
{
"key": "skillname_190018000",
"text_tw": ""
},
{
"key": "tips_1001",
"text_tw": ""
},
{
"key": "tips_1002",
"text_tw": ""
},
{
"key": "nonactivated",
"text_tw": ""
},
{
"key": "activated",
"text_tw": ""
},
{
"key": "opencond_name_10001",
"text_tw": ""
},
{
"key": "opencond_name_10002",
"text_tw": ""
},
{
"key": "opencond_name_10003",
"text_tw": ""
},
{
"key": "opencond_name_10004",
"text_tw": ""
},
{
"key": "opencond_name_10005",
"text_tw": ""
},
{
"key": "opencond_prompt_10001",
"text_tw": ""
},
{
"key": "opencond_prompt_10002",
"text_tw": ""
},
{
"key": "opencond_prompt_10003",
"text_tw": ""
} }
] ]

View File

@ -0,0 +1,172 @@
[
{
"key": 1,
"id_tag": 1,
"active": 20,
"reword": [
{
"a": "attr",
"t": "gold",
"n": 100
},
{
"a": "attr",
"t": "diamond",
"n": 50
}
]
},
{
"key": 2,
"id_tag": 1,
"active": 40,
"reword": [
{
"a": "attr",
"t": "gold",
"n": 150
},
{
"a": "attr",
"t": "diamond",
"n": 50
}
]
},
{
"key": 3,
"id_tag": 1,
"active": 60,
"reword": [
{
"a": "attr",
"t": "gold",
"n": 200
},
{
"a": "attr",
"t": "diamond",
"n": 50
}
]
},
{
"key": 4,
"id_tag": 1,
"active": 80,
"reword": [
{
"a": "attr",
"t": "gold",
"n": 250
},
{
"a": "attr",
"t": "diamond",
"n": 50
}
]
},
{
"key": 5,
"id_tag": 1,
"active": 100,
"reword": [
{
"a": "attr",
"t": "gold",
"n": 300
},
{
"a": "attr",
"t": "diamond",
"n": 50
}
]
},
{
"key": 6,
"id_tag": 2,
"active": 40,
"reword": [
{
"a": "attr",
"t": "gold",
"n": 350
},
{
"a": "attr",
"t": "diamond",
"n": 50
}
]
},
{
"key": 7,
"id_tag": 2,
"active": 80,
"reword": [
{
"a": "attr",
"t": "gold",
"n": 400
},
{
"a": "attr",
"t": "diamond",
"n": 50
}
]
},
{
"key": 8,
"id_tag": 2,
"active": 120,
"reword": [
{
"a": "attr",
"t": "gold",
"n": 450
},
{
"a": "attr",
"t": "diamond",
"n": 50
}
]
},
{
"key": 9,
"id_tag": 2,
"active": 160,
"reword": [
{
"a": "attr",
"t": "gold",
"n": 500
},
{
"a": "attr",
"t": "diamond",
"n": 50
}
]
},
{
"key": 10,
"id_tag": 2,
"active": 200,
"reword": [
{
"a": "attr",
"t": "gold",
"n": 550
},
{
"a": "attr",
"t": "diamond",
"n": 50
}
]
}
]

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,26 @@
[ [
{ {
"name": "本地测试服", "name": {
"ips": "10.0.0.9:7891" "key": "server_10001",
"text": "本地测试服"
},
"ips": "10.0.0.9:7891",
"debug": true
}, },
{ {
"name": "外网测试服", "name": {
"ips": "119.3.89.14:7891" "key": "server_10002",
"text": "外网测试服"
},
"ips": "119.3.89.14:7891",
"debug": false
},
{
"name": {
"key": "debug_server_01",
"text": "lw"
},
"ips": "10.0.0.138:7891",
"debug": true
} }
] ]

View File

@ -5,7 +5,7 @@
{ {
"a": "hero", "a": "hero",
"t": "25001", "t": "25001",
"n": 5 "n": 1
} }
] ]
}, },
@ -21,31 +21,11 @@
}, },
{ {
"index": "3", "index": "3",
"var": [
{
"a": "hero",
"t": "24003",
"n": 5
}
]
},
{
"index": "4",
"var": [ "var": [
{ {
"a": "hero", "a": "hero",
"t": "25004", "t": "25004",
"n": 5 "n": 1
}
]
},
{
"index": "5",
"var": [
{
"a": "hero",
"t": "35002",
"n": 5
} }
] ]
}, },

View File

@ -79,12 +79,12 @@
}, },
"usetype": 1, "usetype": 1,
"color": 5, "color": 5,
"bagtype": 2, "bagtype": 3,
"index": 2, "index": 2,
"special_type": 0, "special_type": 0,
"time": 0, "time": 0,
"effects": "", "effects": "",
"box_id": 10001, "box_id": 10002,
"synthetize_num": 50, "synthetize_num": 50,
"access": 0, "access": 0,
"use_skip": 0, "use_skip": 0,
@ -120,7 +120,7 @@
"special_type": 0, "special_type": 0,
"time": 0, "time": 0,
"effects": "", "effects": "",
"box_id": 10001, "box_id": 20001,
"synthetize_num": 0, "synthetize_num": 0,
"access": 0, "access": 0,
"use_skip": 0, "use_skip": 0,
@ -156,7 +156,7 @@
"special_type": 0, "special_type": 0,
"time": 0, "time": 0,
"effects": "", "effects": "",
"box_id": 10001, "box_id": 20002,
"synthetize_num": 0, "synthetize_num": 0,
"access": 0, "access": 0,
"use_skip": 0, "use_skip": 0,
@ -169,7 +169,7 @@
"ico": "wp_icon_0001", "ico": "wp_icon_0001",
"intr": { "intr": {
"key": "itemdesc_10005", "key": "itemdesc_10005",
"text": "可以下一下道具中随机获取1个" "text": "可以在以下道具中随机获取1个"
}, },
"sale": [ "sale": [
{ {
@ -192,7 +192,7 @@
"special_type": 0, "special_type": 0,
"time": 0, "time": 0,
"effects": "", "effects": "",
"box_id": 20001, "box_id": 20003,
"synthetize_num": 0, "synthetize_num": 0,
"access": 0, "access": 0,
"use_skip": 0, "use_skip": 0,
@ -574,5 +574,77 @@
"n": 1000 "n": 1000
} }
] ]
},
{
"id": "20001",
"name": {
"key": "itemname_20001",
"text": "随机英雄碎片"
},
"usetype": 1,
"color": 5,
"bagtype": 3,
"index": 17,
"special_type": 0,
"time": 0,
"effects": "",
"box_id": 10001,
"synthetize_num": 50,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 6,
"race": 3,
"img": "wp_icon_0001",
"ico": "wp_icon_0001",
"intr": {
"key": "itemdesc_20001",
"text": "集齐50个碎片合成随机英雄"
},
"sale": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
]
},
{
"id": "20002",
"name": {
"key": "itemname_20002",
"text": "25001号碎片"
},
"usetype": 1,
"color": 5,
"bagtype": 3,
"index": 18,
"special_type": 0,
"time": 0,
"effects": "",
"box_id": 10002,
"synthetize_num": 50,
"access": 0,
"use_skip": 0,
"upper_limit": 999,
"uselv": 0,
"isani": 0,
"star": 6,
"race": 3,
"img": "wp_icon_0001",
"ico": "wp_icon_0001",
"intr": {
"key": "itemdesc_20002",
"text": "集齐50个碎片合成25001号英雄"
},
"sale": [
{
"a": "attr",
"t": "gold",
"n": 1000
}
]
} }
] ]

326
bin/json/game_language.json Normal file
View File

@ -0,0 +1,326 @@
[
{
"keycode": {
"key": "ChineseSimplified",
"text": "ChineseSimplified"
}
},
{
"keycode": {
"key": "ChineseTraditional",
"text": "ChineseTraditional"
}
},
{
"keycode": {
"key": "English",
"text": "English"
}
},
{
"keycode": {
"key": "1",
"text": "1"
}
},
{
"keycode": {
"key": "2",
"text": "2"
}
},
{
"keycode": {
"key": "3",
"text": "3"
}
},
{
"keycode": {
"key": "4",
"text": "4"
}
},
{
"keycode": {
"key": "5",
"text": "5"
}
},
{
"keycode": {
"key": "6",
"text": "6"
}
},
{
"keycode": {
"key": "7",
"text": "7"
}
},
{
"keycode": {
"key": "8",
"text": "8"
}
},
{
"keycode": {
"key": "9",
"text": "9"
}
},
{
"keycode": {
"key": "10",
"text": "10"
}
},
{
"keycode": {
"key": "Login",
"text": "Login"
}
},
{
"keycode": {
"key": "MomentDay1",
"text": "MomentDay1"
}
},
{
"keycode": {
"key": "MomentDay2",
"text": "MomentDay2"
}
},
{
"keycode": {
"key": "MomentHour1",
"text": "MomentHour1"
}
},
{
"keycode": {
"key": "MomentHour2",
"text": "MomentHour2"
}
},
{
"keycode": {
"key": "MomentMinutes1",
"text": "MomentMinutes1"
}
},
{
"keycode": {
"key": "MomentMinutes2",
"text": "MomentMinutes2"
}
},
{
"keycode": {
"key": "MomentSeconds1",
"text": "MomentSeconds1"
}
},
{
"keycode": {
"key": "MomentSeconds2",
"text": "MomentSeconds2"
}
},
{
"keycode": {
"key": "Tuijian",
"text": "Tuijian"
}
},
{
"keycode": {
"key": "Juese",
"text": "Juese"
}
},
{
"keycode": {
"key": "hero_star_1",
"text": "hero_star_1"
}
},
{
"keycode": {
"key": "hero_star_2",
"text": "hero_star_2"
}
},
{
"keycode": {
"key": "hero_star_3",
"text": "hero_star_3"
}
},
{
"keycode": {
"key": "hero_star_4",
"text": "hero_star_4"
}
},
{
"keycode": {
"key": "hero_color_1",
"text": "hero_color_1"
}
},
{
"keycode": {
"key": "hero_color_2",
"text": "hero_color_2"
}
},
{
"keycode": {
"key": "hero_color_3",
"text": "hero_color_3"
}
},
{
"keycode": {
"key": "hero_color_4",
"text": "hero_color_4"
}
},
{
"keycode": {
"key": "hero_job_10017",
"text": "hero_job_10017"
}
},
{
"keycode": {
"key": "hero_job_10018",
"text": "hero_job_10018"
}
},
{
"keycode": {
"key": "hero_job_10019",
"text": "hero_job_10019"
}
},
{
"keycode": {
"key": "hero_job_10020",
"text": "hero_job_10020"
}
},
{
"keycode": {
"key": "hero_job_10021",
"text": "hero_job_10021"
}
},
{
"keycode": {
"key": "equip_10001",
"text": "equip_10001"
}
},
{
"keycode": {
"key": "equip_10002",
"text": "equip_10002"
}
},
{
"keycode": {
"key": "equip_10003",
"text": "equip_10003"
}
},
{
"keycode": {
"key": "equip_10004",
"text": "equip_10004"
}
},
{
"keycode": {
"key": "equip_10005",
"text": "equip_10005"
}
},
{
"keycode": {
"key": "hero_10001",
"text": "hero_10001"
}
},
{
"keycode": {
"key": "hero_10002",
"text": "hero_10002"
}
},
{
"keycode": {
"key": "hero_10003",
"text": "hero_10003"
}
},
{
"keycode": {
"key": "hero_10004",
"text": "hero_10004"
}
},
{
"keycode": {
"key": "hero_10005",
"text": "hero_10005"
}
},
{
"keycode": {
"key": "hero_10006",
"text": "hero_10006"
}
},
{
"keycode": {
"key": "hero_10007",
"text": "hero_10007"
}
},
{
"keycode": {
"key": "hero_10008",
"text": "hero_10008"
}
},
{
"keycode": {
"key": "nonactivated",
"text": "nonactivated"
}
},
{
"keycode": {
"key": "activated",
"text": "activated"
}
},
{
"keycode": {
"key": "tips_1001",
"text": "tips_1001"
}
},
{
"keycode": {
"key": "tips_1002",
"text": "tips_1002"
}
}
]

View File

@ -348,7 +348,7 @@
"id": 24003, "id": 24003,
"preson": "24003", "preson": "24003",
"presonshow": "", "presonshow": "",
"ico": "tx_hhjs_24003", "ico": "tx_js_24003",
"fight": "ytx_js_24003", "fight": "ytx_js_24003",
"img": "sbkp_js_24003", "img": "sbkp_js_24003",
"heroimg": "hbkp_js_24003", "heroimg": "hbkp_js_24003",
@ -678,7 +678,7 @@
"id": 34006, "id": 34006,
"preson": "34006", "preson": "34006",
"presonshow": "", "presonshow": "",
"ico": "tx_hhjs_34006", "ico": "tx_js_34006",
"fight": "ytx_js_34006", "fight": "ytx_js_34006",
"img": "sbkp_js_34006", "img": "sbkp_js_34006",
"heroimg": "hbkp_js_34006", "heroimg": "hbkp_js_34006",
@ -723,7 +723,7 @@
"id": 35001, "id": 35001,
"preson": "35001", "preson": "35001",
"presonshow": "", "presonshow": "",
"ico": "tx_hhjs_35001", "ico": "tx_js_35001",
"fight": "ytx_js_35001", "fight": "ytx_js_35001",
"img": "sbkp_js_35001", "img": "sbkp_js_35001",
"heroimg": "hbkp_js_35001", "heroimg": "hbkp_js_35001",
@ -738,7 +738,7 @@
"id": 35002, "id": 35002,
"preson": "35002", "preson": "35002",
"presonshow": "", "presonshow": "",
"ico": "tx_hhjs_35002", "ico": "tx_js_35002",
"fight": "ytx_js_35002", "fight": "ytx_js_35002",
"img": "sbkp_js_35002", "img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002", "heroimg": "hbkp_js_35002",
@ -978,7 +978,7 @@
"id": 44005, "id": 44005,
"preson": "44005", "preson": "44005",
"presonshow": "", "presonshow": "",
"ico": "tx_hhjs_44005", "ico": "tx_js_44005",
"fight": "ytx_js_44005", "fight": "ytx_js_44005",
"img": "sbkp_js_44005", "img": "sbkp_js_44005",
"heroimg": "hbkp_js_44005", "heroimg": "hbkp_js_44005",
@ -1129,10 +1129,10 @@
"preson": "43921", "preson": "43921",
"presonshow": "", "presonshow": "",
"ico": "tx_hhjs_35002", "ico": "tx_hhjs_35002",
"fight": "ytx_js_43921", "fight": "ytx_js_35002",
"img": "sbkp_js_35002", "img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002", "heroimg": "hbkp_js_35002",
"portrait": "portrait_43921", "portrait": "portrait_35002",
"postxyz": [ "postxyz": [
0, 0,
0, 0,
@ -1144,10 +1144,10 @@
"preson": "44921", "preson": "44921",
"presonshow": "", "presonshow": "",
"ico": "tx_hhjs_35002", "ico": "tx_hhjs_35002",
"fight": "ytx_js_44921", "fight": "ytx_js_35002",
"img": "sbkp_js_35002", "img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002", "heroimg": "hbkp_js_35002",
"portrait": "portrait_44921", "portrait": "portrait_35002",
"postxyz": [ "postxyz": [
0, 0,
0, 0,
@ -1159,10 +1159,10 @@
"preson": "45921", "preson": "45921",
"presonshow": "", "presonshow": "",
"ico": "tx_hhjs_35002", "ico": "tx_hhjs_35002",
"fight": "ytx_js_45921", "fight": "ytx_js_35002",
"img": "sbkp_js_35002", "img": "sbkp_js_35002",
"heroimg": "hbkp_js_35002", "heroimg": "hbkp_js_35002",
"portrait": "portrait_45921", "portrait": "portrait_35002",
"postxyz": [ "postxyz": [
0, 0,
0, 0,

View File

@ -3305,8 +3305,8 @@
"key": "hero_51001", "key": "hero_51001",
"text": "啵啵星人(新增)" "text": "啵啵星人(新增)"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 3, "job": 3,
"type": 5, "type": 5,
@ -3349,8 +3349,8 @@
"key": "hero_51002", "key": "hero_51002",
"text": "埃雷特手下1号新增" "text": "埃雷特手下1号新增"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 3, "job": 3,
"type": 5, "type": 5,
@ -3393,8 +3393,8 @@
"key": "hero_51003", "key": "hero_51003",
"text": "埃雷特手下2号新增" "text": "埃雷特手下2号新增"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 3, "job": 3,
"type": 5, "type": 5,
@ -3437,8 +3437,8 @@
"key": "hero_51004", "key": "hero_51004",
"text": "豺狼小怪(新增)" "text": "豺狼小怪(新增)"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 3, "job": 3,
"type": 5, "type": 5,
@ -3481,8 +3481,8 @@
"key": "hero_51005", "key": "hero_51005",
"text": "犀牛守卫(新增)" "text": "犀牛守卫(新增)"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 1, "job": 1,
"type": 5, "type": 5,
@ -3525,8 +3525,8 @@
"key": "hero_51006", "key": "hero_51006",
"text": "香塔尔 杜布瓦队长手下1号新增" "text": "香塔尔 杜布瓦队长手下1号新增"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 3, "job": 3,
"type": 5, "type": 5,
@ -3569,8 +3569,8 @@
"key": "hero_51007", "key": "hero_51007",
"text": "香塔尔 杜布瓦队长手下2号新增" "text": "香塔尔 杜布瓦队长手下2号新增"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 3, "job": 3,
"type": 5, "type": 5,
@ -3613,8 +3613,8 @@
"key": "hero_51008", "key": "hero_51008",
"text": "香塔尔 杜布瓦队长手下3号新增" "text": "香塔尔 杜布瓦队长手下3号新增"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 1, "job": 1,
"type": 5, "type": 5,
@ -3657,8 +3657,8 @@
"key": "hero_51009", "key": "hero_51009",
"text": "香塔尔 杜布瓦队长手下4号新增" "text": "香塔尔 杜布瓦队长手下4号新增"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 1, "job": 1,
"type": 5, "type": 5,
@ -3701,8 +3701,8 @@
"key": "hero_51010", "key": "hero_51010",
"text": "警卫1号新增" "text": "警卫1号新增"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 1, "job": 1,
"type": 5, "type": 5,
@ -3745,8 +3745,8 @@
"key": "hero_51011", "key": "hero_51011",
"text": "警卫2号新增" "text": "警卫2号新增"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 3, "job": 3,
"type": 5, "type": 5,
@ -3789,8 +3789,8 @@
"key": "hero_51012", "key": "hero_51012",
"text": "小猴子(新增)" "text": "小猴子(新增)"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 3, "job": 3,
"type": 5, "type": 5,
@ -3833,8 +3833,8 @@
"key": "hero_51013", "key": "hero_51013",
"text": "巨怪啰啰(新增)" "text": "巨怪啰啰(新增)"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 1, "job": 1,
"type": 5, "type": 5,
@ -3877,8 +3877,8 @@
"key": "hero_51014", "key": "hero_51014",
"text": "博啃族宫廷守卫(新增)" "text": "博啃族宫廷守卫(新增)"
}, },
"star": 1, "star": 2,
"color": 0, "color": 1,
"race": 4, "race": 4,
"job": 1, "job": 1,
"type": 5, "type": 5,

File diff suppressed because it is too large Load Diff

View File

@ -1,45 +1,102 @@
[ [
{ {
"group": 10001, "key": 10001,
"star": 0, "star": 5,
"prize": [ "prize": {
{ "a": "hero",
"a": "attr", "t": "15001",
"t": "gold", "n": 1
"n": 1000 },
}, "p": 1000
{
"a": "attr",
"t": "gold",
"n": 2000
},
{
"a": "attr",
"t": "gold",
"n": 3000
}
],
"p": [
1000,
1000,
1000
]
}, },
{ {
"group": 20001, "key": 10002,
"star": 5,
"prize": {
"a": "hero",
"t": "25001",
"n": 1
},
"p": 1000
},
{
"key": 10003,
"star": 4,
"prize": {
"a": "hero",
"t": "25001",
"n": 1
},
"p": 1000
},
{
"key": 10004,
"star": 4,
"prize": {
"a": "hero",
"t": "25001",
"n": 1
},
"p": 1000
},
{
"key": 20001,
"star": 0, "star": 0,
"prize": [ "prize": {
{ "a": "attr",
"a": "attr", "t": "gold",
"t": "gold", "n": 2000
"n": 4000 },
}, "p": 1000
{ },
"a": "attr", {
"t": "gold", "key": 20002,
"n": 5000 "star": 0,
} "prize": {
], "a": "attr",
"p": [] "t": "diamond",
"n": 3000
},
"p": 1000
},
{
"key": 20003,
"star": 0,
"prize": {
"a": "attr",
"t": "gold",
"n": 2000
},
"p": 1000
},
{
"key": 20004,
"star": 0,
"prize": {
"a": "attr",
"t": "diamond",
"n": 3000
},
"p": 1000
},
{
"key": 20005,
"star": 0,
"prize": {
"a": "attr",
"t": "gold",
"n": 2000
},
"p": 1000
},
{
"key": 20006,
"star": 0,
"prize": {
"a": "attr",
"t": "diamond",
"n": 3000
},
"p": 1000
} }
] ]

View File

@ -0,0 +1,37 @@
[
{
"group": 10001,
"id": [
10001,
10002,
10003
]
},
{
"group": 10002,
"id": [
10004
]
},
{
"group": 20001,
"id": [
20001,
20002
]
},
{
"group": 20002,
"id": [
20003,
20004
]
},
{
"group": 20003,
"id": [
20005,
20006
]
}
]

File diff suppressed because it is too large Load Diff

View File

@ -203,30 +203,6 @@
"comname": "back_up", "comname": "back_up",
"des": "临时展示界面-左上按钮返回" "des": "临时展示界面-左上按钮返回"
}, },
{
"id": "methodandway_equip",
"file": "EquipMethodAndWayWindow",
"unloadpkg": 0,
"loadtype": 0,
"full": 0,
"blur": 0,
"package": "tips/tips",
"packagename": "tips",
"comname": "equipMethodAndWayTips",
"des": "装备获取途径界面(临时)"
},
{
"id": "skillinfo",
"file": "SkillInfoWindow",
"unloadpkg": 0,
"loadtype": 0,
"full": 0,
"blur": 0,
"package": "tips/tips",
"packagename": "tips",
"comname": "skillInfoTips",
"des": "技能信息界面(临时)"
},
{ {
"id": "generaltips", "id": "generaltips",
"file": "GeneralTipsWindow", "file": "GeneralTipsWindow",
@ -533,7 +509,7 @@
"unloadpkg": 5, "unloadpkg": 5,
"loadtype": 1, "loadtype": 1,
"full": 0, "full": 0,
"blur": 0, "blur": 1,
"package": "roledetails/roledetails", "package": "roledetails/roledetails",
"packagename": "roledetails", "packagename": "roledetails",
"comname": "roleupgrade", "comname": "roleupgrade",
@ -558,7 +534,7 @@
"loadtype": 0, "loadtype": 0,
"full": 0, "full": 0,
"blur": 1, "blur": 1,
"package": "n", "package": "roledetails/roledetails",
"packagename": "roledetails", "packagename": "roledetails",
"comname": "role_grow", "comname": "role_grow",
"des": "英雄图鉴属性弹窗" "des": "英雄图鉴属性弹窗"
@ -653,7 +629,7 @@
"unloadpkg": 3, "unloadpkg": 3,
"loadtype": 1, "loadtype": 1,
"full": 0, "full": 0,
"blur": 0, "blur": 1,
"package": "tips/tips", "package": "tips/tips",
"packagename": "tips", "packagename": "tips",
"comname": "GeneralItem", "comname": "GeneralItem",
@ -694,5 +670,17 @@
"packagename": "roledetails", "packagename": "roledetails",
"comname": "skillnametips3", "comname": "skillnametips3",
"des": "队长技描述提示框" "des": "队长技描述提示框"
},
{
"id": "equistrengthen",
"file": "EquiStrengthenWindow",
"unloadpkg": 3,
"loadtype": 1,
"full": 0,
"blur": 0,
"package": "roledetails/roledetails",
"packagename": "roledetails",
"comname": "equistrengthen",
"des": "装备强化"
} }
] ]

View File

@ -207,7 +207,7 @@ func (this *modelEquipmentComp) upgradeEquipment(equipment *pb.DB_Equipment, equ
return return
} }
//检索出未使用的词条 //检索出未使用的词条
for _, v := range sattr { for _, v := range temp {
iskeep := false iskeep := false
for _, v1 := range equipment.AdverbEntry { for _, v1 := range equipment.AdverbEntry {
if v.Key == v1.Id { if v.Key == v1.Id {

View File

@ -4,8 +4,6 @@ import (
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
"math/rand"
"time"
"google.golang.org/protobuf/proto" "google.golang.org/protobuf/proto"
) )
@ -24,7 +22,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
err error err error
item *pb.DB_UserItemData item *pb.DB_UserItemData
itemcf *cfg.Game_itemData itemcf *cfg.Game_itemData
prop *cfg.Game_propsgroupData prop []*cfg.Game_propsgroupData
) )
if code = this.UseitemCheck(session, req); code != pb.ErrorCode_Success { if code = this.UseitemCheck(session, req); code != pb.ErrorCode_Success {
return return
@ -50,7 +48,8 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
if code = this.module.AddItemforGrid(&comm.ModuleCallSource{}, session, req.GridId, -1*itemcf.SynthetizeNum*int32(req.Amount), true); code != pb.ErrorCode_Success { if code = this.module.AddItemforGrid(&comm.ModuleCallSource{}, session, req.GridId, -1*itemcf.SynthetizeNum*int32(req.Amount), true); code != pb.ErrorCode_Success {
return return
} }
if code = this.module.ModuleHero.GetSpecifiedHero(session, prop.Prize[0].T, prop.Star, 0, int32(req.Amount)); code != pb.ErrorCode_Success { sale := RandomProps(prop)
if code = this.module.ModuleHero.GetSpecifiedHero(session, sale.Prize.T, sale.Star, 0, int32(req.Amount)); code != pb.ErrorCode_Success {
return return
} }
case 4: //自选宝箱 case 4: //自选宝箱
@ -61,11 +60,18 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
if code = this.module.AddItemforGrid(&comm.ModuleCallSource{}, session, req.GridId, -1*int32(req.Amount), true); code != pb.ErrorCode_Success { if code = this.module.AddItemforGrid(&comm.ModuleCallSource{}, session, req.GridId, -1*int32(req.Amount), true); code != pb.ErrorCode_Success {
return return
} }
if int(req.Select) >= len(prop.Prize) { var sale *cfg.Game_atn
for _, v := range prop {
if v.Key == req.Select {
sale = v.Prize
}
}
if sale == nil {
this.module.Errorf("no found target sale:%v", req.Select)
code = pb.ErrorCode_ReqParameterError code = pb.ErrorCode_ReqParameterError
return return
} }
sale := prop.Prize[req.Select]
sale.N = sale.N * int32(req.Amount) sale.N = sale.N * int32(req.Amount)
if code = this.module.DispenseRes(session, []*cfg.Game_atn{sale}, true); code != pb.ErrorCode_Success { if code = this.module.DispenseRes(session, []*cfg.Game_atn{sale}, true); code != pb.ErrorCode_Success {
return return
@ -75,9 +81,7 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
return return
} }
r := rand.New(rand.NewSource(time.Now().Unix())) sale := RandomProps(prop).Prize
index := r.Perm(len(prop.Prize))[0]
sale := prop.Prize[index]
sale.N = sale.N * int32(req.Amount) sale.N = sale.N * int32(req.Amount)
if code = this.module.AddItemforGrid(&comm.ModuleCallSource{}, session, req.GridId, -1*int32(req.Amount), true); code != pb.ErrorCode_Success { if code = this.module.AddItemforGrid(&comm.ModuleCallSource{}, session, req.GridId, -1*int32(req.Amount), true); code != pb.ErrorCode_Success {
return return
@ -90,10 +94,10 @@ func (this *apiComp) Useitem(session comm.IUserSession, req *pb.ItemsUseItemReq)
code = pb.ErrorCode_ConfigNoFound code = pb.ErrorCode_ConfigNoFound
return return
} }
sale := make([]*cfg.Game_atn, len(prop.Prize)) sale := make([]*cfg.Game_atn, len(prop))
for i, v := range prop.Prize { for i, v := range prop {
sale[i] = v sale[i] = v.Prize
sale[i].N = v.N * int32(req.Amount) sale[i].N = v.Prize.N * int32(req.Amount)
} }
if code = this.module.AddItemforGrid(&comm.ModuleCallSource{}, session, req.GridId, -1*int32(req.Amount), true); code != pb.ErrorCode_Success { if code = this.module.AddItemforGrid(&comm.ModuleCallSource{}, session, req.GridId, -1*int32(req.Amount), true); code != pb.ErrorCode_Success {
return return

View File

@ -10,8 +10,9 @@ import (
) )
const ( const (
game_item = "game_item.json" game_item = "game_item.json"
game_propsgroup = "game_propsgroup.json" game_propsgroup = "game_propsgroup.json"
game_propsgrouplist = "game_propsgrouplist.json"
) )
///背包配置管理组件 ///背包配置管理组件
@ -26,6 +27,7 @@ func (this *ConfigureComp) Init(service core.IService, module core.IModule, comp
this.module = module.(*Items) this.module = module.(*Items)
err = this.LoadConfigure(game_item, cfg.NewGame_item) err = this.LoadConfigure(game_item, cfg.NewGame_item)
err = this.LoadConfigure(game_propsgroup, cfg.NewGame_propsgroup) err = this.LoadConfigure(game_propsgroup, cfg.NewGame_propsgroup)
err = this.LoadConfigure(game_propsgrouplist, cfg.NewGame_propsgrouplist)
return return
} }
@ -91,20 +93,35 @@ func (this *ConfigureComp) GetPackItemByType(itmes []*pb.DB_UserItemData, bagtyp
} }
//获取道具礼包组 //获取道具礼包组
func (this *ConfigureComp) GetPropsgroupConfigure(id int32) (item *cfg.Game_propsgroupData, err error) { func (this *ConfigureComp) GetPropsgroupConfigure(gid int32) (result []*cfg.Game_propsgroupData, err error) {
var ( var (
v interface{} v interface{}
ok bool group *cfg.Game_propsgrouplistData
) )
if v, err = this.GetConfigure(game_propsgrouplist); err != nil {
this.module.Errorf("err:%v", err)
return
}
result = make([]*cfg.Game_propsgroupData, 0)
if group, ok := v.(*cfg.Game_propsgrouplist).GetDataMap()[gid]; !ok {
err = fmt.Errorf("no found Game_propsgrouplist group:%d", group)
return
}
if v, err = this.GetConfigure(game_propsgroup); err != nil { if v, err = this.GetConfigure(game_propsgroup); err != nil {
this.module.Errorf("err:%v", err) this.module.Errorf("err:%v", err)
return return
} else { }
if item, ok = v.(*cfg.Game_propsgroup).GetDataMap()[id]; !ok { for _, id := range group.Id {
err = fmt.Errorf("no found item:%d configure", id) if temp, ok := v.(*cfg.Game_propsgroup).GetDataMap()[id]; !ok {
this.module.Errorf("err:%v", err) err = fmt.Errorf("no found Game_propsgroup id:%d", v)
return return
} else {
result = append(result, temp)
} }
} }
if len(result) == 0 {
err = fmt.Errorf("no found itemConfigure group:%d", group)
this.module.Errorf("err:%v", err)
}
return return
} }

View File

@ -1,8 +1,11 @@
package items package items
import ( import (
"crypto/rand"
"errors" "errors"
"go_dreamfactory/lego/core" "go_dreamfactory/lego/core"
cfg "go_dreamfactory/sys/configure/structs"
"math/big"
) )
const ( //Redis const ( //Redis
@ -22,3 +25,28 @@ var (
PackGridNumUpper = errors.New("grid amount upper!") //背包格子达到上限 PackGridNumUpper = errors.New("grid amount upper!") //背包格子达到上限
GirdAmountUpper = errors.New("grid amount upper!") //格子容量达到上限 GirdAmountUpper = errors.New("grid amount upper!") //格子容量达到上限
) )
//随机权重宝箱
func RandomProps(group []*cfg.Game_propsgroupData) (prop *cfg.Game_propsgroupData) {
if group == nil || len(group) == 0 {
return
}
var (
totle int64
curr int64
temp int64
)
for _, v := range group {
totle += int64(v.P)
}
n, _ := rand.Int(rand.Reader, big.NewInt(totle))
curr = n.Int64()
for _, v := range group {
temp += int64(v.P)
if curr <= temp {
prop = v
return
}
}
return
}

View File

@ -69,6 +69,8 @@ type Tables struct {
propsgroup *Game_propsgroup propsgroup *Game_propsgroup
facemod *Game_facemod facemod *Game_facemod
msgdistrib *Game_msgdistrib msgdistrib *Game_msgdistrib
language *Game_language
propsgrouplist *Game_propsgrouplist
} }
func NewTables(loader JsonLoader) (*Tables, error) { func NewTables(loader JsonLoader) (*Tables, error) {
@ -418,5 +420,17 @@ func NewTables(loader JsonLoader) (*Tables, error) {
if tables.msgdistrib, err = NewGame_msgdistrib(buf) ; err != nil { if tables.msgdistrib, err = NewGame_msgdistrib(buf) ; err != nil {
return nil, err return nil, err
} }
if buf, err = loader("game_language") ; err != nil {
return nil, err
}
if tables.language, err = NewGame_language(buf) ; err != nil {
return nil, err
}
if buf, err = loader("game_propsgrouplist") ; err != nil {
return nil, err
}
if tables.propsgrouplist, err = NewGame_propsgrouplist(buf) ; err != nil {
return nil, err
}
return tables, nil return tables, nil
} }

View File

@ -17,11 +17,14 @@ type Game_equipData struct {
Suitintr string Suitintr string
Pos int32 Pos int32
Star int32 Star int32
Color int32
Leadlibrary int32 Leadlibrary int32
Addattrnum []int32 Addattrnum []int32
Addattrnump []int32 Addattrnump []int32
Addlibrary int32 Addlibrary int32
Ico string Ico string
UseSkip int32
Sale []*Game_atn
} }
func (Game_equipData) GetTypeId() int { func (Game_equipData) GetTypeId() int {
@ -36,6 +39,7 @@ func NewGame_equipData(_buf map[string]interface{}) (_v *Game_equipData, err err
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["suitintr"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Suitintr error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Suitintr, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["suitintr"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Suitintr error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Suitintr, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pos"].(float64); !_ok_ { err = errors.New("pos error"); return }; _v.Pos = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["pos"].(float64); !_ok_ { err = errors.New("pos error"); return }; _v.Pos = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["color"].(float64); !_ok_ { err = errors.New("color error"); return }; _v.Color = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["leadlibrary"].(float64); !_ok_ { err = errors.New("leadlibrary error"); return }; _v.Leadlibrary = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["leadlibrary"].(float64); !_ok_ { err = errors.New("leadlibrary error"); return }; _v.Leadlibrary = int32(_tempNum_) }
{ {
var _arr_ []interface{} var _arr_ []interface{}
@ -67,5 +71,20 @@ func NewGame_equipData(_buf map[string]interface{}) (_v *Game_equipData, err err
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["addlibrary"].(float64); !_ok_ { err = errors.New("addlibrary error"); return }; _v.Addlibrary = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["addlibrary"].(float64); !_ok_ { err = errors.New("addlibrary error"); return }; _v.Addlibrary = int32(_tempNum_) }
{ var _ok_ bool; if _v.Ico, _ok_ = _buf["ico"].(string); !_ok_ { err = errors.New("ico error"); return } } { var _ok_ bool; if _v.Ico, _ok_ = _buf["ico"].(string); !_ok_ { err = errors.New("ico error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["use_skip"].(float64); !_ok_ { err = errors.New("use_skip error"); return }; _v.UseSkip = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["sale"].([]interface{}); !_ok_ { err = errors.New("sale error"); return }
_v.Sale = make([]*Game_atn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Game_atn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = NewGame_atn(_x_); err != nil { return } }
_v.Sale = append(_v.Sale, _list_v_)
}
}
return return
} }

View File

@ -13,6 +13,7 @@ import "errors"
type Game_extserversData struct { type Game_extserversData struct {
Name string Name string
Ips string Ips string
Debug bool
} }
func (Game_extserversData) GetTypeId() int { func (Game_extserversData) GetTypeId() int {
@ -21,7 +22,8 @@ func (Game_extserversData) GetTypeId() int {
func NewGame_extserversData(_buf map[string]interface{}) (_v *Game_extserversData, err error) { func NewGame_extserversData(_buf map[string]interface{}) (_v *Game_extserversData, err error) {
_v = &Game_extserversData{} _v = &Game_extserversData{}
{ var _ok_ bool; if _v.Name, _ok_ = _buf["name"].(string); !_ok_ { err = errors.New("name error"); return } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; if _v.Ips, _ok_ = _buf["ips"].(string); !_ok_ { err = errors.New("ips error"); return } } { var _ok_ bool; if _v.Ips, _ok_ = _buf["ips"].(string); !_ok_ { err = errors.New("ips error"); return } }
{ var _ok_ bool; if _v.Debug, _ok_ = _buf["debug"].(bool); !_ok_ { err = errors.New("debug error"); return } }
return return
} }

View File

@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type Game_language struct {
_dataMap map[string]*Game_languageData
_dataList []*Game_languageData
}
func NewGame_language(_buf []map[string]interface{}) (*Game_language, error) {
_dataList := make([]*Game_languageData, 0, len(_buf))
dataMap := make(map[string]*Game_languageData)
for _, _ele_ := range _buf {
if _v, err2 := NewGame_languageData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Keycode] = _v
}
}
return &Game_language{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *Game_language) GetDataMap() map[string]*Game_languageData {
return table._dataMap
}
func (table *Game_language) GetDataList() []*Game_languageData {
return table._dataList
}
func (table *Game_language) Get(key string) *Game_languageData {
return table._dataMap[key]
}

View File

@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type Game_languageData struct {
Keycode string
}
func (Game_languageData) GetTypeId() int {
return -1436621922
}
func NewGame_languageData(_buf map[string]interface{}) (_v *Game_languageData, err error) {
_v = &Game_languageData{}
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["keycode"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Keycode error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Keycode, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
return
}

View File

@ -34,7 +34,7 @@ func (Game_newSkillData) GetTypeId() int {
func NewGame_newSkillData(_buf map[string]interface{}) (_v *Game_newSkillData, err error) { func NewGame_newSkillData(_buf map[string]interface{}) (_v *Game_newSkillData, err error) {
_v = &Game_newSkillData{} _v = &Game_newSkillData{}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Id"].(float64); !_ok_ { err = errors.New("Id error"); return }; _v.Id = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Id"].(float64); !_ok_ { err = errors.New("Id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; if _v.Name, _ok_ = _buf["Name"].(string); !_ok_ { err = errors.New("Name error"); return } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["Name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; if _v.Ico, _ok_ = _buf["ico"].(string); !_ok_ { err = errors.New("ico error"); return } } { var _ok_ bool; if _v.Ico, _ok_ = _buf["ico"].(string); !_ok_ { err = errors.New("ico error"); return } }
{ var _ok_ bool; if _v.Act, _ok_ = _buf["act"].(string); !_ok_ { err = errors.New("act error"); return } } { var _ok_ bool; if _v.Act, _ok_ = _buf["act"].(string); !_ok_ { err = errors.New("act error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Type"].(float64); !_ok_ { err = errors.New("Type error"); return }; _v.Type = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Type"].(float64); !_ok_ { err = errors.New("Type error"); return }; _v.Type = int32(_tempNum_) }

View File

@ -21,7 +21,7 @@ func NewGame_propsgroup(_buf []map[string]interface{}) (*Game_propsgroup, error)
return nil, err2 return nil, err2
} else { } else {
_dataList = append(_dataList, _v) _dataList = append(_dataList, _v)
dataMap[_v.Group] = _v dataMap[_v.Key] = _v
} }
} }
return &Game_propsgroup{_dataList:_dataList, _dataMap:dataMap}, nil return &Game_propsgroup{_dataList:_dataList, _dataMap:dataMap}, nil

View File

@ -11,10 +11,10 @@ package cfg
import "errors" import "errors"
type Game_propsgroupData struct { type Game_propsgroupData struct {
Group int32 Key int32
Star int32 Star int32
Prize []*Game_atn Prize *Game_atn
P []int32 P int32
} }
func (Game_propsgroupData) GetTypeId() int { func (Game_propsgroupData) GetTypeId() int {
@ -23,35 +23,9 @@ func (Game_propsgroupData) GetTypeId() int {
func NewGame_propsgroupData(_buf map[string]interface{}) (_v *Game_propsgroupData, err error) { func NewGame_propsgroupData(_buf map[string]interface{}) (_v *Game_propsgroupData, err error) {
_v = &Game_propsgroupData{} _v = &Game_propsgroupData{}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["group"].(float64); !_ok_ { err = errors.New("group error"); return }; _v.Group = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["key"].(float64); !_ok_ { err = errors.New("key error"); return }; _v.Key = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["star"].(float64); !_ok_ { err = errors.New("star error"); return }; _v.Star = int32(_tempNum_) }
{ { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["prize"].(map[string]interface{}); !_ok_ { err = errors.New("prize error"); return }; if _v.Prize, err = NewGame_atn(_x_); err != nil { return } }
var _arr_ []interface{} { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["p"].(float64); !_ok_ { err = errors.New("p error"); return }; _v.P = int32(_tempNum_) }
var _ok_ bool
if _arr_, _ok_ = _buf["prize"].([]interface{}); !_ok_ { err = errors.New("prize error"); return }
_v.Prize = make([]*Game_atn, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ *Game_atn
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _e_.(map[string]interface{}); !_ok_ { err = errors.New("_list_v_ error"); return }; if _list_v_, err = NewGame_atn(_x_); err != nil { return } }
_v.Prize = append(_v.Prize, _list_v_)
}
}
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["p"].([]interface{}); !_ok_ { err = errors.New("p error"); return }
_v.P = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.P = append(_v.P, _list_v_)
}
}
return return
} }

View File

@ -0,0 +1,42 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
type Game_propsgrouplist struct {
_dataMap map[int32]*Game_propsgrouplistData
_dataList []*Game_propsgrouplistData
}
func NewGame_propsgrouplist(_buf []map[string]interface{}) (*Game_propsgrouplist, error) {
_dataList := make([]*Game_propsgrouplistData, 0, len(_buf))
dataMap := make(map[int32]*Game_propsgrouplistData)
for _, _ele_ := range _buf {
if _v, err2 := NewGame_propsgrouplistData(_ele_); err2 != nil {
return nil, err2
} else {
_dataList = append(_dataList, _v)
dataMap[_v.Group] = _v
}
}
return &Game_propsgrouplist{_dataList:_dataList, _dataMap:dataMap}, nil
}
func (table *Game_propsgrouplist) GetDataMap() map[int32]*Game_propsgrouplistData {
return table._dataMap
}
func (table *Game_propsgrouplist) GetDataList() []*Game_propsgrouplistData {
return table._dataList
}
func (table *Game_propsgrouplist) Get(key int32) *Game_propsgrouplistData {
return table._dataMap[key]
}

View File

@ -0,0 +1,40 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
package cfg
import "errors"
type Game_propsgrouplistData struct {
Group int32
Id []int32
}
func (Game_propsgrouplistData) GetTypeId() int {
return -835013389
}
func NewGame_propsgrouplistData(_buf map[string]interface{}) (_v *Game_propsgrouplistData, err error) {
_v = &Game_propsgrouplistData{}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["group"].(float64); !_ok_ { err = errors.New("group error"); return }; _v.Group = int32(_tempNum_) }
{
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["id"].([]interface{}); !_ok_ { err = errors.New("id error"); return }
_v.Id = make([]int32, 0, len(_arr_))
for _, _e_ := range _arr_ {
var _list_v_ int32
{ var _ok_ bool; var _x_ float64; if _x_, _ok_ = _e_.(float64); !_ok_ { err = errors.New("_list_v_ error"); return }; _list_v_ = int32(_x_) }
_v.Id = append(_v.Id, _list_v_)
}
}
return
}

View File

@ -34,7 +34,7 @@ func (Game_skillAtkData) GetTypeId() int {
func NewGame_skillAtkData(_buf map[string]interface{}) (_v *Game_skillAtkData, err error) { func NewGame_skillAtkData(_buf map[string]interface{}) (_v *Game_skillAtkData, err error) {
_v = &Game_skillAtkData{} _v = &Game_skillAtkData{}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Id"].(float64); !_ok_ { err = errors.New("Id error"); return }; _v.Id = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Id"].(float64); !_ok_ { err = errors.New("Id error"); return }; _v.Id = int32(_tempNum_) }
{ var _ok_ bool; if _v.Name, _ok_ = _buf["Name"].(string); !_ok_ { err = errors.New("Name error"); return } } {var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["Name"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Name error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Name, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
{ var _ok_ bool; if _v.Ico, _ok_ = _buf["ico"].(string); !_ok_ { err = errors.New("ico error"); return } } { var _ok_ bool; if _v.Ico, _ok_ = _buf["ico"].(string); !_ok_ { err = errors.New("ico error"); return } }
{ var _ok_ bool; if _v.Act, _ok_ = _buf["act"].(string); !_ok_ { err = errors.New("act error"); return } } { var _ok_ bool; if _v.Act, _ok_ = _buf["act"].(string); !_ok_ { err = errors.New("act error"); return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Type"].(float64); !_ok_ { err = errors.New("Type error"); return }; _v.Type = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Type"].(float64); !_ok_ { err = errors.New("Type error"); return }; _v.Type = int32(_tempNum_) }