Merge branch 'dev_20230725' of http://git.juzugame.com/b6-client/b6-lua into dev_20230725

This commit is contained in:
xiekaidong 2023-07-24 14:08:49 +08:00
commit e42990673e
15 changed files with 23440 additions and 2016 deletions

View File

@ -129,6 +129,10 @@ BIReport.ITEM_GET_TYPE = {
DUNGEON_ARMOR_END = "DungeonArmorEnd",
DUNGEON_ARMOR_SWEEP = "DungeonArmorSweep",
DUNGEON_ARMOR_STAR_REWARD = "DungeonArmorStarReward",
DUNGEON_ARMOR_FUND_REWARD = "DungeonArmorFundReward",
ARMOR_FUND = "ArmorFund",
WEAPON_GIFT = "WeaponGift",
ARMOR_GIFT = "ArmorGift",
EQUIP_UPGRADE = "EquipUpgrade",
}
@ -141,6 +145,7 @@ BIReport.ADS_CLICK_TYPE = {
ARENA_TICKET = "ArenaTicket",
ARENA_REMATCH = "ArenaRematch",
ARENA_AD_BOX = "ArenaAdBox",
ARMOR_FUND_AD = "ArmorFundAd",
MALL_DAILY = "MallDaily",
MALL_DAILY_RESET = "MallDailyReset",
@ -193,6 +198,9 @@ BIReport.GIFT_TYPE = {
ARENA_BOUNTY = "ArenaBounty",
INTRODUCTORY_GIFT = "IntroductoryGift",
ARENA_GIFT = "ArenaGift",
ARMOR_FUND = "ArmorFund",
WEAPON_GIFT = "WeaponGift",
ARMOR_GIFT = "ArmorGift",
}
BIReport.COIN_TYPE = {

View File

@ -37,6 +37,7 @@ local LOCAL_DATA_KEY = {
LINK_TOUCH_CANCEL_COUNT = "LINK_TOUCH_CANCEL_COUNT",
ARENA_TODAY_BATTLE_COUNT = "ARENA_TODAY_BATTLE_COUNT",
TRIAL_HERO = "TRIAL_HERO",
ARMOR_FUND_TODAY_AD = "ARMOR_FUND_TODAY_AD",
}
LocalData.KEYS = LOCAL_DATA_KEY
@ -430,4 +431,12 @@ function LocalData:GetMarktrailHero()
return self:getInt(LocalData:getRoleKey(LOCAL_DATA_KEY.TRIAL_HERO), 0)
end
function LocalData:isTodayWatchedArmorFundAd()
return self:getInt(LOCAL_DATA_KEY.ARMOR_FUND_TODAY_AD .. Time:getBeginningOfServerToday(), 0) == 1
end
function LocalData:recordTodayWatchedArmorFundAd()
self:setInt(LOCAL_DATA_KEY.ARMOR_FUND_TODAY_AD .. Time:getBeginningOfServerToday(), 1)
end
return LocalData

View File

@ -43,6 +43,9 @@ PayManager.BI_ITEM_GET_TYPE = {
[PayManager.PURCHARSE_ACT_TYPE.BOUNTY] = BIReport.ITEM_GET_TYPE.BOUNTY,
[PayManager.PURCHARSE_ACT_TYPE.ARENA_BOUNTY] = BIReport.ITEM_GET_TYPE.ARENA_BOUNTY,
[PayManager.PURCHARSE_ACT_TYPE.ARENA_GIFT] = BIReport.ITEM_GET_TYPE.ARENA_GIFT,
[PayManager.PURCHARSE_ACT_TYPE.ARMOR_FUND] = BIReport.ITEM_GET_TYPE.ARMOR_FUND,
[PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = BIReport.ITEM_GET_TYPE.WEAPON_GIFT,
[PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT] = BIReport.ITEM_GET_TYPE.ARMOR_GIFT,
},
[PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG] = BIReport.ITEM_GET_TYPE.GOLD_PIG,
[PayManager.PURCHARSE_TYPE.MALL_TREASURE] = BIReport.ITEM_GET_TYPE.MALL_TREASURE,
@ -61,6 +64,9 @@ PayManager.BI_GIFT_TYPE = {
[PayManager.PURCHARSE_ACT_TYPE.BOUNTY] = BIReport.GIFT_TYPE.BOUNTY,
[PayManager.PURCHARSE_ACT_TYPE.ARENA_BOUNTY] = BIReport.GIFT_TYPE.ARENA_BOUNTY,
[PayManager.PURCHARSE_ACT_TYPE.ARENA_GIFT] = BIReport.GIFT_TYPE.ARENA_GIFT,
[PayManager.PURCHARSE_ACT_TYPE.ARMOR_FUND] = BIReport.GIFT_TYPE.ARMOR_FUND,
[PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = BIReport.GIFT_TYPE.WEAPON_GIFT,
[PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT] = BIReport.GIFT_TYPE.ARMOR_GIFT,
},
[PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG] = BIReport.GIFT_TYPE.GOLD_PIG,
[PayManager.PURCHARSE_TYPE.MALL_TREASURE] = BIReport.GIFT_TYPE.MALL_TREASURE,

File diff suppressed because it is too large Load Diff

View File

@ -5,9 +5,9 @@ local chapter_dungeon_armor = {
["stage"]=1,
["chapter_bg"]="dungeon_armor_map_1",
["stage_icon"]="dungeon_armor_house_1",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_3",
["block_icon"]="battle_hinder_3",
["chess_board"]="chessboard_1",
["board"]={
1,
2
@ -118,12 +118,12 @@ local chapter_dungeon_armor = {
["stage"]=2,
["chapter_bg"]="dungeon_armor_map_1",
["stage_icon"]="dungeon_armor_house_1",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_4",
["block_icon"]="battle_hinder_4",
["chess_board"]="chessboard_1",
["board"]={
1,
2
3,
4
},
["monster"]={
1107,
@ -231,12 +231,12 @@ local chapter_dungeon_armor = {
["stage"]=3,
["chapter_bg"]="dungeon_armor_map_1",
["stage_icon"]="dungeon_armor_house_1",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_4",
["block_icon"]="battle_hinder_4",
["chess_board"]="chessboard_1",
["board"]={
1,
2
5,
6
},
["monster"]={
2107,
@ -344,12 +344,12 @@ local chapter_dungeon_armor = {
["stage"]=4,
["chapter_bg"]="dungeon_armor_map_1",
["stage_icon"]="dungeon_armor_house_1",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_6",
["block_icon"]="battle_hinder_6",
["chess_board"]="chessboard_2",
["board"]={
1,
2
7,
8
},
["monster"]={
3107,
@ -457,12 +457,12 @@ local chapter_dungeon_armor = {
["stage"]=5,
["chapter_bg"]="dungeon_armor_map_1",
["stage_icon"]="dungeon_armor_house_1",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_7",
["block_icon"]="battle_hinder_7",
["chess_board"]="chessboard_2",
["board"]={
1,
2
9,
10
},
["monster"]={
4107,
@ -570,12 +570,12 @@ local chapter_dungeon_armor = {
["stage"]=6,
["chapter_bg"]="dungeon_armor_map_1",
["stage_icon"]="dungeon_armor_house_1",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_8",
["block_icon"]="battle_hinder_8",
["chess_board"]="chessboard_2",
["board"]={
1,
2
11,
12
},
["monster"]={
5107,
@ -683,12 +683,12 @@ local chapter_dungeon_armor = {
["stage"]=1,
["chapter_bg"]="dungeon_armor_map_2",
["stage_icon"]="dungeon_armor_house_2",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_10",
["block_icon"]="battle_hinder_10",
["chess_board"]="chessboard_2",
["board"]={
1,
2
13,
14
},
["monster"]={
6107,
@ -818,12 +818,12 @@ local chapter_dungeon_armor = {
["stage"]=2,
["chapter_bg"]="dungeon_armor_map_2",
["stage_icon"]="dungeon_armor_house_2",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_12",
["block_icon"]="battle_hinder_12",
["chess_board"]="chessboard_2",
["board"]={
1,
2
15,
16
},
["monster"]={
7107,
@ -953,12 +953,12 @@ local chapter_dungeon_armor = {
["stage"]=3,
["chapter_bg"]="dungeon_armor_map_2",
["stage_icon"]="dungeon_armor_house_2",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_9",
["block_icon"]="battle_hinder_9",
["chess_board"]="chessboard_2",
["board"]={
1,
2
17,
18
},
["monster"]={
8107,
@ -1088,12 +1088,12 @@ local chapter_dungeon_armor = {
["stage"]=4,
["chapter_bg"]="dungeon_armor_map_2",
["stage_icon"]="dungeon_armor_house_2",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_14",
["block_icon"]="battle_hinder_14",
["chess_board"]="chessboard_1",
["board"]={
1,
2
19,
20
},
["monster"]={
9107,
@ -1223,12 +1223,12 @@ local chapter_dungeon_armor = {
["stage"]=5,
["chapter_bg"]="dungeon_armor_map_2",
["stage_icon"]="dungeon_armor_house_2",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_19",
["block_icon"]="battle_hinder_19",
["chess_board"]="chessboard_1",
["board"]={
1,
2
21,
22
},
["monster"]={
10107,
@ -1358,12 +1358,12 @@ local chapter_dungeon_armor = {
["stage"]=6,
["chapter_bg"]="dungeon_armor_map_2",
["stage_icon"]="dungeon_armor_house_2",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_11",
["block_icon"]="battle_hinder_11",
["chess_board"]="chessboard_2",
["board"]={
1,
2
23,
24
},
["monster"]={
11107,
@ -1493,12 +1493,12 @@ local chapter_dungeon_armor = {
["stage"]=1,
["chapter_bg"]="dungeon_armor_map_3",
["stage_icon"]="dungeon_armor_house_3",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_8",
["block_icon"]="battle_hinder_8",
["chess_board"]="chessboard_2",
["board"]={
1,
2
25,
26
},
["monster"]={
12107,
@ -1650,12 +1650,12 @@ local chapter_dungeon_armor = {
["stage"]=2,
["chapter_bg"]="dungeon_armor_map_3",
["stage_icon"]="dungeon_armor_house_3",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_9",
["block_icon"]="battle_hinder_9",
["chess_board"]="chessboard_2",
["board"]={
1,
2
27,
28
},
["monster"]={
13107,
@ -1807,12 +1807,12 @@ local chapter_dungeon_armor = {
["stage"]=3,
["chapter_bg"]="dungeon_armor_map_3",
["stage_icon"]="dungeon_armor_house_3",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_10",
["block_icon"]="battle_hinder_10",
["chess_board"]="chessboard_2",
["board"]={
1,
2
29,
30
},
["monster"]={
14107,
@ -1964,12 +1964,12 @@ local chapter_dungeon_armor = {
["stage"]=4,
["chapter_bg"]="dungeon_armor_map_3",
["stage_icon"]="dungeon_armor_house_3",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_17",
["block_icon"]="battle_hinder_17",
["chess_board"]="chessboard_1",
["board"]={
1,
2
31,
32
},
["monster"]={
15107,
@ -2121,12 +2121,12 @@ local chapter_dungeon_armor = {
["stage"]=5,
["chapter_bg"]="dungeon_armor_map_3",
["stage_icon"]="dungeon_armor_house_3",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_21",
["block_icon"]="battle_hinder_21",
["chess_board"]="chessboard_1",
["board"]={
1,
2
33,
34
},
["monster"]={
16107,
@ -2278,12 +2278,12 @@ local chapter_dungeon_armor = {
["stage"]=6,
["chapter_bg"]="dungeon_armor_map_3",
["stage_icon"]="dungeon_armor_house_3",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_18",
["block_icon"]="battle_hinder_18",
["chess_board"]="chessboard_1",
["board"]={
1,
2
35,
36
},
["monster"]={
17107,
@ -2435,12 +2435,12 @@ local chapter_dungeon_armor = {
["stage"]=1,
["chapter_bg"]="dungeon_armor_map_4",
["stage_icon"]="dungeon_armor_house_4",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_20",
["block_icon"]="battle_hinder_20",
["chess_board"]="chessboard_1",
["board"]={
1,
2
37,
38
},
["monster"]={
18107,
@ -2592,12 +2592,12 @@ local chapter_dungeon_armor = {
["stage"]=2,
["chapter_bg"]="dungeon_armor_map_4",
["stage_icon"]="dungeon_armor_house_4",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_23",
["block_icon"]="battle_hinder_23",
["chess_board"]="chessboard_2",
["board"]={
1,
2
39,
40
},
["monster"]={
19107,
@ -2749,12 +2749,12 @@ local chapter_dungeon_armor = {
["stage"]=3,
["chapter_bg"]="dungeon_armor_map_4",
["stage_icon"]="dungeon_armor_house_4",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_23",
["block_icon"]="battle_hinder_23",
["chess_board"]="chessboard_2",
["board"]={
1,
2
41,
42
},
["monster"]={
20107,
@ -2906,12 +2906,12 @@ local chapter_dungeon_armor = {
["stage"]=4,
["chapter_bg"]="dungeon_armor_map_4",
["stage_icon"]="dungeon_armor_house_4",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_24",
["block_icon"]="battle_hinder_24",
["chess_board"]="chessboard_3",
["board"]={
1,
2
43,
44
},
["monster"]={
21107,
@ -3063,12 +3063,12 @@ local chapter_dungeon_armor = {
["stage"]=5,
["chapter_bg"]="dungeon_armor_map_4",
["stage_icon"]="dungeon_armor_house_4",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_24",
["block_icon"]="battle_hinder_24",
["chess_board"]="chessboard_3",
["board"]={
1,
2
45,
46
},
["monster"]={
22107,
@ -3220,12 +3220,12 @@ local chapter_dungeon_armor = {
["stage"]=6,
["chapter_bg"]="dungeon_armor_map_4",
["stage_icon"]="dungeon_armor_house_4",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_22",
["block_icon"]="battle_hinder_22",
["chess_board"]="chessboard_1",
["board"]={
1,
2
47,
48
},
["monster"]={
23107,
@ -3377,12 +3377,12 @@ local chapter_dungeon_armor = {
["stage"]=1,
["chapter_bg"]="dungeon_armor_map_5",
["stage_icon"]="dungeon_armor_house_5",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_24",
["block_icon"]="battle_hinder_24",
["chess_board"]="chessboard_3",
["board"]={
1,
2
49,
50
},
["monster"]={
24107,
@ -3534,12 +3534,12 @@ local chapter_dungeon_armor = {
["stage"]=2,
["chapter_bg"]="dungeon_armor_map_5",
["stage_icon"]="dungeon_armor_house_5",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_11",
["block_icon"]="battle_hinder_11",
["chess_board"]="chessboard_2",
["board"]={
1,
2
51,
52
},
["monster"]={
25107,
@ -3691,12 +3691,12 @@ local chapter_dungeon_armor = {
["stage"]=3,
["chapter_bg"]="dungeon_armor_map_5",
["stage_icon"]="dungeon_armor_house_5",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_17",
["block_icon"]="battle_hinder_17",
["chess_board"]="chessboard_1",
["board"]={
1,
2
53,
54
},
["monster"]={
26107,
@ -3848,12 +3848,12 @@ local chapter_dungeon_armor = {
["stage"]=4,
["chapter_bg"]="dungeon_armor_map_5",
["stage_icon"]="dungeon_armor_house_5",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_23",
["block_icon"]="battle_hinder_23",
["chess_board"]="chessboard_2",
["board"]={
1,
2
55,
56
},
["monster"]={
27107,
@ -4005,12 +4005,12 @@ local chapter_dungeon_armor = {
["stage"]=5,
["chapter_bg"]="dungeon_armor_map_5",
["stage_icon"]="dungeon_armor_house_5",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_24",
["block_icon"]="battle_hinder_24",
["chess_board"]="chessboard_3",
["board"]={
1,
2
57,
58
},
["monster"]={
28107,
@ -4162,12 +4162,12 @@ local chapter_dungeon_armor = {
["stage"]=6,
["chapter_bg"]="dungeon_armor_map_5",
["stage_icon"]="dungeon_armor_house_5",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_24",
["block_icon"]="battle_hinder_24",
["chess_board"]="chessboard_3",
["board"]={
1,
2
59,
60
},
["monster"]={
29107,
@ -4319,12 +4319,12 @@ local chapter_dungeon_armor = {
["stage"]=1,
["chapter_bg"]="dungeon_armor_map_6",
["stage_icon"]="dungeon_armor_house_6",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_24",
["block_icon"]="battle_hinder_24",
["chess_board"]="chessboard_3",
["board"]={
1,
2
61,
62
},
["monster"]={
30107,
@ -4476,12 +4476,12 @@ local chapter_dungeon_armor = {
["stage"]=2,
["chapter_bg"]="dungeon_armor_map_6",
["stage_icon"]="dungeon_armor_house_6",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_26",
["block_icon"]="battle_hinder_26",
["chess_board"]="chessboard_1",
["board"]={
1,
2
63,
64
},
["monster"]={
31107,
@ -4633,12 +4633,12 @@ local chapter_dungeon_armor = {
["stage"]=3,
["chapter_bg"]="dungeon_armor_map_6",
["stage_icon"]="dungeon_armor_house_6",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_27",
["block_icon"]="battle_hinder_27",
["chess_board"]="chessboard_1",
["board"]={
1,
2
65,
66
},
["monster"]={
32107,
@ -4790,12 +4790,12 @@ local chapter_dungeon_armor = {
["stage"]=4,
["chapter_bg"]="dungeon_armor_map_6",
["stage_icon"]="dungeon_armor_house_6",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_28",
["block_icon"]="battle_hinder_28",
["chess_board"]="chessboard_1",
["board"]={
1,
2
67,
68
},
["monster"]={
33107,
@ -4947,12 +4947,12 @@ local chapter_dungeon_armor = {
["stage"]=5,
["chapter_bg"]="dungeon_armor_map_6",
["stage_icon"]="dungeon_armor_house_6",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_29",
["block_icon"]="battle_hinder_30",
["chess_board"]="chessboard_3",
["board"]={
1,
2
69,
70
},
["monster"]={
34107,
@ -5104,12 +5104,12 @@ local chapter_dungeon_armor = {
["stage"]=6,
["chapter_bg"]="dungeon_armor_map_6",
["stage_icon"]="dungeon_armor_house_6",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_30",
["block_icon"]="battle_hinder_29",
["chess_board"]="chessboard_3",
["board"]={
1,
2
71,
72
},
["monster"]={
35107,
@ -5261,12 +5261,12 @@ local chapter_dungeon_armor = {
["stage"]=1,
["chapter_bg"]="dungeon_armor_map_7",
["stage_icon"]="dungeon_armor_house_7",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_3",
["block_icon"]="battle_hinder_3",
["chess_board"]="chessboard_1",
["board"]={
1,
2
73,
74
},
["monster"]={
36107,
@ -5418,12 +5418,12 @@ local chapter_dungeon_armor = {
["stage"]=2,
["chapter_bg"]="dungeon_armor_map_7",
["stage_icon"]="dungeon_armor_house_7",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_11",
["block_icon"]="battle_hinder_11",
["chess_board"]="chessboard_2",
["board"]={
1,
2
75,
76
},
["monster"]={
37107,
@ -5575,12 +5575,12 @@ local chapter_dungeon_armor = {
["stage"]=3,
["chapter_bg"]="dungeon_armor_map_7",
["stage_icon"]="dungeon_armor_house_7",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_8",
["block_icon"]="battle_hinder_8",
["chess_board"]="chessboard_2",
["board"]={
1,
2
77,
78
},
["monster"]={
38107,
@ -5732,12 +5732,12 @@ local chapter_dungeon_armor = {
["stage"]=4,
["chapter_bg"]="dungeon_armor_map_7",
["stage_icon"]="dungeon_armor_house_7",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_7",
["block_icon"]="battle_hinder_7",
["chess_board"]="chessboard_2",
["board"]={
1,
2
79,
80
},
["monster"]={
39107,
@ -5889,12 +5889,12 @@ local chapter_dungeon_armor = {
["stage"]=5,
["chapter_bg"]="dungeon_armor_map_7",
["stage_icon"]="dungeon_armor_house_7",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_29",
["block_icon"]="battle_hinder_30",
["chess_board"]="chessboard_3",
["board"]={
1,
2
81,
82
},
["monster"]={
40107,
@ -6046,12 +6046,12 @@ local chapter_dungeon_armor = {
["stage"]=6,
["chapter_bg"]="dungeon_armor_map_7",
["stage_icon"]="dungeon_armor_house_7",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_24",
["block_icon"]="battle_hinder_24",
["chess_board"]="chessboard_3",
["board"]={
1,
2
83,
84
},
["monster"]={
41107,
@ -6203,12 +6203,12 @@ local chapter_dungeon_armor = {
["stage"]=1,
["chapter_bg"]="dungeon_armor_map_8",
["stage_icon"]="dungeon_armor_house_8",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_26",
["block_icon"]="battle_hinder_26",
["chess_board"]="chessboard_1",
["board"]={
1,
2
85,
86
},
["monster"]={
42107,
@ -6360,12 +6360,12 @@ local chapter_dungeon_armor = {
["stage"]=2,
["chapter_bg"]="dungeon_armor_map_8",
["stage_icon"]="dungeon_armor_house_8",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_18",
["block_icon"]="battle_hinder_18",
["chess_board"]="chessboard_1",
["board"]={
1,
2
87,
88
},
["monster"]={
43107,
@ -6517,12 +6517,12 @@ local chapter_dungeon_armor = {
["stage"]=3,
["chapter_bg"]="dungeon_armor_map_8",
["stage_icon"]="dungeon_armor_house_8",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_28",
["block_icon"]="battle_hinder_28",
["chess_board"]="chessboard_1",
["board"]={
1,
2
89,
90
},
["monster"]={
44107,
@ -6674,12 +6674,12 @@ local chapter_dungeon_armor = {
["stage"]=4,
["chapter_bg"]="dungeon_armor_map_8",
["stage_icon"]="dungeon_armor_house_8",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_7",
["block_icon"]="battle_hinder_7",
["chess_board"]="chessboard_2",
["board"]={
1,
2
91,
92
},
["monster"]={
45107,
@ -6831,12 +6831,12 @@ local chapter_dungeon_armor = {
["stage"]=5,
["chapter_bg"]="dungeon_armor_map_8",
["stage_icon"]="dungeon_armor_house_8",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_14",
["block_icon"]="battle_hinder_14",
["chess_board"]="chessboard_1",
["board"]={
1,
2
93,
94
},
["monster"]={
46107,
@ -6988,12 +6988,12 @@ local chapter_dungeon_armor = {
["stage"]=6,
["chapter_bg"]="dungeon_armor_map_8",
["stage_icon"]="dungeon_armor_house_8",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_26",
["block_icon"]="battle_hinder_26",
["chess_board"]="chessboard_1",
["board"]={
1,
2
95,
96
},
["monster"]={
47107,
@ -7145,12 +7145,12 @@ local chapter_dungeon_armor = {
["stage"]=1,
["chapter_bg"]="dungeon_armor_map_9",
["stage_icon"]="dungeon_armor_house_9",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_27",
["block_icon"]="battle_hinder_27",
["chess_board"]="chessboard_1",
["board"]={
1,
2
97,
98
},
["monster"]={
48107,
@ -7302,12 +7302,12 @@ local chapter_dungeon_armor = {
["stage"]=2,
["chapter_bg"]="dungeon_armor_map_9",
["stage_icon"]="dungeon_armor_house_9",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_7",
["block_icon"]="battle_hinder_7",
["chess_board"]="chessboard_2",
["board"]={
1,
2
99,
100
},
["monster"]={
49107,
@ -7459,12 +7459,12 @@ local chapter_dungeon_armor = {
["stage"]=3,
["chapter_bg"]="dungeon_armor_map_9",
["stage_icon"]="dungeon_armor_house_9",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_23",
["block_icon"]="battle_hinder_23",
["chess_board"]="chessboard_2",
["board"]={
1,
2
101,
102
},
["monster"]={
50107,
@ -7616,12 +7616,12 @@ local chapter_dungeon_armor = {
["stage"]=4,
["chapter_bg"]="dungeon_armor_map_9",
["stage_icon"]="dungeon_armor_house_9",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_22",
["block_icon"]="battle_hinder_22",
["chess_board"]="chessboard_1",
["board"]={
1,
2
103,
104
},
["monster"]={
51107,
@ -7773,12 +7773,12 @@ local chapter_dungeon_armor = {
["stage"]=5,
["chapter_bg"]="dungeon_armor_map_9",
["stage_icon"]="dungeon_armor_house_9",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_14",
["block_icon"]="battle_hinder_14",
["chess_board"]="chessboard_1",
["board"]={
1,
2
105,
106
},
["monster"]={
52107,
@ -7930,12 +7930,12 @@ local chapter_dungeon_armor = {
["stage"]=6,
["chapter_bg"]="dungeon_armor_map_9",
["stage_icon"]="dungeon_armor_house_9",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_30",
["block_icon"]="battle_hinder_29",
["chess_board"]="chessboard_3",
["board"]={
1,
2
107,
108
},
["monster"]={
53107,
@ -8087,12 +8087,12 @@ local chapter_dungeon_armor = {
["stage"]=1,
["chapter_bg"]="dungeon_armor_map_10",
["stage_icon"]="dungeon_armor_house_10",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_28",
["block_icon"]="battle_hinder_28",
["chess_board"]="chessboard_1",
["board"]={
1,
2
109,
110
},
["monster"]={
54107,
@ -8244,12 +8244,12 @@ local chapter_dungeon_armor = {
["stage"]=2,
["chapter_bg"]="dungeon_armor_map_10",
["stage_icon"]="dungeon_armor_house_10",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_24",
["block_icon"]="battle_hinder_24",
["chess_board"]="chessboard_3",
["board"]={
1,
2
111,
112
},
["monster"]={
55107,
@ -8401,12 +8401,12 @@ local chapter_dungeon_armor = {
["stage"]=3,
["chapter_bg"]="dungeon_armor_map_10",
["stage_icon"]="dungeon_armor_house_10",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_7",
["block_icon"]="battle_hinder_7",
["chess_board"]="chessboard_2",
["board"]={
1,
2
113,
114
},
["monster"]={
56107,
@ -8558,12 +8558,12 @@ local chapter_dungeon_armor = {
["stage"]=4,
["chapter_bg"]="dungeon_armor_map_10",
["stage_icon"]="dungeon_armor_house_10",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["scene"]="bg_23",
["block_icon"]="battle_hinder_23",
["chess_board"]="chessboard_2",
["board"]={
1,
2
115,
116
},
["monster"]={
57107,
@ -8715,12 +8715,12 @@ local chapter_dungeon_armor = {
["stage"]=5,
["chapter_bg"]="dungeon_armor_map_10",
["stage_icon"]="dungeon_armor_house_10",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_22",
["block_icon"]="battle_hinder_22",
["chess_board"]="chessboard_1",
["board"]={
1,
2
117,
118
},
["monster"]={
58107,
@ -8872,12 +8872,12 @@ local chapter_dungeon_armor = {
["stage"]=6,
["chapter_bg"]="dungeon_armor_map_10",
["stage_icon"]="dungeon_armor_house_10",
["scene"]="bg_13",
["block_icon"]="battle_hinder_13",
["chess_board"]="chessboard_2",
["scene"]="bg_25",
["block_icon"]="battle_hinder_25",
["chess_board"]="chessboard_3",
["board"]={
1,
2
119,
120
},
["monster"]={
59107,

View File

@ -52,7 +52,7 @@ local monster_dungeon_armor = {
["is_boss"]=1,
["hp"]=290940000,
["atk"]=2800000,
["atk_times"]=3,
["atk_times"]=4,
["hurt_skill"]={
30010,
30011,
@ -180,7 +180,7 @@ local monster_dungeon_armor = {
["is_boss"]=1,
["hp"]=290940000,
["atk"]=2800000,
["atk_times"]=3,
["atk_times"]=4,
["hurt_skill"]={
30043,
30044,
@ -311,7 +311,7 @@ local monster_dungeon_armor = {
["is_boss"]=1,
["hp"]=290940000,
["atk"]=2800000,
["atk_times"]=3,
["atk_times"]=4,
["hurt_skill"]={
30040,
30041,
@ -963,7 +963,7 @@ local monster_dungeon_armor = {
["is_boss"]=1,
["hp"]=356570000,
["atk"]=3520000,
["atk_times"]=3,
["atk_times"]=4,
["hurt_skill"]={
30040,
30041,
@ -1627,7 +1627,7 @@ local monster_dungeon_armor = {
["is_boss"]=1,
["hp"]=475340000,
["atk"]=4990000,
["atk_times"]=3,
["atk_times"]=4,
["hurt_skill"]={
30040,
30041,
@ -1758,7 +1758,7 @@ local monster_dungeon_armor = {
["is_boss"]=1,
["hp"]=475340000,
["atk"]=4990000,
["atk_times"]=3,
["atk_times"]=4,
["hurt_skill"]={
30043,
30044,
@ -4841,7 +4841,7 @@ local monster_dungeon_armor = {
["is_boss"]=1,
["hp"]=600970000,
["atk"]=6650000,
["atk_times"]=3,
["atk_times"]=4,
["hurt_skill"]={
30010,
30011,
@ -5105,7 +5105,7 @@ local monster_dungeon_armor = {
["is_boss"]=1,
["hp"]=600970000,
["atk"]=6650000,
["atk_times"]=3,
["atk_times"]=4,
["hurt_skill"]={
30040,
30041,
@ -6041,7 +6041,7 @@ local monster_dungeon_armor = {
["is_boss"]=1,
["hp"]=639240000,
["atk"]=7150000,
["atk_times"]=3,
["atk_times"]=4,
["hurt_skill"]={
30040,
30041,
@ -6708,7 +6708,7 @@ local monster_dungeon_armor = {
["is_boss"]=1,
["hp"]=674740000,
["atk"]=7720000,
["atk_times"]=3,
["atk_times"]=4,
["hurt_skill"]={
30043,
30044,
@ -7168,18 +7168,25 @@ local monster_dungeon_armor = {
["monster_exp"]=29000
},
[54007]={
["monster_base"]=20017,
["monster_base"]=20038,
["is_boss"]=2,
["hp"]=1072430000,
["atk"]=7900000,
["atk_times"]=4,
["hurt_skill"]={
30049,
30050,
30051
30109,
30110,
30111,
30112
},
["skill"]={
10027
10080,
10081
},
["passive_skill"]={
10083,
10009,
10011
},
["monster_exp"]=40000
},
@ -7766,21 +7773,21 @@ local monster_dungeon_armor = {
["monster_exp"]=29000
},
[58507]={
["monster_base"]=20025,
["monster_base"]=20015,
["is_boss"]=1,
["hp"]=722740000,
["atk"]=8330000,
["atk_times"]=4,
["hurt_skill"]={
30073,
30074,
30075
30043,
30044,
30045
},
["skill"]={
10062
10070
},
["passive_skill"]={
10013
10008
},
["monster_exp"]=40000
},
@ -7833,21 +7840,22 @@ local monster_dungeon_armor = {
["monster_exp"]=29000
},
[59007]={
["monster_base"]=20015,
["monster_base"]=20024,
["is_boss"]=2,
["hp"]=1148710000,
["atk"]=8530000,
["atk_times"]=3,
["atk_times"]=4,
["hurt_skill"]={
30043,
30044,
30045
30070,
30071,
30072
},
["skill"]={
10070
10043,
10044
},
["passive_skill"]={
10008
10012
},
["monster_exp"]=40000
},
@ -7964,22 +7972,24 @@ local monster_dungeon_armor = {
["monster_exp"]=29000
},
[60007]={
["monster_base"]=20016,
["monster_base"]=20031,
["is_boss"]=2,
["hp"]=1148710000,
["atk"]=8530000,
["atk_times"]=4,
["hurt_skill"]={
30046,
30047,
30048
30091,
30092,
30093
},
["skill"]={
10036
10058,
10059
},
["passive_skill"]={
10010,
10011
10008,
10011,
10013
},
["monster_exp"]=40000
}

View File

@ -164,4 +164,22 @@ function DungeonArmorManager:respStarReward(result)
end
end
-- 领取基金奖励
function DungeonArmorManager:reqFundReward(id)
local parmas = {
id = id,-- id为1是广告奖励
}
self:sendMessage(ProtoMsgType.FromMsgEnum.ChapterArmorFundRewardReq, parmas, {}, self.respFundReward, BIReport.ITEM_GET_TYPE.DUNGEON_ARMOR_FUND_REWARD)
end
function DungeonArmorManager:respFundReward(result)
if result.err_code == GConst.ERROR_STR.SUCCESS then
GFunc.showRewardBox(result.rewards)
local armorData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_ARMOR)
if result.reqData then
armorData:onGetFundRewardSuccess(result.reqData.id)
end
end
end
return DungeonArmorManager

View File

@ -0,0 +1,93 @@
local ArmorFundUI = class("ArmorFundUI", BaseUI)
function ArmorFundUI:isFullScreen()
return false
end
function ArmorFundUI:showCommonBG()
return false
end
function ArmorFundUI:getPrefabPath()
return "assets/prefabs/ui/dungeon_armor/armor_fund_ui.prefab"
end
function ArmorFundUI:onPressBackspace()
self:closeUI()
end
function ArmorFundUI:ctor()
end
function ArmorFundUI:onCover()
end
function ArmorFundUI:onReshow()
end
function ArmorFundUI:onClose()
end
function ArmorFundUI:onLoadRootComplete()
local uiMap = self.root:genAllChildren()
self.txTitle = uiMap["armor_fund_ui.content.title.tx_title"]
self.btnClose = uiMap["armor_fund_ui.content.close_btn"]
self.scrollrectComp = uiMap["armor_fund_ui.content.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
self.txDesc = uiMap["armor_fund_ui.content.buy_node.tx_desc"]
self.btnBuy = uiMap["armor_fund_ui.content.buy_node.btn_buy"]
self.txBuy = uiMap["armor_fund_ui.content.buy_node.btn_buy.tx_buy"]
self.armorEntity = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_ARMOR)
self.txTitle:setText(self.armorEntity:getFundStageTitle())
self.btnBuy:addClickListener(function()
PayManager:purchasePackage(self.curGiftId, PayManager.PURCHARSE_TYPE.ACT_GIFT)
end)
self.btnClose:addClickListener(function()
self:closeUI()
end)
self:bind(self.armorEntity, "isDirty", function()
self:onRefresh()
end)
self:bind(DataManager.ShopData, "isDirty", function()
self:onRefresh()
end)
end
function ArmorFundUI:onRefresh()
self.curStage = self.armorEntity:getCurFundStage()
self.curGiftId = self.armorEntity:getFundStageGiftId(self.curStage)
self:showRewardList()
self:refreshBuy()
end
function ArmorFundUI:showRewardList()
local datas = self.armorEntity:getFundRewardIdsSort()
self.scrollrectComp:addInitCallback(function()
return "app/ui/dungeon_armor/cell/armor_fund_reward_cell"
end)
self.scrollrectComp:addRefreshCallback(function(index, cell)
cell:refresh(datas[index])
end)
self.scrollrectComp:clearCells()
self.scrollrectComp:refillCells(#datas)
end
function ArmorFundUI:refreshBuy()
local gift = DataManager.ShopData:getActGiftConfig()[self.curGiftId]
self.txDesc:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_ARMOR_DESC_16) .. " <size=46>" .. gift.value .. "%</size>")
if not self.armorEntity:isBoughtFundStage(self.curStage) then
-- 可购买
self.txBuy:setText(GFunc.getFormatPrice(gift.recharge_id))
self.btnBuy:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_2")
self.btnBuy:setTouchEnable(true)
else
-- 已购买
self.txBuy:setText(I18N:getGlobalText(I18N.GlobalConst.SHOP_DESC_20))
self.btnBuy:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_2")
self.btnBuy:setTouchEnable(false)
end
end
return ArmorFundUI

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 98906e790fb58d34ebd955ab17ef856a
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -0,0 +1,87 @@
local ArmorFundRewardCell = class("ArmorFundRewardCell", BaseCell)
local FUND_AD_REWARD_ID = 1
function ArmorFundRewardCell:init()
local uiMap = self:getUIMap()
self.txTitle = uiMap["armor_fund_cell.tx_title"]
self.txBtn = uiMap["armor_fund_cell.btn_get.tx_btn"]
self.imgAd = uiMap["armor_fund_cell.btn_get.img_ad"]
self.btnGet = uiMap["armor_fund_cell.btn_get"]
self.rewardsCells = {}
for i = 1, 3 do
self.rewardsCells[i] = uiMap["armor_fund_cell.rewards.reward_cell_"..i]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
end
self.btnGet:addClickListener(function()
-- ad奖励处理
if self.rewardId == FUND_AD_REWARD_ID and self.armorEntity:isCanWatchFundAd() then
SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.ARMOR_FUND_AD, function ()
self.armorEntity:onWatchFundAdSuccess()
end)
return
end
if self.rewardId ~= FUND_AD_REWARD_ID and not self.armorEntity:isBoughtFundStage(self.armorEntity:getCurFundStage()) then
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_ARMOR_DESC_15))
return
end
ModuleManager.DungeonArmorManager:reqFundReward(self.rewardId)
end)
end
function ArmorFundRewardCell:refresh(id)
self.rewardId = id
self.armorEntity = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_ARMOR)
local data = ConfigManager:getConfig("dungeon_armor_fund")[id]
if not data then
return
end
if data.reward then
local rewards = data.reward
for idx, cell in pairs(self.rewardsCells) do
if rewards[idx] then
cell:setVisible(true)
cell:refreshByConfig(rewards[idx])
else
cell:setVisible(false)
end
end
end
local levelCfg = ConfigManager:getConfig("chapter_dungeon_armor")[data.dungeon_stage]
if levelCfg then
self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_ARMOR_DESC_14, levelCfg.chapter, levelCfg.stage))
else
self.txTitle:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_ARMOR_DESC_13))
end
self.imgAd:setActive(false)
self.btnGet:removeRedPoint()
if not self.armorEntity:isCanGetFundReward(self.rewardId) or self.armorEntity:isGotFundReward(self.rewardId) then
-- 不满足条件 or 已领取
self.txBtn:setActive(true)
self.txBtn:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM))
self.btnGet:setTouchEnable(false)
self.btnGet:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_grey_2")
self.baseObject:setSprite(GConst.ATLAS_PATH.UI_DUGEON_ARMOR, "dungeon_armor_bg_1")
-- 广告奖励
if self.rewardId == 1 then
self.txBtn:setActive(false)
self.imgAd:setActive(true)
self.btnGet:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_2")
self.btnGet:setTouchEnable(true)
self.btnGet:addRedPoint(50, 30, 0.6)
end
else
-- 满足奖励条件 and 未领取
self.txBtn:setActive(true)
self.txBtn:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM))
self.btnGet:setTouchEnable(true)
self.btnGet:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_green_2")
self.baseObject:setSprite(GConst.ATLAS_PATH.UI_DUGEON_ARMOR, "dungeon_armor_bg_2")
end
end
return ArmorFundRewardCell

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 5c4ea3275ef535f419ef50f59b25ed7e
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}

View File

@ -60,7 +60,10 @@ function DungeonArmorMainUI:_display()
self.bg2 = uiMap["dungeon_armor_main_ui.scrollrect.viewport.content.bg_2"]
self.bg1:setAnchoredPositionY(-1)
self.bg2:setAnchoredPositionY(-1)
self.btnFund = uiMap["dungeon_armor_main_ui.btn_fund"]
self.txFund = uiMap["dungeon_armor_main_ui.btn_fund.tx_fund"]
self:refreshFund()
self:refreshScrollrect()
self:refreshFormation()
self:refreshStarNode()
@ -79,6 +82,10 @@ function DungeonArmorMainUI:_addListeners()
uiMap["dungeon_armor_main_ui.banner.star_node"]:addClickListener(function()
ModuleManager.DungeonArmorManager:showStarRewardUI()
end)
self.btnFund:addClickListener(function()
UIManager:showUI("app/ui/dungeon_armor/armor_fund_ui")
end)
self:addEventListener(EventManager.CUSTOM_EVENT.GO_SHOP, function()
self:closeUI()
@ -103,6 +110,7 @@ end
function DungeonArmorMainUI:_bind()
self:bind(self.armorData, "isDirty", function()
self:refreshFund()
self:refreshFormation()
self:refreshStarNode()
end)
@ -249,4 +257,14 @@ function DungeonArmorMainUI:refreshCloud(id)
end
end
function DungeonArmorMainUI:refreshFund()
self.txFund:setText(I18N:getGlobalText(I18N.GlobalConst.DUNGEON_ARMOR_DESC_12))
if DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_ARMOR):isHasFundRedDot() then
self.btnFund:addRedPoint(30, 40, 0.6)
else
self.btnFund:removeRedPoint()
end
end
return DungeonArmorMainUI

View File

@ -77,14 +77,18 @@ function ArmorInfoComp:refreshSelectArmor()
local armorEntity = DataManager.EquipData:getEquip(self.heroEntity:getCfgId(), self.selectPart)
self.txCurName:setText(armorEntity:getName())
self.imgCurBg:setSprite(GConst.ATLAS_PATH.ICON_EQUIP, "frame_" .. armorEntity:getStage())
self.imgCurIcon:setSprite(GConst.ATLAS_PATH.ICON_EQUIP, tostring(armorEntity:getIconId()))
self.imgCurIcon:setSprite(GConst.ATLAS_PATH.ICON_EQUIP, tostring(armorEntity:getIconId()), function()
self.imgCurIcon:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize()
end)
self.txCurLevel:setText("+".. armorEntity:getLevel())
-- next
local armorNextEntity = armorEntity:getNextLevelEntity()
self.txNextName:setText(armorNextEntity:getName())
self.imgNextBg:setSprite(GConst.ATLAS_PATH.ICON_EQUIP, "frame_" .. armorNextEntity:getStage())
self.imgNextIcon:setSprite(GConst.ATLAS_PATH.ICON_EQUIP, tostring(armorNextEntity:getIconId()))
self.imgNextIcon:setSprite(GConst.ATLAS_PATH.ICON_EQUIP, tostring(armorNextEntity:getIconId()), function()
self.imgNextIcon:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize()
end)
self.txNextLevel:setText("+".. armorNextEntity:getLevel())
-- 基础属性
@ -143,7 +147,10 @@ function ArmorInfoComp:refreshSelectArmor()
else
num:setText(haveNum .. "/" .. costNum)
end
icon:setSprite(GFunc.getIconRes(costId))
local atlas, name = GFunc.getIconRes(costId)
icon:setSprite(atlas, name, function ()
icon:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize()
end)
else
costNode:setActive(false)
end
@ -182,7 +189,9 @@ function ArmorInfoComp:refreshPart(index)
imgSelect:setActive(part == self.selectPart)
imgSelect:setSprite(GConst.ATLAS_PATH.ICON_EQUIP, "frame_select_" .. math.floor(stage / 2) + stage % 2)
imgBg:setSprite(GConst.ATLAS_PATH.ICON_EQUIP, "frame_" .. stage)
imgIcon:setSprite(GConst.ATLAS_PATH.ICON_EQUIP, tostring(armorEntity:getIconId()))
imgIcon:setSprite(GConst.ATLAS_PATH.ICON_EQUIP, tostring(armorEntity:getIconId()), function()
imgIcon:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize()
end)
imgType:setSprite(GConst.ATLAS_PATH.ICON_EQUIP, stage <= 1 and "frame_dec_1" or "frame_dec_2")
txLevel:setText("+".. armorEntity:getLevel())
end

View File

@ -42,7 +42,9 @@ function WeaponInfoComp:refresh()
local nextWeaponEntity = self.weaponEntity:getNextLevelEntity()
self.txName:setText(self.weaponEntity:getName())
self.imgWeapon:setSprite(GConst.ATLAS_PATH.ICON_EQUIP, tostring(self.weaponEntity:getIconId()))
self.imgWeapon:setSprite(GConst.ATLAS_PATH.ICON_EQUIP, tostring(self.weaponEntity:getIconId()), function()
self.imgWeapon:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize()
end)
self.txLevel:setText(I18N:getGlobalText(I18N.GlobalConst.EQUIP_DESC_3) .. self.weaponEntity:getLevel().."/"..self.weaponEntity:getMaxLevel())
self.txAttr:setText(self.weaponEntity:getAttrDesc())
@ -102,7 +104,10 @@ function WeaponInfoComp:refresh()
else
num:setText(haveNum .. "/" .. costNum)
end
-- icon:setSprite(GFunc.getIconRes(costId))
local atlas, name = GFunc.getIconRes(costId)
icon:setSprite(atlas, name, function ()
icon:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize()
end)
else
costNode:setActive(false)
end

View File

@ -1,6 +1,8 @@
local DungeonBaseEntity = require "app/userdata/dungeon/dungeon_base_entity"
local DungeonArmorEntity = class("DungeonArmorEntity", DungeonBaseEntity)
local FUND_AD_REWARD_ID = 1
-- 支线副本数据
function DungeonArmorEntity:clear()
DataManager:unregisterCrossDayFunc("DungeonArmorEntity")
@ -16,6 +18,7 @@ function DungeonArmorEntity:init(data)
self.starRewards = data.star_rewards or {}
self.fundRewards = data.fund_rewards
self.totalChallengeCount = data.total_challenge_count
self.fundAd = data.ad or false
self:updateGift(data.gift_info)
DataManager.FormationData:initDungeonArmor(self.heroes)
@ -378,4 +381,142 @@ function DungeonArmorEntity:getTaskDescByIndex(chapterId, index, battleBaseContr
return self:getTaskDesc(taskId, taskProgress[taskId]), over
end
-- 获取当前基金奖励所属阶段
function DungeonArmorEntity:getCurFundStage()
for id, data in ipairs(ConfigManager:getConfig("dungeon_armor_fund")) do
if id ~= FUND_AD_REWARD_ID and not self:isGotFundReward() then
return data.stage
end
end
return nil
end
-- 基金是否有红点
function DungeonArmorEntity:isHasFundRedDot()
return self:isCanWatchFundAd() or self:hasCanGetFundReward()
end
-- 基金阶段是否已购买
function DungeonArmorEntity:isBoughtFundStage(stage)
local bought = DataManager.ShopData:getActGiftMapByType(PayManager.PURCHARSE_TYPE.ACT_GIFT)
if EDITOR_MODE then
Logger.logHighlight("支线基金购买状态/"..self:getFundStageGiftId(stage))
Logger.printTable(bought)
end
if bought then
return bought[self:getFundStageGiftId(stage)]
end
return false
end
-- 获取基金阶段标题
function DungeonArmorEntity:getFundStageTitle()
local stage = self:getCurFundStage()
return I18N:getGlobalText("DUNGEON_ARMOR_FUND_" .. stage)
end
-- 获取基金阶段的礼包id
function DungeonArmorEntity:getFundStageGiftId(stage)
local giftId
for id, data in ipairs(ConfigManager:getConfig("dungeon_armor_fund")) do
if data.stage == stage then
giftId = data.act_gift
break
end
end
return giftId
end
-- 获取基金阶段奖励id列表
function DungeonArmorEntity:getFundStageRewardIds(stage)
local result = {}
for id, data in ipairs(ConfigManager:getConfig("dungeon_armor_fund")) do
if data.stage == stage then
table.insert(result, id)
end
end
return result
end
-- 获取当前基金奖励列表Sort
function DungeonArmorEntity:getFundRewardIdsSort()
local ids = self:getFundStageRewardIds(self:getCurFundStage())
local unreceived = {}
local received = {}
for index, id in ipairs(ids) do
if self:isGotFundReward(id) then
table.insert(received, id)
else
table.insert(unreceived, id)
end
end
table.sort(unreceived, function(a, b) return a < b end)
table.sort(received, function(a, b) return a < b end)
if not self:isGotFundReward(FUND_AD_REWARD_ID) then
unreceived = table.addArray(self:getFundStageRewardIds(0), unreceived)
end
return table.addArray(unreceived, received)
end
-- 是否可领取基金奖励
function DungeonArmorEntity:isCanGetFundReward(id)
if id == FUND_AD_REWARD_ID then
return not self:isCanWatchFundAd()
end
local cfg = ConfigManager:getConfig("dungeon_armor_fund")[id]
return cfg and self.maxPassedId >= cfg.dungeon_stage
end
-- 是否有可领取的基金奖励
function DungeonArmorEntity:hasCanGetFundReward()
for index, id in ipairs(self:getFundStageRewardIds(self:getCurFundStage())) do
if self:isCanGetFundReward(id) and not self:isGotFundReward(id) then
return true
end
end
return false
end
-- 是否已领取基金奖励
function DungeonArmorEntity:isGotFundReward(id)
if id == FUND_AD_REWARD_ID then
self.fundAd = true
end
return self.fundRewards and self.fundRewards[id]
end
-- 今日是否可以看基金广告
function DungeonArmorEntity:isCanWatchFundAd()
return not LocalData:isTodayWatchedArmorFundAd()
end
-- 基金奖励领取成功
function DungeonArmorEntity:onGetFundRewardSuccess(id)
if not self.fundRewards then
self.fundRewards = {}
end
self.fundRewards[id] = true
self:setDirty()
end
-- 基金广告观看成功
function DungeonArmorEntity:onWatchFundAdSuccess()
LocalData:recordTodayWatchedArmorFundAd()
self:setDirty()
end
-- 基金购买成功
function DungeonArmorEntity:onBuyFundSuccess()
self:setDirty()
end
return DungeonArmorEntity