Merge branch 'bs_2.0.6.28' of http://git.legu.cc/liwei_3d/go_dreamfactory into bs_2.0.6.28

This commit is contained in:
meixiongfeng 2023-07-13 11:51:11 +08:00
commit 6d1679a7b8
30 changed files with 592 additions and 956 deletions

View File

@ -17467,7 +17467,7 @@
"type_sp": 1, "type_sp": 1,
"tasktxt": { "tasktxt": {
"key": "buried_buried_condi_tasktxt_747", "key": "buried_buried_condi_tasktxt_747",
"text": "功夫大师挑战塔3层" "text": "高能武者挑战塔3层"
}, },
"type": 168, "type": 168,
"valid": 0, "valid": 0,
@ -17853,7 +17853,7 @@
"type_sp": 1, "type_sp": 1,
"tasktxt": { "tasktxt": {
"key": "buried_buried_condi_tasktxt_763", "key": "buried_buried_condi_tasktxt_763",
"text": "功夫大师挑战塔5层" "text": "高能武者挑战塔5层"
}, },
"type": 168, "type": 168,
"valid": 0, "valid": 0,
@ -18238,12 +18238,12 @@
"type_sp": 1, "type_sp": 1,
"tasktxt": { "tasktxt": {
"key": "buried_buried_condi_tasktxt_779", "key": "buried_buried_condi_tasktxt_779",
"text": "功夫大师挑战塔5层" "text": "高能武者挑战塔8层"
}, },
"type": 168, "type": 168,
"valid": 0, "valid": 0,
"NPC": 10534, "NPC": 10534,
"value": 5, "value": 8,
"filter": [ "filter": [
1 1
], ],
@ -18572,7 +18572,7 @@
"type_sp": 1, "type_sp": 1,
"tasktxt": { "tasktxt": {
"key": "buried_buried_condi_tasktxt_793", "key": "buried_buried_condi_tasktxt_793",
"text": "功夫大师挑战塔10层" "text": "高能武者挑战塔10层"
}, },
"type": 168, "type": 168,
"valid": 0, "valid": 0,
@ -18974,7 +18974,7 @@
"type_sp": 1, "type_sp": 1,
"tasktxt": { "tasktxt": {
"key": "buried_buried_condi_tasktxt_810", "key": "buried_buried_condi_tasktxt_810",
"text": "功夫大师挑战塔20层" "text": "高能武者挑战塔20层"
}, },
"type": 168, "type": 168,
"valid": 0, "valid": 0,
@ -19124,7 +19124,7 @@
"NPC": 10904, "NPC": 10904,
"value": 1, "value": 1,
"filter": [ "filter": [
1200103 1101203
], ],
"filter2": [ "filter2": [
"关卡ID", "关卡ID",

View File

@ -176,7 +176,7 @@
"datatype": 3, "datatype": 3,
"text": { "text": {
"key": "chat_system_text_11", "key": "chat_system_text_11",
"text": "【传闻】{0}已经{1}培养至60级" "text": "【传闻】{0}已经{1}培养至60级"
}, },
"data": 60, "data": 60,
"data2": 0, "data2": 0,
@ -191,7 +191,7 @@
"datatype": 3, "datatype": 3,
"text": { "text": {
"key": "chat_system_text_12", "key": "chat_system_text_12",
"text": "【传闻】{0}已经{1}培养至6星" "text": "【传闻】{0}已经{1}培养至6星"
}, },
"data": 5, "data": 5,
"data2": 0, "data2": 0,
@ -206,7 +206,7 @@
"datatype": 3, "datatype": 3,
"text": { "text": {
"key": "chat_system_text_13", "key": "chat_system_text_13",
"text": "【传闻】{0}已经{1}技能培养至满级!" "text": "【传闻】{0}已经{1}技能培养至满级!"
}, },
"data": 5, "data": 5,
"data2": 0, "data2": 0,
@ -221,7 +221,7 @@
"datatype": 3, "datatype": 3,
"text": { "text": {
"key": "chat_system_text_14", "key": "chat_system_text_14",
"text": "【传闻】{0}已经{1}回响至满级!" "text": "【传闻】{0}已经{1}回响至满级!"
}, },
"data": 5, "data": 5,
"data2": 0, "data2": 0,
@ -236,7 +236,7 @@
"datatype": 3, "datatype": 3,
"text": { "text": {
"key": "chat_system_text_15", "key": "chat_system_text_15",
"text": "【传闻】{0}已经{1}觉醒至满级!" "text": "【传闻】{0}已经{1}觉醒至满级!"
}, },
"data": 5, "data": 5,
"data2": 0, "data2": 0,

View File

@ -220,48 +220,7 @@
"t": "18000004", "t": "18000004",
"n": 1 "n": 1
}, },
"Arena_buy": [ "Arena_buy": 1001,
{
"a": "attr",
"t": "diamond",
"n": 100
},
{
"a": "attr",
"t": "diamond",
"n": 200
},
{
"a": "attr",
"t": "diamond",
"n": 400
},
{
"a": "attr",
"t": "diamond",
"n": 600
},
{
"a": "attr",
"t": "diamond",
"n": 800
},
{
"a": "attr",
"t": "diamond",
"n": 1000
},
{
"a": "attr",
"t": "diamond",
"n": 1200
},
{
"a": "attr",
"t": "diamond",
"n": 1400
}
],
"VikingExpedition_RecoveryTime": 144, "VikingExpedition_RecoveryTime": 144,
"cops_RecoveryTime": 300, "cops_RecoveryTime": 300,
"cops_InitialNum": 60, "cops_InitialNum": 60,

View File

@ -8666,7 +8666,7 @@
"img": "item_15000101", "img": "item_15000101",
"intr": { "intr": {
"key": "item_item_intr_251", "key": "item_item_intr_251",
"text": "狩猎头目的初级掉落物,可用于守护者回响。" "text": "狩猎头目的初级掉落物,可用于真诚阵营守护者回响。"
}, },
"sale": [ "sale": [
{ {
@ -8717,7 +8717,7 @@
"img": "item_15000102", "img": "item_15000102",
"intr": { "intr": {
"key": "item_item_intr_252", "key": "item_item_intr_252",
"text": "狩猎头目的初级掉落物,可用于守护者回响。" "text": "狩猎头目的初级掉落物,可用于直觉阵营守护者回响。"
}, },
"sale": [ "sale": [
{ {
@ -8768,7 +8768,7 @@
"img": "item_15000103", "img": "item_15000103",
"intr": { "intr": {
"key": "item_item_intr_253", "key": "item_item_intr_253",
"text": "狩猎头目的初级掉落物,可用于守护者回响。" "text": "狩猎头目的初级掉落物,可用于共情阵营守护者回响。"
}, },
"sale": [ "sale": [
{ {
@ -8819,7 +8819,7 @@
"img": "item_15000104", "img": "item_15000104",
"intr": { "intr": {
"key": "item_item_intr_254", "key": "item_item_intr_254",
"text": "狩猎头目的初级掉落物,可用于守护者回响。" "text": "狩猎头目的初级掉落物,可用于责任阵营守护者回响。"
}, },
"sale": [ "sale": [
{ {
@ -8870,7 +8870,7 @@
"decompose_get": [ "decompose_get": [
{ {
"a": "item", "a": "item",
"t": "15000201", "t": "15000101",
"n": 2 "n": 2
} }
], ],
@ -8882,7 +8882,7 @@
"img": "item_15000201", "img": "item_15000201",
"intr": { "intr": {
"key": "item_item_intr_255", "key": "item_item_intr_255",
"text": "狩猎头目的中级掉落物,可用于守护者回响。" "text": "狩猎头目的中级掉落物,可用于真诚阵营守护者回响。"
}, },
"sale": [ "sale": [
{ {
@ -8933,7 +8933,7 @@
"decompose_get": [ "decompose_get": [
{ {
"a": "item", "a": "item",
"t": "15000202", "t": "15000102",
"n": 2 "n": 2
} }
], ],
@ -8945,7 +8945,7 @@
"img": "item_15000202", "img": "item_15000202",
"intr": { "intr": {
"key": "item_item_intr_256", "key": "item_item_intr_256",
"text": "狩猎头目的中级掉落物,可用于守护者回响。" "text": "狩猎头目的中级掉落物,可用于直觉阵营守护者回响。"
}, },
"sale": [ "sale": [
{ {
@ -8996,7 +8996,7 @@
"decompose_get": [ "decompose_get": [
{ {
"a": "item", "a": "item",
"t": "15000203", "t": "15000103",
"n": 2 "n": 2
} }
], ],
@ -9008,7 +9008,7 @@
"img": "item_15000203", "img": "item_15000203",
"intr": { "intr": {
"key": "item_item_intr_257", "key": "item_item_intr_257",
"text": "狩猎头目的中级掉落物,可用于守护者回响。" "text": "狩猎头目的中级掉落物,可用于共情阵营守护者回响。"
}, },
"sale": [ "sale": [
{ {
@ -9059,7 +9059,7 @@
"decompose_get": [ "decompose_get": [
{ {
"a": "item", "a": "item",
"t": "15000204", "t": "15000104",
"n": 2 "n": 2
} }
], ],
@ -9071,7 +9071,7 @@
"img": "item_15000204", "img": "item_15000204",
"intr": { "intr": {
"key": "item_item_intr_258", "key": "item_item_intr_258",
"text": "狩猎头目的中级掉落物,可用于守护者回响。" "text": "狩猎头目的中级掉落物,可用于责任阵营守护者回响。"
}, },
"sale": [ "sale": [
{ {
@ -9110,7 +9110,7 @@
"decompose_get": [ "decompose_get": [
{ {
"a": "item", "a": "item",
"t": "15000301", "t": "15000201",
"n": 2 "n": 2
} }
], ],
@ -9122,7 +9122,7 @@
"img": "item_15000301", "img": "item_15000301",
"intr": { "intr": {
"key": "item_item_intr_259", "key": "item_item_intr_259",
"text": "狩猎头目的高级掉落物,可用于守护者回响。" "text": "狩猎头目的高级掉落物,可用于真诚阵营守护者回响。"
}, },
"sale": [ "sale": [
{ {
@ -9161,7 +9161,7 @@
"decompose_get": [ "decompose_get": [
{ {
"a": "item", "a": "item",
"t": "15000302", "t": "15000202",
"n": 2 "n": 2
} }
], ],
@ -9173,7 +9173,7 @@
"img": "item_15000302", "img": "item_15000302",
"intr": { "intr": {
"key": "item_item_intr_260", "key": "item_item_intr_260",
"text": "狩猎头目的高级掉落物,可用于守护者回响。" "text": "狩猎头目的高级掉落物,可用于直觉阵营守护者回响。"
}, },
"sale": [ "sale": [
{ {
@ -9212,7 +9212,7 @@
"decompose_get": [ "decompose_get": [
{ {
"a": "item", "a": "item",
"t": "15000303", "t": "15000203",
"n": 2 "n": 2
} }
], ],
@ -9224,7 +9224,7 @@
"img": "item_15000303", "img": "item_15000303",
"intr": { "intr": {
"key": "item_item_intr_261", "key": "item_item_intr_261",
"text": "狩猎头目的高级掉落物,可用于守护者回响。" "text": "狩猎头目的高级掉落物,可用于共情阵营守护者回响。"
}, },
"sale": [ "sale": [
{ {
@ -9263,7 +9263,7 @@
"decompose_get": [ "decompose_get": [
{ {
"a": "item", "a": "item",
"t": "15000304", "t": "15000204",
"n": 2 "n": 2
} }
], ],
@ -9275,7 +9275,7 @@
"img": "item_15000304", "img": "item_15000304",
"intr": { "intr": {
"key": "item_item_intr_262", "key": "item_item_intr_262",
"text": "狩猎头目的高级掉落物,可用于守护者回响。" "text": "狩猎头目的高级掉落物,可用于责任阵营守护者回响。"
}, },
"sale": [ "sale": [
{ {

View File

@ -228,7 +228,7 @@
"text": "木桩" "text": "木桩"
}, },
"npcName": [ "npcName": [
"木桩" "木桩1"
], ],
"functionicon": "ty_qp_mz", "functionicon": "ty_qp_mz",
"jumpId": 10001 "jumpId": 10001

View File

@ -19,7 +19,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -38,7 +38,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -57,7 +57,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -76,7 +76,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -95,7 +95,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -114,7 +114,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -133,7 +133,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -152,7 +152,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -171,7 +171,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -190,7 +190,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -209,7 +209,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -228,7 +228,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -247,7 +247,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -266,7 +266,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -285,7 +285,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -304,7 +304,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -323,7 +323,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -342,7 +342,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -361,7 +361,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -380,7 +380,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -399,7 +399,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -418,7 +418,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -437,7 +437,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -456,7 +456,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -475,7 +475,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -494,7 +494,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -513,7 +513,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -532,7 +532,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -551,7 +551,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -570,7 +570,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -589,7 +589,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -608,7 +608,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -627,7 +627,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -646,7 +646,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -665,7 +665,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -684,7 +684,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -703,7 +703,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -722,7 +722,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -741,7 +741,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -760,7 +760,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -779,7 +779,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -798,7 +798,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -817,7 +817,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -836,7 +836,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -855,7 +855,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -874,7 +874,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -893,7 +893,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -912,7 +912,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -931,7 +931,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -950,7 +950,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -969,7 +969,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -988,7 +988,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -1007,7 +1007,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -1026,7 +1026,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -1045,7 +1045,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -1064,7 +1064,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -1083,7 +1083,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -1102,7 +1102,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,
@ -1121,7 +1121,7 @@
{ {
"a": "attr", "a": "attr",
"t": "starcoin", "t": "starcoin",
"n": 40 "n": 400
} }
], ],
"ps_ceiling": 180, "ps_ceiling": 180,

View File

@ -89,5 +89,18 @@
"n": 250 "n": 250
} }
] ]
},
{
"id": 8,
"pricegroupId": 1001,
"purchasemin": 11,
"purchasemax": -1,
"cost": [
{
"a": "attr",
"t": "diamond",
"n": 250
}
]
} }
] ]

View File

@ -29,18 +29,18 @@
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_3", "key": "ruledesc_ruledesc_content_3",
"text": "这里可以查看与各个守护者们的好感度。" "text": "这里可以查看与各个守护者们的好感度。<br>点击守护者可以进入守护者送礼界面。"
} }
}, },
{ {
"id": 10004, "id": 10004,
"title": { "title": {
"key": "ruledesc_ruledesc_title_4", "key": "ruledesc_ruledesc_title_4",
"text": "好感度详细说明" "text": "好感度说明"
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_4", "key": "ruledesc_ruledesc_content_4",
"text": "这里可以给守护者送礼,提升与守护者的好感度。" "text": "这里可以给守护者送礼,提升与守护者的好感度。<br>每个守护者每日最多送礼9次且每次赠送会随着饱腹度的增加而减少好感度的增加。<br>每日赠送1-3次为100%的食物好感度。<br>每日赠送4-6次为80%的食物好感度。<br>每日赠送7-9次为50%的好感度。<br>每个守护者有喜欢的食物与讨厌的食物赠送喜欢的食物增加的好感度为1.5倍,且对话也有所不同。"
} }
}, },
{ {
@ -51,14 +51,14 @@
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_5", "key": "ruledesc_ruledesc_content_5",
"text": "这里可以查看各种功夫陪练,完成陪练可以获得高额奖励,完成一定数量的陪练还有格外奖励。" "text": "这里可以查看各种功夫陪练,完成陪练可以获得高额奖励。<br>完成3/6/9次的陪练还有格外奖励可以领取。"
} }
}, },
{ {
"id": 10006, "id": 10006,
"title": { "title": {
"key": "ruledesc_ruledesc_title_6", "key": "ruledesc_ruledesc_title_6",
"text": "功夫陪练详细说明" "text": "陪练详细说明"
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_6", "key": "ruledesc_ruledesc_content_6",
@ -84,7 +84,7 @@
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_8", "key": "ruledesc_ruledesc_content_8",
"text": "这里可以与其他玩家的阵容进行对决,也可以挑战电脑阵容来获取奖励。<br>挑战电脑阵容难度随等级解锁,挑战需要消耗竞技场挑战卷。<br>挑战玩家也需消耗竞技场挑战卷,战胜玩家获得积分,在每周结算时根据积分排名来获得奖励。" "text": "这里可以与其他玩家的阵容进行对决,也可以挑战电脑阵容来获取奖励。<br>挑战电脑阵容难度随等级解锁,挑战需要消耗竞技场挑战卷。<br>竞技场挑战卷随时间恢复每144分钟回复一张。<br>可以使用钻石直接购买竞技场挑战卷。购买上限最多为8张。每次购买消耗的钻石逐级递增。<br>挑战玩家也需消耗竞技场挑战卷,战胜玩家获得积分,在每周结算时根据积分排名来获得奖励。<br>积分排名逻辑:<br>黑铁0—799竞技胜利获胜奖励为竞技币10个。<br>青铜800-1299竞技胜利获胜奖励为竞技币12个。<br>白银1300-1599竞技胜利获胜奖励为竞技币14个。<br>黄金1600-2199竞技胜利获胜奖励为竞技币16个。<br>铂金2200-2799竞技胜利获胜奖励为竞技币18个。<br>钻石:2800-3699,竞技胜利获胜奖励为竞技币20个。<br>大师3700-4599竞技胜利获胜奖励为竞技币22个。<br>王者4600以上竞技胜利获胜奖励为竞技币22个。<br>积分排名奖励具体查看排名中的奖励预览。"
} }
}, },
{ {
@ -135,11 +135,11 @@
"id": 10013, "id": 10013,
"title": { "title": {
"key": "ruledesc_ruledesc_title_13", "key": "ruledesc_ruledesc_title_13",
"text": "主线关卡世界说明" "text": "冒险关卡说明"
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_13", "key": "ruledesc_ruledesc_content_13",
"text": "这里可以挑战主线并赢取巨量奖励。" "text": "这里可以挑战冒险关卡并赢取巨量奖励。"
} }
}, },
{ {
@ -161,7 +161,7 @@
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_15", "key": "ruledesc_ruledesc_content_15",
"text": "这里可以查看你获得的所有守护者们,选择守护者点击右侧按钮可以查看详细界面并且强化他们。<br>在强化界面,可以有各种方式强化守护者。<br>守护者等级强化:<br>点击守护者经验条下方的加号按钮可以进入守护者升级界面,使用护身符可以快速提升守护者等级。<br>守护者升星:<br>当守护者等级达到当前星级最大值三星最大等级为30级四星为40级5星为50级可以使用荣耀徽章提升守护者星级并解锁最高等级上限。守护者最高为6星<br>守护者技能等级强化:<br>点击技能图标上方的按钮,可以进入守护者技能升级界面,使用不同等级的功夫卷轴可以强化不同稀有度的守护者的技能等级。<br>守护者觉醒:<br>使用觉醒强化你的守护者。觉醒道具守护之心主要为招募重复守护者获得。<br>守护者回响:<br>使用回响强化你的守护者。共鸣强化道具可以再狩猎与宝箱中获得。" "text": "这里可以查看你获得的所有守护者们,选择守护者点击右侧按钮可以查看详细界面并且强化他们。<br>在强化界面,可以有各种方式强化守护者。<br>守护者等级强化:<br>点击守护者经验条下方的加号按钮可以进入守护者升级界面,使用护身符可以快速提升守护者等级。<br>守护者升星:<br>当守护者等级达到当前星级最大值三星最大等级为30级四星为40级5星为50级6星60级可以使用荣耀徽章提升守护者星级并解锁最高等级上限。守护者最高为6星。荣耀徽章可以通过合成或分解操作,进行不同星级之间的转换。<br>守护者技能等级强化:<br>点击技能图标上方的按钮,可以进入守护者技能升级界面,使用不同等级的功夫卷轴可以强化不同稀有度的守护者的技能等级。技能等级提升为随机提升该守护者未满级的技能等级。<br>守护者觉醒:<br>可以在觉醒界面使用守护之心强化你的守护者。觉醒道具守护之心主要为招募重复守护者获得。<br>守护者回响:<br>可以在回响界面使用回响强化道具强化你的守护者。回响强化道具可以再狩猎与宝箱中获得。"
} }
}, },
{ {
@ -172,7 +172,7 @@
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_16", "key": "ruledesc_ruledesc_content_16",
"text": "这里可以查看你拥有的所有装备,并且可以给守护者们装备上,一件穿戴会默认选择你最好的装备穿戴给当前守护者(已穿戴装备除外)。" "text": "这里可以查看你拥有的所有装备,并且可以给守护者们装备上,一件穿戴会默认选择你最好的装备穿戴给当前守护者(已穿戴装备除外)。<br>点击装备可以打开装备强化界面,"
} }
}, },
{ {
@ -205,7 +205,7 @@
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_19", "key": "ruledesc_ruledesc_content_19",
"text": "这里可以挑战泰坦们获得打造材料。" "text": "这里可以挑战泰坦们获得打造材料。<br>泰坦共有三种,挑战不同的泰坦都会有不同类别的装备打造材料。<br>挑战高难度泰坦获得的材料奖励越多。"
} }
}, },
{ {
@ -216,7 +216,7 @@
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_20", "key": "ruledesc_ruledesc_content_20",
"text": "这里可以狩猎各种敌人获得珍惜材料。" "text": "这里可以狩猎各种敌人获得回响材料。<br>狩猎挑战随时间开放不同的狩猎头目,掉落的回响材料可用于阵容也会有所不同。<br>挑战难度越高的狩猎头目,获得的材料数量与稀有度越高。"
} }
}, },
{ {
@ -260,7 +260,7 @@
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_24", "key": "ruledesc_ruledesc_content_24",
"text": "这里可以查看关卡星完成条件与获胜可获得奖励。" "text": "这里可以查看关卡星完成条件,积累一定的关卡星可以获得格外的道具奖励。"
} }
}, },
{ {
@ -271,7 +271,7 @@
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_25", "key": "ruledesc_ruledesc_content_25",
"text": "这里可以使用回响强化你的守护者。<br>回响强化道具可在狩猎与宝箱中获得。" "text": "这里可以使用回响强化道具强化你的守护者。<br>回响强化道具可在狩猎与宝箱中获得。"
} }
}, },
{ {
@ -293,7 +293,7 @@
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_27", "key": "ruledesc_ruledesc_content_27",
"text": "这里可以使用觉醒强化你的守护者。<br>觉醒道具守护之心主要为招募重复守护者获得。" "text": "这里可以使用守护之心强化你的守护者。<br>觉醒道具守护之心主要为招募重复守护者获得。"
} }
}, },
{ {
@ -326,7 +326,7 @@
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_30", "key": "ruledesc_ruledesc_content_30",
"text": "这里可以使用装备手册的各个技能强化锻造炉。<br>技能包括:<br>销售精英:<br>可以提升装备的售价。<br>节能环保:<br>可以减少打造所消耗的炉温。<br>推广引流:<br>可以提升顾客数量。<br>倾销货物:<br>可以提升顾客购买装备数量的上限。<br>制作大师:<br>打造高品质装备时满星的概率提升1%。<br>每当前一个技能提升至5级时解锁下一个技能强化选项。" "text": "这里可以使用装备手册的各个技能强化锻造炉。<br>技能包括:<br>销售精英:<br>可以提升装备的售价。<br>节能环保:<br>可以减少打造所消耗的炉温。<br>推广引流:<br>可以提升顾客数量。<br>倾销货物:<br>可以提升顾客购买装备数量的上限。<br>制作大师:<br>打造高品质装备时满星的概率提升1%。"
} }
}, },
{ {
@ -337,7 +337,7 @@
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_31", "key": "ruledesc_ruledesc_content_31",
"text": "这里可以挑战功夫塔每次挑战胜利都可以获得奖励每挑战胜利10层会有特殊奖励(功夫塔挑战不需要消耗物品)。" "text": "这里可以挑战功夫塔每次挑战胜利都可以获得奖励每挑战胜利10层可以获得相应教习。(功夫塔挑战不需要消耗物品)。"
} }
}, },
{ {
@ -366,7 +366,7 @@
"id": 10034, "id": 10034,
"title": { "title": {
"key": "ruledesc_ruledesc_title_34", "key": "ruledesc_ruledesc_title_34",
"text": "每日一练动作说明" "text": "每日一练说明"
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_34", "key": "ruledesc_ruledesc_content_34",
@ -399,7 +399,7 @@
"id": 10037, "id": 10037,
"title": { "title": {
"key": "ruledesc_ruledesc_title_37", "key": "ruledesc_ruledesc_title_37",
"text": "商队功能界面说明" "text": "商队界面说明"
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_37", "key": "ruledesc_ruledesc_content_37",
@ -458,7 +458,7 @@
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_42", "key": "ruledesc_ruledesc_content_42",
"text": "这里可以可以使用星图币强化这个属性的全部守护者们。" "text": "这里可以可以使用星图币强化某个属性的全部守护者们。<br>强化属性会在战斗中生效,不会在属性中显示。<br>星图币在玩家升级时获得。"
} }
}, },
{ {
@ -476,11 +476,11 @@
"id": 10044, "id": 10044,
"title": { "title": {
"key": "ruledesc_ruledesc_title_44", "key": "ruledesc_ruledesc_title_44",
"text": "主角个人信息界面说明" "text": "主角界面说明"
}, },
"content": { "content": {
"key": "ruledesc_ruledesc_content_44", "key": "ruledesc_ruledesc_content_44",
"text": "这里可以查看玩家游戏进度。<br>可以修改名称与个性签名(名称最多20字符汉字算2字符。<br>更改角色装扮,还能修改并查看自己的阵容展示。" "text": "这里可以查看玩家游戏进度。<br>可以修改名称与个性签名(名称最多12字符汉字算2字符。<br>更改角色装扮,还能修改并查看自己的阵容展示。"
} }
} }
] ]

View File

@ -218,43 +218,5 @@
15008, 15008,
15009 15009
] ]
},
{
"shopid": 7,
"tab": 7,
"shopname": {
"key": "shop_shop_shopname_7",
"text": "铁匠商店"
},
"upper_shop": {
"key": "shop_shop_upper_shop_7",
"text": "玩法商店"
},
"needshow": [
{
"a": "attr",
"t": "diamond",
"n": 1
}
],
"rtype": 2,
"rtime": 7,
"rnum": -1,
"rneed": [],
"shopitem": [
16001,
16002,
16003,
16004,
16005,
16006,
16007,
16008,
16009,
16010,
16011,
16012,
16013
]
} }
] ]

View File

@ -71,474 +71,6 @@
"mapidmin": 101, "mapidmin": 101,
"mapidmax": 9999 "mapidmax": 9999
}, },
{
"key": 6,
"id": 16001,
"iteminfo": [
{
"a": "item",
"t": "13001001",
"n": 100
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 20
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 7,
"id": 16002,
"iteminfo": [
{
"a": "item",
"t": "13001002",
"n": 100
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 20
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 8,
"id": 16003,
"iteminfo": [
{
"a": "item",
"t": "13001003",
"n": 100
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 20
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 9,
"id": 16004,
"iteminfo": [
{
"a": "item",
"t": "13002001",
"n": 100
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 20
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 10,
"id": 16005,
"iteminfo": [
{
"a": "item",
"t": "13002002",
"n": 100
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 20
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 11,
"id": 16006,
"iteminfo": [
{
"a": "item",
"t": "13002003",
"n": 100
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 20
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 12,
"id": 16007,
"iteminfo": [
{
"a": "item",
"t": "13003001",
"n": 100
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 20
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 13,
"id": 16008,
"iteminfo": [
{
"a": "item",
"t": "13003002",
"n": 100
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 20
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 14,
"id": 16009,
"iteminfo": [
{
"a": "item",
"t": "13003003",
"n": 100
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 20
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 15,
"id": 16010,
"iteminfo": [
{
"a": "item",
"t": "13000001",
"n": 100
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 20
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 16,
"id": 16011,
"iteminfo": [
{
"a": "item",
"t": "13000002",
"n": 100
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 20
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 17,
"id": 16012,
"iteminfo": [
{
"a": "item",
"t": "13000003",
"n": 100
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 20
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{
"key": 18,
"id": 16013,
"iteminfo": [
{
"a": "item",
"t": "13000004",
"n": 100
}
],
"preview": false,
"probability": 1000,
"need": [
{
"a": "attr",
"t": "diamond",
"n": 20
}
],
"sale": 1000,
"salelist": [
1000,
1000,
1000,
1000,
1000,
1000
],
"buyminnum": 999,
"buymaxnum": 999,
"vip": 0,
"lvmin": 1,
"lvmax": 60,
"mapidmin": 101,
"mapidmax": 9999
},
{ {
"key": 19, "key": 19,
"id": 10001, "id": 10001,

View File

@ -88,7 +88,7 @@ func (t *Task) Reset() {
t.circle = false t.circle = false
} }
//启动时间轮 // 启动时间轮
func (this *TimeWheel) Start() { func (this *TimeWheel) Start() {
// onlye once start // onlye once start
this.onceStart.Do( this.onceStart.Do(
@ -114,12 +114,12 @@ func (this *TimeWheel) Remove(task *Task) error {
return nil return nil
} }
//停止时间轮 // 停止时间轮
func (this *TimeWheel) Stop() { func (this *TimeWheel) Stop() {
this.stopC <- struct{}{} this.stopC <- struct{}{}
} }
//此处写法 为监控时间轮是否正常执行 // 此处写法 为监控时间轮是否正常执行
func (this *TimeWheel) tickGenerator() { func (this *TimeWheel) tickGenerator() {
if this.tickQueue == nil { if this.tickQueue == nil {
return return
@ -137,7 +137,7 @@ func (this *TimeWheel) tickGenerator() {
} }
} }
//调度器 // 调度器
func (this *TimeWheel) schduler() { func (this *TimeWheel) schduler() {
queue := this.ticker.C queue := this.ticker.C
if this.tickQueue != nil { if this.tickQueue != nil {
@ -160,7 +160,7 @@ func (this *TimeWheel) schduler() {
} }
} }
//清理 // 清理
func (this *TimeWheel) collectTask(task *Task) { func (this *TimeWheel) collectTask(task *Task) {
index := this.bucketIndexes[task.id] index := this.bucketIndexes[task.id]
delete(this.bucketIndexes, task.id) delete(this.bucketIndexes, task.id)
@ -185,8 +185,9 @@ func (this *TimeWheel) handleTick() {
} }
if task.async { if task.async {
go func(task *Task) { go func(_task *Task) {
go this.calltask(task, task.args...) this.calltask(_task, _task.args...)
this.collectTask(task)
}(task) }(task)
} else { } else {
@ -202,7 +203,9 @@ func (this *TimeWheel) handleTick() {
} }
// gc // gc
this.collectTask(task) if !task.async {
this.collectTask(task)
}
} }
if this.currentIndex == this.bucketsNum-1 { if this.currentIndex == this.bucketsNum-1 {
@ -213,7 +216,7 @@ func (this *TimeWheel) handleTick() {
this.currentIndex++ this.currentIndex++
} }
//执行时间轮事件 捕捉异常错误 防止程序崩溃 // 执行时间轮事件 捕捉异常错误 防止程序崩溃
func (this *TimeWheel) calltask(task *Task, args ...interface{}) { func (this *TimeWheel) calltask(task *Task, args ...interface{}) {
defer func() { //程序异常 收集异常信息传递给前端显示 defer func() { //程序异常 收集异常信息传递给前端显示
if r := recover(); r != nil { if r := recover(); r != nil {

View File

@ -7,7 +7,7 @@ import (
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
) )
//参数校验 // 参数校验
func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.ArenaBuyReq) (errdata *pb.ErrorData) { func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.ArenaBuyReq) (errdata *pb.ErrorData) {
if req.BuyNum == 0 { if req.BuyNum == 0 {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
@ -18,7 +18,7 @@ func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.ArenaBuyReq) (e
return return
} }
///获取自己的排行榜信息 // /获取自己的排行榜信息
func (this *apiComp) Buy(session comm.IUserSession, req *pb.ArenaBuyReq) (errdata *pb.ErrorData) { func (this *apiComp) Buy(session comm.IUserSession, req *pb.ArenaBuyReq) (errdata *pb.ErrorData) {
var ( var (
// global *cfg.GameGlobalData // global *cfg.GameGlobalData
@ -49,8 +49,8 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ArenaBuyReq) (errdat
return return
} }
this.module.modelArena.recoverTicket(session, info) this.module.modelArena.recoverTicket(session, info)
pricekey := this.module.ModuleTools.GetGlobalConf().ArenaBuy
if maxbuy, err = this.module.ModuleTools.GetPriceGroupLen(comm.ArenaBuyType); err != nil { if maxbuy, err = this.module.ModuleTools.GetPriceGroupLen(pricekey); err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ConfigNoFound, Code: pb.ErrorCode_ConfigNoFound,
Title: pb.ErrorCode_CacheReadError.ToString(), Title: pb.ErrorCode_CacheReadError.ToString(),

View File

@ -8,13 +8,13 @@ import (
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
) )
//参数校验 // 参数校验
func (this *apiComp) ChallengeRewardCheck(session comm.IUserSession, req *pb.ArenaChallengeRewardReq) (errdata *pb.ErrorData) { func (this *apiComp) ChallengeRewardCheck(session comm.IUserSession, req *pb.ArenaChallengeRewardReq) (errdata *pb.ErrorData) {
return return
} }
///挑战奖励领取 // /挑战奖励领取
func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaChallengeRewardReq) (errdata *pb.ErrorData) { func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaChallengeRewardReq) (errdata *pb.ErrorData) {
var ( var (
reward *cfg.GameArenaActiveRewardData reward *cfg.GameArenaActiveRewardData
@ -46,7 +46,7 @@ func (this *apiComp) ChallengeReward(session comm.IUserSession, req *pb.ArenaCha
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_BattleValidationFailed, Code: pb.ErrorCode_BattleValidationFailed,
Title: pb.ErrorCode_BattleValidationFailed.ToString(), Title: pb.ErrorCode_BattleValidationFailed.ToString(),
Message: err.Error(), Message: "CheckBattleReport check fail",
} }
return return
} }

View File

@ -39,17 +39,17 @@ type Chat struct {
modelChat *modelChatComp modelChat *modelChatComp
} }
//重构模块配置对象 // 重构模块配置对象
func (this *Chat) NewOptions() (options core.IModuleOptions) { func (this *Chat) NewOptions() (options core.IModuleOptions) {
return new(Options) return new(Options)
} }
//模块名 // 模块名
func (this *Chat) GetType() core.M_Modules { func (this *Chat) GetType() core.M_Modules {
return comm.ModuleChat return comm.ModuleChat
} }
//模块初始化接口 注册用户创建角色事件 // 模块初始化接口 注册用户创建角色事件
func (this *Chat) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { func (this *Chat) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options) err = this.ModuleBase.Init(service, module, options)
this.service = service.(base.IRPCXService) this.service = service.(base.IRPCXService)
@ -73,7 +73,7 @@ func (this *Chat) Start() (err error) {
return return
} }
//装备组件 // 装备组件
func (this *Chat) OnInstallComp() { func (this *Chat) OnInstallComp() {
this.ModuleBase.OnInstallComp() this.ModuleBase.OnInstallComp()
this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp) this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp)
@ -81,15 +81,15 @@ func (this *Chat) OnInstallComp() {
this.configure = this.RegisterComp(new(configureComp)).(*configureComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
} }
//Event------------------------------------------------------------------------------------------------------------ // Event------------------------------------------------------------------------------------------------------------
func (this *Chat) EventUserOffline(uid, sessionid string) { func (this *Chat) EventUserOffline(uid, sessionid string) {
if err := this.modelChat.removeCrossChannelMember(uid); err != nil { if err := this.modelChat.removeCrossChannelMember(uid); err != nil {
this.Error("EventUserOffline", log.Field{Key: "uid", Value: uid}, log.Field{Key: "err", Value: err.Error()}) this.Error("EventUserOffline", log.Field{Key: "uid", Value: uid}, log.Field{Key: "err", Value: err.Error()})
} }
} }
//RPC-------------------------------------------------------------------------------------------------------------- // RPC--------------------------------------------------------------------------------------------------------------
//推送聊天消息 // 推送聊天消息
func (this *Chat) Rpc_ModuleChatPushChat(ctx context.Context, args *pb.DBChat, reply *pb.EmptyResp) (err error) { func (this *Chat) Rpc_ModuleChatPushChat(ctx context.Context, args *pb.DBChat, reply *pb.EmptyResp) (err error) {
var ( var (
max_chat int32 max_chat int32
@ -133,8 +133,8 @@ func (this *Chat) Rpc_ModuleChatPushChat(ctx context.Context, args *pb.DBChat, r
return return
} }
//对外接口---------------------------------------------------------------------------------------------------------- // 对外接口----------------------------------------------------------------------------------------------------------
//向世界频道发送聊天消息 // 向世界频道发送聊天消息
func (this *Chat) SendWorldChat(msg *pb.DBChat) (errdata *pb.ErrorData) { func (this *Chat) SendWorldChat(msg *pb.DBChat) (errdata *pb.ErrorData) {
var ( var (
max_chat int32 max_chat int32
@ -173,7 +173,7 @@ func (this *Chat) SendWorldChat(msg *pb.DBChat) (errdata *pb.ErrorData) {
return return
} }
//向工会发送聊天消息 // 向工会发送聊天消息
func (this *Chat) SendUnionChat(msg *pb.DBChat) (errdata *pb.ErrorData) { func (this *Chat) SendUnionChat(msg *pb.DBChat) (errdata *pb.ErrorData) {
var ( var (
max_chat int32 max_chat int32
@ -212,7 +212,7 @@ func (this *Chat) SendUnionChat(msg *pb.DBChat) (errdata *pb.ErrorData) {
return return
} }
//向个人发送聊天消息 // 向个人发送聊天消息
func (this *Chat) SendUserChat(msg *pb.DBChat) (errdata *pb.ErrorData) { func (this *Chat) SendUserChat(msg *pb.DBChat) (errdata *pb.ErrorData) {
var ( var (
err error err error
@ -246,7 +246,7 @@ func (this *Chat) SendUserChat(msg *pb.DBChat) (errdata *pb.ErrorData) {
return return
} }
//广播系统消息 // 广播系统消息
func (this *Chat) SendSysChatToWorld(ctype comm.ChatSystemType, appenddata interface{}, value0 int32, value1 int32, agrs ...string) (errdata *pb.ErrorData) { func (this *Chat) SendSysChatToWorld(ctype comm.ChatSystemType, appenddata interface{}, value0 int32, value1 int32, agrs ...string) (errdata *pb.ErrorData) {
var ( var (
jsonStr []byte jsonStr []byte
@ -263,7 +263,9 @@ func (this *Chat) SendSysChatToWorld(ctype comm.ChatSystemType, appenddata inter
AppendInt: int64(st.Key), AppendInt: int64(st.Key),
AppendStrs: agrs, AppendStrs: agrs,
} }
if ctype == comm.ChatSystem3 { //装备分享
switch ctype {
case comm.ChatSystem3:
msg.Ctype = pb.ChatType_Share msg.Ctype = pb.ChatType_Share
if appenddata != nil { if appenddata != nil {
if jsonStr, err = json.Marshal(appenddata); err != nil { if jsonStr, err = json.Marshal(appenddata); err != nil {
@ -280,6 +282,23 @@ func (this *Chat) SendSysChatToWorld(ctype comm.ChatSystemType, appenddata inter
msg.AppendStr = string(jsonStr) msg.AppendStr = string(jsonStr)
} }
} }
case comm.ChatSystem7, comm.ChatSystem8, comm.ChatSystem9, comm.ChatSystem10, comm.ChatSystem11:
msg.Ctype = pb.ChatType_Share
if appenddata != nil {
if jsonStr, err = json.Marshal(appenddata); err != nil {
this.Errorf("err:%v", err)
} else {
data := map[string]interface{}{
agrs[1]: map[string]interface{}{
"key": agrs[1],
"appendStr": string(jsonStr),
"itemType": pb.ChatType_HeroShare,
},
}
jsonStr, _ = json.Marshal(data)
msg.AppendStr = string(jsonStr)
}
}
} }
if this.IsCross() { if this.IsCross() {
@ -307,7 +326,7 @@ func (this *Chat) SendSysChatToWorld(ctype comm.ChatSystemType, appenddata inter
return return
} }
//广播系统消息 // 广播系统消息
func (this *Chat) SendSysChatToUser(session comm.IUserSession, ctype comm.ChatSystemType, value0, value1 int32, agrs ...string) (errdata *pb.ErrorData) { func (this *Chat) SendSysChatToUser(session comm.IUserSession, ctype comm.ChatSystemType, value0, value1 int32, agrs ...string) (errdata *pb.ErrorData) {
if st, ok := this.configure.GetCheckChatSystem(int32(ctype), value0, value1); ok { if st, ok := this.configure.GetCheckChatSystem(int32(ctype), value0, value1); ok {
msg := &pb.DBChat{ msg := &pb.DBChat{
@ -320,8 +339,8 @@ func (this *Chat) SendSysChatToUser(session comm.IUserSession, ctype comm.ChatSy
return return
} }
//Push-------------------------------------------------------------------------------------------------------------- // Push--------------------------------------------------------------------------------------------------------------
//推送消息到世界 // 推送消息到世界
func (this *Chat) pushChatToWorld(msg *pb.DBChat) (err error) { func (this *Chat) pushChatToWorld(msg *pb.DBChat) (err error) {
data, _ := anypb.New(&pb.ChatMessagePush{Chat: msg}) data, _ := anypb.New(&pb.ChatMessagePush{Chat: msg})
if err = this.service.AcrossClusterBroadcast(context.Background(), msg.Stag, comm.Service_Gateway, string(comm.Rpc_GatewaySendRadioMsg), pb.UserMessage{ if err = this.service.AcrossClusterBroadcast(context.Background(), msg.Stag, comm.Service_Gateway, string(comm.Rpc_GatewaySendRadioMsg), pb.UserMessage{
@ -334,7 +353,7 @@ func (this *Chat) pushChatToWorld(msg *pb.DBChat) (err error) {
return return
} }
//推送消息到工会 // 推送消息到工会
func (this *Chat) pushChatToUnion(msg *pb.DBChat) (err error) { func (this *Chat) pushChatToUnion(msg *pb.DBChat) (err error) {
if members := this.sociaty.MembersBySociatyId(msg.UnionId); members != nil { if members := this.sociaty.MembersBySociatyId(msg.UnionId); members != nil {
users := make([]string, 0, len(members)) users := make([]string, 0, len(members))
@ -348,7 +367,7 @@ func (this *Chat) pushChatToUnion(msg *pb.DBChat) (err error) {
return return
} }
//推送私聊消息 // 推送私聊消息
func (this *Chat) pushChatToPrivate(msg *pb.DBChat) (err error) { func (this *Chat) pushChatToPrivate(msg *pb.DBChat) (err error) {
var ( var (
session comm.IUserSession session comm.IUserSession
@ -369,7 +388,7 @@ func (this *Chat) pushChatToPrivate(msg *pb.DBChat) (err error) {
return return
} }
//推送跨服频道消息 // 推送跨服频道消息
func (this *Chat) pushChatToCross(msg *pb.DBChat) (err error) { func (this *Chat) pushChatToCross(msg *pb.DBChat) (err error) {
var ( var (
users []*pb.CacheUser users []*pb.CacheUser
@ -383,7 +402,7 @@ func (this *Chat) pushChatToCross(msg *pb.DBChat) (err error) {
return return
} }
//推送系统消息 // 推送系统消息
func (this *Chat) pushChatToSystem(msg *pb.DBChat) (err error) { func (this *Chat) pushChatToSystem(msg *pb.DBChat) (err error) {
data, _ := anypb.New(&pb.ChatMessagePush{Chat: msg}) data, _ := anypb.New(&pb.ChatMessagePush{Chat: msg})
if err = this.service.ClusterBroadcast(context.Background(), comm.Service_Gateway, string(comm.Rpc_GatewaySendRadioMsg), pb.UserMessage{ if err = this.service.ClusterBroadcast(context.Background(), comm.Service_Gateway, string(comm.Rpc_GatewaySendRadioMsg), pb.UserMessage{

View File

@ -1,13 +1,14 @@
package equipment package equipment
import ( import (
"fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/lego/sys/log" "go_dreamfactory/lego/sys/log"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
) )
//参数校验 // 参数校验
func (this *apiComp) WashConfirmCheck(session comm.IUserSession, req *pb.EquipmentWashConfirmReq) (errdata *pb.ErrorData) { func (this *apiComp) WashConfirmCheck(session comm.IUserSession, req *pb.EquipmentWashConfirmReq) (errdata *pb.ErrorData) {
if req.Eid == "" || req.Pids == nil || len(req.Pids) == 0 { if req.Eid == "" || req.Pids == nil || len(req.Pids) == 0 {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
@ -18,11 +19,13 @@ func (this *apiComp) WashConfirmCheck(session comm.IUserSession, req *pb.Equipme
return return
} }
//锻造 // 锻造
func (this *apiComp) WashConfirm(session comm.IUserSession, req *pb.EquipmentWashConfirmReq) (errdata *pb.ErrorData) { func (this *apiComp) WashConfirm(session comm.IUserSession, req *pb.EquipmentWashConfirmReq) (errdata *pb.ErrorData) {
var ( var (
equip *pb.DB_Equipment equip *pb.DB_Equipment
attrlibrary *cfg.GameEquipAttrlibrarySData attrlibrary *cfg.GameEquipAttrlibrarySData
hero *pb.DBHero
equipments []*pb.DB_Equipment
err error err error
) )
if errdata = this.WashConfirmCheck(session, req); errdata != nil { if errdata = this.WashConfirmCheck(session, req); errdata != nil {
@ -74,6 +77,32 @@ func (this *apiComp) WashConfirm(session comm.IUserSession, req *pb.EquipmentWas
} }
return return
} }
if equip.HeroId != "" {
equipments = make([]*pb.DB_Equipment, 8)
if hero, errdata = this.module.ModuleHero.GetHeroByObjID(session.GetUserId(), equip.HeroId); errdata != nil {
return
}
for i, v := range hero.EquipID {
if v != "" {
if v != equip.Id {
if equipments[i], err = this.module.modelEquipment.QueryUserEquipmentsById(session.GetUserId(), v); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_EquipmentOnFoundEquipment,
Title: pb.ErrorCode_EquipmentOnFoundEquipment.ToString(),
Message: fmt.Sprintf("装备唯一 id:%s", v),
}
return
}
} else {
equipments[i] = equip
}
}
}
if errdata = this.module.ModuleHero.UpdateEquipment(session, hero, equipments); errdata != nil {
return
}
}
session.SendMsg(string(this.module.GetType()), "washconfirm", &pb.EquipmentWashConfirmResp{Issucc: true}) session.SendMsg(string(this.module.GetType()), "washconfirm", &pb.EquipmentWashConfirmResp{Issucc: true})
return return
} }

View File

@ -89,11 +89,13 @@ func (this *apiComp) Addblack(session comm.IUserSession, req *pb.FriendAddBlackR
// 将目标从好友列表中移除 // 将目标从好友列表中移除
friendIds := utils.Deletex(self.FriendIds, req.FriendId) friendIds := utils.Deletex(self.FriendIds, req.FriendId)
// 将好友从申请列表移除
applyIds := utils.Deletex(self.ApplyIds, req.FriendId)
//更新 //更新
err = this.module.modelFriend.Change(self.Uid, map[string]interface{}{ err = this.module.modelFriend.Change(self.Uid, map[string]interface{}{
"blackIds": self.BlackIds, "blackIds": self.BlackIds,
"friendIds": friendIds, "friendIds": friendIds,
"applyIds": applyIds,
}) })
if err != nil { if err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{

View File

@ -109,6 +109,7 @@ func (this *apiComp) Agree(session comm.IUserSession, req *pb.FriendAgreeReq) (e
} }
if err = this.module.modelFriend.Change(target.Uid, map[string]interface{}{ if err = this.module.modelFriend.Change(target.Uid, map[string]interface{}{
"friendIds": target.FriendIds, "friendIds": target.FriendIds,
"applyIds": target.ApplyIds,
}); err != nil { }); err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError, Code: pb.ErrorCode_DBError,

View File

@ -7,7 +7,7 @@ import (
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
) )
//参数校验 // 参数校验
func (this *apiComp) StrengthenUplvCheck(session comm.IUserSession, req *pb.HeroStrengthenUplvReq) (errdata *pb.ErrorData) { func (this *apiComp) StrengthenUplvCheck(session comm.IUserSession, req *pb.HeroStrengthenUplvReq) (errdata *pb.ErrorData) {
if req.HeroObjID == "" || len(req.Item) == 0 { if req.HeroObjID == "" || len(req.Item) == 0 {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
@ -20,7 +20,7 @@ func (this *apiComp) StrengthenUplvCheck(session comm.IUserSession, req *pb.Hero
return return
} }
/// 英雄升级 // / 英雄升级
func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStrengthenUplvReq) (errdata *pb.ErrorData) { func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStrengthenUplvReq) (errdata *pb.ErrorData) {
var ( var (
@ -96,7 +96,7 @@ func (this *apiComp) StrengthenUplv(session comm.IUserSession, req *pb.HeroStren
//英雄升级 【玩家名称】已将【英雄名称】培养至60级 //英雄升级 【玩家名称】已将【英雄名称】培养至60级
if user := this.module.ModuleUser.GetUser(session.GetUserId()); user != nil { if user := this.module.ModuleUser.GetUser(session.GetUserId()); user != nil {
this.chat.SendSysChatToWorld(comm.ChatSystem7, nil, _hero.Lv, 0, user.Name, _hero.HeroID) this.chat.SendSysChatToWorld(comm.ChatSystem7, _hero, _hero.Lv, 0, user.Name, _hero.HeroID)
} else { } else {
this.module.Errorf("no found userdata uid:%s", session.GetUserId()) this.module.Errorf("no found userdata uid:%s", session.GetUserId())
} }

View File

@ -1,6 +1,7 @@
package shop package shop
import ( import (
"fmt"
"go_dreamfactory/comm" "go_dreamfactory/comm"
"go_dreamfactory/pb" "go_dreamfactory/pb"
cfg "go_dreamfactory/sys/configure/structs" cfg "go_dreamfactory/sys/configure/structs"
@ -8,9 +9,9 @@ import (
"math" "math"
) )
//参数校验 // 参数校验
func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.ShopBuyReq) (errdata *pb.ErrorData) { func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.ShopBuyReq) (errdata *pb.ErrorData) {
if req.ShopType == 0 || req.GoodsId == 0 || req.BuyNum <= 0 { if req.ShopType == 0 || req.Gid == 0 || req.BuyNum <= 0 {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError, Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(), Title: pb.ErrorCode_ReqParameterError.ToString(),
@ -19,12 +20,13 @@ func (this *apiComp) BuyCheck(session comm.IUserSession, req *pb.ShopBuyReq) (er
return return
} }
///获取用户商品列表 // /获取用户商品列表
func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata *pb.ErrorData) { func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata *pb.ErrorData) {
var ( var (
err error err error
conf *cfg.GameShopitemData conf *cfg.GameShopitemData
shopData *pb.DBShop shopData *pb.DBShop
good *pb.UserShopGood
filed string filed string
record *pb.UserShopData record *pb.UserShopData
need []*cfg.Gameatn need []*cfg.Gameatn
@ -35,14 +37,6 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata
return return
} }
if conf, err = this.module.configure.GetShopItemsConfigure(req.GoodsId); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_SystemError,
Title: pb.ErrorCode_SystemError.ToString(),
Message: err.Error(),
}
return
}
if shopData, err = this.module.modelShop.QueryUserShopData(session.GetUserId()); err != nil { //没有购买记录 if shopData, err = this.module.modelShop.QueryUserShopData(session.GetUserId()); err != nil { //没有购买记录
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_DBError, Code: pb.ErrorCode_DBError,
@ -51,23 +45,6 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata
} }
return return
} }
need = make([]*cfg.Gameatn, len(conf.Need))
for i, v := range conf.Need {
need[i] = &cfg.Gameatn{
A: v.A,
T: v.T,
N: int32(math.Ceil(float64(v.N)*float64(conf.Sale)/float64(1000))) * req.BuyNum,
}
}
give = make([]*cfg.Gameatn, len(conf.Iteminfo))
for i, v := range conf.Iteminfo {
give[i] = &cfg.Gameatn{
A: v.A,
T: v.T,
N: v.N * req.BuyNum,
}
}
switch req.ShopType { switch req.ShopType {
case pb.ShopType_GoldShop: case pb.ShopType_GoldShop:
@ -106,18 +83,64 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata
return return
} }
if record == nil { if record == nil {
record = &pb.UserShopData{ errdata = &pb.ErrorData{
Buy: map[int32]int32{}, Code: pb.ErrorCode_DBError,
Title: pb.ErrorCode_DBError.ToString(),
Message: err.Error(),
}
return
}
for _, v := range record.Items {
if v.Id == req.Gid {
good = v
} }
} }
if conf.Buyminnum-record.Buy[req.GoodsId] < req.BuyNum {
if good == nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_ReqParameterError,
Title: pb.ErrorCode_ReqParameterError.ToString(),
Message: fmt.Sprintf("no found good:%d", req.Gid),
}
return
}
if conf, err = this.module.configure.GetShopItemsConfigure(good.Gid); err != nil {
errdata = &pb.ErrorData{
Code: pb.ErrorCode_SystemError,
Title: pb.ErrorCode_SystemError.ToString(),
Message: err.Error(),
}
return
}
need = make([]*cfg.Gameatn, len(conf.Need))
for i, v := range conf.Need {
need[i] = &cfg.Gameatn{
A: v.A,
T: v.T,
N: int32(math.Ceil(float64(v.N)*float64(conf.Sale)/float64(1000))) * req.BuyNum,
}
}
give = make([]*cfg.Gameatn, len(conf.Iteminfo))
for i, v := range conf.Iteminfo {
give[i] = &cfg.Gameatn{
A: v.A,
T: v.T,
N: v.N * req.BuyNum,
}
}
if conf.Buyminnum-good.Buy < req.BuyNum {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_ShopGoodsIsSoldOut, Code: pb.ErrorCode_ShopGoodsIsSoldOut,
Title: pb.ErrorCode_ShopGoodsIsSoldOut.ToString(), Title: pb.ErrorCode_ShopGoodsIsSoldOut.ToString(),
} }
return return
} }
record.Buy[req.GoodsId] += req.BuyNum good.Buy += req.BuyNum
if errdata = this.module.ConsumeRes(session, need, true); errdata != nil { if errdata = this.module.ConsumeRes(session, need, true); errdata != nil {
return return
} }
@ -127,25 +150,21 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.ShopBuyReq) (errdata
return return
} }
} else { } else {
if errdata = this.module.equip.AddEquipment(session, record.Preview[req.GoodsId]); errdata != nil { if errdata = this.module.equip.AddEquipment(session, record.Preview[req.Gid]); errdata != nil {
return return
} }
} }
//随机任务 //随机任务
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype64, 1)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype64, 1))
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype64, 1)
for _, v := range give { for _, v := range give {
if v.A == comm.ItemType { if v.A == comm.ItemType {
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype65, v.N, utils.ToInt32(v.T))) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype65, v.N, utils.ToInt32(v.T)))
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype65, v.N, utils.ToInt32(v.T))
} }
} }
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype66, 1, int32(req.ShopType))) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype66, 1, int32(req.ShopType)))
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype66, 1, int32(req.ShopType))
for _, v := range need { for _, v := range need {
if v.A == comm.AttrType { if v.A == comm.AttrType {
// tasks = append(tasks, comm.GetBuriedParam(comm.Rtype67, v.N, utils.ToInt32(v.T)))
switch v.T { switch v.T {
case comm.ResGold: case comm.ResGold:
tasks = append(tasks, comm.GetBuriedParam(comm.Rtype67, v.N, 1)) tasks = append(tasks, comm.GetBuriedParam(comm.Rtype67, v.N, 1))

View File

@ -25,6 +25,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
var ( var (
err error err error
filed string filed string
refresh int32
shopconf *cfg.GameShopData shopconf *cfg.GameShopData
shopData *pb.DBShop shopData *pb.DBShop
udata *pb.DBUser udata *pb.DBUser
@ -66,6 +67,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
case pb.ShopType_GoldShop: case pb.ShopType_GoldShop:
sdata = shopData.GoldShop sdata = shopData.GoldShop
filed = "goldShop" filed = "goldShop"
refresh = this.module.privilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType2)
break break
case pb.ShopType_DiamondShop: case pb.ShopType_DiamondShop:
sdata = shopData.DiamondShop sdata = shopData.DiamondShop
@ -100,7 +102,7 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
} }
if sdata == nil { if sdata == nil {
sdata = &pb.UserShopData{ sdata = &pb.UserShopData{
Buy: map[int32]int32{}, Items: make([]*pb.UserShopGood, 0),
} }
} }
if shopconf.Rnum > 0 { if shopconf.Rnum > 0 {
@ -127,14 +129,15 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
if req.IsManualRefresh && shopconf.Rnum > 0 { //可以手动刷新 if req.IsManualRefresh && shopconf.Rnum > 0 { //可以手动刷新
isrefresh := false isrefresh := false
refresh := int(this.module.privilege.GetCountByPrivilegeId(session.GetUserId(), comm.PrivilegeType2))
if refresh > 0 { // if refresh > 0 { //
if time.Unix(shopData.RefreshtimegoldShop, 0).Day() < configure.Now().Day() { if time.Unix(shopData.RefreshtimegoldShop, 0).Day() < configure.Now().Day() {
shopData.RefreshtimegoldShop = configure.Now().Unix() shopData.RefreshtimegoldShop = configure.Now().Unix()
shopData.RefreshnumgoldShop = 0 shopData.RefreshnumgoldShop = 0
} }
if int(shopData.RefreshnumgoldShop) < refresh { if shopData.RefreshnumgoldShop < refresh {
isrefresh = true isrefresh = true
shopData.RefreshnumgoldShop++
} }
} }
if !isrefresh { if !isrefresh {
@ -166,15 +169,20 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
} }
items = append(items, randomGoods(_items)) items = append(items, randomGoods(_items))
} }
sdata.Buy = make(map[int32]int32)
sdata.LastRefreshTime = configure.Now().Unix() sdata.LastRefreshTime = configure.Now().Unix()
sdata.ManualRefreshNum++ sdata.ManualRefreshNum++
sdata.Items = make([]int32, len(items)) sdata.Leftfreerefreshnum = refresh - shopData.RefreshnumgoldShop
sdata.Items = make([]*pb.UserShopGood, len(items))
sdata.Preview = make(map[int32]*pb.DB_Equipment) sdata.Preview = make(map[int32]*pb.DB_Equipment)
for i, v := range items { for i, v := range items {
sdata.Items[i] = v.Key id := v.Key*100 + int32(i)
sdata.Items[i] = &pb.UserShopGood{
Id: id,
Gid: v.Key,
Buy: 0,
}
if v.Preview { //是否预览 if v.Preview { //是否预览
if errdata, sdata.Preview[v.Key] = this.module.equip.NewEquipment(session.GetUserId(), v.Iteminfo[0].T); errdata != nil { if errdata, sdata.Preview[id] = this.module.equip.NewEquipment(session.GetUserId(), v.Iteminfo[0].T); errdata != nil {
return return
} }
} }
@ -213,14 +221,18 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
} }
items = append(items, randomGoods(_items)) items = append(items, randomGoods(_items))
} }
sdata.Buy = make(map[int32]int32)
sdata.LastRefreshTime = configure.Now().Unix() sdata.LastRefreshTime = configure.Now().Unix()
sdata.Items = make([]int32, len(items)) sdata.Items = make([]*pb.UserShopGood, len(items))
sdata.Preview = make(map[int32]*pb.DB_Equipment) sdata.Preview = make(map[int32]*pb.DB_Equipment)
for i, v := range items { for i, v := range items {
sdata.Items[i] = v.Key id := v.Key*100 + int32(i)
sdata.Items[i] = &pb.UserShopGood{
Id: id,
Gid: v.Key,
Buy: 0,
}
if v.Preview { //是否预览 if v.Preview { //是否预览
if errdata, sdata.Preview[v.Key] = this.module.equip.NewEquipment(session.GetUserId(), v.Iteminfo[0].T); errdata != nil { if errdata, sdata.Preview[id] = this.module.equip.NewEquipment(session.GetUserId(), v.Iteminfo[0].T); errdata != nil {
return return
} }
} }
@ -230,7 +242,11 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
// this.module.ModuleRtask.SendToRtask(session, comm.Rtype105, 1) // this.module.ModuleRtask.SendToRtask(session, comm.Rtype105, 1)
go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype105, 1)) go this.module.ModuleBuried.TriggerBuried(session.GetUserId(), comm.GetBuriedParam(comm.Rtype105, 1))
} else { //返回以前的商品列表 } else { //返回以前的商品列表
if items, err = this.module.configure.GetShopItemsConfigureByIds(sdata.Items...); err != nil { keys := make([]int32, len(sdata.Items))
for i, v := range sdata.Items {
keys[i] = v.Gid
}
if items, err = this.module.configure.GetShopItemsConfigureByIds(keys...); err != nil {
errdata = &pb.ErrorData{ errdata = &pb.ErrorData{
Code: pb.ErrorCode_SystemError, Code: pb.ErrorCode_SystemError,
Title: pb.ErrorCode_SystemError.ToString(), Title: pb.ErrorCode_SystemError.ToString(),
@ -247,6 +263,6 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
} }
return return
} }
session.SendMsg(string(this.module.GetType()), "getlist", &pb.ShopGetListResp{SType: req.SType, IsManualRefresh: req.IsManualRefresh, Goods: goods, SurplusRefreshNum: leftrefnum, Lastrefreshtime: sdata.LastRefreshTime}) session.SendMsg(string(this.module.GetType()), "getlist", &pb.ShopGetListResp{SType: req.SType, IsManualRefresh: req.IsManualRefresh, Goods: goods, SurplusRefreshNum: leftrefnum, Lastrefreshtime: sdata.LastRefreshTime, Leftfreerefreshnum: sdata.Leftfreerefreshnum})
return return
} }

View File

@ -14,13 +14,13 @@ const (
game_shopitem = "game_shopitem.json" game_shopitem = "game_shopitem.json"
) )
///背包配置管理组件 // /背包配置管理组件
type configureComp struct { type configureComp struct {
modules.MCompConfigure modules.MCompConfigure
module *Shop module *Shop
} }
//组件初始化接口 // 组件初始化接口
func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { func (this *configureComp) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
this.MCompConfigure.Init(service, module, comp, options) this.MCompConfigure.Init(service, module, comp, options)
this.module = module.(*Shop) this.module = module.(*Shop)
@ -29,7 +29,7 @@ func (this *configureComp) Init(service core.IService, module core.IModule, comp
return return
} }
//获取装备配置数据 // 获取装备配置数据
func (this *configureComp) GetShopConfigure(id int32) (configure *cfg.GameShopData, err error) { func (this *configureComp) GetShopConfigure(id int32) (configure *cfg.GameShopData, err error) {
var ( var (
v interface{} v interface{}
@ -48,7 +48,7 @@ func (this *configureComp) GetShopConfigure(id int32) (configure *cfg.GameShopDa
return return
} }
//读取商品 // 读取商品
func (this *configureComp) GetShopItemsConfigure(key int32) (result *cfg.GameShopitemData, err error) { func (this *configureComp) GetShopItemsConfigure(key int32) (result *cfg.GameShopitemData, err error) {
var ( var (
v interface{} v interface{}
@ -67,7 +67,7 @@ func (this *configureComp) GetShopItemsConfigure(key int32) (result *cfg.GameSho
return return
} }
//读取商品组 // 读取商品组
func (this *configureComp) GetShopItemsConfigureByGroups(groupid int32, user *pb.DBUser) (result []*cfg.GameShopitemData, err error) { func (this *configureComp) GetShopItemsConfigureByGroups(groupid int32, user *pb.DBUser) (result []*cfg.GameShopitemData, err error) {
result = make([]*cfg.GameShopitemData, 0, 10) result = make([]*cfg.GameShopitemData, 0, 10)
var ( var (
@ -92,7 +92,7 @@ func (this *configureComp) GetShopItemsConfigureByGroups(groupid int32, user *pb
return return
} }
//读取商品 // 读取商品
func (this *configureComp) GetShopItemsConfigureByIds(keys ...int32) (result []*cfg.GameShopitemData, err error) { func (this *configureComp) GetShopItemsConfigureByIds(keys ...int32) (result []*cfg.GameShopitemData, err error) {
result = make([]*cfg.GameShopitemData, 0, len(keys)) result = make([]*cfg.GameShopitemData, 0, len(keys))
var ( var (
@ -111,6 +111,8 @@ func (this *configureComp) GetShopItemsConfigureByIds(keys ...int32) (result []*
result = append(result, item) result = append(result, item)
} else { } else {
this.module.Errorf("no found GetShopItemsConfigureByIds:%d", v) this.module.Errorf("no found GetShopItemsConfigureByIds:%d", v)
err = comm.NewNotFoundConfErr(string(this.module.GetType()), game_shopitem, v)
return
} }
} }
} }

View File

@ -8,7 +8,7 @@ import (
"math/big" "math/big"
) )
//随机商品列表 // 随机商品列表
func randomGoods(goods []*cfg.GameShopitemData) (result *cfg.GameShopitemData) { func randomGoods(goods []*cfg.GameShopitemData) (result *cfg.GameShopitemData) {
var ( var (
totle int64 totle int64
@ -30,20 +30,16 @@ func randomGoods(goods []*cfg.GameShopitemData) (result *cfg.GameShopitemData) {
return return
} }
//转换商品对象 // 转换商品对象
func transGoods(goods []*cfg.GameShopitemData, sdata *pb.UserShopData) (result []*pb.ShopItem) { func transGoods(goods []*cfg.GameShopitemData, sdata *pb.UserShopData) (result []*pb.ShopItem) {
result = make([]*pb.ShopItem, len(goods)) result = make([]*pb.ShopItem, len(goods))
// ok := false
// uitem := &pb.DBShopItem{}
for i, v := range goods { for i, v := range goods {
// if uitem, ok = ushoputem[v.Key]; !ok {
// uitem = &pb.DBShopItem{}
// }
result[i] = &pb.ShopItem{ result[i] = &pb.ShopItem{
Gid: sdata.Items[i].Id,
GoodsId: v.Key, GoodsId: v.Key,
Sale: int32(v.Sale), Sale: int32(v.Sale),
} }
result[i].LeftBuyNum = v.Buyminnum - sdata.Buy[v.Key] result[i].LeftBuyNum = v.Buyminnum - sdata.Items[i].Buy
result[i].Items = make([]*pb.UserAssets, len(v.Iteminfo)) result[i].Items = make([]*pb.UserAssets, len(v.Iteminfo))
for i1, v1 := range v.Iteminfo { for i1, v1 := range v.Iteminfo {
result[i].Items[i1] = &pb.UserAssets{ result[i].Items[i1] = &pb.UserAssets{

View File

@ -28,12 +28,12 @@ type Shop struct {
modelShop *modelShopComp modelShop *modelShopComp
} }
//模块名 // 模块名
func (this *Shop) GetType() core.M_Modules { func (this *Shop) GetType() core.M_Modules {
return comm.ModuleShop return comm.ModuleShop
} }
//模块初始化接口 注册用户创建角色事件 // 模块初始化接口 注册用户创建角色事件
func (this *Shop) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) { func (this *Shop) Init(service core.IService, module core.IModule, options core.IModuleOptions) (err error) {
err = this.ModuleBase.Init(service, module, options) err = this.ModuleBase.Init(service, module, options)
this.service = service.(base.IRPCXService) this.service = service.(base.IRPCXService)
@ -53,7 +53,7 @@ func (this *Shop) Start() (err error) {
return return
} }
//装备组件 // 装备组件
func (this *Shop) OnInstallComp() { func (this *Shop) OnInstallComp() {
this.ModuleBase.OnInstallComp() this.ModuleBase.OnInstallComp()
this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp) this.api_comp = this.RegisterComp(new(apiComp)).(*apiComp)
@ -61,7 +61,7 @@ func (this *Shop) OnInstallComp() {
this.configure = this.RegisterComp(new(configureComp)).(*configureComp) this.configure = this.RegisterComp(new(configureComp)).(*configureComp)
} }
//Event------------------------------------------------------------------------------------------------------------ // Event------------------------------------------------------------------------------------------------------------
func (this *Shop) EventUserOffline(session comm.IUserSession) { func (this *Shop) EventUserOffline(session comm.IUserSession) {
this.modelShop.DelByUId(session.GetUserId(), db.SetDBMgoLog(false)) this.modelShop.DelByUId(session.GetUserId(), db.SetDBMgoLog(false))
} }

View File

@ -30,12 +30,12 @@ func newService(ops ...rpcx.Option) core.IService {
return s return s
} }
//梦工厂基础服务对象 // 梦工厂基础服务对象
type TestService struct { type TestService struct {
rpcx.RPCXService rpcx.RPCXService
} }
//初始化相关系统 // 初始化相关系统
func (this *TestService) InitSys() { func (this *TestService) InitSys() {
this.RPCXService.InitSys() this.RPCXService.InitSys()
if err := db.OnInit(this.GetSettings().Sys["db"]); err != nil { if err := db.OnInit(this.GetSettings().Sys["db"]); err != nil {
@ -54,7 +54,7 @@ var service core.IService
var s_gateComp comm.ISC_GateRouteComp = services.NewGateRouteComp() var s_gateComp comm.ISC_GateRouteComp = services.NewGateRouteComp()
var module = new(shop.Shop) var module = new(shop.Shop)
//测试环境下初始化db和cache 系统 // 测试环境下初始化db和cache 系统
func TestMain(m *testing.M) { func TestMain(m *testing.M) {
service = newService( service = newService(
rpcx.SetConfPath("../../bin/conf/worker_1.yaml"), rpcx.SetConfPath("../../bin/conf/worker_1.yaml"),
@ -76,18 +76,10 @@ func TestMain(m *testing.M) {
defer os.Exit(m.Run()) defer os.Exit(m.Run())
} }
//测试api_getlist // 测试api_getlist
func Test_Module_APIGetList(t *testing.T) { func Test_Module_APIGetList(t *testing.T) {
data, _ := ptypes.MarshalAny(&pb.ShopGetListReq{SType: pb.ShopType_GoldShop, IsManualRefresh: false}) data, _ := ptypes.MarshalAny(&pb.ShopGetListReq{SType: pb.ShopType_GoldShop, IsManualRefresh: false})
reply := &pb.RPCMessageReply{} reply := &pb.RPCMessageReply{}
s_gateComp.ReceiveMsg(context.Background(), &pb.AgentMessage{UserId: "0_62b16dda909b2f8faeff788d", MainType: "shop", SubType: "getlist", Message: data}, reply) s_gateComp.ReceiveMsg(context.Background(), &pb.AgentMessage{UserId: "0_62b16dda909b2f8faeff788d", MainType: "shop", SubType: "getlist", Message: data}, reply)
log.Debugf("reply:%v", reply) log.Debugf("reply:%v", reply)
} }
//测试api_buy
func Test_Module_APIBuy(t *testing.T) {
data, _ := ptypes.MarshalAny(&pb.ShopBuyReq{GoodsId: 7})
reply := &pb.RPCMessageReply{}
s_gateComp.ReceiveMsg(context.Background(), &pb.AgentMessage{UserId: "0_62b16dda909b2f8faeff788d", MainType: "shop", SubType: "buy", Message: data}, reply)
log.Debugf("reply:%v", reply)
}

View File

@ -33,7 +33,7 @@ const (
game_food = "game_breakingbad.json" game_food = "game_breakingbad.json"
) )
///配置管理基础组件 // /配置管理基础组件
type MCompConfigure struct { type MCompConfigure struct {
cbase.ModuleCompBase cbase.ModuleCompBase
hlock sync.RWMutex hlock sync.RWMutex
@ -56,7 +56,7 @@ type MCompConfigure struct {
_price map[int32][]*cfg.GamePricegroupData _price map[int32][]*cfg.GamePricegroupData
} }
//组件初始化接口 // 组件初始化接口
func (this *MCompConfigure) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) { func (this *MCompConfigure) Init(service core.IService, module core.IModule, comp core.IModuleComp, options core.IModuleOptions) (err error) {
err = this.ModuleCompBase.Init(service, module, comp, options) err = this.ModuleCompBase.Init(service, module, comp, options)
err = this.LoadConfigure(game_global, cfg.NewGameGlobal) err = this.LoadConfigure(game_global, cfg.NewGameGlobal)
@ -293,7 +293,7 @@ func (this *MCompConfigure) LoadConfigure(name string, fn interface{}) (err erro
return configure.RegisterConfigure(name, fn, nil) return configure.RegisterConfigure(name, fn, nil)
} }
//加载一个配置文件 // 加载一个配置文件
func (this *MCompConfigure) LoadDropData() { func (this *MCompConfigure) LoadDropData() {
if v, err := this.GetConfigure(game_drop); err == nil { if v, err := this.GetConfigure(game_drop); err == nil {
if configure, ok := v.(*cfg.GameDrop); ok { if configure, ok := v.(*cfg.GameDrop); ok {
@ -320,7 +320,7 @@ func (this *MCompConfigure) LoadDropData() {
return return
} }
//加载多个配置文件 // 加载多个配置文件
func (this *MCompConfigure) LoadMultiConfigure(confs map[string]interface{}) (err error) { func (this *MCompConfigure) LoadMultiConfigure(confs map[string]interface{}) (err error) {
for k, v := range confs { for k, v := range confs {
err = configure.RegisterConfigure(k, v, nil) err = configure.RegisterConfigure(k, v, nil)
@ -332,12 +332,12 @@ func (this *MCompConfigure) LoadMultiConfigure(confs map[string]interface{}) (er
return return
} }
//读取配置数据 // 读取配置数据
func (this *MCompConfigure) GetConfigure(name string) (v interface{}, err error) { func (this *MCompConfigure) GetConfigure(name string) (v interface{}, err error) {
return configure.GetConfigure(name) return configure.GetConfigure(name)
} }
//全局配置 // 全局配置
func (this *MCompConfigure) GetGlobalConf() *cfg.GameGlobalData { func (this *MCompConfigure) GetGlobalConf() *cfg.GameGlobalData {
var ( var (
configure *cfg.GameGlobal configure *cfg.GameGlobal
@ -492,7 +492,7 @@ func (this *MCompConfigure) GetHeroConfigData() (data []*cfg.GameHeroData) {
return nil return nil
} }
//读取物品配置 // 读取物品配置
func (this *MCompConfigure) GetItemConfigureData(id string) (item *cfg.GameItemData, err error) { func (this *MCompConfigure) GetItemConfigureData(id string) (item *cfg.GameItemData, err error) {
var ( var (
v interface{} v interface{}
@ -597,7 +597,7 @@ func (this *MCompConfigure) GetPriceGroupCost(pricegroupId int32, purchase int32
return return
} }
for _, v := range this._price[pricegroupId] { for _, v := range this._price[pricegroupId] {
if v.Purchasemin <= purchase && purchase <= v.Purchasemax { if v.Purchasemin <= purchase && (purchase <= v.Purchasemax || v.Purchasemax == -1) {
res = v.Cost res = v.Cost
return return
} }
@ -609,8 +609,12 @@ func (this *MCompConfigure) GetPriceGroupLen(pricegroupId int32) (count int32, e
if _, ok := this._price[pricegroupId]; !ok { if _, ok := this._price[pricegroupId]; !ok {
err = comm.NewNotFoundConfErr("tools", game_price, pricegroupId) err = comm.NewNotFoundConfErr("tools", game_price, pricegroupId)
} }
count = int32(len(this._price[pricegroupId])) count = 0
for _, v := range this._price[pricegroupId] {
if count < v.Purchasemax {
count = v.Purchasemax
}
}
return return
} }

View File

@ -84,22 +84,85 @@ func (ShopType) EnumDescriptor() ([]byte, []int) {
return file_shop_shop_db_proto_rawDescGZIP(), []int{0} return file_shop_shop_db_proto_rawDescGZIP(), []int{0}
} }
type UserShopGood struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id"` //实例id
Gid int32 `protobuf:"varint,2,opt,name=gid,proto3" json:"gid"` //商品Id
Buy int32 `protobuf:"varint,3,opt,name=buy,proto3" json:"buy"` //购买实例
}
func (x *UserShopGood) Reset() {
*x = UserShopGood{}
if protoimpl.UnsafeEnabled {
mi := &file_shop_shop_db_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UserShopGood) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UserShopGood) ProtoMessage() {}
func (x *UserShopGood) ProtoReflect() protoreflect.Message {
mi := &file_shop_shop_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 UserShopGood.ProtoReflect.Descriptor instead.
func (*UserShopGood) Descriptor() ([]byte, []int) {
return file_shop_shop_db_proto_rawDescGZIP(), []int{0}
}
func (x *UserShopGood) GetId() int32 {
if x != nil {
return x.Id
}
return 0
}
func (x *UserShopGood) GetGid() int32 {
if x != nil {
return x.Gid
}
return 0
}
func (x *UserShopGood) GetBuy() int32 {
if x != nil {
return x.Buy
}
return 0
}
type UserShopData struct { type UserShopData struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
LastRefreshTime int64 `protobuf:"varint,1,opt,name=LastRefreshTime,proto3" json:"LastRefreshTime"` //最后一次刷新时间 LastRefreshTime int64 `protobuf:"varint,1,opt,name=LastRefreshTime,proto3" json:"LastRefreshTime"` //最后一次刷新时间
ManualRefreshNum int32 `protobuf:"varint,2,opt,name=ManualRefreshNum,proto3" json:"ManualRefreshNum"` //手动刷新次数 ManualRefreshNum int32 `protobuf:"varint,2,opt,name=ManualRefreshNum,proto3" json:"ManualRefreshNum"` //手动刷新次数
Items []int32 `protobuf:"varint,3,rep,packed,name=Items,proto3" json:"Items"` //商品列表 Items []*UserShopGood `protobuf:"bytes,3,rep,name=Items,proto3" json:"Items"` //商品列表
Buy map[int32]int32 `protobuf:"bytes,4,rep,name=buy,proto3" json:"buy" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` //购买记录 Preview map[int32]*DB_Equipment `protobuf:"bytes,5,rep,name=preview,proto3" json:"preview" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //预览数据
Preview map[int32]*DB_Equipment `protobuf:"bytes,5,rep,name=preview,proto3" json:"preview" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` //预览数据 Leftfreerefreshnum int32 `protobuf:"varint,6,opt,name=leftfreerefreshnum,proto3" json:"leftfreerefreshnum"` //剩余免费刷新次数
} }
func (x *UserShopData) Reset() { func (x *UserShopData) Reset() {
*x = UserShopData{} *x = UserShopData{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_shop_shop_db_proto_msgTypes[0] mi := &file_shop_shop_db_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -112,7 +175,7 @@ func (x *UserShopData) String() string {
func (*UserShopData) ProtoMessage() {} func (*UserShopData) ProtoMessage() {}
func (x *UserShopData) ProtoReflect() protoreflect.Message { func (x *UserShopData) ProtoReflect() protoreflect.Message {
mi := &file_shop_shop_db_proto_msgTypes[0] mi := &file_shop_shop_db_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -125,7 +188,7 @@ func (x *UserShopData) ProtoReflect() protoreflect.Message {
// Deprecated: Use UserShopData.ProtoReflect.Descriptor instead. // Deprecated: Use UserShopData.ProtoReflect.Descriptor instead.
func (*UserShopData) Descriptor() ([]byte, []int) { func (*UserShopData) Descriptor() ([]byte, []int) {
return file_shop_shop_db_proto_rawDescGZIP(), []int{0} return file_shop_shop_db_proto_rawDescGZIP(), []int{1}
} }
func (x *UserShopData) GetLastRefreshTime() int64 { func (x *UserShopData) GetLastRefreshTime() int64 {
@ -142,20 +205,13 @@ func (x *UserShopData) GetManualRefreshNum() int32 {
return 0 return 0
} }
func (x *UserShopData) GetItems() []int32 { func (x *UserShopData) GetItems() []*UserShopGood {
if x != nil { if x != nil {
return x.Items return x.Items
} }
return nil return nil
} }
func (x *UserShopData) GetBuy() map[int32]int32 {
if x != nil {
return x.Buy
}
return nil
}
func (x *UserShopData) GetPreview() map[int32]*DB_Equipment { func (x *UserShopData) GetPreview() map[int32]*DB_Equipment {
if x != nil { if x != nil {
return x.Preview return x.Preview
@ -163,6 +219,13 @@ func (x *UserShopData) GetPreview() map[int32]*DB_Equipment {
return nil return nil
} }
func (x *UserShopData) GetLeftfreerefreshnum() int32 {
if x != nil {
return x.Leftfreerefreshnum
}
return 0
}
type DBShop struct { type DBShop struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -184,7 +247,7 @@ type DBShop struct {
func (x *DBShop) Reset() { func (x *DBShop) Reset() {
*x = DBShop{} *x = DBShop{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_shop_shop_db_proto_msgTypes[1] mi := &file_shop_shop_db_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@ -197,7 +260,7 @@ func (x *DBShop) String() string {
func (*DBShop) ProtoMessage() {} func (*DBShop) ProtoMessage() {}
func (x *DBShop) ProtoReflect() protoreflect.Message { func (x *DBShop) ProtoReflect() protoreflect.Message {
mi := &file_shop_shop_db_proto_msgTypes[1] mi := &file_shop_shop_db_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@ -210,7 +273,7 @@ func (x *DBShop) ProtoReflect() protoreflect.Message {
// Deprecated: Use DBShop.ProtoReflect.Descriptor instead. // Deprecated: Use DBShop.ProtoReflect.Descriptor instead.
func (*DBShop) Descriptor() ([]byte, []int) { func (*DBShop) Descriptor() ([]byte, []int) {
return file_shop_shop_db_proto_rawDescGZIP(), []int{1} return file_shop_shop_db_proto_rawDescGZIP(), []int{2}
} }
func (x *DBShop) GetId() string { func (x *DBShop) GetId() string {
@ -296,66 +359,68 @@ var file_shop_shop_db_proto_rawDesc = []byte{
0x0a, 0x12, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x0a, 0x12, 0x73, 0x68, 0x6f, 0x70, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x64, 0x62, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x2f,
0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xdd, 0x02, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x74, 0x6f, 0x22, 0x42, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x6f,
0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x0f, 0x4c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02,
0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x4c, 0x61, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
0x73, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2a, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
0x10, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x05, 0x52, 0x03, 0x62, 0x75, 0x79, 0x22, 0xba, 0x02, 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x53,
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x28, 0x0a, 0x0f, 0x4c, 0x61, 0x73, 0x74, 0x52,
0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x14, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x52, 0x0f, 0x4c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x69, 0x6d,
0x28, 0x0a, 0x03, 0x62, 0x75, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x55, 0x65, 0x12, 0x2a, 0x0a, 0x10, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65,
0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x42, 0x75, 0x79, 0x45, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x4d, 0x61, 0x6e,
0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x62, 0x75, 0x79, 0x12, 0x34, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x23, 0x0a,
0x76, 0x69, 0x65, 0x77, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x55, 0x73, 0x65, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55,
0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x6f, 0x6f, 0x64, 0x52, 0x05, 0x49, 0x74, 0x65,
0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x1a, 0x6d, 0x73, 0x12, 0x34, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x18, 0x05, 0x20,
0x36, 0x0a, 0x08, 0x42, 0x75, 0x79, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, 0x12, 0x2e, 0x0a, 0x12, 0x6c, 0x65, 0x66, 0x74,
0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x49, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x76, 0x69, 0x66, 0x72, 0x65, 0x65, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x18, 0x06,
0x65, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x6c, 0x65, 0x66, 0x74, 0x66, 0x72, 0x65, 0x65, 0x72, 0x65,
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x1a, 0x49, 0x0a, 0x0c, 0x50, 0x72, 0x65, 0x76,
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x71, 0x69, 0x65, 0x77, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x05, 0x76, 0x61,
0x38, 0x01, 0x22, 0xc7, 0x03, 0x0a, 0x06, 0x44, 0x42, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x0e, 0x0a, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x02, 0x38, 0x01, 0x22, 0xc7, 0x03, 0x0a, 0x06, 0x44, 0x42, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x0e,
0x2e, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x67, 0x6f, 0x6c, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10,
0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x72, 0x65, 0x66, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64,
0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x12, 0x2e, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x67, 0x6f,
0x30, 0x0a, 0x13, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x72, 0x65,
0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70,
0x66, 0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x12, 0x30, 0x0a, 0x13, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x67,
0x70, 0x12, 0x29, 0x0a, 0x08, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x05, 0x20, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x13, 0x72,
0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68,
0x74, 0x61, 0x52, 0x08, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x2f, 0x0a, 0x0b, 0x6f, 0x70, 0x12, 0x29, 0x0a, 0x08, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x05,
0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61,
0x52, 0x0b, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x27, 0x0a,
0x07, 0x70, 0x76, 0x70, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d,
0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x70,
0x76, 0x70, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68, 0x6f,
0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68,
0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x12,
0x31, 0x0a, 0x0c, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x18,
0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70,
0x44, 0x61, 0x74, 0x61, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68,
0x6f, 0x70, 0x12, 0x29, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x0a,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44,
0x61, 0x74, 0x61, 0x52, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x2d, 0x0a, 0x61, 0x74, 0x61, 0x52, 0x08, 0x67, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x2f, 0x0a,
0x0a, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x06, 0x20, 0x01,
0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74,
0x52, 0x0a, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x68, 0x6f, 0x70, 0x2a, 0x7d, 0x0a, 0x08, 0x61, 0x52, 0x0b, 0x64, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x27,
0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x75, 0x6c, 0x6c, 0x0a, 0x07, 0x70, 0x76, 0x70, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x47, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x01, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07,
0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x70, 0x76, 0x70, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x27, 0x0a, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68,
0x02, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x56, 0x50, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x03, 0x12, 0x0b, 0x6f, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53,
0x0a, 0x07, 0x50, 0x56, 0x45, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x07, 0x70, 0x76, 0x65, 0x53, 0x68, 0x6f, 0x70,
0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x12, 0x31, 0x0a, 0x0c, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70,
0x08, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f,
0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x07, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x0c, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53,
0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x68, 0x6f, 0x70, 0x12, 0x29, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x18,
0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70,
0x44, 0x61, 0x74, 0x61, 0x52, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x12, 0x2d,
0x0a, 0x0a, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x68, 0x6f, 0x70, 0x18, 0x0b, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x53, 0x68, 0x6f, 0x70, 0x44, 0x61, 0x74,
0x61, 0x52, 0x0a, 0x73, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x68, 0x6f, 0x70, 0x2a, 0x7d, 0x0a,
0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x75, 0x6c,
0x6c, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x47, 0x6f, 0x6c, 0x64, 0x53, 0x68, 0x6f, 0x70, 0x10,
0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x44, 0x69, 0x61, 0x6d, 0x6f, 0x6e, 0x64, 0x53, 0x68, 0x6f, 0x70,
0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x56, 0x50, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x03, 0x12,
0x0b, 0x0a, 0x07, 0x50, 0x56, 0x45, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c,
0x41, 0x6c, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x05, 0x12, 0x0c,
0x0a, 0x08, 0x48, 0x65, 0x72, 0x6f, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x06, 0x12, 0x0e, 0x0a, 0x0a,
0x53, 0x6d, 0x69, 0x74, 0x68, 0x79, 0x53, 0x68, 0x6f, 0x70, 0x10, 0x07, 0x42, 0x06, 0x5a, 0x04,
0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (
@ -374,22 +439,22 @@ var file_shop_shop_db_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_shop_shop_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_shop_shop_db_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_shop_shop_db_proto_goTypes = []interface{}{ var file_shop_shop_db_proto_goTypes = []interface{}{
(ShopType)(0), // 0: ShopType (ShopType)(0), // 0: ShopType
(*UserShopData)(nil), // 1: UserShopData (*UserShopGood)(nil), // 1: UserShopGood
(*DBShop)(nil), // 2: DBShop (*UserShopData)(nil), // 2: UserShopData
nil, // 3: UserShopData.BuyEntry (*DBShop)(nil), // 3: DBShop
nil, // 4: UserShopData.PreviewEntry nil, // 4: UserShopData.PreviewEntry
(*DB_Equipment)(nil), // 5: DB_Equipment (*DB_Equipment)(nil), // 5: DB_Equipment
} }
var file_shop_shop_db_proto_depIdxs = []int32{ var file_shop_shop_db_proto_depIdxs = []int32{
3, // 0: UserShopData.buy:type_name -> UserShopData.BuyEntry 1, // 0: UserShopData.Items:type_name -> UserShopGood
4, // 1: UserShopData.preview:type_name -> UserShopData.PreviewEntry 4, // 1: UserShopData.preview:type_name -> UserShopData.PreviewEntry
1, // 2: DBShop.goldShop:type_name -> UserShopData 2, // 2: DBShop.goldShop:type_name -> UserShopData
1, // 3: DBShop.diamondShop:type_name -> UserShopData 2, // 3: DBShop.diamondShop:type_name -> UserShopData
1, // 4: DBShop.pvpShop:type_name -> UserShopData 2, // 4: DBShop.pvpShop:type_name -> UserShopData
1, // 5: DBShop.pveShop:type_name -> UserShopData 2, // 5: DBShop.pveShop:type_name -> UserShopData
1, // 6: DBShop.allianceShop:type_name -> UserShopData 2, // 6: DBShop.allianceShop:type_name -> UserShopData
1, // 7: DBShop.heroShop:type_name -> UserShopData 2, // 7: DBShop.heroShop:type_name -> UserShopData
1, // 8: DBShop.smithyShop:type_name -> UserShopData 2, // 8: DBShop.smithyShop:type_name -> UserShopData
5, // 9: UserShopData.PreviewEntry.value:type_name -> DB_Equipment 5, // 9: UserShopData.PreviewEntry.value:type_name -> DB_Equipment
10, // [10:10] is the sub-list for method output_type 10, // [10:10] is the sub-list for method output_type
10, // [10:10] is the sub-list for method input_type 10, // [10:10] is the sub-list for method input_type
@ -406,7 +471,7 @@ func file_shop_shop_db_proto_init() {
file_equipment_equipment_db_proto_init() file_equipment_equipment_db_proto_init()
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_shop_shop_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_shop_shop_db_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserShopData); i { switch v := v.(*UserShopGood); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
@ -418,6 +483,18 @@ func file_shop_shop_db_proto_init() {
} }
} }
file_shop_shop_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_shop_shop_db_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UserShopData); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_shop_shop_db_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DBShop); i { switch v := v.(*DBShop); i {
case 0: case 0:
return &v.state return &v.state

View File

@ -26,12 +26,13 @@ type ShopItem struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
GoodsId int32 `protobuf:"varint,1,opt,name=GoodsId,proto3" json:"GoodsId"` //商品Id Gid int32 `protobuf:"varint,1,opt,name=gid,proto3" json:"gid"` //商品id 唯一
Items []*UserAssets `protobuf:"bytes,2,rep,name=Items,proto3" json:"Items"` //货物 GoodsId int32 `protobuf:"varint,2,opt,name=GoodsId,proto3" json:"GoodsId"` //商品配置id
Consume []*UserAssets `protobuf:"bytes,3,rep,name=Consume,proto3" json:"Consume"` //消耗 Items []*UserAssets `protobuf:"bytes,3,rep,name=Items,proto3" json:"Items"` //货物
Sale int32 `protobuf:"varint,4,opt,name=Sale,proto3" json:"Sale"` //打折 Consume []*UserAssets `protobuf:"bytes,4,rep,name=Consume,proto3" json:"Consume"` //消耗
LeftBuyNum int32 `protobuf:"varint,5,opt,name=LeftBuyNum,proto3" json:"LeftBuyNum"` //还可购买次数 Sale int32 `protobuf:"varint,5,opt,name=Sale,proto3" json:"Sale"` //打折
Preview *DB_Equipment `protobuf:"bytes,6,opt,name=preview,proto3" json:"preview"` //装备预览数据 LeftBuyNum int32 `protobuf:"varint,6,opt,name=LeftBuyNum,proto3" json:"LeftBuyNum"` //还可购买次数
Preview *DB_Equipment `protobuf:"bytes,7,opt,name=preview,proto3" json:"preview"` //装备预览数据
} }
func (x *ShopItem) Reset() { func (x *ShopItem) Reset() {
@ -66,6 +67,13 @@ func (*ShopItem) Descriptor() ([]byte, []int) {
return file_shop_shop_msg_proto_rawDescGZIP(), []int{0} return file_shop_shop_msg_proto_rawDescGZIP(), []int{0}
} }
func (x *ShopItem) GetGid() int32 {
if x != nil {
return x.Gid
}
return 0
}
func (x *ShopItem) GetGoodsId() int32 { func (x *ShopItem) GetGoodsId() int32 {
if x != nil { if x != nil {
return x.GoodsId return x.GoodsId
@ -170,11 +178,12 @@ type ShopGetListResp struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
SType ShopType `protobuf:"varint,1,opt,name=sType,proto3,enum=ShopType" json:"sType"` //商城类型 SType ShopType `protobuf:"varint,1,opt,name=sType,proto3,enum=ShopType" json:"sType"` //商城类型
IsManualRefresh bool `protobuf:"varint,2,opt,name=IsManualRefresh,proto3" json:"IsManualRefresh"` //是否手动刷新 IsManualRefresh bool `protobuf:"varint,2,opt,name=IsManualRefresh,proto3" json:"IsManualRefresh"` //是否手动刷新
Goods []*ShopItem `protobuf:"bytes,4,rep,name=Goods,proto3" json:"Goods"` //商品列表 Goods []*ShopItem `protobuf:"bytes,4,rep,name=Goods,proto3" json:"Goods"` //商品列表
SurplusRefreshNum int32 `protobuf:"varint,5,opt,name=SurplusRefreshNum,proto3" json:"SurplusRefreshNum"` //剩余手动刷新次数 SurplusRefreshNum int32 `protobuf:"varint,5,opt,name=SurplusRefreshNum,proto3" json:"SurplusRefreshNum"` //剩余手动刷新次数
Lastrefreshtime int64 `protobuf:"varint,6,opt,name=lastrefreshtime,proto3" json:"lastrefreshtime"` //上一次刷新时间 Lastrefreshtime int64 `protobuf:"varint,6,opt,name=lastrefreshtime,proto3" json:"lastrefreshtime"` //上一次刷新时间
Leftfreerefreshnum int32 `protobuf:"varint,7,opt,name=leftfreerefreshnum,proto3" json:"leftfreerefreshnum"` //剩余免费刷新次数
} }
func (x *ShopGetListResp) Reset() { func (x *ShopGetListResp) Reset() {
@ -244,6 +253,13 @@ func (x *ShopGetListResp) GetLastrefreshtime() int64 {
return 0 return 0
} }
func (x *ShopGetListResp) GetLeftfreerefreshnum() int32 {
if x != nil {
return x.Leftfreerefreshnum
}
return 0
}
//购买商品 请求 //购买商品 请求
type ShopBuyReq struct { type ShopBuyReq struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -251,7 +267,7 @@ type ShopBuyReq struct {
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
ShopType ShopType `protobuf:"varint,1,opt,name=ShopType,proto3,enum=ShopType" json:"ShopType"` //商店类型 ShopType ShopType `protobuf:"varint,1,opt,name=ShopType,proto3,enum=ShopType" json:"ShopType"` //商店类型
GoodsId int32 `protobuf:"varint,2,opt,name=GoodsId,proto3" json:"GoodsId"` //商品Id Gid int32 `protobuf:"varint,2,opt,name=gid,proto3" json:"gid"` //商品Id
BuyNum int32 `protobuf:"varint,3,opt,name=BuyNum,proto3" json:"BuyNum"` //商品购买数量 BuyNum int32 `protobuf:"varint,3,opt,name=BuyNum,proto3" json:"BuyNum"` //商品购买数量
} }
@ -294,9 +310,9 @@ func (x *ShopBuyReq) GetShopType() ShopType {
return ShopType_Null return ShopType_Null
} }
func (x *ShopBuyReq) GetGoodsId() int32 { func (x *ShopBuyReq) GetGid() int32 {
if x != nil { if x != nil {
return x.GoodsId return x.Gid
} }
return 0 return 0
} }
@ -364,49 +380,52 @@ var file_shop_shop_msg_proto_rawDesc = []byte{
0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74,
0x2f, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x2f, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x62, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0xcb, 0x01, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x6f, 0x74, 0x6f, 0x22, 0xdd, 0x01, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x74, 0x65, 0x6d,
0x12, 0x18, 0x0a, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x67,
0x05, 0x52, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x05, 0x49, 0x74, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x02, 0x20,
0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x05,
0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x25, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x55, 0x73,
0x07, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12,
0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x07, 0x43, 0x6f, 0x6e, 0x25, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b,
0x73, 0x75, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x61, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x32, 0x0b, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x52, 0x07, 0x43,
0x28, 0x05, 0x52, 0x04, 0x53, 0x61, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x4c, 0x65, 0x66, 0x74, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x61, 0x6c, 0x65, 0x18, 0x05,
0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x4c, 0x65, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x61, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x4c, 0x65,
0x66, 0x74, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x12, 0x27, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x76, 0x66, 0x74, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a,
0x69, 0x65, 0x77, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42, 0x5f, 0x45, 0x4c, 0x65, 0x66, 0x74, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x12, 0x27, 0x0a, 0x07, 0x70, 0x72,
0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x65, 0x76, 0x69, 0x65, 0x77, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x44, 0x42,
0x77, 0x22, 0x5b, 0x0a, 0x0e, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x5f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x07, 0x70, 0x72, 0x65, 0x76,
0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x69, 0x65, 0x77, 0x22, 0x5b, 0x0a, 0x0e, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x65, 0x74, 0x4c, 0x69,
0x28, 0x0e, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x73, 0x73, 0x74, 0x52, 0x65, 0x71, 0x12, 0x1f, 0x0a, 0x05, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01,
0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x49, 0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52,
0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x49, 0x05, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x49, 0x73, 0x4d, 0x61, 0x6e, 0x75,
0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x22, 0xd5, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
0x01, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x0f, 0x49, 0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68,
0x73, 0x70, 0x12, 0x1f, 0x0a, 0x05, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x22, 0x85, 0x02, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x70, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x73, 0x74,
0x0e, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x73, 0x54, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1f, 0x0a, 0x05, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20,
0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x49, 0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05,
0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x49, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x49, 0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61,
0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x1f, 0x0a, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f,
0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x53, 0x49, 0x73, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12,
0x68, 0x6f, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x12, 0x2c, 0x1f, 0x0a, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09,
0x0a, 0x11, 0x53, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x47, 0x6f, 0x6f, 0x64, 0x73,
0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x53, 0x75, 0x72, 0x70, 0x6c, 0x12, 0x2c, 0x0a, 0x11, 0x53, 0x75, 0x72, 0x70, 0x6c, 0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65,
0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x53, 0x75, 0x72,
0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x70, 0x6c, 0x75, 0x73, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x4e, 0x75, 0x6d, 0x12, 0x28,
0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x0a, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d,
0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x22, 0x65, 0x0a, 0x0a, 0x53, 0x68, 0x6f, 0x70, 0x42, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x6c, 0x61, 0x73, 0x74, 0x72, 0x65, 0x66,
0x79, 0x52, 0x65, 0x71, 0x12, 0x25, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x72, 0x65, 0x73, 0x68, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x12, 0x6c, 0x65, 0x66, 0x74,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x66, 0x72, 0x65, 0x65, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x18, 0x07,
0x65, 0x52, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x6c, 0x65, 0x66, 0x74, 0x66, 0x72, 0x65, 0x65, 0x72, 0x65,
0x6f, 0x6f, 0x64, 0x73, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x47, 0x6f, 0x66, 0x72, 0x65, 0x73, 0x68, 0x6e, 0x75, 0x6d, 0x22, 0x5d, 0x0a, 0x0a, 0x53, 0x68, 0x6f, 0x70,
0x6f, 0x64, 0x73, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x42, 0x75, 0x79, 0x52, 0x65, 0x71, 0x12, 0x25, 0x0a, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x22, 0x25, 0x0a, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x54,
0x0b, 0x53, 0x68, 0x6f, 0x70, 0x42, 0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x79, 0x70, 0x65, 0x52, 0x08, 0x53, 0x68, 0x6f, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a,
0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x03, 0x67, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x67, 0x69, 0x64, 0x12,
0x53, 0x75, 0x63, 0x63, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x16, 0x0a, 0x06, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52,
0x6f, 0x74, 0x6f, 0x33, 0x06, 0x42, 0x75, 0x79, 0x4e, 0x75, 0x6d, 0x22, 0x25, 0x0a, 0x0b, 0x53, 0x68, 0x6f, 0x70, 0x42,
0x75, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63,
0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x49, 0x73, 0x53, 0x75, 0x63, 0x63, 0x42, 0x06,
0x5a, 0x04, 0x2e, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

View File

@ -16,6 +16,7 @@ type GameWorldBattleData struct {
BattleReadyID int32 BattleReadyID int32
EventList []int32 EventList []int32
Playexp *Gameatn Playexp *Gameatn
Carexe int32
} }
const TypeId_GameWorldBattleData = 1096332216 const TypeId_GameWorldBattleData = 1096332216
@ -56,6 +57,7 @@ func (_v *GameWorldBattleData)Deserialize(_buf map[string]interface{}) (err erro
} }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["playexp"].(map[string]interface{}); !_ok_ { err = errors.New("playexp error"); return }; if _v.Playexp, err = DeserializeGameatn(_x_); err != nil { return } } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["playexp"].(map[string]interface{}); !_ok_ { err = errors.New("playexp error"); return }; if _v.Playexp, err = DeserializeGameatn(_x_); err != nil { return } }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["carexe"].(float64); !_ok_ { err = errors.New("carexe error"); return }; _v.Carexe = int32(_tempNum_) }
return return
} }

View File

@ -114,7 +114,7 @@ type GameGlobalData struct {
ArenaTicketMax int32 ArenaTicketMax int32
ArenaTicketRecoveryTime int32 ArenaTicketRecoveryTime int32
ArenaTicketCos *Gameatn ArenaTicketCos *Gameatn
ArenaBuy []*Gameatn ArenaBuy int32
VikingExpeditionRecoveryTime int32 VikingExpeditionRecoveryTime int32
CopsRecoveryTime int32 CopsRecoveryTime int32
CopsInitialNum int32 CopsInitialNum int32
@ -493,20 +493,7 @@ func (_v *GameGlobalData)Deserialize(_buf map[string]interface{}) (err error) {
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_max"].(float64); !_ok_ { err = errors.New("ArenaTicket_max error"); return }; _v.ArenaTicketMax = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_max"].(float64); !_ok_ { err = errors.New("ArenaTicket_max error"); return }; _v.ArenaTicketMax = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_RecoveryTime"].(float64); !_ok_ { err = errors.New("ArenaTicket_RecoveryTime error"); return }; _v.ArenaTicketRecoveryTime = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ArenaTicket_RecoveryTime"].(float64); !_ok_ { err = errors.New("ArenaTicket_RecoveryTime error"); return }; _v.ArenaTicketRecoveryTime = int32(_tempNum_) }
{ var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["ArenaTicket_cos"].(map[string]interface{}); !_ok_ { err = errors.New("ArenaTicket_cos error"); return }; if _v.ArenaTicketCos, err = DeserializeGameatn(_x_); err != nil { return } } { var _ok_ bool; var _x_ map[string]interface{}; if _x_, _ok_ = _buf["ArenaTicket_cos"].(map[string]interface{}); !_ok_ { err = errors.New("ArenaTicket_cos error"); return }; if _v.ArenaTicketCos, err = DeserializeGameatn(_x_); err != nil { return } }
{ { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["Arena_buy"].(float64); !_ok_ { err = errors.New("Arena_buy error"); return }; _v.ArenaBuy = int32(_tempNum_) }
var _arr_ []interface{}
var _ok_ bool
if _arr_, _ok_ = _buf["Arena_buy"].([]interface{}); !_ok_ { err = errors.New("Arena_buy error"); return }
_v.ArenaBuy = 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.ArenaBuy = append(_v.ArenaBuy, _list_v_)
}
}
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["VikingExpedition_RecoveryTime"].(float64); !_ok_ { err = errors.New("VikingExpedition_RecoveryTime error"); return }; _v.VikingExpeditionRecoveryTime = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["VikingExpedition_RecoveryTime"].(float64); !_ok_ { err = errors.New("VikingExpedition_RecoveryTime error"); return }; _v.VikingExpeditionRecoveryTime = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["cops_RecoveryTime"].(float64); !_ok_ { err = errors.New("cops_RecoveryTime error"); return }; _v.CopsRecoveryTime = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["cops_RecoveryTime"].(float64); !_ok_ { err = errors.New("cops_RecoveryTime error"); return }; _v.CopsRecoveryTime = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["cops_InitialNum"].(float64); !_ok_ { err = errors.New("cops_InitialNum error"); return }; _v.CopsInitialNum = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["cops_InitialNum"].(float64); !_ok_ { err = errors.New("cops_InitialNum error"); return }; _v.CopsInitialNum = int32(_tempNum_) }

View File

@ -16,6 +16,7 @@ type GamePlayerlvData struct {
Reward []*Gameatn Reward []*Gameatn
PsCeiling int32 PsCeiling int32
CopsPsCeiling int32 CopsPsCeiling int32
HeroLv int32
} }
const TypeId_GamePlayerlvData = 927774449 const TypeId_GamePlayerlvData = 927774449
@ -43,6 +44,7 @@ func (_v *GamePlayerlvData)Deserialize(_buf map[string]interface{}) (err error)
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ps_ceiling"].(float64); !_ok_ { err = errors.New("ps_ceiling error"); return }; _v.PsCeiling = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["ps_ceiling"].(float64); !_ok_ { err = errors.New("ps_ceiling error"); return }; _v.PsCeiling = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["cops_ps_ceiling"].(float64); !_ok_ { err = errors.New("cops_ps_ceiling error"); return }; _v.CopsPsCeiling = int32(_tempNum_) } { var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["cops_ps_ceiling"].(float64); !_ok_ { err = errors.New("cops_ps_ceiling error"); return }; _v.CopsPsCeiling = int32(_tempNum_) }
{ var _ok_ bool; var _tempNum_ float64; if _tempNum_, _ok_ = _buf["hero_lv"].(float64); !_ok_ { err = errors.New("hero_lv error"); return }; _v.HeroLv = int32(_tempNum_) }
return return
} }