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 = { local hero = {
[1]={ [12001]={
["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]={
["position"]=1, ["position"]=1,
["qlt"]=2, ["qlt"]=2,
["base_skill"]=50, ["base_skill"]=50,
@ -189,45 +37,159 @@ local hero = {
["atk_14"]=230, ["atk_14"]=230,
["atk_15"]=240 ["atk_15"]=240
}, },
[6]={ [22001]={
["position"]=3, ["position"]=2,
["qlt"]=3, ["qlt"]=2,
["base_skill"]=60, ["base_skill"]=20,
["rouge_skill_1"]=200601, ["rouge_skill_1"]=200201,
["rouge_skill_2"]=200602, ["rouge_skill_2"]=200202,
["rouge_skill_3"]=200603, ["rouge_skill_3"]=200203,
["hp_1"]=150, ["hp_1"]=100,
["hp_2"]=165, ["hp_2"]=110,
["hp_3"]=180, ["hp_3"]=120,
["hp_4"]=195, ["hp_4"]=130,
["hp_5"]=210, ["hp_5"]=140,
["hp_6"]=225, ["hp_6"]=150,
["hp_7"]=240, ["hp_7"]=160,
["hp_8"]=255, ["hp_8"]=170,
["hp_9"]=270, ["hp_9"]=180,
["hp_10"]=285, ["hp_10"]=190,
["hp_11"]=300, ["hp_11"]=200,
["hp_12"]=315, ["hp_12"]=210,
["hp_13"]=330, ["hp_13"]=220,
["hp_14"]=345, ["hp_14"]=230,
["hp_15"]=360, ["hp_15"]=240,
["atk_1"]=150, ["atk_1"]=100,
["atk_2"]=165, ["atk_2"]=110,
["atk_3"]=180, ["atk_3"]=120,
["atk_4"]=195, ["atk_4"]=130,
["atk_5"]=210, ["atk_5"]=140,
["atk_6"]=225, ["atk_6"]=150,
["atk_7"]=240, ["atk_7"]=160,
["atk_8"]=255, ["atk_8"]=170,
["atk_9"]=270, ["atk_9"]=180,
["atk_10"]=285, ["atk_10"]=190,
["atk_11"]=300, ["atk_11"]=200,
["atk_12"]=315, ["atk_12"]=210,
["atk_13"]=330, ["atk_13"]=220,
["atk_14"]=345, ["atk_14"]=230,
["atk_15"]=360 ["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, ["position"]=2,
["qlt"]=3, ["qlt"]=3,
["base_skill"]=70, ["base_skill"]=70,
@ -265,7 +227,45 @@ local hero = {
["atk_14"]=345, ["atk_14"]=345,
["atk_15"]=360 ["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, ["position"]=4,
["qlt"]=3, ["qlt"]=3,
["base_skill"]=80, ["base_skill"]=80,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,26 +1,26 @@
local hero = { 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]={ [6]={
}, },
[5001]={ [32001]={
}, },
[5002]={ [22001]={
}, },
[5003]={ [42001]={
}, },
[5004]={ [52001]={
}, },
[5005]={ [12001]={
}, },
[5006]={ [33001]={
}, },
[5007]={ [23001]={
}, },
[5008]={ [43001]={
},
[5009]={
},
[5010]={
} }
} }
local config = { local config = {
data=item,count=16 data=item,count=14
} }
return config return config

View File

@ -1,26 +1,26 @@
local hero = { 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]={ [6]={
}, },
[5001]={ [32001]={
}, },
[5002]={ [22001]={
}, },
[5003]={ [42001]={
}, },
[5004]={ [52001]={
}, },
[5005]={ [12001]={
}, },
[5006]={ [33001]={
}, },
[5007]={ [23001]={
}, },
[5008]={ [43001]={
},
[5009]={
},
[5010]={
} }
} }
local config = { local config = {
data=item,count=16 data=item,count=14
} }
return config return config

View File

@ -1,26 +1,26 @@
local hero = { 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]={ [6]={
}, },
[5001]={ [32001]={
}, },
[5002]={ [22001]={
}, },
[5003]={ [42001]={
}, },
[5004]={ [52001]={
}, },
[5005]={ [12001]={
}, },
[5006]={ [33001]={
}, },
[5007]={ [23001]={
}, },
[5008]={ [43001]={
},
[5009]={
},
[5010]={
} }
} }
local config = { local config = {
data=item,count=16 data=item,count=14
} }
return config return config

View File

@ -1,26 +1,26 @@
local hero = { 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]={ [6]={
}, },
[5001]={ [32001]={
}, },
[5002]={ [22001]={
}, },
[5003]={ [42001]={
}, },
[5004]={ [52001]={
}, },
[5005]={ [12001]={
}, },
[5006]={ [33001]={
}, },
[5007]={ [23001]={
}, },
[5008]={ [43001]={
},
[5009]={
},
[5010]={
} }
} }
local config = { local config = {
data=item,count=16 data=item,count=14
} }
return config return config

View File

@ -1,26 +1,26 @@
local hero = { 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]={ [6]={
}, },
[5001]={ [32001]={
}, },
[5002]={ [22001]={
}, },
[5003]={ [42001]={
}, },
[5004]={ [52001]={
}, },
[5005]={ [12001]={
}, },
[5006]={ [33001]={
}, },
[5007]={ [23001]={
}, },
[5008]={ [43001]={
},
[5009]={
},
[5010]={
} }
} }
local config = { local config = {
data=item,count=16 data=item,count=14
} }
return config return config

View File

@ -1,26 +1,26 @@
local hero = { 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]={ [6]={
}, },
[5001]={ [32001]={
}, },
[5002]={ [22001]={
}, },
[5003]={ [42001]={
}, },
[5004]={ [52001]={
}, },
[5005]={ [12001]={
}, },
[5006]={ [33001]={
}, },
[5007]={ [23001]={
}, },
[5008]={ [43001]={
},
[5009]={
},
[5010]={
} }
} }
local config = { local config = {
data=item,count=16 data=item,count=14
} }
return config return config

View File

@ -1,26 +1,26 @@
local hero = { 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]={ [6]={
}, },
[5001]={ [32001]={
}, },
[5002]={ [22001]={
}, },
[5003]={ [42001]={
}, },
[5004]={ [52001]={
}, },
[5005]={ [12001]={
}, },
[5006]={ [33001]={
}, },
[5007]={ [23001]={
}, },
[5008]={ [43001]={
},
[5009]={
},
[5010]={
} }
} }
local config = { local config = {
data=item,count=16 data=item,count=14
} }
return config return config

View File

@ -1,26 +1,26 @@
local hero = { 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]={ [6]={
}, },
[5001]={ [32001]={
}, },
[5002]={ [22001]={
}, },
[5003]={ [42001]={
}, },
[5004]={ [52001]={
}, },
[5005]={ [12001]={
}, },
[5006]={ [33001]={
}, },
[5007]={ [23001]={
}, },
[5008]={ [43001]={
},
[5009]={
},
[5010]={
} }
} }
local config = { local config = {
data=item,count=16 data=item,count=14
} }
return config return config

View File

@ -1,26 +1,26 @@
local hero = { 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]={ [6]={
}, },
[5001]={ [32001]={
}, },
[5002]={ [22001]={
}, },
[5003]={ [42001]={
}, },
[5004]={ [52001]={
}, },
[5005]={ [12001]={
}, },
[5006]={ [33001]={
}, },
[5007]={ [23001]={
}, },
[5008]={ [43001]={
},
[5009]={
},
[5010]={
} }
} }
local config = { local config = {
data=item,count=16 data=item,count=14
} }
return config return config

View File

@ -1,26 +1,26 @@
local hero = { 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]={ [6]={
}, },
[5001]={ [32001]={
}, },
[5002]={ [22001]={
}, },
[5003]={ [42001]={
}, },
[5004]={ [52001]={
}, },
[5005]={ [12001]={
}, },
[5006]={ [33001]={
}, },
[5007]={ [23001]={
}, },
[5008]={ [43001]={
},
[5009]={
},
[5010]={
} }
} }
local config = { local config = {
data=item,count=16 data=item,count=14
} }
return config return config

View File

@ -1,26 +1,26 @@
local hero = { 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]={ [6]={
}, },
[5001]={ [32001]={
}, },
[5002]={ [22001]={
}, },
[5003]={ [42001]={
}, },
[5004]={ [52001]={
}, },
[5005]={ [12001]={
}, },
[5006]={ [33001]={
}, },
[5007]={ [23001]={
}, },
[5008]={ [43001]={
},
[5009]={
},
[5010]={
} }
} }
local config = { local config = {
data=item,count=16 data=item,count=14
} }
return config return config

View File

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

View File

@ -19,8 +19,11 @@ end
function ServerBaseData:init() function ServerBaseData:init()
end end
function ServerBaseData:clear()
end
function ServerBaseData:loadLocalData() function ServerBaseData:loadLocalData()
local data = LocalData:getString("ServerData_" .. self.__cname, "") local data = LocalData:getString(self:_getLocalSaveKey(), "")
local dataObj = nil local dataObj = nil
if data and data ~= "" then if data and data ~= "" then
dataObj = json.decode(data) dataObj = json.decode(data)
@ -28,6 +31,18 @@ function ServerBaseData:loadLocalData()
return dataObj return dataObj
end 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() function ServerBaseData:getCloneData()
local cloneData = {} local cloneData = {}
local function _copy(object) local function _copy(object)
@ -46,8 +61,19 @@ function ServerBaseData:getCloneData()
return _copy(self.data) return _copy(self.data)
end 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 end
return ServerBaseData return ServerBaseData

View File

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

View File

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

View File

@ -12,14 +12,20 @@ end
function HeroData:init(data) function HeroData:init(data)
self.heroes = {} self.heroes = {}
local heroCfg = ConfigManager:getConfig("hero") if data then
for heroId, heroInfo in pairs(heroCfg) do for _, heroInfo in pairs(data.heroes) do
self:createHeroById(heroId, heroInfo) self:addHero(heroInfo.cfg_id, heroInfo.lv)
end
end end
end end
function HeroData:createHeroById(heroId, heroInfo) function HeroData:addHero(cfgId, lv)
self.heroes[heroId] = HeroEntity:create(heroId, heroInfo) 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 end
function HeroData:getAllHeroes() function HeroData:getAllHeroes()

View File

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