This commit is contained in:
chenxi 2023-04-10 17:56:15 +08:00
parent 9dc6bff28e
commit 8c45213fcb
34 changed files with 515 additions and 560 deletions

View File

@ -1,157 +1,5 @@
local hero = {
[1]={
["position"]=3,
["qlt"]=2,
["base_skill"]=10,
["rouge_skill_1"]=200101,
["rouge_skill_2"]=200102,
["rouge_skill_3"]=200103,
["hp_1"]=100,
["hp_2"]=110,
["hp_3"]=120,
["hp_4"]=130,
["hp_5"]=140,
["hp_6"]=150,
["hp_7"]=160,
["hp_8"]=170,
["hp_9"]=180,
["hp_10"]=190,
["hp_11"]=200,
["hp_12"]=210,
["hp_13"]=220,
["hp_14"]=230,
["hp_15"]=240,
["atk_1"]=100,
["atk_2"]=110,
["atk_3"]=120,
["atk_4"]=130,
["atk_5"]=140,
["atk_6"]=150,
["atk_7"]=160,
["atk_8"]=170,
["atk_9"]=180,
["atk_10"]=190,
["atk_11"]=200,
["atk_12"]=210,
["atk_13"]=220,
["atk_14"]=230,
["atk_15"]=240
},
[2]={
["position"]=2,
["qlt"]=2,
["base_skill"]=20,
["rouge_skill_1"]=200201,
["rouge_skill_2"]=200202,
["rouge_skill_3"]=200203,
["hp_1"]=100,
["hp_2"]=110,
["hp_3"]=120,
["hp_4"]=130,
["hp_5"]=140,
["hp_6"]=150,
["hp_7"]=160,
["hp_8"]=170,
["hp_9"]=180,
["hp_10"]=190,
["hp_11"]=200,
["hp_12"]=210,
["hp_13"]=220,
["hp_14"]=230,
["hp_15"]=240,
["atk_1"]=100,
["atk_2"]=110,
["atk_3"]=120,
["atk_4"]=130,
["atk_5"]=140,
["atk_6"]=150,
["atk_7"]=160,
["atk_8"]=170,
["atk_9"]=180,
["atk_10"]=190,
["atk_11"]=200,
["atk_12"]=210,
["atk_13"]=220,
["atk_14"]=230,
["atk_15"]=240
},
[3]={
["position"]=4,
["qlt"]=2,
["base_skill"]=30,
["rouge_skill_1"]=200301,
["rouge_skill_2"]=200302,
["rouge_skill_3"]=200303,
["hp_1"]=100,
["hp_2"]=110,
["hp_3"]=120,
["hp_4"]=130,
["hp_5"]=140,
["hp_6"]=150,
["hp_7"]=160,
["hp_8"]=170,
["hp_9"]=180,
["hp_10"]=190,
["hp_11"]=200,
["hp_12"]=210,
["hp_13"]=220,
["hp_14"]=230,
["hp_15"]=240,
["atk_1"]=100,
["atk_2"]=110,
["atk_3"]=120,
["atk_4"]=130,
["atk_5"]=140,
["atk_6"]=150,
["atk_7"]=160,
["atk_8"]=170,
["atk_9"]=180,
["atk_10"]=190,
["atk_11"]=200,
["atk_12"]=210,
["atk_13"]=220,
["atk_14"]=230,
["atk_15"]=240
},
[4]={
["position"]=5,
["qlt"]=2,
["base_skill"]=40,
["rouge_skill_1"]=200401,
["rouge_skill_2"]=200402,
["rouge_skill_3"]=200403,
["hp_1"]=100,
["hp_2"]=110,
["hp_3"]=120,
["hp_4"]=130,
["hp_5"]=140,
["hp_6"]=150,
["hp_7"]=160,
["hp_8"]=170,
["hp_9"]=180,
["hp_10"]=190,
["hp_11"]=200,
["hp_12"]=210,
["hp_13"]=220,
["hp_14"]=230,
["hp_15"]=240,
["atk_1"]=100,
["atk_2"]=110,
["atk_3"]=120,
["atk_4"]=130,
["atk_5"]=140,
["atk_6"]=150,
["atk_7"]=160,
["atk_8"]=170,
["atk_9"]=180,
["atk_10"]=190,
["atk_11"]=200,
["atk_12"]=210,
["atk_13"]=220,
["atk_14"]=230,
["atk_15"]=240
},
[5]={
[12001]={
["position"]=1,
["qlt"]=2,
["base_skill"]=50,
@ -189,45 +37,159 @@ local hero = {
["atk_14"]=230,
["atk_15"]=240
},
[6]={
["position"]=3,
["qlt"]=3,
["base_skill"]=60,
["rouge_skill_1"]=200601,
["rouge_skill_2"]=200602,
["rouge_skill_3"]=200603,
["hp_1"]=150,
["hp_2"]=165,
["hp_3"]=180,
["hp_4"]=195,
["hp_5"]=210,
["hp_6"]=225,
["hp_7"]=240,
["hp_8"]=255,
["hp_9"]=270,
["hp_10"]=285,
["hp_11"]=300,
["hp_12"]=315,
["hp_13"]=330,
["hp_14"]=345,
["hp_15"]=360,
["atk_1"]=150,
["atk_2"]=165,
["atk_3"]=180,
["atk_4"]=195,
["atk_5"]=210,
["atk_6"]=225,
["atk_7"]=240,
["atk_8"]=255,
["atk_9"]=270,
["atk_10"]=285,
["atk_11"]=300,
["atk_12"]=315,
["atk_13"]=330,
["atk_14"]=345,
["atk_15"]=360
[22001]={
["position"]=2,
["qlt"]=2,
["base_skill"]=20,
["rouge_skill_1"]=200201,
["rouge_skill_2"]=200202,
["rouge_skill_3"]=200203,
["hp_1"]=100,
["hp_2"]=110,
["hp_3"]=120,
["hp_4"]=130,
["hp_5"]=140,
["hp_6"]=150,
["hp_7"]=160,
["hp_8"]=170,
["hp_9"]=180,
["hp_10"]=190,
["hp_11"]=200,
["hp_12"]=210,
["hp_13"]=220,
["hp_14"]=230,
["hp_15"]=240,
["atk_1"]=100,
["atk_2"]=110,
["atk_3"]=120,
["atk_4"]=130,
["atk_5"]=140,
["atk_6"]=150,
["atk_7"]=160,
["atk_8"]=170,
["atk_9"]=180,
["atk_10"]=190,
["atk_11"]=200,
["atk_12"]=210,
["atk_13"]=220,
["atk_14"]=230,
["atk_15"]=240
},
[7]={
[32001]={
["position"]=3,
["qlt"]=2,
["base_skill"]=10,
["rouge_skill_1"]=200101,
["rouge_skill_2"]=200102,
["rouge_skill_3"]=200103,
["hp_1"]=100,
["hp_2"]=110,
["hp_3"]=120,
["hp_4"]=130,
["hp_5"]=140,
["hp_6"]=150,
["hp_7"]=160,
["hp_8"]=170,
["hp_9"]=180,
["hp_10"]=190,
["hp_11"]=200,
["hp_12"]=210,
["hp_13"]=220,
["hp_14"]=230,
["hp_15"]=240,
["atk_1"]=100,
["atk_2"]=110,
["atk_3"]=120,
["atk_4"]=130,
["atk_5"]=140,
["atk_6"]=150,
["atk_7"]=160,
["atk_8"]=170,
["atk_9"]=180,
["atk_10"]=190,
["atk_11"]=200,
["atk_12"]=210,
["atk_13"]=220,
["atk_14"]=230,
["atk_15"]=240
},
[42001]={
["position"]=4,
["qlt"]=2,
["base_skill"]=30,
["rouge_skill_1"]=200301,
["rouge_skill_2"]=200302,
["rouge_skill_3"]=200303,
["hp_1"]=100,
["hp_2"]=110,
["hp_3"]=120,
["hp_4"]=130,
["hp_5"]=140,
["hp_6"]=150,
["hp_7"]=160,
["hp_8"]=170,
["hp_9"]=180,
["hp_10"]=190,
["hp_11"]=200,
["hp_12"]=210,
["hp_13"]=220,
["hp_14"]=230,
["hp_15"]=240,
["atk_1"]=100,
["atk_2"]=110,
["atk_3"]=120,
["atk_4"]=130,
["atk_5"]=140,
["atk_6"]=150,
["atk_7"]=160,
["atk_8"]=170,
["atk_9"]=180,
["atk_10"]=190,
["atk_11"]=200,
["atk_12"]=210,
["atk_13"]=220,
["atk_14"]=230,
["atk_15"]=240
},
[52001]={
["position"]=5,
["qlt"]=2,
["base_skill"]=40,
["rouge_skill_1"]=200401,
["rouge_skill_2"]=200402,
["rouge_skill_3"]=200403,
["hp_1"]=100,
["hp_2"]=110,
["hp_3"]=120,
["hp_4"]=130,
["hp_5"]=140,
["hp_6"]=150,
["hp_7"]=160,
["hp_8"]=170,
["hp_9"]=180,
["hp_10"]=190,
["hp_11"]=200,
["hp_12"]=210,
["hp_13"]=220,
["hp_14"]=230,
["hp_15"]=240,
["atk_1"]=100,
["atk_2"]=110,
["atk_3"]=120,
["atk_4"]=130,
["atk_5"]=140,
["atk_6"]=150,
["atk_7"]=160,
["atk_8"]=170,
["atk_9"]=180,
["atk_10"]=190,
["atk_11"]=200,
["atk_12"]=210,
["atk_13"]=220,
["atk_14"]=230,
["atk_15"]=240
},
[23001]={
["position"]=2,
["qlt"]=3,
["base_skill"]=70,
@ -265,7 +227,45 @@ local hero = {
["atk_14"]=345,
["atk_15"]=360
},
[8]={
[33001]={
["position"]=3,
["qlt"]=3,
["base_skill"]=60,
["rouge_skill_1"]=200601,
["rouge_skill_2"]=200602,
["rouge_skill_3"]=200603,
["hp_1"]=150,
["hp_2"]=165,
["hp_3"]=180,
["hp_4"]=195,
["hp_5"]=210,
["hp_6"]=225,
["hp_7"]=240,
["hp_8"]=255,
["hp_9"]=270,
["hp_10"]=285,
["hp_11"]=300,
["hp_12"]=315,
["hp_13"]=330,
["hp_14"]=345,
["hp_15"]=360,
["atk_1"]=150,
["atk_2"]=165,
["atk_3"]=180,
["atk_4"]=195,
["atk_5"]=210,
["atk_6"]=225,
["atk_7"]=240,
["atk_8"]=255,
["atk_9"]=270,
["atk_10"]=285,
["atk_11"]=300,
["atk_12"]=315,
["atk_13"]=330,
["atk_14"]=345,
["atk_15"]=360
},
[43001]={
["position"]=4,
["qlt"]=3,
["base_skill"]=80,

View File

@ -79,53 +79,53 @@ local item = {
}
}
},
[5001]={
[32001]={
["type"]=5,
["parameter"]=10,
["parameter"]=32001,
["qlt"]=2,
["icon"]="5001"
["icon"]="32001"
},
[5002]={
[22001]={
["type"]=5,
["parameter"]=20,
["parameter"]=22001,
["qlt"]=2,
["icon"]="5002"
["icon"]="22001"
},
[5003]={
[42001]={
["type"]=5,
["parameter"]=30,
["parameter"]=42001,
["qlt"]=2,
["icon"]="5003"
["icon"]="42001"
},
[5004]={
[52001]={
["type"]=5,
["parameter"]=40,
["parameter"]=52001,
["qlt"]=2,
["icon"]="5004"
["icon"]="52001"
},
[5005]={
[12001]={
["type"]=5,
["parameter"]=50,
["parameter"]=12001,
["qlt"]=2,
["icon"]="5005"
["icon"]="12001"
},
[5006]={
[33001]={
["type"]=5,
["parameter"]=60,
["parameter"]=33001,
["qlt"]=3,
["icon"]="5006"
["icon"]="33001"
},
[5007]={
[23001]={
["type"]=5,
["parameter"]=70,
["parameter"]=23001,
["qlt"]=3,
["icon"]="5007"
["icon"]="23001"
},
[5008]={
[43001]={
["type"]=5,
["parameter"]=80,
["parameter"]=43001,
["qlt"]=3,
["icon"]="5008"
["icon"]="43001"
}
}
local config = {

View File

@ -13,8 +13,8 @@ local player_initial = {
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5001,
["id_for_nothing"]="UwhcAg==",
["id"]=32001,
["id_for_nothing"]="VQpcA2Q=",
["num"]=3,
["num_for_nothing"]="VQ=="
}
@ -23,24 +23,14 @@ local player_initial = {
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5002,
["id_for_nothing"]="UwhcAQ==",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
[4]={
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5003,
["id_for_nothing"]="UwhcAA==",
["id"]=22001,
["id_for_nothing"]="VApcA2Q=",
["num"]=3,
["num_for_nothing"]="VQ=="
}
}
}
local config = {
data=player_initial,count=4
data=player_initial,count=3
}
return config

View File

@ -1,6 +1,6 @@
local skill_hero = {
[10]={
["energy"]=3,
["energy"]=10,
["position"]=3,
["method"]=2,
["skill_type"]=1,
@ -14,11 +14,10 @@ local skill_hero = {
["range"]=1
}
},
["icon"]=10,
["battle_icon"]=1
["icon"]=10
},
[20]={
["energy"]=3,
["energy"]=10,
["position"]=2,
["method"]=2,
["skill_type"]=0,
@ -31,13 +30,12 @@ local skill_hero = {
}
},
["obj"]=2,
["icon"]=20,
["battle_icon"]=2
["icon"]=20
},
[21]={
["energy"]=3,
["energy"]=10,
["position"]=2,
["method"]=1,
["method"]=2,
["skill_type"]=2,
["skill_type_parameter"]=2,
["boardrange"]={
@ -66,11 +64,10 @@ local skill_hero = {
["round"]=0
}
},
["icon"]=20,
["battle_icon"]=2
["icon"]=20
},
[30]={
["energy"]=3,
["energy"]=10,
["position"]=4,
["method"]=2,
["skill_type"]=1,
@ -80,11 +77,10 @@ local skill_hero = {
["range"]=2
}
},
["icon"]=30,
["battle_icon"]=3
["icon"]=30
},
[40]={
["energy"]=3,
["energy"]=10,
["position"]=5,
["method"]=2,
["skill_type"]=0,
@ -97,11 +93,10 @@ local skill_hero = {
}
},
["obj"]=1,
["icon"]=40,
["battle_icon"]=4
["icon"]=40
},
[50]={
["energy"]=3,
["energy"]=10,
["position"]=1,
["method"]=2,
["skill_type"]=1,
@ -115,11 +110,10 @@ local skill_hero = {
["range"]=2
}
},
["icon"]=50,
["battle_icon"]=5
["icon"]=50
},
[60]={
["energy"]=3,
["energy"]=10,
["position"]=3,
["method"]=2,
["skill_type"]=0,
@ -132,11 +126,10 @@ local skill_hero = {
}
},
["obj"]=1,
["icon"]=60,
["battle_icon"]=6
["icon"]=60
},
[70]={
["energy"]=3,
["energy"]=10,
["position"]=2,
["method"]=2,
["skill_type"]=0,
@ -149,11 +142,10 @@ local skill_hero = {
}
},
["obj"]=1,
["icon"]=70,
["battle_icon"]=7
["icon"]=70
},
[71]={
["energy"]=3,
["energy"]=10,
["position"]=2,
["method"]=1,
["skill_type"]=2,
@ -185,11 +177,10 @@ local skill_hero = {
}
},
["obj"]=1,
["icon"]=70,
["battle_icon"]=7
["icon"]=70
},
[72]={
["energy"]=3,
["energy"]=10,
["position"]=2,
["method"]=1,
["skill_type"]=2,
@ -228,11 +219,10 @@ local skill_hero = {
["range"]=1
}
},
["icon"]=70,
["battle_icon"]=7
["icon"]=70
},
[80]={
["energy"]=3,
["energy"]=10,
["position"]=4,
["method"]=2,
["skill_type"]=0,
@ -250,11 +240,10 @@ local skill_hero = {
["round"]=1
}
},
["icon"]=80,
["battle_icon"]=8
["icon"]=80
},
[81]={
["energy"]=3,
["energy"]=10,
["position"]=4,
["method"]=2,
["skill_type"]=1,
@ -290,8 +279,7 @@ local skill_hero = {
["round"]=1
}
},
["icon"]=80,
["battle_icon"]=8
["icon"]=80
}
}
local config = {

View File

@ -1,26 +1,26 @@
local hero = {
[1]={
[12001]={
["name"]="王八拳"
},
[2]={
[22001]={
["name"]="无影腿"
},
[3]={
[32001]={
["name"]="闪电鞭"
},
[4]={
[42001]={
["name"]="金钟罩"
},
[5]={
[52001]={
["name"]="大鹏展翅"
},
[6]={
[23001]={
["name"]="丹田吐纳"
},
[7]={
[33001]={
["name"]="疾风骤雨"
},
[8]={
[43001]={
["name"]="寒冰掌"
}
}

View File

@ -20,38 +20,32 @@ local item = {
[6]={
["name"]="史诗招式箱"
},
[5001]={
[32001]={
["name"]="王八拳招式碎片"
},
[5002]={
[22001]={
["name"]="无影腿招式碎片"
},
[5003]={
[42001]={
["name"]="闪电鞭招式碎片"
},
[5004]={
[52001]={
["name"]="金钟罩招式碎片"
},
[5005]={
[12001]={
["name"]="大鹏展翅招式碎片"
},
[5006]={
[33001]={
["name"]="丹田吐纳招式碎片"
},
[5007]={
[23001]={
["name"]="疾风骤雨招式碎片"
},
[5008]={
[43001]={
["name"]="寒冰掌招式碎片"
},
[5009]={
["name"]="蓄力拳招式碎片"
},
[5010]={
["name"]="烈火神拳招式碎片"
}
}
local config = {
data=item,count=16
data=item,count=14
}
return config

View File

@ -1,26 +1,26 @@
local hero = {
[1]={
[12001]={
},
[2]={
[22001]={
},
[3]={
[32001]={
},
[4]={
[42001]={
},
[5]={
[52001]={
},
[6]={
[23001]={
},
[7]={
[33001]={
},
[8]={
[43001]={
}
}

View File

@ -20,38 +20,32 @@ local item = {
[6]={
},
[5001]={
[32001]={
},
[5002]={
[22001]={
},
[5003]={
[42001]={
},
[5004]={
[52001]={
},
[5005]={
[12001]={
},
[5006]={
[33001]={
},
[5007]={
[23001]={
},
[5008]={
},
[5009]={
},
[5010]={
[43001]={
}
}
local config = {
data=item,count=16
data=item,count=14
}
return config

View File

@ -1,26 +1,26 @@
local hero = {
[1]={
[12001]={
},
[2]={
[22001]={
},
[3]={
[32001]={
},
[4]={
[42001]={
},
[5]={
[52001]={
},
[6]={
[23001]={
},
[7]={
[33001]={
},
[8]={
[43001]={
}
}

View File

@ -20,38 +20,32 @@ local item = {
[6]={
},
[5001]={
[32001]={
},
[5002]={
[22001]={
},
[5003]={
[42001]={
},
[5004]={
[52001]={
},
[5005]={
[12001]={
},
[5006]={
[33001]={
},
[5007]={
[23001]={
},
[5008]={
},
[5009]={
},
[5010]={
[43001]={
}
}
local config = {
data=item,count=16
data=item,count=14
}
return config

View File

@ -1,26 +1,26 @@
local hero = {
[1]={
[12001]={
},
[2]={
[22001]={
},
[3]={
[32001]={
},
[4]={
[42001]={
},
[5]={
[52001]={
},
[6]={
[23001]={
},
[7]={
[33001]={
},
[8]={
[43001]={
}
}

View File

@ -20,38 +20,32 @@ local item = {
[6]={
},
[5001]={
[32001]={
},
[5002]={
[22001]={
},
[5003]={
[42001]={
},
[5004]={
[52001]={
},
[5005]={
[12001]={
},
[5006]={
[33001]={
},
[5007]={
[23001]={
},
[5008]={
},
[5009]={
},
[5010]={
[43001]={
}
}
local config = {
data=item,count=16
data=item,count=14
}
return config

View File

@ -1,26 +1,26 @@
local hero = {
[1]={
[12001]={
},
[2]={
[22001]={
},
[3]={
[32001]={
},
[4]={
[42001]={
},
[5]={
[52001]={
},
[6]={
[23001]={
},
[7]={
[33001]={
},
[8]={
[43001]={
}
}

View File

@ -20,38 +20,32 @@ local item = {
[6]={
},
[5001]={
[32001]={
},
[5002]={
[22001]={
},
[5003]={
[42001]={
},
[5004]={
[52001]={
},
[5005]={
[12001]={
},
[5006]={
[33001]={
},
[5007]={
[23001]={
},
[5008]={
},
[5009]={
},
[5010]={
[43001]={
}
}
local config = {
data=item,count=16
data=item,count=14
}
return config

View File

@ -1,26 +1,26 @@
local hero = {
[1]={
[12001]={
},
[2]={
[22001]={
},
[3]={
[32001]={
},
[4]={
[42001]={
},
[5]={
[52001]={
},
[6]={
[23001]={
},
[7]={
[33001]={
},
[8]={
[43001]={
}
}

View File

@ -20,38 +20,32 @@ local item = {
[6]={
},
[5001]={
[32001]={
},
[5002]={
[22001]={
},
[5003]={
[42001]={
},
[5004]={
[52001]={
},
[5005]={
[12001]={
},
[5006]={
[33001]={
},
[5007]={
[23001]={
},
[5008]={
},
[5009]={
},
[5010]={
[43001]={
}
}
local config = {
data=item,count=16
data=item,count=14
}
return config

View File

@ -1,26 +1,26 @@
local hero = {
[1]={
[12001]={
},
[2]={
[22001]={
},
[3]={
[32001]={
},
[4]={
[42001]={
},
[5]={
[52001]={
},
[6]={
[23001]={
},
[7]={
[33001]={
},
[8]={
[43001]={
}
}

View File

@ -20,38 +20,32 @@ local item = {
[6]={
},
[5001]={
[32001]={
},
[5002]={
[22001]={
},
[5003]={
[42001]={
},
[5004]={
[52001]={
},
[5005]={
[12001]={
},
[5006]={
[33001]={
},
[5007]={
[23001]={
},
[5008]={
},
[5009]={
},
[5010]={
[43001]={
}
}
local config = {
data=item,count=16
data=item,count=14
}
return config

View File

@ -1,26 +1,26 @@
local hero = {
[1]={
[12001]={
},
[2]={
[22001]={
},
[3]={
[32001]={
},
[4]={
[42001]={
},
[5]={
[52001]={
},
[6]={
[23001]={
},
[7]={
[33001]={
},
[8]={
[43001]={
}
}

View File

@ -19,38 +19,32 @@ local item = {
[6]={
},
[5001]={
[32001]={
},
[5002]={
[22001]={
},
[5003]={
[42001]={
},
[5004]={
[52001]={
},
[5005]={
[12001]={
},
[5006]={
[33001]={
},
[5007]={
[23001]={
},
[5008]={
},
[5009]={
},
[5010]={
[43001]={
}
}
local config = {
data=item,count=16
data=item,count=14
}
return config

View File

@ -1,26 +1,26 @@
local hero = {
[1]={
[12001]={
},
[2]={
[22001]={
},
[3]={
[32001]={
},
[4]={
[42001]={
},
[5]={
[52001]={
},
[6]={
[23001]={
},
[7]={
[33001]={
},
[8]={
[43001]={
}
}

View File

@ -17,38 +17,32 @@ local item = {
[6]={
},
[5001]={
[32001]={
},
[5002]={
[22001]={
},
[5003]={
[42001]={
},
[5004]={
[52001]={
},
[5005]={
[12001]={
},
[5006]={
[33001]={
},
[5007]={
[23001]={
},
[5008]={
},
[5009]={
},
[5010]={
[43001]={
}
}
local config = {
data=item,count=16
data=item,count=14
}
return config

View File

@ -1,26 +1,26 @@
local hero = {
[1]={
[12001]={
},
[2]={
[22001]={
},
[3]={
[32001]={
},
[4]={
[42001]={
},
[5]={
[52001]={
},
[6]={
[23001]={
},
[7]={
[33001]={
},
[8]={
[43001]={
}
}

View File

@ -17,38 +17,32 @@ local item = {
[6]={
},
[5001]={
[32001]={
},
[5002]={
[22001]={
},
[5003]={
[42001]={
},
[5004]={
[52001]={
},
[5005]={
[12001]={
},
[5006]={
[33001]={
},
[5007]={
[23001]={
},
[5008]={
},
[5009]={
},
[5010]={
[43001]={
}
}
local config = {
data=item,count=16
data=item,count=14
}
return config

View File

@ -1,26 +1,26 @@
local hero = {
[1]={
[12001]={
},
[2]={
[22001]={
},
[3]={
[32001]={
},
[4]={
[42001]={
},
[5]={
[52001]={
},
[6]={
[23001]={
},
[7]={
[33001]={
},
[8]={
[43001]={
}
}

View File

@ -20,38 +20,32 @@ local item = {
[6]={
},
[5001]={
[32001]={
},
[5002]={
[22001]={
},
[5003]={
[42001]={
},
[5004]={
[52001]={
},
[5005]={
[12001]={
},
[5006]={
[33001]={
},
[5007]={
[23001]={
},
[5008]={
},
[5009]={
},
[5010]={
[43001]={
}
}
local config = {
data=item,count=16
data=item,count=14
}
return config

View File

@ -1,26 +1,26 @@
local hero = {
[1]={
[12001]={
},
[2]={
[22001]={
},
[3]={
[32001]={
},
[4]={
[42001]={
},
[5]={
[52001]={
},
[6]={
[23001]={
},
[7]={
[33001]={
},
[8]={
[43001]={
}
}

View File

@ -20,38 +20,32 @@ local item = {
[6]={
},
[5001]={
[32001]={
},
[5002]={
[22001]={
},
[5003]={
[42001]={
},
[5004]={
[52001]={
},
[5005]={
[12001]={
},
[5006]={
[33001]={
},
[5007]={
[23001]={
},
[5008]={
},
[5009]={
},
[5010]={
[43001]={
}
}
local config = {
data=item,count=16
data=item,count=14
}
return config

View File

@ -19,6 +19,10 @@ function ServerBagData:getCloneData()
return data
end
function ServerBagData:saveLocalData()
self.ItemData:saveLocalData()
end
function ServerBagData:clear()
self.ItemData:clear()
end

View File

@ -19,8 +19,11 @@ end
function ServerBaseData:init()
end
function ServerBaseData:clear()
end
function ServerBaseData:loadLocalData()
local data = LocalData:getString("ServerData_" .. self.__cname, "")
local data = LocalData:getString(self:_getLocalSaveKey(), "")
local dataObj = nil
if data and data ~= "" then
dataObj = json.decode(data)
@ -28,6 +31,18 @@ function ServerBaseData:loadLocalData()
return dataObj
end
function ServerBaseData:saveLocalData()
local str = json.encode(self.data) or ""
LocalData:setString(self:_getLocalSaveKey(), str)
end
function ServerBaseData:_getLocalSaveKey()
if self._localSaveKey == nil then
self._localSaveKey = "ServerData_" .. self.__cname
end
return self._localSaveKey
end
function ServerBaseData:getCloneData()
local cloneData = {}
local function _copy(object)
@ -46,8 +61,19 @@ function ServerBaseData:getCloneData()
return _copy(self.data)
end
function ServerBaseData:clone()
function ServerBaseData:_clear()
self._localSaveKey = nil
self:clear()
end
if NOT_PUBLISH then
ServerBaseData._editorGetLocalSaveKey = ServerBaseData._getLocalSaveKey
function ServerBaseData:_getLocalSaveKey()
if self._localSaveKey == nil then
self._localSaveKey = LocalData:getDistinctId() .. "ServerData_" .. self.__cname
end
return self._localSaveKey
end
end
return ServerBaseData

View File

@ -1,20 +1,22 @@
local ServerHeroData = class("ServerHeroData", ServerBaseData)
function ServerHeroData:init(data)
Logger.logHighlight("ServerHeroData")
Logger.printTable(data)
self.data.heroes = data and data.heroes or {}
end
function ServerHeroData:getHeroByCfgId(id)
return self.data.heroes[id]
local idStr = tostring(id)
return self.data.heroes[idStr]
end
function ServerHeroData:addHero(id, lv)
Logger.logHighlight("addHero==11")
if self.data.heroes[id] then
local idStr = tostring(id)
if self.data.heroes[idStr] then
return
end
Logger.logHighlight("addHero==22")
self.data.heroes[id] = {
self.data.heroes[idStr] = {
cfg_id = id,
lv = lv,
}

View File

@ -6,6 +6,9 @@ local TempRewards = {}
function ServerGameData:init()
if self.isInit then
for k, v in pairs(self.dataMap) do
v:_clear()
end
return
end
self.isInit = true
@ -66,7 +69,9 @@ function ServerGameData:initData()
end
end
end
-- LocalData:setNotNewPlayer()
self:saveData()
LocalData:setNotNewPlayer()
LocalData:save()
else
for k, v in pairs(self.dataMap) do
v:init(v:loadLocalData())
@ -90,6 +95,12 @@ function ServerGameData:getData()
return data
end
function ServerGameData:saveData()
for k, v in pairs(self.dataMap) do
v:saveLocalData()
end
end
-- 根据配置表添加奖励
function ServerGameData:addRewards(cfgRewards, getType)
local rewards = {}

View File

@ -12,14 +12,20 @@ end
function HeroData:init(data)
self.heroes = {}
local heroCfg = ConfigManager:getConfig("hero")
for heroId, heroInfo in pairs(heroCfg) do
self:createHeroById(heroId, heroInfo)
if data then
for _, heroInfo in pairs(data.heroes) do
self:addHero(heroInfo.cfg_id, heroInfo.lv)
end
end
end
function HeroData:createHeroById(heroId, heroInfo)
self.heroes[heroId] = HeroEntity:create(heroId, heroInfo)
function HeroData:addHero(cfgId, lv)
if self.heroes[cfgId] then
return
end
Logger.logHighlight("cfgId=%s, lv=%s", cfgId, lv)
self.heroes[cfgId] = HeroEntity:create(cfgId, lv)
self.data.activeCount = self.data.activeCount + 1
end
function HeroData:getAllHeroes()

View File

@ -1,11 +1,11 @@
local HeroEntity = class("HeroEntity", BaseData)
function HeroEntity:ctor(cfgId, config)
function HeroEntity:ctor(cfgId, lv)
self.id = cfgId
self.config = config
self.cfgId = cfgId
self.data.lv = 0
self.data.lv = lv
self.attrDirty = false
self.config = ConfigManager:getConfig("hero")[self.cfgId]
self.baseAttrOriginal = {}
self.allAttr = {}