Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into liwei
This commit is contained in:
commit
a317fca98c
File diff suppressed because it is too large
Load Diff
386
bin/json/game_gourmet.json
Normal file
386
bin/json/game_gourmet.json
Normal file
@ -0,0 +1,386 @@
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"type": 1001,
|
||||
"level": 1,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "马马虎虎"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1001",
|
||||
"text": "魔法料理"
|
||||
},
|
||||
"picture": "ty_wz_k1",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"type": 1001,
|
||||
"level": 2,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "匠心独运"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1001",
|
||||
"text": "魔法料理"
|
||||
},
|
||||
"picture": "ty_wz_k1",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"type": 1001,
|
||||
"level": 3,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "孰能生巧"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1001",
|
||||
"text": "魔法料理"
|
||||
},
|
||||
"picture": "ty_wz_k1",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"type": 1001,
|
||||
"level": 4,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "可圈可点"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1001",
|
||||
"text": "魔法料理"
|
||||
},
|
||||
"picture": "ty_wz_k1",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"type": 1002,
|
||||
"level": 1,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "马马虎虎"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1002",
|
||||
"text": "功夫料理"
|
||||
},
|
||||
"picture": "ty_wz_k2",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"type": 1002,
|
||||
"level": 2,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "匠心独运"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1002",
|
||||
"text": "功夫料理"
|
||||
},
|
||||
"picture": "ty_wz_k2",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"type": 1002,
|
||||
"level": 3,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "孰能生巧"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1002",
|
||||
"text": "功夫料理"
|
||||
},
|
||||
"picture": "ty_wz_k2",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"type": 1002,
|
||||
"level": 4,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "可圈可点"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1002",
|
||||
"text": "功夫料理"
|
||||
},
|
||||
"picture": "ty_wz_k2",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"type": 1003,
|
||||
"level": 1,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "马马虎虎"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1003",
|
||||
"text": "科技料理"
|
||||
},
|
||||
"picture": "ty_wz_k3",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"type": 1003,
|
||||
"level": 2,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "匠心独运"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1003",
|
||||
"text": "科技料理"
|
||||
},
|
||||
"picture": "ty_wz_k3",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"type": 1003,
|
||||
"level": 3,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "孰能生巧"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1003",
|
||||
"text": "科技料理"
|
||||
},
|
||||
"picture": "ty_wz_k3",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"type": 1003,
|
||||
"level": 4,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "可圈可点"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1003",
|
||||
"text": "科技料理"
|
||||
},
|
||||
"picture": "ty_wz_k3",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"type": 1004,
|
||||
"level": 1,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "马马虎虎"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1004",
|
||||
"text": "月能料理"
|
||||
},
|
||||
"picture": "ty_wz_k4",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"type": 1004,
|
||||
"level": 2,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "匠心独运"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1004",
|
||||
"text": "月能料理"
|
||||
},
|
||||
"picture": "ty_wz_k4",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"type": 1004,
|
||||
"level": 3,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "孰能生巧"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1004",
|
||||
"text": "月能料理"
|
||||
},
|
||||
"picture": "ty_wz_k4",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"type": 1004,
|
||||
"level": 4,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "可圈可点"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_1004",
|
||||
"text": "月能料理"
|
||||
},
|
||||
"picture": "ty_wz_k4",
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"using": 1,
|
||||
"propsgroup": 10001
|
||||
}
|
||||
]
|
738
bin/json/game_gourmetskill.json
Normal file
738
bin/json/game_gourmetskill.json
Normal file
@ -0,0 +1,738 @@
|
||||
[
|
||||
{
|
||||
"id": 10011,
|
||||
"type": 1001,
|
||||
"initial": 1,
|
||||
"level": 1,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "马马虎虎"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "魔法厨艺"
|
||||
},
|
||||
"needtime": 60,
|
||||
"display": 1000,
|
||||
"probability": 1000,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "无"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10012,
|
||||
"type": 1001,
|
||||
"initial": 0,
|
||||
"level": 2,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "匠心独运"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "魔法厨艺"
|
||||
},
|
||||
"needtime": 120,
|
||||
"display": 1000,
|
||||
"probability": 500,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "极低"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10013,
|
||||
"type": 1001,
|
||||
"initial": 0,
|
||||
"level": 3,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "孰能生巧"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "魔法厨艺"
|
||||
},
|
||||
"needtime": 240,
|
||||
"display": 1000,
|
||||
"probability": 20,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "中等"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10014,
|
||||
"type": 1001,
|
||||
"initial": 0,
|
||||
"level": 4,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "可圈可点"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "魔法厨艺"
|
||||
},
|
||||
"needtime": 480,
|
||||
"display": 1000,
|
||||
"probability": 10,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "较高"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10021,
|
||||
"type": 1002,
|
||||
"initial": 1,
|
||||
"level": 1,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "马马虎虎"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "功夫厨艺"
|
||||
},
|
||||
"needtime": 60,
|
||||
"display": 1000,
|
||||
"probability": 1000,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "无"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10022,
|
||||
"type": 1002,
|
||||
"initial": 0,
|
||||
"level": 2,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "匠心独运"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "功夫厨艺"
|
||||
},
|
||||
"needtime": 120,
|
||||
"display": 1000,
|
||||
"probability": 500,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "极低"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10023,
|
||||
"type": 1002,
|
||||
"initial": 0,
|
||||
"level": 3,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "孰能生巧"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "功夫厨艺"
|
||||
},
|
||||
"needtime": 240,
|
||||
"display": 1000,
|
||||
"probability": 20,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "中等"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10024,
|
||||
"type": 1002,
|
||||
"initial": 0,
|
||||
"level": 4,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "可圈可点"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "功夫厨艺"
|
||||
},
|
||||
"needtime": 480,
|
||||
"display": 1000,
|
||||
"probability": 10,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "较高"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10031,
|
||||
"type": 1003,
|
||||
"initial": 1,
|
||||
"level": 1,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "马马虎虎"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "科技厨艺"
|
||||
},
|
||||
"needtime": 60,
|
||||
"display": 1000,
|
||||
"probability": 1000,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "无"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10032,
|
||||
"type": 1003,
|
||||
"initial": 0,
|
||||
"level": 2,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "匠心独运"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "科技厨艺"
|
||||
},
|
||||
"needtime": 120,
|
||||
"display": 1000,
|
||||
"probability": 500,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "极低"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10033,
|
||||
"type": 1003,
|
||||
"initial": 0,
|
||||
"level": 3,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "孰能生巧"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "科技厨艺"
|
||||
},
|
||||
"needtime": 240,
|
||||
"display": 1000,
|
||||
"probability": 20,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "中等"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10034,
|
||||
"type": 1003,
|
||||
"initial": 0,
|
||||
"level": 4,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "可圈可点"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "科技厨艺"
|
||||
},
|
||||
"needtime": 480,
|
||||
"display": 1000,
|
||||
"probability": 10,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "较高"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10041,
|
||||
"type": 1004,
|
||||
"initial": 1,
|
||||
"level": 1,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "马马虎虎"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "月能厨艺"
|
||||
},
|
||||
"needtime": 60,
|
||||
"display": 1000,
|
||||
"probability": 1000,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "无"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10042,
|
||||
"type": 1004,
|
||||
"initial": 0,
|
||||
"level": 2,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "匠心独运"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "月能厨艺"
|
||||
},
|
||||
"needtime": 120,
|
||||
"display": 1000,
|
||||
"probability": 500,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "极低"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10043,
|
||||
"type": 1004,
|
||||
"initial": 0,
|
||||
"level": 3,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "孰能生巧"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "月能厨艺"
|
||||
},
|
||||
"needtime": 240,
|
||||
"display": 1000,
|
||||
"probability": 20,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "中等"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10044,
|
||||
"type": 1004,
|
||||
"initial": 0,
|
||||
"level": 4,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "可圈可点"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "月能厨艺"
|
||||
},
|
||||
"needtime": 480,
|
||||
"display": 1000,
|
||||
"probability": 10,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
],
|
||||
"affix": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "较高"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10051,
|
||||
"type": 1005,
|
||||
"initial": 0,
|
||||
"level": 1,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "马马虎虎"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "高效制作"
|
||||
},
|
||||
"needtime": -5,
|
||||
"display": 1000,
|
||||
"probability": 1000,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [],
|
||||
"affix": {
|
||||
"key": "gourmet_ln1",
|
||||
"text": "出餐时间-5分钟"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10052,
|
||||
"type": 1005,
|
||||
"initial": 0,
|
||||
"level": 2,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "匠心独运"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "高效制作"
|
||||
},
|
||||
"needtime": -10,
|
||||
"display": 1000,
|
||||
"probability": 500,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [],
|
||||
"affix": {
|
||||
"key": "gourmet_ln2",
|
||||
"text": "出餐时间-10分钟"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10053,
|
||||
"type": 1005,
|
||||
"initial": 0,
|
||||
"level": 3,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "孰能生巧"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "高效制作"
|
||||
},
|
||||
"needtime": -15,
|
||||
"display": 1000,
|
||||
"probability": 20,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [],
|
||||
"affix": {
|
||||
"key": "gourmet_ln3",
|
||||
"text": "出餐时间-15分钟"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10054,
|
||||
"type": 1005,
|
||||
"initial": 0,
|
||||
"level": 4,
|
||||
"levelname": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "可圈可点"
|
||||
},
|
||||
"colour": 0,
|
||||
"name": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "高效制作"
|
||||
},
|
||||
"needtime": -20,
|
||||
"display": 1000,
|
||||
"probability": 10,
|
||||
"icon": "ty_wz_k1",
|
||||
"item": [],
|
||||
"affix": {
|
||||
"key": "gourmet_ln4",
|
||||
"text": "出餐时间-20分钟"
|
||||
},
|
||||
"affix_colour": 0,
|
||||
"consume": [
|
||||
{
|
||||
"a": "item",
|
||||
"t": "10002",
|
||||
"n": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
File diff suppressed because it is too large
Load Diff
@ -47,6 +47,7 @@ const (
|
||||
ModuleGM core.M_Modules = "gm" //gm模块
|
||||
ModulePagoda core.M_Modules = "pagoda" //魔塔模块
|
||||
ModuleMartialhall core.M_Modules = "martialhall" //武馆模块
|
||||
ModuleGourmet core.M_Modules = "gourmet" //美食馆
|
||||
)
|
||||
|
||||
//数据表名定义处
|
||||
@ -93,6 +94,8 @@ const (
|
||||
TablePagoda = "pagoda"
|
||||
///武馆数据表
|
||||
TableMartialhall = "martialhall"
|
||||
// 美食馆
|
||||
TableGourmet = "gourmet"
|
||||
)
|
||||
|
||||
//RPC服务接口定义处
|
||||
|
@ -52,6 +52,8 @@ type (
|
||||
CleanData(uid string)
|
||||
// 获取指定星级等级的英雄
|
||||
GetSpecifiedHero(session IUserSession, heroConfId string, star, lv, amount int32) (code pb.ErrorCode)
|
||||
// 英雄加经验
|
||||
AddHeroExp(session IUserSession, heroObjID string, exp int32) (code pb.ErrorCode)
|
||||
}
|
||||
|
||||
//玩家
|
||||
|
32
modules/gourmet/api.go
Normal file
32
modules/gourmet/api.go
Normal file
@ -0,0 +1,32 @@
|
||||
package gourmet
|
||||
|
||||
import (
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
)
|
||||
|
||||
const (
|
||||
GourmetGetListResp = "getlist"
|
||||
PagodaChallengeResp = "challenge"
|
||||
PagodaGetRewardResp = "getreward"
|
||||
)
|
||||
|
||||
type apiComp struct {
|
||||
modules.MCompGate
|
||||
service core.IService
|
||||
module *Gourmet
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
func (this *apiComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.MCompGate.Init(service, module, comp, options)
|
||||
this.module = module.(*Gourmet)
|
||||
this.service = service
|
||||
return
|
||||
}
|
||||
|
||||
func (this *apiComp) Start() (err error) {
|
||||
err = this.MCompGate.Start()
|
||||
|
||||
return
|
||||
}
|
28
modules/gourmet/api_createorder.go
Normal file
28
modules/gourmet/api_createorder.go
Normal file
@ -0,0 +1,28 @@
|
||||
package gourmet
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) CreateOrderCheck(session comm.IUserSession, req *pb.GourmetCreateOrderReq) (code pb.ErrorCode) {
|
||||
if len(req.Order) == 0 {
|
||||
code = pb.ErrorCode_ReqParameterError
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
///美食城创建订单
|
||||
func (this *apiComp) CreateOrder(session comm.IUserSession, req *pb.GourmetCreateOrderReq) (code pb.ErrorCode, data proto.Message) {
|
||||
|
||||
code = this.CreateOrderCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
|
||||
return
|
||||
}
|
25
modules/gourmet/api_getReward.go
Normal file
25
modules/gourmet/api_getReward.go
Normal file
@ -0,0 +1,25 @@
|
||||
package gourmet
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) GetRewardCheck(session comm.IUserSession, req *pb.GourmetGetRewardReq) (code pb.ErrorCode) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
///美食城领取奖励
|
||||
func (this *apiComp) GetReward(session comm.IUserSession, req *pb.GourmetGetRewardReq) (code pb.ErrorCode, data proto.Message) {
|
||||
|
||||
code = this.GetRewardCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
|
||||
return
|
||||
}
|
31
modules/gourmet/api_getlist.go
Normal file
31
modules/gourmet/api_getlist.go
Normal file
@ -0,0 +1,31 @@
|
||||
package gourmet
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
//参数校验
|
||||
func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.GourmetGetListReq) (code pb.ErrorCode) {
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
///获取美食城基本信息
|
||||
func (this *apiComp) GetList(session comm.IUserSession, req *pb.GourmetGetListReq) (code pb.ErrorCode, data proto.Message) {
|
||||
|
||||
code = this.GetListCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
_gourmet, err := this.module.modelGourmet.getGourmetList(session.GetUserId())
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), GourmetGetListResp, &pb.GourmetGetListResp{Data: _gourmet})
|
||||
return
|
||||
}
|
93
modules/gourmet/comp_configure.go
Normal file
93
modules/gourmet/comp_configure.go
Normal file
@ -0,0 +1,93 @@
|
||||
package gourmet
|
||||
|
||||
import (
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/core/cbase"
|
||||
"go_dreamfactory/lego/sys/log"
|
||||
"go_dreamfactory/sys/configure"
|
||||
cfg "go_dreamfactory/sys/configure/structs"
|
||||
"sync"
|
||||
)
|
||||
|
||||
const (
|
||||
game_gourmet = "game_gourmet.json"
|
||||
game_gourmetskill = "game_gourmetskill.json"
|
||||
)
|
||||
|
||||
///配置管理基础组件
|
||||
type configureComp struct {
|
||||
cbase.ModuleCompBase
|
||||
hlock sync.RWMutex
|
||||
_gourmetMap map[int64]*cfg.GameGourmetData
|
||||
_gourmetSkillMap map[int64]*cfg.GameGourmetSkillData
|
||||
}
|
||||
|
||||
//组件初始化接口
|
||||
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleCompBase.Init(service, module, comp, options)
|
||||
|
||||
this._gourmetMap = make(map[int64]*cfg.GameGourmetData, 0)
|
||||
configure.RegisterConfigure(game_gourmet, cfg.NewGameGourmet, func() {
|
||||
if v, err := this.GetConfigure(game_gourmet); err == nil {
|
||||
if configure, ok := v.(*cfg.GameGourmet); ok {
|
||||
this.hlock.Lock()
|
||||
defer this.hlock.Unlock()
|
||||
for _, value := range configure.GetDataList() {
|
||||
this._gourmetMap[int64(value.Type<<16)+int64(value.Level)] = value
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
log.Errorf("get game_pagoda conf err:%v", err)
|
||||
return
|
||||
})
|
||||
this._gourmetSkillMap = make(map[int64]*cfg.GameGourmetSkillData, 0)
|
||||
configure.RegisterConfigure(game_gourmetskill, cfg.NewGameGourmetSkill, func() {
|
||||
if v, err := this.GetConfigure(game_gourmetskill); err == nil {
|
||||
if configure, ok := v.(*cfg.GameGourmetSkill); ok {
|
||||
this.hlock.Lock()
|
||||
defer this.hlock.Unlock()
|
||||
for _, value := range configure.GetDataList() {
|
||||
this._gourmetSkillMap[int64(value.Type<<16)+int64(value.Level)] = value
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
log.Errorf("get game_pagoda conf err:%v", err)
|
||||
return
|
||||
})
|
||||
|
||||
// _data := this.GetGourmetConfigData(1002, 4) // 测试配置文件读取
|
||||
// _dataskill := this.GetGourmetSkillConfigData(1001, 4)
|
||||
// fmt.Printf("%v,%v", _data, _dataskill)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取美食馆配置数据
|
||||
func (this *configureComp) GetGourmetConfigData(gourmetType int32, level int32) (data *cfg.GameGourmetData) {
|
||||
|
||||
return this._gourmetMap[int64(gourmetType<<16)+int64(level)]
|
||||
}
|
||||
|
||||
// 获取美食馆配置数据
|
||||
func (this *configureComp) GetGourmetSkillConfigData(gourmetType int32, level int32) (data *cfg.GameGourmetSkillData) {
|
||||
|
||||
return this._gourmetSkillMap[int64(gourmetType<<16)+int64(level)]
|
||||
}
|
||||
|
||||
//加载多个配置文件
|
||||
func (this *configureComp) LoadMultiConfigure(confs map[string]interface{}) (err error) {
|
||||
for k, v := range confs {
|
||||
err = configure.RegisterConfigure(k, v, nil)
|
||||
if err != nil {
|
||||
log.Errorf("配置文件:%s解析失败!", k)
|
||||
break
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//读取配置数据
|
||||
func (this *configureComp) GetConfigure(name string) (v interface{}, err error) {
|
||||
return configure.GetConfigure(name)
|
||||
}
|
39
modules/gourmet/model_gourmet.go
Normal file
39
modules/gourmet/model_gourmet.go
Normal file
@ -0,0 +1,39 @@
|
||||
package gourmet
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/lego/sys/redis"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
type modelGourmet struct {
|
||||
modules.MCompModel
|
||||
module *Gourmet
|
||||
}
|
||||
|
||||
func (this *modelGourmet) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
|
||||
this.TableName = string(comm.TableGourmet)
|
||||
err = this.MCompModel.Init(service, module, comp, options)
|
||||
this.module = module.(*Gourmet)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *modelGourmet) getGourmetList(uid string) (result *pb.DBGourmet, err error) {
|
||||
result = &pb.DBGourmet{}
|
||||
if err = this.Get(uid, result); err != nil {
|
||||
if redis.RedisNil != err { // 没有数据直接创建新的数据
|
||||
result.Uid = uid
|
||||
if err = this.Add(uid, result); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
err = nil
|
||||
return
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
err = nil
|
||||
return result, err
|
||||
}
|
42
modules/gourmet/module.go
Normal file
42
modules/gourmet/module.go
Normal file
@ -0,0 +1,42 @@
|
||||
package gourmet
|
||||
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/lego/core"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
)
|
||||
|
||||
type Gourmet struct {
|
||||
modules.ModuleBase
|
||||
modelGourmet *modelGourmet
|
||||
api *apiComp
|
||||
configure *configureComp
|
||||
}
|
||||
|
||||
func NewModule() core.IModule {
|
||||
return &Gourmet{}
|
||||
}
|
||||
|
||||
func (this *Gourmet) GetType() core.M_Modules {
|
||||
return comm.ModuleGourmet
|
||||
}
|
||||
|
||||
func (this *Gourmet) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
|
||||
err = this.ModuleBase.Init(service, module, options)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (this *Gourmet) OnInstallComp() {
|
||||
this.ModuleBase.OnInstallComp()
|
||||
this.api = this.RegisterComp(new(apiComp)).(*apiComp)
|
||||
this.modelGourmet = this.RegisterComp(new(modelGourmet)).(*modelGourmet)
|
||||
this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
|
||||
}
|
||||
|
||||
// 接口信息
|
||||
func (this *Gourmet) ModifyGourmetData(uid string, objId string, data map[string]interface{}) (code pb.ErrorCode) {
|
||||
|
||||
return
|
||||
}
|
@ -18,19 +18,19 @@ func (this *apiComp) DrawCardCheck(session comm.IUserSession, req *pb.HeroDrawCa
|
||||
//抽卡
|
||||
func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq) (code pb.ErrorCode, data proto.Message) {
|
||||
var (
|
||||
szCards []string // 最终抽到的卡牌
|
||||
drawCount int32 // 抽卡次数
|
||||
szStar []int32 //星级
|
||||
costRes []*cfg.Gameatn
|
||||
star4Max int32 // 10连抽最大4星数量
|
||||
star5Max int32 // 10连抽最大5星数量
|
||||
cfgDraw *cfg.GameglobalData
|
||||
costAtn *cfg.Gameatn
|
||||
heroRecord *pb.DBHeroRecord
|
||||
pool string
|
||||
//heroRecord *pb.DBHeroRecord // 英雄扩展属性
|
||||
szCards []string // 最终抽到的卡牌
|
||||
drawCount int32 // 抽卡次数
|
||||
szStar []int32 //星级
|
||||
costRes []*cfg.Gameatn
|
||||
star4Max int32 // 10连抽最大4星数量
|
||||
star5Max int32 // 10连抽最大5星数量
|
||||
cfgDraw *cfg.GameglobalData
|
||||
costAtn *cfg.Gameatn
|
||||
heroRecord *pb.DBHeroRecord
|
||||
pool string
|
||||
_mapAddHero map[string]int32
|
||||
)
|
||||
req.DrawCount = 10 // test
|
||||
_mapAddHero = make(map[string]int32, 0)
|
||||
cfgDraw = this.module.configure.GetGlobalConf() // 读取抽卡配置文件
|
||||
if cfgDraw == nil {
|
||||
return
|
||||
@ -184,10 +184,10 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
if err := this.module.modelHero.createMultiHero(session.GetUserId(), szCards...); err != nil {
|
||||
code = pb.ErrorCode_HeroCreate
|
||||
return
|
||||
for _, heroId := range szCards {
|
||||
_mapAddHero[heroId]++
|
||||
}
|
||||
code = this.module.CreateRepeatHeros(session, _mapAddHero, true)
|
||||
|
||||
rsp.Heroes = szCards
|
||||
session.SendMsg(string(this.module.GetType()), DrawCard, rsp)
|
||||
|
@ -224,3 +224,25 @@ func (this *Hero) CreateRepeatHeros(session comm.IUserSession, heros map[string]
|
||||
|
||||
return
|
||||
}
|
||||
func (this *Hero) AddHeroExp(session comm.IUserSession, heroObjID string, exp int32) (code pb.ErrorCode) {
|
||||
var (
|
||||
_hero *pb.DBHero
|
||||
newhero *pb.DBHero
|
||||
_changeHero []*pb.DBHero // 变化的英雄
|
||||
)
|
||||
_hero, code = this.GetHeroByObjID(session.GetUserId(), heroObjID)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
newhero, code = this.modelHero.AddCardExp(session.GetUserId(), _hero, exp)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return
|
||||
}
|
||||
_changeHero = append(_changeHero, _hero) // 升级后的英雄 hero id 不变
|
||||
if newhero != nil {
|
||||
_changeHero = append(_changeHero, newhero) // 原来的英雄 只是数量变化了
|
||||
}
|
||||
_changeHero = append(_changeHero, _hero)
|
||||
session.SendMsg(string(this.GetType()), "change", &pb.HeroChangePush{List: _changeHero})
|
||||
return
|
||||
}
|
||||
|
@ -33,14 +33,14 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChalleng
|
||||
code = pb.ErrorCode_PagodaNotFound
|
||||
return
|
||||
}
|
||||
if cfg.PreLevel != pagoda.PagodaId {
|
||||
if cfg.LayerNum != pagoda.PagodaId {
|
||||
code = pb.ErrorCode_PagodaLevlErr // 挑战关卡数据不匹配
|
||||
return
|
||||
}
|
||||
|
||||
//// todo 战斗相关
|
||||
|
||||
pagoda.PagodaId = cfg.LayerNum // 更新层数
|
||||
pagoda.PagodaId = cfg.NextLevel // 更新层数
|
||||
|
||||
// 通关奖励
|
||||
code = this.module.DispenseRes(session, cfg.Reward, true)
|
||||
@ -48,8 +48,8 @@ func (this *apiComp) Challenge(session comm.IUserSession, req *pb.PagodaChalleng
|
||||
return
|
||||
}
|
||||
mapData := make(map[string]interface{}, 0)
|
||||
mapData["pagodaId"] = cfg.LayerNum
|
||||
code = this.module.ModifyPagodaData(session.GetUserId(), pagoda.Id, mapData)
|
||||
mapData["pagodaId"] = cfg.NextLevel
|
||||
code = this.module.ModifyPagodaData(session.GetUserId(), mapData)
|
||||
session.SendMsg(string(this.module.GetType()), PagodaChallengeResp, &pb.PagodaChallengeResp{Data: pagoda})
|
||||
return
|
||||
}
|
||||
|
@ -22,6 +22,35 @@ func (this *apiComp) GetReward(session comm.IUserSession, req *pb.PagodaGetRewar
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
// 获取 奖励信息
|
||||
list, err := this.module.modelPagoda.getPagodaList(session.GetUserId())
|
||||
if err != nil || list == nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
return
|
||||
}
|
||||
_cfg := this.module.configure.GetPagodaRewardconfig(req.Id)
|
||||
if _cfg == nil {
|
||||
code = pb.ErrorCode_ConfigNoFound
|
||||
return
|
||||
}
|
||||
// 校验是否能领取
|
||||
if _cfg.LayerNum >= list.PagodaId {
|
||||
code = pb.ErrorCode_PagodaConditionErr
|
||||
return
|
||||
}
|
||||
|
||||
if _, ok := list.Reward[req.GetId()]; ok { // 校验是否重复领取
|
||||
code = pb.ErrorCode_PagodaGetRewardErr
|
||||
return
|
||||
}
|
||||
if list.Reward == nil {
|
||||
list.Reward = make(map[int32]bool, 0)
|
||||
}
|
||||
|
||||
list.Reward[req.Id] = true
|
||||
mapData := make(map[string]interface{}, 0)
|
||||
mapData["reward"] = list.Reward
|
||||
code = this.module.ModifyPagodaData(session.GetUserId(), mapData)
|
||||
session.SendMsg(string(this.module.GetType()), PagodaGetRewardResp, &pb.PagodaGetRewardResp{Data: list})
|
||||
return
|
||||
}
|
||||
|
@ -16,28 +16,27 @@ func (this *apiComp) GetListCheck(session comm.IUserSession, req *pb.PagodaGetLi
|
||||
|
||||
///获取主线关卡信息
|
||||
func (this *apiComp) GetList(session comm.IUserSession, req *pb.PagodaGetListReq) (code pb.ErrorCode, data proto.Message) {
|
||||
_data := &pb.DBPagoda{}
|
||||
|
||||
code = this.GetListCheck(session, req)
|
||||
if code != pb.ErrorCode_Success {
|
||||
return // 参数校验失败直接返回
|
||||
}
|
||||
|
||||
list, err := this.module.modelPagoda.getPagodaList(session.GetUserId())
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
list, _ := this.module.modelPagoda.getPagodaList(session.GetUserId())
|
||||
|
||||
if list == nil { // redis没有数据
|
||||
result := &pb.DBPagoda{}
|
||||
result.Id = primitive.NewObjectID().Hex()
|
||||
|
||||
//_mData := make(map[string]interface{}, 0)
|
||||
result.Uid = session.GetUserId()
|
||||
result.PagodaId = 1 // 初始数据1层
|
||||
//_mData[result.Id] = result
|
||||
this.module.modelPagoda.addNewPagoda(session.GetUserId(), result)
|
||||
session.SendMsg(string(this.module.GetType()), PagodaGetListResp, &pb.PagodaGetListResp{Data: result})
|
||||
return
|
||||
}
|
||||
if list == nil { // redis没有数据
|
||||
|
||||
_data.Id = primitive.NewObjectID().Hex()
|
||||
|
||||
_mData := make(map[string]interface{}, 0)
|
||||
_data.Uid = session.GetUserId()
|
||||
_mData[_data.Id] = _data
|
||||
this.module.modelPagoda.addNewPagoda(session.GetUserId(), _mData)
|
||||
|
||||
}
|
||||
|
||||
session.SendMsg(string(this.module.GetType()), PagodaGetListResp, &pb.PagodaGetListResp{Data: _data})
|
||||
session.SendMsg(string(this.module.GetType()), PagodaGetListResp, &pb.PagodaGetListResp{Data: list})
|
||||
return
|
||||
}
|
||||
|
@ -93,3 +93,25 @@ func (this *configureComp) GetPagodaconfig(id int32) (data *cfg.GamepagodaData)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// 爬塔奖励
|
||||
func (this *configureComp) GetPagodaRewardconfig(id int32) (data *cfg.GamepagodaTaskRewardData) {
|
||||
if v, err := this.GetConfigure(game_pagodataskreward); err == nil {
|
||||
var (
|
||||
configure *cfg.GamepagodaTaskReward
|
||||
ok bool
|
||||
)
|
||||
if configure, ok = v.(*cfg.GamepagodaTaskReward); !ok {
|
||||
log.Errorf("%T no is *cfg.Game_pagodaData", v)
|
||||
return
|
||||
}
|
||||
|
||||
if data, ok = configure.GetDataMap()[id]; ok {
|
||||
return
|
||||
}
|
||||
} else {
|
||||
log.Errorf("get game_pagodataskreward conf err:%v", err)
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
@ -6,6 +6,9 @@ import (
|
||||
"go_dreamfactory/lego/sys/redis"
|
||||
"go_dreamfactory/modules"
|
||||
"go_dreamfactory/pb"
|
||||
|
||||
"go.mongodb.org/mongo-driver/mongo"
|
||||
"go.mongodb.org/mongo-driver/x/bsonx"
|
||||
)
|
||||
|
||||
type ModelPagoda struct {
|
||||
@ -17,14 +20,20 @@ func (this *ModelPagoda) Init(service core.IService, module core.IModule, comp c
|
||||
this.TableName = string(comm.TablePagoda)
|
||||
err = this.MCompModel.Init(service, module, comp, options)
|
||||
this.module = module.(*Pagoda)
|
||||
|
||||
//创建uid索引
|
||||
this.DB.CreateIndex(core.SqlTable(this.TableName), mongo.IndexModel{
|
||||
Keys: bsonx.Doc{{Key: "uid", Value: bsonx.Int32(1)}},
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// 获取爬塔信息
|
||||
func (this *ModelPagoda) getPagodaList(uid string) (result *pb.DBPagoda, err error) {
|
||||
result = &pb.DBPagoda{}
|
||||
if err = this.Get(uid, result); err != nil && redis.RedisNil != err {
|
||||
if err = this.Get(uid, result); err != nil {
|
||||
if redis.RedisNil != err {
|
||||
result = nil
|
||||
}
|
||||
return
|
||||
}
|
||||
err = nil
|
||||
@ -32,14 +41,14 @@ func (this *ModelPagoda) getPagodaList(uid string) (result *pb.DBPagoda, err err
|
||||
}
|
||||
|
||||
// 修改爬塔数据信息
|
||||
func (this *ModelPagoda) modifyPagodaDataByObjId(uid string, objid string, data map[string]interface{}) error {
|
||||
return this.ChangeList(uid, objid, data)
|
||||
func (this *ModelPagoda) modifyPagodaDataByObjId(uid string, data map[string]interface{}) error {
|
||||
return this.Change(uid, data)
|
||||
}
|
||||
|
||||
// 创建一个新的塔数据
|
||||
func (this *ModelPagoda) addNewPagoda(uId string, data map[string]interface{}) (err error) {
|
||||
func (this *ModelPagoda) addNewPagoda(uId string, data *pb.DBPagoda) (err error) {
|
||||
|
||||
if err = this.AddLists(uId, data); err != nil {
|
||||
if err = this.Add(uId, data); err != nil {
|
||||
this.module.Errorf("err:%v", err)
|
||||
return
|
||||
}
|
||||
|
@ -36,8 +36,8 @@ func (this *Pagoda) OnInstallComp() {
|
||||
}
|
||||
|
||||
// 接口信息
|
||||
func (this *Pagoda) ModifyPagodaData(uid string, objId string, data map[string]interface{}) (code pb.ErrorCode) {
|
||||
err := this.modelPagoda.modifyPagodaDataByObjId(uid, objId, data)
|
||||
func (this *Pagoda) ModifyPagodaData(uid string, data map[string]interface{}) (code pb.ErrorCode) {
|
||||
err := this.modelPagoda.modifyPagodaDataByObjId(uid, data)
|
||||
if err != nil {
|
||||
code = pb.ErrorCode_DBError
|
||||
}
|
||||
|
@ -138,127 +138,120 @@ const (
|
||||
// mail
|
||||
ErrorCode_MailErr ErrorCode = 1800 // 邮件不存在
|
||||
// pagoda
|
||||
ErrorCode_PagodaNotFound ErrorCode = 1900 // 找不到塔数据
|
||||
ErrorCode_PagodaLevlErr ErrorCode = 1901 // 挑战关卡数据不匹配
|
||||
//martialhall
|
||||
ErrorCode_MartialhallNotUnlocked ErrorCode = 2000 //木桩未解锁
|
||||
ErrorCode_MartialhallInUse ErrorCode = 2001 //有使用
|
||||
ErrorCode_MartialhallNoReceive ErrorCode = 2002 //未达到领取状态
|
||||
ErrorCode_PagodaNotFound ErrorCode = 1900 // 找不到塔数据
|
||||
ErrorCode_PagodaLevlErr ErrorCode = 19001 // 挑战关卡数据不匹配
|
||||
)
|
||||
|
||||
// Enum value maps for ErrorCode.
|
||||
var (
|
||||
ErrorCode_name = map[int32]string{
|
||||
0: "Success",
|
||||
10: "NoFindService",
|
||||
11: "NoFindServiceHandleFunc",
|
||||
12: "RpcFuncExecutionError",
|
||||
13: "CacheReadError",
|
||||
14: "SqlExecutionError",
|
||||
15: "ReqParameterError",
|
||||
16: "SignError",
|
||||
17: "InsufficientPermissions",
|
||||
18: "NoLogin",
|
||||
19: "UserSessionNobeing",
|
||||
20: "StateInvalid",
|
||||
21: "DBError",
|
||||
22: "SystemError",
|
||||
23: "DecodeError",
|
||||
24: "TimestampTimeout",
|
||||
25: "PbError",
|
||||
26: "AgentUidEmpty",
|
||||
100: "Exception",
|
||||
101: "Unknown",
|
||||
102: "ResNoEnough",
|
||||
103: "ConfigurationException",
|
||||
104: "ConfigNoFound",
|
||||
1000: "SecKeyInvalid",
|
||||
1001: "SecKey",
|
||||
1002: "BindUser",
|
||||
1003: "GoldNoEnough",
|
||||
1004: "DiamondNoEnough",
|
||||
1005: "RoleCreated",
|
||||
1006: "UserNickNameExist",
|
||||
1007: "VeriCodeNoValid",
|
||||
1008: "VeriCodeExpired",
|
||||
1009: "UserResetData",
|
||||
1010: "UserModiNameCount",
|
||||
1011: "UserNickNameEmpty",
|
||||
1012: "UserExpandNull",
|
||||
1100: "FriendNotSelf",
|
||||
1101: "FriendSelfMax",
|
||||
1102: "FriendTargetMax",
|
||||
1103: "FriendSelfNoData",
|
||||
1104: "FriendTargetNoData",
|
||||
1105: "FriendYet",
|
||||
1106: "FriendApplyYet",
|
||||
1107: "FriendSelfBlackYet",
|
||||
1108: "FriendTargetBlackYet",
|
||||
1109: "FriendApplyError",
|
||||
1110: "FriendBlackMax",
|
||||
1111: "FriendSearchNameEmpty",
|
||||
1112: "FriendZaned",
|
||||
1113: "FriendZanreceived",
|
||||
1114: "FriendZanSelf",
|
||||
1115: "FriendPointLimit",
|
||||
1200: "ItemsNoEnough",
|
||||
1201: "ItemsNoFoundGird",
|
||||
1202: "ItemsGridNumUpper",
|
||||
1203: "ItemsGirdAmountUpper",
|
||||
1204: "ItemsUseNotSupported",
|
||||
1300: "HeroNoExist",
|
||||
1301: "HeroNoEnough",
|
||||
1302: "HeroMaxLv",
|
||||
1303: "HeroInitCreat",
|
||||
1304: "HeroColorErr",
|
||||
1305: "HeroSkillUpErr",
|
||||
1306: "HeroMaxResonate",
|
||||
1307: "HeroNoResonate",
|
||||
1308: "HeroNotNeedResonate",
|
||||
1309: "HeroNoEnergy",
|
||||
1310: "HeroCreate",
|
||||
1311: "HeroEquipUpdate",
|
||||
1312: "HeroMaxAwaken",
|
||||
1313: "HeroIsLock",
|
||||
1314: "HeroMaxCount",
|
||||
1315: "HeroCostTypeErr",
|
||||
1316: "HeroStarErr",
|
||||
1317: "HeroTypeErr",
|
||||
1318: "HeroExpTypeErr",
|
||||
1319: "HeroAddMaxExp",
|
||||
1320: "HeroStarLvErr",
|
||||
1321: "HeroMaxStarLv",
|
||||
1322: "DrawCardTypeNotFound",
|
||||
1323: "HeroMaxSkillLv",
|
||||
1400: "EquipmentOnFoundEquipment",
|
||||
1401: "EquipmentLvlimitReached",
|
||||
1402: "EquipmentIsWorn",
|
||||
1500: "MainlineNotFindChapter",
|
||||
1501: "MainlineIDFailed",
|
||||
1502: "MainlineNotFound",
|
||||
1503: "MainlinePreNotFound",
|
||||
1504: "MainlineRepeatReward",
|
||||
1505: "MainlineCompleteReward",
|
||||
1600: "TaskInit",
|
||||
1601: "TaskReset",
|
||||
1602: "TaskHandle",
|
||||
1603: "TaskReceived",
|
||||
1604: "TaskActiveInit",
|
||||
1605: "TaskActiveNofound",
|
||||
1606: "TaskActiveNoenough",
|
||||
1607: "TaskNoFinished",
|
||||
1608: "TaskFinished",
|
||||
1609: "TaskTagEmpty",
|
||||
1610: "TaskIdEmpty",
|
||||
1611: "TaskNotFound",
|
||||
1700: "ShopGoodsIsSoldOut",
|
||||
1701: "ShopNoSurplusRefreshNum",
|
||||
1800: "MailErr",
|
||||
1900: "PagodaNotFound",
|
||||
1901: "PagodaLevlErr",
|
||||
2000: "MartialhallNotUnlocked",
|
||||
2001: "MartialhallInUse",
|
||||
2002: "MartialhallNoReceive",
|
||||
0: "Success",
|
||||
10: "NoFindService",
|
||||
11: "NoFindServiceHandleFunc",
|
||||
12: "RpcFuncExecutionError",
|
||||
13: "CacheReadError",
|
||||
14: "SqlExecutionError",
|
||||
15: "ReqParameterError",
|
||||
16: "SignError",
|
||||
17: "InsufficientPermissions",
|
||||
18: "NoLogin",
|
||||
19: "UserSessionNobeing",
|
||||
20: "StateInvalid",
|
||||
21: "DBError",
|
||||
22: "SystemError",
|
||||
23: "DecodeError",
|
||||
24: "TimestampTimeout",
|
||||
25: "PbError",
|
||||
26: "AgentUidEmpty",
|
||||
100: "Exception",
|
||||
101: "Unknown",
|
||||
102: "ResNoEnough",
|
||||
103: "ConfigurationException",
|
||||
104: "ConfigNoFound",
|
||||
1000: "SecKeyInvalid",
|
||||
1001: "SecKey",
|
||||
1002: "BindUser",
|
||||
1003: "GoldNoEnough",
|
||||
1004: "DiamondNoEnough",
|
||||
1005: "RoleCreated",
|
||||
1006: "UserNickNameExist",
|
||||
1007: "VeriCodeNoValid",
|
||||
1008: "VeriCodeExpired",
|
||||
1009: "UserResetData",
|
||||
1010: "UserModiNameCount",
|
||||
1011: "UserNickNameEmpty",
|
||||
1012: "UserExpandNull",
|
||||
1100: "FriendNotSelf",
|
||||
1101: "FriendSelfMax",
|
||||
1102: "FriendTargetMax",
|
||||
1103: "FriendSelfNoData",
|
||||
1104: "FriendTargetNoData",
|
||||
1105: "FriendYet",
|
||||
1106: "FriendApplyYet",
|
||||
1107: "FriendSelfBlackYet",
|
||||
1108: "FriendTargetBlackYet",
|
||||
1109: "FriendApplyError",
|
||||
1110: "FriendBlackMax",
|
||||
1111: "FriendSearchNameEmpty",
|
||||
1112: "FriendZaned",
|
||||
1113: "FriendZanreceived",
|
||||
1114: "FriendZanSelf",
|
||||
1115: "FriendPointLimit",
|
||||
1200: "ItemsNoEnough",
|
||||
1201: "ItemsNoFoundGird",
|
||||
1202: "ItemsGridNumUpper",
|
||||
1203: "ItemsGirdAmountUpper",
|
||||
1204: "ItemsUseNotSupported",
|
||||
1300: "HeroNoExist",
|
||||
1301: "HeroNoEnough",
|
||||
1302: "HeroMaxLv",
|
||||
1303: "HeroInitCreat",
|
||||
1304: "HeroColorErr",
|
||||
1305: "HeroSkillUpErr",
|
||||
1306: "HeroMaxResonate",
|
||||
1307: "HeroNoResonate",
|
||||
1308: "HeroNotNeedResonate",
|
||||
1309: "HeroNoEnergy",
|
||||
1310: "HeroCreate",
|
||||
1311: "HeroEquipUpdate",
|
||||
1312: "HeroMaxAwaken",
|
||||
1313: "HeroIsLock",
|
||||
1314: "HeroMaxCount",
|
||||
1315: "HeroCostTypeErr",
|
||||
1316: "HeroStarErr",
|
||||
1317: "HeroTypeErr",
|
||||
1318: "HeroExpTypeErr",
|
||||
1319: "HeroAddMaxExp",
|
||||
1320: "HeroStarLvErr",
|
||||
1321: "HeroMaxStarLv",
|
||||
1322: "DrawCardTypeNotFound",
|
||||
1323: "HeroMaxSkillLv",
|
||||
1400: "EquipmentOnFoundEquipment",
|
||||
1401: "EquipmentLvlimitReached",
|
||||
1402: "EquipmentIsWorn",
|
||||
1500: "MainlineNotFindChapter",
|
||||
1501: "MainlineIDFailed",
|
||||
1502: "MainlineNotFound",
|
||||
1503: "MainlinePreNotFound",
|
||||
1504: "MainlineRepeatReward",
|
||||
1505: "MainlineCompleteReward",
|
||||
1600: "TaskInit",
|
||||
1601: "TaskReset",
|
||||
1602: "TaskHandle",
|
||||
1603: "TaskReceived",
|
||||
1604: "TaskActiveInit",
|
||||
1605: "TaskActiveNofound",
|
||||
1606: "TaskActiveNoenough",
|
||||
1607: "TaskNoFinished",
|
||||
1608: "TaskFinished",
|
||||
1609: "TaskTagEmpty",
|
||||
1610: "TaskIdEmpty",
|
||||
1611: "TaskNotFound",
|
||||
1700: "ShopGoodsIsSoldOut",
|
||||
1701: "ShopNoSurplusRefreshNum",
|
||||
1800: "MailErr",
|
||||
1900: "PagodaNotFound",
|
||||
19001: "PagodaLevlErr",
|
||||
}
|
||||
ErrorCode_value = map[string]int32{
|
||||
"Success": 0,
|
||||
@ -367,10 +360,7 @@ var (
|
||||
"ShopNoSurplusRefreshNum": 1701,
|
||||
"MailErr": 1800,
|
||||
"PagodaNotFound": 1900,
|
||||
"PagodaLevlErr": 1901,
|
||||
"MartialhallNotUnlocked": 2000,
|
||||
"MartialhallInUse": 2001,
|
||||
"MartialhallNoReceive": 2002,
|
||||
"PagodaLevlErr": 19001,
|
||||
}
|
||||
)
|
||||
|
||||
@ -405,7 +395,7 @@ var File_errorcode_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_errorcode_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x2a, 0xa8, 0x12, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x6f, 0x2a, 0xda, 0x11, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x0b, 0x0a, 0x07, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d,
|
||||
0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x10, 0x0a, 0x12,
|
||||
0x1b, 0x0a, 0x17, 0x4e, 0x6f, 0x46, 0x69, 0x6e, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
|
||||
@ -545,14 +535,9 @@ var file_errorcode_proto_rawDesc = []byte{
|
||||
0x4e, 0x6f, 0x53, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68,
|
||||
0x4e, 0x75, 0x6d, 0x10, 0xa5, 0x0d, 0x12, 0x0c, 0x0a, 0x07, 0x4d, 0x61, 0x69, 0x6c, 0x45, 0x72,
|
||||
0x72, 0x10, 0x88, 0x0e, 0x12, 0x13, 0x0a, 0x0e, 0x50, 0x61, 0x67, 0x6f, 0x64, 0x61, 0x4e, 0x6f,
|
||||
0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xec, 0x0e, 0x12, 0x12, 0x0a, 0x0d, 0x50, 0x61, 0x67,
|
||||
0x6f, 0x64, 0x61, 0x4c, 0x65, 0x76, 0x6c, 0x45, 0x72, 0x72, 0x10, 0xed, 0x0e, 0x12, 0x1b, 0x0a,
|
||||
0x16, 0x4d, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x4e, 0x6f, 0x74, 0x55,
|
||||
0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x10, 0xd0, 0x0f, 0x12, 0x15, 0x0a, 0x10, 0x4d, 0x61,
|
||||
0x72, 0x74, 0x69, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c, 0x49, 0x6e, 0x55, 0x73, 0x65, 0x10, 0xd1,
|
||||
0x0f, 0x12, 0x19, 0x0a, 0x14, 0x4d, 0x61, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x68, 0x61, 0x6c, 0x6c,
|
||||
0x4e, 0x6f, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x10, 0xd2, 0x0f, 0x42, 0x06, 0x5a, 0x04,
|
||||
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x10, 0xec, 0x0e, 0x12, 0x13, 0x0a, 0x0d, 0x50, 0x61, 0x67,
|
||||
0x6f, 0x64, 0x61, 0x4c, 0x65, 0x76, 0x6c, 0x45, 0x72, 0x72, 0x10, 0xb9, 0x94, 0x01, 0x42, 0x06,
|
||||
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
307
pb/gourmet_db.pb.go
Normal file
307
pb/gourmet_db.pb.go
Normal file
@ -0,0 +1,307 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: gourmet/gourmet_db.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 烹饪
|
||||
type Cooking struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
FoodType int32 `protobuf:"varint,1,opt,name=foodType,proto3" json:"foodType"` // 料理类型
|
||||
FoodCount int32 `protobuf:"varint,2,opt,name=foodCount,proto3" json:"foodCount"` // 料理数量
|
||||
CookTime int32 `protobuf:"varint,3,opt,name=cookTime,proto3" json:"cookTime"` // 烹饪时间
|
||||
}
|
||||
|
||||
func (x *Cooking) Reset() {
|
||||
*x = Cooking{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_gourmet_gourmet_db_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Cooking) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Cooking) ProtoMessage() {}
|
||||
|
||||
func (x *Cooking) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_gourmet_gourmet_db_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Cooking.ProtoReflect.Descriptor instead.
|
||||
func (*Cooking) Descriptor() ([]byte, []int) {
|
||||
return file_gourmet_gourmet_db_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *Cooking) GetFoodType() int32 {
|
||||
if x != nil {
|
||||
return x.FoodType
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Cooking) GetFoodCount() int32 {
|
||||
if x != nil {
|
||||
return x.FoodCount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *Cooking) GetCookTime() int32 {
|
||||
if x != nil {
|
||||
return x.CookTime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DBGourmet struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` //ID
|
||||
Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid" bson:"uid"` //用户ID
|
||||
CookingFood *Cooking `protobuf:"bytes,3,opt,name=cookingFood,proto3" json:"cookingFood"` // 正在烹饪的食品
|
||||
Foods []*Cooking `protobuf:"bytes,4,rep,name=foods,proto3" json:"foods"` // 等待烹饪的食品
|
||||
Items []*UserAssets `protobuf:"bytes,5,rep,name=items,proto3" json:"items"` // 已经做好的食品
|
||||
Skilllv map[int32]int32 `protobuf:"bytes,6,rep,name=skilllv,proto3" json:"skilllv" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 技能等级
|
||||
Ordercosttime int32 `protobuf:"varint,7,opt,name=ordercosttime,proto3" json:"ordercosttime"` // 订单消耗的时常
|
||||
Ctime int64 `protobuf:"varint,8,opt,name=ctime,proto3" json:"ctime"` // 订单创建时间
|
||||
}
|
||||
|
||||
func (x *DBGourmet) Reset() {
|
||||
*x = DBGourmet{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_gourmet_gourmet_db_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *DBGourmet) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*DBGourmet) ProtoMessage() {}
|
||||
|
||||
func (x *DBGourmet) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_gourmet_gourmet_db_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use DBGourmet.ProtoReflect.Descriptor instead.
|
||||
func (*DBGourmet) Descriptor() ([]byte, []int) {
|
||||
return file_gourmet_gourmet_db_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *DBGourmet) GetId() string {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBGourmet) GetUid() string {
|
||||
if x != nil {
|
||||
return x.Uid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *DBGourmet) GetCookingFood() *Cooking {
|
||||
if x != nil {
|
||||
return x.CookingFood
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBGourmet) GetFoods() []*Cooking {
|
||||
if x != nil {
|
||||
return x.Foods
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBGourmet) GetItems() []*UserAssets {
|
||||
if x != nil {
|
||||
return x.Items
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBGourmet) GetSkilllv() map[int32]int32 {
|
||||
if x != nil {
|
||||
return x.Skilllv
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *DBGourmet) GetOrdercosttime() int32 {
|
||||
if x != nil {
|
||||
return x.Ordercosttime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *DBGourmet) GetCtime() int64 {
|
||||
if x != nil {
|
||||
return x.Ctime
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_gourmet_gourmet_db_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_gourmet_gourmet_db_proto_rawDesc = []byte{
|
||||
0x0a, 0x18, 0x67, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x75, 0x72, 0x6d, 0x65,
|
||||
0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 0x0a, 0x07, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x6e,
|
||||
0x67, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x6f, 0x6f, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x08, 0x66, 0x6f, 0x6f, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x66, 0x6f, 0x6f, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x09, 0x66, 0x6f, 0x6f, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63,
|
||||
0x6f, 0x6f, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63,
|
||||
0x6f, 0x6f, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x22, 0xc7, 0x02, 0x0a, 0x09, 0x44, 0x42, 0x47, 0x6f,
|
||||
0x75, 0x72, 0x6d, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x0b, 0x63, 0x6f, 0x6f, 0x6b, 0x69,
|
||||
0x6e, 0x67, 0x46, 0x6f, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x43,
|
||||
0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x46,
|
||||
0x6f, 0x6f, 0x64, 0x12, 0x1e, 0x0a, 0x05, 0x66, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x08, 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x66, 0x6f,
|
||||
0x6f, 0x64, 0x73, 0x12, 0x21, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03,
|
||||
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52,
|
||||
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x6c,
|
||||
0x76, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72,
|
||||
0x6d, 0x65, 0x74, 0x2e, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x6c, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||
0x52, 0x07, 0x73, 0x6b, 0x69, 0x6c, 0x6c, 0x6c, 0x76, 0x12, 0x24, 0x0a, 0x0d, 0x6f, 0x72, 0x64,
|
||||
0x65, 0x72, 0x63, 0x6f, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05,
|
||||
0x52, 0x0d, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x63, 0x6f, 0x73, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x12,
|
||||
0x14, 0x0a, 0x05, 0x63, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05,
|
||||
0x63, 0x74, 0x69, 0x6d, 0x65, 0x1a, 0x3a, 0x0a, 0x0c, 0x53, 0x6b, 0x69, 0x6c, 0x6c, 0x6c, 0x76,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
|
||||
0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_gourmet_gourmet_db_proto_rawDescOnce sync.Once
|
||||
file_gourmet_gourmet_db_proto_rawDescData = file_gourmet_gourmet_db_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_gourmet_gourmet_db_proto_rawDescGZIP() []byte {
|
||||
file_gourmet_gourmet_db_proto_rawDescOnce.Do(func() {
|
||||
file_gourmet_gourmet_db_proto_rawDescData = protoimpl.X.CompressGZIP(file_gourmet_gourmet_db_proto_rawDescData)
|
||||
})
|
||||
return file_gourmet_gourmet_db_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_gourmet_gourmet_db_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_gourmet_gourmet_db_proto_goTypes = []interface{}{
|
||||
(*Cooking)(nil), // 0: Cooking
|
||||
(*DBGourmet)(nil), // 1: DBGourmet
|
||||
nil, // 2: DBGourmet.SkilllvEntry
|
||||
(*UserAssets)(nil), // 3: UserAssets
|
||||
}
|
||||
var file_gourmet_gourmet_db_proto_depIdxs = []int32{
|
||||
0, // 0: DBGourmet.cookingFood:type_name -> Cooking
|
||||
0, // 1: DBGourmet.foods:type_name -> Cooking
|
||||
3, // 2: DBGourmet.items:type_name -> UserAssets
|
||||
2, // 3: DBGourmet.skilllv:type_name -> DBGourmet.SkilllvEntry
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_gourmet_gourmet_db_proto_init() }
|
||||
func file_gourmet_gourmet_db_proto_init() {
|
||||
if File_gourmet_gourmet_db_proto != nil {
|
||||
return
|
||||
}
|
||||
file_comm_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_gourmet_gourmet_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Cooking); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_gourmet_gourmet_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DBGourmet); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_gourmet_gourmet_db_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_gourmet_gourmet_db_proto_goTypes,
|
||||
DependencyIndexes: file_gourmet_gourmet_db_proto_depIdxs,
|
||||
MessageInfos: file_gourmet_gourmet_db_proto_msgTypes,
|
||||
}.Build()
|
||||
File_gourmet_gourmet_db_proto = out.File
|
||||
file_gourmet_gourmet_db_proto_rawDesc = nil
|
||||
file_gourmet_gourmet_db_proto_goTypes = nil
|
||||
file_gourmet_gourmet_db_proto_depIdxs = nil
|
||||
}
|
451
pb/gourmet_msg.pb.go
Normal file
451
pb/gourmet_msg.pb.go
Normal file
@ -0,0 +1,451 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.0
|
||||
// protoc v3.20.0
|
||||
// source: gourmet/gourmet_msg.proto
|
||||
|
||||
package pb
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// 查询塔进度
|
||||
type GourmetGetListReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *GourmetGetListReq) Reset() {
|
||||
*x = GourmetGetListReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_gourmet_gourmet_msg_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GourmetGetListReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GourmetGetListReq) ProtoMessage() {}
|
||||
|
||||
func (x *GourmetGetListReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_gourmet_gourmet_msg_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GourmetGetListReq.ProtoReflect.Descriptor instead.
|
||||
func (*GourmetGetListReq) Descriptor() ([]byte, []int) {
|
||||
return file_gourmet_gourmet_msg_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// 返回进度信息
|
||||
type GourmetGetListResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBGourmet `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *GourmetGetListResp) Reset() {
|
||||
*x = GourmetGetListResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_gourmet_gourmet_msg_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GourmetGetListResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GourmetGetListResp) ProtoMessage() {}
|
||||
|
||||
func (x *GourmetGetListResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_gourmet_gourmet_msg_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GourmetGetListResp.ProtoReflect.Descriptor instead.
|
||||
func (*GourmetGetListResp) Descriptor() ([]byte, []int) {
|
||||
return file_gourmet_gourmet_msg_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GourmetGetListResp) GetData() *DBGourmet {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 创建订单
|
||||
type GourmetCreateOrderReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Order []*Cooking `protobuf:"bytes,1,rep,name=order,proto3" json:"order"` // 烹饪时间不用传 后端会重新计算
|
||||
}
|
||||
|
||||
func (x *GourmetCreateOrderReq) Reset() {
|
||||
*x = GourmetCreateOrderReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_gourmet_gourmet_msg_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GourmetCreateOrderReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GourmetCreateOrderReq) ProtoMessage() {}
|
||||
|
||||
func (x *GourmetCreateOrderReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_gourmet_gourmet_msg_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GourmetCreateOrderReq.ProtoReflect.Descriptor instead.
|
||||
func (*GourmetCreateOrderReq) Descriptor() ([]byte, []int) {
|
||||
return file_gourmet_gourmet_msg_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *GourmetCreateOrderReq) GetOrder() []*Cooking {
|
||||
if x != nil {
|
||||
return x.Order
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type GourmetCreateOrderResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBGourmet `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *GourmetCreateOrderResp) Reset() {
|
||||
*x = GourmetCreateOrderResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_gourmet_gourmet_msg_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GourmetCreateOrderResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GourmetCreateOrderResp) ProtoMessage() {}
|
||||
|
||||
func (x *GourmetCreateOrderResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_gourmet_gourmet_msg_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GourmetCreateOrderResp.ProtoReflect.Descriptor instead.
|
||||
func (*GourmetCreateOrderResp) Descriptor() ([]byte, []int) {
|
||||
return file_gourmet_gourmet_msg_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
func (x *GourmetCreateOrderResp) GetData() *DBGourmet {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// 领取奖励
|
||||
type GourmetGetRewardReq struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *GourmetGetRewardReq) Reset() {
|
||||
*x = GourmetGetRewardReq{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_gourmet_gourmet_msg_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GourmetGetRewardReq) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GourmetGetRewardReq) ProtoMessage() {}
|
||||
|
||||
func (x *GourmetGetRewardReq) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_gourmet_gourmet_msg_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GourmetGetRewardReq.ProtoReflect.Descriptor instead.
|
||||
func (*GourmetGetRewardReq) Descriptor() ([]byte, []int) {
|
||||
return file_gourmet_gourmet_msg_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
type GourmetGetRewardResp struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Data *DBGourmet `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
|
||||
}
|
||||
|
||||
func (x *GourmetGetRewardResp) Reset() {
|
||||
*x = GourmetGetRewardResp{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_gourmet_gourmet_msg_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GourmetGetRewardResp) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GourmetGetRewardResp) ProtoMessage() {}
|
||||
|
||||
func (x *GourmetGetRewardResp) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_gourmet_gourmet_msg_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GourmetGetRewardResp.ProtoReflect.Descriptor instead.
|
||||
func (*GourmetGetRewardResp) Descriptor() ([]byte, []int) {
|
||||
return file_gourmet_gourmet_msg_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *GourmetGetRewardResp) GetData() *DBGourmet {
|
||||
if x != nil {
|
||||
return x.Data
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_gourmet_gourmet_msg_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_gourmet_gourmet_msg_proto_rawDesc = []byte{
|
||||
0x0a, 0x19, 0x67, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x75, 0x72, 0x6d, 0x65,
|
||||
0x74, 0x5f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x67, 0x6f, 0x75,
|
||||
0x72, 0x6d, 0x65, 0x74, 0x2f, 0x67, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x5f, 0x64, 0x62, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x13, 0x0a, 0x11, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74,
|
||||
0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x22, 0x34, 0x0a, 0x12, 0x47, 0x6f,
|
||||
0x75, 0x72, 0x6d, 0x65, 0x74, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
|
||||
0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a,
|
||||
0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x22, 0x37, 0x0a, 0x15, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x1e, 0x0a, 0x05, 0x6f, 0x72, 0x64,
|
||||
0x65, 0x72, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x43, 0x6f, 0x6f, 0x6b, 0x69,
|
||||
0x6e, 0x67, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x22, 0x38, 0x0a, 0x16, 0x47, 0x6f, 0x75,
|
||||
0x72, 0x6d, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52,
|
||||
0x65, 0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x0a, 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x52, 0x04, 0x64,
|
||||
0x61, 0x74, 0x61, 0x22, 0x15, 0x0a, 0x13, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x47, 0x65,
|
||||
0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65, 0x71, 0x22, 0x36, 0x0a, 0x14, 0x47, 0x6f,
|
||||
0x75, 0x72, 0x6d, 0x65, 0x74, 0x47, 0x65, 0x74, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x65,
|
||||
0x73, 0x70, 0x12, 0x1e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x0a, 0x2e, 0x44, 0x42, 0x47, 0x6f, 0x75, 0x72, 0x6d, 0x65, 0x74, 0x52, 0x04, 0x64, 0x61,
|
||||
0x74, 0x61, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_gourmet_gourmet_msg_proto_rawDescOnce sync.Once
|
||||
file_gourmet_gourmet_msg_proto_rawDescData = file_gourmet_gourmet_msg_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_gourmet_gourmet_msg_proto_rawDescGZIP() []byte {
|
||||
file_gourmet_gourmet_msg_proto_rawDescOnce.Do(func() {
|
||||
file_gourmet_gourmet_msg_proto_rawDescData = protoimpl.X.CompressGZIP(file_gourmet_gourmet_msg_proto_rawDescData)
|
||||
})
|
||||
return file_gourmet_gourmet_msg_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_gourmet_gourmet_msg_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_gourmet_gourmet_msg_proto_goTypes = []interface{}{
|
||||
(*GourmetGetListReq)(nil), // 0: GourmetGetListReq
|
||||
(*GourmetGetListResp)(nil), // 1: GourmetGetListResp
|
||||
(*GourmetCreateOrderReq)(nil), // 2: GourmetCreateOrderReq
|
||||
(*GourmetCreateOrderResp)(nil), // 3: GourmetCreateOrderResp
|
||||
(*GourmetGetRewardReq)(nil), // 4: GourmetGetRewardReq
|
||||
(*GourmetGetRewardResp)(nil), // 5: GourmetGetRewardResp
|
||||
(*DBGourmet)(nil), // 6: DBGourmet
|
||||
(*Cooking)(nil), // 7: Cooking
|
||||
}
|
||||
var file_gourmet_gourmet_msg_proto_depIdxs = []int32{
|
||||
6, // 0: GourmetGetListResp.data:type_name -> DBGourmet
|
||||
7, // 1: GourmetCreateOrderReq.order:type_name -> Cooking
|
||||
6, // 2: GourmetCreateOrderResp.data:type_name -> DBGourmet
|
||||
6, // 3: GourmetGetRewardResp.data:type_name -> DBGourmet
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_gourmet_gourmet_msg_proto_init() }
|
||||
func file_gourmet_gourmet_msg_proto_init() {
|
||||
if File_gourmet_gourmet_msg_proto != nil {
|
||||
return
|
||||
}
|
||||
file_gourmet_gourmet_db_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_gourmet_gourmet_msg_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GourmetGetListReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_gourmet_gourmet_msg_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GourmetGetListResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_gourmet_gourmet_msg_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GourmetCreateOrderReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_gourmet_gourmet_msg_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GourmetCreateOrderResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_gourmet_gourmet_msg_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GourmetGetRewardReq); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_gourmet_gourmet_msg_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GourmetGetRewardResp); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_gourmet_gourmet_msg_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_gourmet_gourmet_msg_proto_goTypes,
|
||||
DependencyIndexes: file_gourmet_gourmet_msg_proto_depIdxs,
|
||||
MessageInfos: file_gourmet_gourmet_msg_proto_msgTypes,
|
||||
}.Build()
|
||||
File_gourmet_gourmet_msg_proto = out.File
|
||||
file_gourmet_gourmet_msg_proto_rawDesc = nil
|
||||
file_gourmet_gourmet_msg_proto_goTypes = nil
|
||||
file_gourmet_gourmet_msg_proto_depIdxs = nil
|
||||
}
|
@ -8,6 +8,7 @@ import (
|
||||
"go_dreamfactory/modules/forum"
|
||||
"go_dreamfactory/modules/friend"
|
||||
"go_dreamfactory/modules/gm"
|
||||
"go_dreamfactory/modules/gourmet"
|
||||
"go_dreamfactory/modules/hero"
|
||||
"go_dreamfactory/modules/items"
|
||||
"go_dreamfactory/modules/mail"
|
||||
@ -59,6 +60,7 @@ func main() {
|
||||
gm.NewModule(),
|
||||
forum.NewModule(),
|
||||
pagoda.NewModule(),
|
||||
gourmet.NewModule(),
|
||||
)
|
||||
}
|
||||
|
||||
|
42
sys/configure/structs/game.Gourmet.go
Normal file
42
sys/configure/structs/game.Gourmet.go
Normal 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 GameGourmet struct {
|
||||
_dataMap map[int32]*GameGourmetData
|
||||
_dataList []*GameGourmetData
|
||||
}
|
||||
|
||||
func NewGameGourmet(_buf []map[string]interface{}) (*GameGourmet, error) {
|
||||
_dataList := make([]*GameGourmetData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameGourmetData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameGourmetData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameGourmet{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameGourmet) GetDataMap() map[int32]*GameGourmetData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameGourmet) GetDataList() []*GameGourmetData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameGourmet) Get(key int32) *GameGourmetData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
66
sys/configure/structs/game.GourmetData.go
Normal file
66
sys/configure/structs/game.GourmetData.go
Normal file
@ -0,0 +1,66 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GameGourmetData struct {
|
||||
Id int32
|
||||
Type int32
|
||||
Level int32
|
||||
Levelname string
|
||||
Colour int32
|
||||
Name string
|
||||
Picture string
|
||||
Consume []*Gameatn
|
||||
Using int32
|
||||
Propsgroup int32
|
||||
}
|
||||
|
||||
const TypeId_GameGourmetData = -359286171
|
||||
|
||||
func (*GameGourmetData) GetTypeId() int32 {
|
||||
return -359286171
|
||||
}
|
||||
|
||||
func (_v *GameGourmetData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ 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["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["level"].(float64); !_ok_ { err = errors.New("level error"); return }; _v.Level = int32(_tempNum_) }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["levelname"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Levelname error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Levelname, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["colour"].(float64); !_ok_ { err = errors.New("colour error"); return }; _v.Colour = int32(_tempNum_) }
|
||||
{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.Picture, _ok_ = _buf["picture"].(string); !_ok_ { err = errors.New("picture error"); return } }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["consume"].([]interface{}); !_ok_ { err = errors.New("consume error"); return }
|
||||
|
||||
_v.Consume = make([]*Gameatn, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ *Gameatn
|
||||
{ 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 = DeserializeGameatn(_x_); err != nil { return } }
|
||||
_v.Consume = append(_v.Consume, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["using"].(float64); !_ok_ { err = errors.New("using error"); return }; _v.Using = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["propsgroup"].(float64); !_ok_ { err = errors.New("propsgroup error"); return }; _v.Propsgroup = int32(_tempNum_) }
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameGourmetData(_buf map[string]interface{}) (*GameGourmetData, error) {
|
||||
v := &GameGourmetData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
42
sys/configure/structs/game.GourmetSkill.go
Normal file
42
sys/configure/structs/game.GourmetSkill.go
Normal 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 GameGourmetSkill struct {
|
||||
_dataMap map[int32]*GameGourmetSkillData
|
||||
_dataList []*GameGourmetSkillData
|
||||
}
|
||||
|
||||
func NewGameGourmetSkill(_buf []map[string]interface{}) (*GameGourmetSkill, error) {
|
||||
_dataList := make([]*GameGourmetSkillData, 0, len(_buf))
|
||||
dataMap := make(map[int32]*GameGourmetSkillData)
|
||||
for _, _ele_ := range _buf {
|
||||
if _v, err2 := DeserializeGameGourmetSkillData(_ele_); err2 != nil {
|
||||
return nil, err2
|
||||
} else {
|
||||
_dataList = append(_dataList, _v)
|
||||
dataMap[_v.Id] = _v
|
||||
}
|
||||
}
|
||||
return &GameGourmetSkill{_dataList:_dataList, _dataMap:dataMap}, nil
|
||||
}
|
||||
|
||||
func (table *GameGourmetSkill) GetDataMap() map[int32]*GameGourmetSkillData {
|
||||
return table._dataMap
|
||||
}
|
||||
|
||||
func (table *GameGourmetSkill) GetDataList() []*GameGourmetSkillData {
|
||||
return table._dataList
|
||||
}
|
||||
|
||||
func (table *GameGourmetSkill) Get(key int32) *GameGourmetSkillData {
|
||||
return table._dataMap[key]
|
||||
}
|
||||
|
||||
|
89
sys/configure/structs/game.GourmetSkillData.go
Normal file
89
sys/configure/structs/game.GourmetSkillData.go
Normal file
@ -0,0 +1,89 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 GameGourmetSkillData struct {
|
||||
Id int32
|
||||
Type int32
|
||||
Initial int32
|
||||
Level int32
|
||||
Levelname string
|
||||
Colour int32
|
||||
Name string
|
||||
Needtime int32
|
||||
Display int32
|
||||
Probability int32
|
||||
Icon string
|
||||
Item []*Gameatn
|
||||
Affix string
|
||||
AffixColour int32
|
||||
Consume []*Gameatn
|
||||
}
|
||||
|
||||
const TypeId_GameGourmetSkillData = 235491264
|
||||
|
||||
func (*GameGourmetSkillData) GetTypeId() int32 {
|
||||
return 235491264
|
||||
}
|
||||
|
||||
func (_v *GameGourmetSkillData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ 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["type"].(float64); !_ok_ { err = errors.New("type error"); return }; _v.Type = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["initial"].(float64); !_ok_ { err = errors.New("initial error"); return }; _v.Initial = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["level"].(float64); !_ok_ { err = errors.New("level error"); return }; _v.Level = int32(_tempNum_) }
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["levelname"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Levelname error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Levelname, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["colour"].(float64); !_ok_ { err = errors.New("colour error"); return }; _v.Colour = int32(_tempNum_) }
|
||||
{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; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["needtime"].(float64); !_ok_ { err = errors.New("needtime error"); return }; _v.Needtime = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["display"].(float64); !_ok_ { err = errors.New("display error"); return }; _v.Display = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["probability"].(float64); !_ok_ { err = errors.New("probability error"); return }; _v.Probability = int32(_tempNum_) }
|
||||
{ var _ok_ bool; if _v.Icon, _ok_ = _buf["icon"].(string); !_ok_ { err = errors.New("icon error"); return } }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["item"].([]interface{}); !_ok_ { err = errors.New("item error"); return }
|
||||
|
||||
_v.Item = make([]*Gameatn, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ *Gameatn
|
||||
{ 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 = DeserializeGameatn(_x_); err != nil { return } }
|
||||
_v.Item = append(_v.Item, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
{var _ok_ bool; var __json_text__ map[string]interface{}; if __json_text__, _ok_ = _buf["affix"].(map[string]interface{}) ; !_ok_ { err = errors.New("_v.Affix error"); return }; { var _ok_ bool; if _, _ok_ = __json_text__["key"].(string); !_ok_ { err = errors.New("key error"); return } }; { var _ok_ bool; if _v.Affix, _ok_ = __json_text__["text"].(string); !_ok_ { err = errors.New("text error"); return } } }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["affix_colour"].(float64); !_ok_ { err = errors.New("affix_colour error"); return }; _v.AffixColour = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
var _ok_ bool
|
||||
if _arr_, _ok_ = _buf["consume"].([]interface{}); !_ok_ { err = errors.New("consume error"); return }
|
||||
|
||||
_v.Consume = make([]*Gameatn, 0, len(_arr_))
|
||||
|
||||
for _, _e_ := range _arr_ {
|
||||
var _list_v_ *Gameatn
|
||||
{ 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 = DeserializeGameatn(_x_); err != nil { return } }
|
||||
_v.Consume = append(_v.Consume, _list_v_)
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func DeserializeGameGourmetSkillData(_buf map[string]interface{}) (*GameGourmetSkillData, error) {
|
||||
v := &GameGourmetSkillData{}
|
||||
if err := v.Deserialize(_buf); err == nil {
|
||||
return v, nil
|
||||
} else {
|
||||
return nil, err
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@ type GamepagodaData struct {
|
||||
Key int32
|
||||
PagodaType int32
|
||||
LevelType int32
|
||||
PreLevel int32
|
||||
NextLevel int32
|
||||
LayerNum int32
|
||||
MonsterLv []int32
|
||||
MonsterHp []float32
|
||||
@ -42,7 +42,7 @@ func (_v *GamepagodaData)Deserialize(_buf map[string]interface{}) (err error) {
|
||||
{ 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["pagoda_type"].(float64); !_ok_ { err = errors.New("pagoda_type error"); return }; _v.PagodaType = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Level_type"].(float64); !_ok_ { err = errors.New("Level_type error"); return }; _v.LevelType = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["PreLevel"].(float64); !_ok_ { err = errors.New("PreLevel error"); return }; _v.PreLevel = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["NextLevel"].(float64); !_ok_ { err = errors.New("NextLevel error"); return }; _v.NextLevel = int32(_tempNum_) }
|
||||
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["layer_num"].(float64); !_ok_ { err = errors.New("layer_num error"); return }; _v.LayerNum = int32(_tempNum_) }
|
||||
{
|
||||
var _arr_ []interface{}
|
||||
|
Loading…
Reference in New Issue
Block a user