diff --git a/lua/app/common/data_manager.lua b/lua/app/common/data_manager.lua index 76486734..a01aabc0 100644 --- a/lua/app/common/data_manager.lua +++ b/lua/app/common/data_manager.lua @@ -114,7 +114,7 @@ function DataManager:initWithServerData(data) self.TutorialData:init(data.guide) self.MailData:init(data.mail_info) self.ActivityData:init() - self.GodPigData:init() + self.GodPigData:init(data.pig) self.BountyData:init(data.bounty) -- 任务要在BountyData之后初始化,依赖BountyData的数据 self.DailyTaskData:init(data.task_daily) diff --git a/lua/app/common/server_push_manager.lua b/lua/app/common/server_push_manager.lua index 13749abf..5cd3c277 100644 --- a/lua/app/common/server_push_manager.lua +++ b/lua/app/common/server_push_manager.lua @@ -14,6 +14,7 @@ end function ServerPushManager:initWhenLogin() self:addServerPushListener(ProtoMsgType.FromMsgEnum.KickOutNtf, UIManager, UIManager.showKickOut) self:addServerPushListener(ProtoMsgType.FromMsgEnum.BountyBoughtNtf, ModuleManager.BountyManager, ModuleManager.BountyManager.onBoughtBountyFinish) + self:addServerPushListener(ProtoMsgType.FromMsgEnum.NewMailNtf, ModuleManager.MailManager, ModuleManager.MailManager.needUpdateMail) end ---- 移除全局推送监听 diff --git a/lua/app/config/chapter.lua b/lua/app/config/chapter.lua index 908c6726..7e5a8633 100644 --- a/lua/app/config/chapter.lua +++ b/lua/app/config/chapter.lua @@ -1580,6 +1580,7 @@ local chapter = { }, [10]={ ["before_chapter"]=9, + ["next_chapter"]=11, ["icon"]="chapter_10", ["scene"]="bg_7", ["block_icon"]="battle_hinder_7", @@ -1775,9 +1776,458 @@ local chapter = { ["weight"]=100 } } + }, + [11]={ + ["before_chapter"]=10, + ["next_chapter"]=12, + ["icon"]="chapter_9", + ["scene"]="bg_7", + ["block_icon"]="battle_hinder_7", + ["chess_board"]="chessboard_2", + ["board"]={ + 35, + 36, + 37, + 38 + }, + ["monster"]={ + 15101, + 15201, + 15301, + 15401, + 15501, + 15601, + 15701, + 15801, + 15901, + 16001, + 16101, + 16201, + 16301, + 16401, + 16501, + 16601, + 16701, + 16801, + 16901, + 17001 + }, + ["mystery_box"]={ + 1, + 3 + }, + ["mystery_box_reward"]={ + { + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + { + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + ["wave_reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["boss_reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["finish_reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + } + }, + ["box_num"]={ + 10, + 15, + 20 + }, + ["box_reward_1"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=20000, + ["num_for_nothing"]="VAhcA2U=" + } + }, + ["box_reward_2"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=3, + ["id_for_nothing"]="VQ==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=30000, + ["num_for_nothing"]="VQhcA2U=" + } + }, + ["box_reward_3"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=3, + ["id_for_nothing"]="VQ==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=60000, + ["num_for_nothing"]="UAhcA2U=" + } + }, + ["finish_exp"]=1900, + ["challenge_exp"]=950, + ["idle_exp"]=20, + ["idle_gold"]=25, + ["idle_drop"]={ + { + ["type"]=1, + ["id"]=4, + ["num"]=3, + ["weight"]=100 + }, + { + ["type"]=1, + ["id"]=5, + ["num"]=1, + ["weight"]=100 + } + } + }, + [12]={ + ["before_chapter"]=11, + ["icon"]="chapter_10", + ["scene"]="bg_7", + ["block_icon"]="battle_hinder_7", + ["chess_board"]="chessboard_2", + ["board"]={ + 39, + 40, + 41, + 42 + }, + ["monster"]={ + 15101, + 15201, + 15301, + 15401, + 15501, + 15601, + 15701, + 15801, + 15901, + 16001, + 16101, + 16201, + 16301, + 16401, + 16501, + 16601, + 16701, + 16801, + 16901, + 17001 + }, + ["mystery_box"]={ + 2, + 3 + }, + ["mystery_box_reward"]={ + { + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + }, + { + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=2, + ["id_for_nothing"]="VA==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + } + } + }, + ["wave_reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["boss_reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=3, + ["num_for_nothing"]="VQ==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=1, + ["num_for_nothing"]="Vw==" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + } + }, + ["finish_reward"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=100, + ["num_for_nothing"]="Vwhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=5000, + ["num_for_nothing"]="UwhcAw==" + } + }, + ["box_num"]={ + 10, + 15, + 20 + }, + ["box_reward_1"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=4, + ["id_for_nothing"]="Ug==", + ["num"]=200, + ["num_for_nothing"]="VAhc" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=20000, + ["num_for_nothing"]="VAhcA2U=" + } + }, + ["box_reward_2"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=15, + ["num_for_nothing"]="Vw0=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=3, + ["id_for_nothing"]="VQ==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=30000, + ["num_for_nothing"]="VQhcA2U=" + } + }, + ["box_reward_3"]={ + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=5, + ["id_for_nothing"]="Uw==", + ["num"]=20, + ["num_for_nothing"]="VAg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=3, + ["id_for_nothing"]="VQ==", + ["num"]=10, + ["num_for_nothing"]="Vwg=" + }, + { + ["type"]=1, + ["type_for_nothing"]="Vw==", + ["id"]=1, + ["id_for_nothing"]="Vw==", + ["num"]=60000, + ["num_for_nothing"]="UAhcA2U=" + } + }, + ["finish_exp"]=1900, + ["challenge_exp"]=950, + ["idle_exp"]=20, + ["idle_gold"]=25, + ["idle_drop"]={ + { + ["type"]=1, + ["id"]=4, + ["num"]=3, + ["weight"]=100 + }, + { + ["type"]=1, + ["id"]=5, + ["num"]=1, + ["weight"]=100 + } + } } } local config = { -data=chapter,count=10 +data=chapter,count=12 } return config \ No newline at end of file diff --git a/lua/app/config/chapter_board.lua b/lua/app/config/chapter_board.lua index a53bee14..6630b74b 100644 --- a/lua/app/config/chapter_board.lua +++ b/lua/app/config/chapter_board.lua @@ -7816,7 +7816,7 @@ local chapter_board = { }, { 4, - 4 + 1 }, { 0, @@ -7844,7 +7844,7 @@ local chapter_board = { }, { 4, - 4 + 1 }, { 0, @@ -7867,7 +7867,7 @@ local chapter_board = { 0 }, { - 2, + 7, 0 }, { @@ -7883,7 +7883,7 @@ local chapter_board = { 4 }, { - 2, + 7, 0 }, { @@ -7895,7 +7895,7 @@ local chapter_board = { 0 }, { - 2, + 7, 0 }, { @@ -7911,7 +7911,7 @@ local chapter_board = { 2 }, { - 2, + 7, 0 }, { @@ -7923,7 +7923,7 @@ local chapter_board = { 0 }, { - 2, + 7, 0 }, { @@ -7939,7 +7939,7 @@ local chapter_board = { 0 }, { - 2, + 7, 0 }, { @@ -7951,7 +7951,7 @@ local chapter_board = { 0 }, { - 2, + 7, 0 }, { @@ -7967,7 +7967,7 @@ local chapter_board = { 0 }, { - 2, + 7, 0 }, { @@ -8399,10 +8399,1403 @@ local chapter_board = { } }, [38]={ - + ["board"]={ + { + 1, + 0 + }, + { + 0, + 1 + }, + { + 0, + 1 + }, + { + 1, + 0 + }, + { + 0, + 1 + }, + { + 0, + 1 + }, + { + 1, + 0 + }, + { + 0, + 1 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 1 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 1 + }, + { + 0, + 1 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 7, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 1 + }, + { + 0, + 1 + }, + { + 3, + 0 + }, + { + 7, + 0 + }, + { + 14, + 0 + }, + { + 7, + 0 + }, + { + 3, + 0 + }, + { + 0, + 1 + }, + { + 1, + 0 + }, + { + 0, + 1 + }, + { + 3, + 0 + }, + { + 7, + 0 + }, + { + 3, + 0 + }, + { + 0, + 1 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 0, + 1 + }, + { + 3, + 0 + }, + { + 0, + 1 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 0, + 1 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + } + } + }, + [39]={ + ["board"]={ + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 0, + 3 + }, + { + 0, + 1 + }, + { + 0, + 3 + }, + { + 0, + 4 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 13, + 2 + }, + { + 13, + 3 + }, + { + 0, + 3 + }, + { + 0, + 3 + }, + { + 0, + 4 + }, + { + 1, + 0 + }, + { + 0, + 2 + }, + { + 0, + 2 + }, + { + 13, + 3 + }, + { + 13, + 4 + }, + { + 0, + 1 + }, + { + 0, + 3 + }, + { + 1, + 0 + }, + { + 3, + 0 + }, + { + 0, + 3 + }, + { + 0, + 3 + }, + { + 13, + 4 + }, + { + 13, + 5 + }, + { + 0, + 3 + }, + { + 14, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 4 + }, + { + 0, + 4 + }, + { + 13, + 5 + }, + { + 13, + 5 + }, + { + 1, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 5 + }, + { + 0, + 5 + }, + { + 13, + 5 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + } + } + }, + [40]={ + ["board"]={ + { + 0, + 1 + }, + { + 0, + 4 + }, + { + 0, + 5 + }, + { + 0, + 5 + }, + { + 0, + 3 + }, + { + 0, + 3 + }, + { + 1, + 0 + }, + { + 0, + 5 + }, + { + 0, + 5 + }, + { + 0, + 5 + }, + { + 0, + 1 + }, + { + 2, + 0 + }, + { + 0, + 3 + }, + { + 13, + 4 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 1 + }, + { + 2, + 0 + }, + { + 0, + 4 + }, + { + 13, + 4 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 1, + 0 + }, + { + 3, + 0 + }, + { + 0, + 2 + }, + { + 13, + 2 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 1 + }, + { + 13, + 1 + }, + { + 14, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 7, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 1, + 0 + } + }, + ["mystery_box_board"]={ + { + 0, + 1 + }, + { + 0, + 4 + }, + { + 0, + 5 + }, + { + 0, + 5 + }, + { + 0, + 3 + }, + { + 0, + 3 + }, + { + 1, + 0 + }, + { + 0, + 5 + }, + { + 0, + 5 + }, + { + 0, + 5 + }, + { + 0, + 1 + }, + { + 2, + 0 + }, + { + 0, + 3 + }, + { + 13, + 4 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 0, + 1 + }, + { + 2, + 0 + }, + { + 0, + 4 + }, + { + 13, + 4 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 1, + 0 + }, + { + 3, + 0 + }, + { + 0, + 2 + }, + { + 13, + 2 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 0, + 1 + }, + { + 13, + 1 + }, + { + 14, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 15, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 1, + 0 + } + } + }, + [41]={ + ["board"]={ + { + 1, + 0 + }, + { + 0, + 4 + }, + { + 0, + 3 + }, + { + 0, + 4 + }, + { + 0, + 4 + }, + { + 0, + 3 + }, + { + 1, + 0 + }, + { + 2, + 0 + }, + { + 0, + 3 + }, + { + 0, + 1 + }, + { + 0, + 1 + }, + { + 0, + 1 + }, + { + 0, + 3 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 13, + 1 + }, + { + 2, + 0 + }, + { + 13, + 2 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 13, + 3 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 13, + 3 + }, + { + 3, + 0 + }, + { + 13, + 2 + }, + { + 3, + 0 + }, + { + 13, + 4 + }, + { + 3, + 0 + }, + { + 13, + 5 + }, + { + 3, + 0 + }, + { + 13, + 4 + }, + { + 1, + 0 + }, + { + 14, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 14, + 0 + }, + { + 1, + 0 + } + }, + ["mystery_box_board"]={ + { + 1, + 0 + }, + { + 0, + 4 + }, + { + 0, + 3 + }, + { + 0, + 4 + }, + { + 0, + 4 + }, + { + 0, + 3 + }, + { + 1, + 0 + }, + { + 2, + 0 + }, + { + 0, + 3 + }, + { + 0, + 1 + }, + { + 0, + 1 + }, + { + 0, + 1 + }, + { + 0, + 3 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 13, + 1 + }, + { + 2, + 0 + }, + { + 13, + 2 + }, + { + 2, + 0 + }, + { + 2, + 0 + }, + { + 3, + 0 + }, + { + 13, + 3 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 13, + 3 + }, + { + 3, + 0 + }, + { + 13, + 2 + }, + { + 3, + 0 + }, + { + 13, + 4 + }, + { + 3, + 0 + }, + { + 13, + 5 + }, + { + 3, + 0 + }, + { + 13, + 4 + }, + { + 1, + 0 + }, + { + 14, + 0 + }, + { + 3, + 0 + }, + { + 15, + 0 + }, + { + 3, + 0 + }, + { + 14, + 0 + }, + { + 1, + 0 + } + } + }, + [42]={ + ["board"]={ + { + 1, + 0 + }, + { + 0, + 3 + }, + { + 0, + 3 + }, + { + 0, + 3 + }, + { + 0, + 3 + }, + { + 0, + 3 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 13, + 4 + }, + { + 0, + 4 + }, + { + 0, + 3 + }, + { + 0, + 4 + }, + { + 13, + 4 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 13, + 5 + }, + { + 0, + 5 + }, + { + 0, + 5 + }, + { + 0, + 5 + }, + { + 13, + 5 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 14, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 3, + 0 + }, + { + 14, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 13, + 2 + }, + { + 0, + 2 + }, + { + 0, + 2 + }, + { + 0, + 2 + }, + { + 13, + 2 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + }, + { + 1, + 0 + } + } } } local config = { -data=chapter_board,count=38 +data=chapter_board,count=42 } return config \ No newline at end of file diff --git a/lua/app/config/localization/localization_global_const.lua b/lua/app/config/localization/localization_global_const.lua index dec66e32..e0c6cac9 100644 --- a/lua/app/config/localization/localization_global_const.lua +++ b/lua/app/config/localization/localization_global_const.lua @@ -112,6 +112,10 @@ local LocalizationGlobalConst = STR_FREE = "STR_FREE", TODAY_REMAIN_TIMES = "TODAY_REMAIN_TIMES", BUY_ENERGY = "BUY_ENERGY", + MAIL_TITLE = "MAIL_TITLE", + BTN_DELETE_ALL_READ_MAIL = "BTN_DELETE_ALL_READ_MAIL", + BTN_CLAIM_ALL = "BTN_CLAIM_ALL", + BTN_READ = "BTN_READ", } return LocalizationGlobalConst \ No newline at end of file diff --git a/lua/app/config/skill.lua b/lua/app/config/skill.lua index 693587bd..db0fce13 100644 --- a/lua/app/config/skill.lua +++ b/lua/app/config/skill.lua @@ -931,7 +931,7 @@ local skill = { ["energy"]=10, ["link"]=1, ["position"]=1, - ["method"]=2, + ["method"]=1, ["skill_type"]=2, ["boardrange"]={ { @@ -2465,7 +2465,7 @@ local skill = { ["energy"]=10, ["link"]=1, ["position"]=3, - ["method"]=2, + ["method"]=1, ["battle_icon"]="6", ["effect_type"]=1, ["trigger"]=1, @@ -2518,7 +2518,7 @@ local skill = { ["energy"]=10, ["link"]=1, ["position"]=3, - ["method"]=2, + ["method"]=1, ["battle_icon"]="6", ["buff_condition"]={ { @@ -2581,7 +2581,7 @@ local skill = { ["energy"]=10, ["link"]=1, ["position"]=3, - ["method"]=2, + ["method"]=1, ["battle_icon"]="6", ["buff_condition"]={ { diff --git a/lua/app/config/skill_rogue.lua b/lua/app/config/skill_rogue.lua index b3b3a181..cf59becb 100644 --- a/lua/app/config/skill_rogue.lua +++ b/lua/app/config/skill_rogue.lua @@ -2090,7 +2090,7 @@ local skill_rogue = { ["weight"]=3000, ["qlt"]=3, ["type"]=9, - ["skill_position"]=4, + ["skill_position"]=3, ["effect"]={ { ["type"]="atkp_green_add", @@ -2119,12 +2119,14 @@ local skill_rogue = { ["weight"]=30000, ["qlt"]=4, ["type"]=6, + ["skill_position"]=3, ["icon"]="67" }, [3400101]={ ["weight"]=3000, ["qlt"]=4, ["type"]=12, + ["skill_position"]=3, ["effect"]={ { ["type"]="add_skill", @@ -2167,7 +2169,7 @@ local skill_rogue = { ["weight"]=3000, ["qlt"]=3, ["type"]=9, - ["skill_position"]=4, + ["skill_position"]=3, ["effect"]={ { ["type"]="atkp_green_add", @@ -2185,6 +2187,7 @@ local skill_rogue = { ["weight"]=3000, ["qlt"]=3, ["type"]=12, + ["skill_position"]=3, ["effect"]={ { ["type"]="add_skill", @@ -2200,6 +2203,7 @@ local skill_rogue = { ["weight"]=3000, ["qlt"]=4, ["type"]=12, + ["skill_position"]=3, ["effect"]={ { ["type"]="add_skill", @@ -2217,6 +2221,7 @@ local skill_rogue = { ["weight"]=3000, ["qlt"]=3, ["type"]=12, + ["skill_position"]=3, ["effect"]={ { ["type"]="add_skill", @@ -2235,6 +2240,7 @@ local skill_rogue = { ["parameter"]={ 4 }, + ["skill_position"]=3, ["effect"]={ { ["type"]="skill_fire_times", @@ -2374,6 +2380,7 @@ local skill_rogue = { ["weight"]=30000, ["qlt"]=4, ["type"]=6, + ["skill_position"]=4, ["icon"]="57" }, [4300101]={ @@ -2500,6 +2507,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=30000, ["qlt"]=4, + ["skill_position"]=4, ["icon"]="57" }, [4300301]={ @@ -2511,12 +2519,14 @@ local skill_rogue = { 2, 1 }, + ["skill_position"]=4, ["icon"]="39" }, [4300302]={ ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, + ["skill_position"]=4, ["effect"]={ { ["type"]="add_skill", @@ -2551,6 +2561,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=3, + ["skill_position"]=4, ["effect"]={ { ["type"]="add_skill", @@ -2566,6 +2577,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, + ["skill_position"]=4, ["effect"]={ { ["type"]="add_skill", @@ -2609,6 +2621,7 @@ local skill_rogue = { ["limit_times"]=1, ["weight"]=3000, ["qlt"]=4, + ["skill_position"]=4, ["effect"]={ { ["type"]="add_skill", @@ -3122,7 +3135,8 @@ local skill_rogue = { ["weight"]=30000, ["qlt"]=4, ["type"]=6, - ["skill_position"]=5 + ["skill_position"]=5, + ["icon"]="58" }, [5400101]={ ["limit_times"]=1, @@ -3133,7 +3147,8 @@ local skill_rogue = { 1, 30000 }, - ["skill_position"]=5 + ["skill_position"]=5, + ["icon"]="41" }, [5400102]={ ["limit_times"]=1, @@ -3148,7 +3163,8 @@ local skill_rogue = { ["ratio"]=10000, ["round"]=1 } - } + }, + ["icon"]="44" }, [5400103]={ ["limit_times"]=1, @@ -3163,7 +3179,8 @@ local skill_rogue = { ["ratio"]=10000, ["round"]=1 } - } + }, + ["icon"]="42" }, [5400104]={ ["limit_times"]=1, @@ -3190,7 +3207,8 @@ local skill_rogue = { ["parameter"]={ 5400123 }, - ["skill_position"]=5 + ["skill_position"]=5, + ["icon"]="66" }, [5400106]={ ["limit_times"]=1, @@ -3205,7 +3223,8 @@ local skill_rogue = { ["ratio"]=10000, ["round"]=1 } - } + }, + ["icon"]="58" }, [5400107]={ ["limit_times"]=1, @@ -3220,7 +3239,8 @@ local skill_rogue = { ["ratio"]=10000, ["round"]=1 } - } + }, + ["icon"]="66" } } local config = { diff --git a/lua/app/config/strings/cn/chapter.lua b/lua/app/config/strings/cn/chapter.lua index 03e39e04..85da84c0 100644 --- a/lua/app/config/strings/cn/chapter.lua +++ b/lua/app/config/strings/cn/chapter.lua @@ -28,9 +28,15 @@ local chapter = { }, [10]={ ["name"]="10.城堡深处" + }, + [11]={ + ["name"]="11.城堡内部" + }, + [12]={ + ["name"]="12.城堡深处" } } local config = { -data=chapter,count=10 +data=chapter,count=12 } return config \ No newline at end of file diff --git a/lua/app/config/strings/cn/global.lua b/lua/app/config/strings/cn/global.lua index 07e92ae9..47180099 100644 --- a/lua/app/config/strings/cn/global.lua +++ b/lua/app/config/strings/cn/global.lua @@ -112,6 +112,10 @@ local localization_global = ["STR_FREE"] = "免费", ["TODAY_REMAIN_TIMES"] = "今日剩余{0}次", ["BUY_ENERGY"] = "购买体力", + ["MAIL_TITLE"] = "邮箱", + ["BTN_DELETE_ALL_READ_MAIL"] = "删除已读邮件", + ["BTN_CLAIM_ALL"] = "领取所有", + ["BTN_READ"] = "读取", } return localization_global \ No newline at end of file diff --git a/lua/app/config/strings/de/chapter.lua b/lua/app/config/strings/de/chapter.lua index f94155c0..7637691b 100644 --- a/lua/app/config/strings/de/chapter.lua +++ b/lua/app/config/strings/de/chapter.lua @@ -28,9 +28,15 @@ local chapter = { }, [10]={ + }, + [11]={ + + }, + [12]={ + } } local config = { -data=chapter,count=10 +data=chapter,count=12 } return config \ No newline at end of file diff --git a/lua/app/config/strings/en/chapter.lua b/lua/app/config/strings/en/chapter.lua index 5c715bb5..6286a89c 100644 --- a/lua/app/config/strings/en/chapter.lua +++ b/lua/app/config/strings/en/chapter.lua @@ -28,9 +28,15 @@ local chapter = { }, [10]={ ["name"]="10. Inner Castle" + }, + [11]={ + ["name"]="11. Castle Inside" + }, + [12]={ + ["name"]="12. Inner Castle" } } local config = { -data=chapter,count=10 +data=chapter,count=12 } return config \ No newline at end of file diff --git a/lua/app/config/strings/fr/chapter.lua b/lua/app/config/strings/fr/chapter.lua index f94155c0..7637691b 100644 --- a/lua/app/config/strings/fr/chapter.lua +++ b/lua/app/config/strings/fr/chapter.lua @@ -28,9 +28,15 @@ local chapter = { }, [10]={ + }, + [11]={ + + }, + [12]={ + } } local config = { -data=chapter,count=10 +data=chapter,count=12 } return config \ No newline at end of file diff --git a/lua/app/config/strings/id/chapter.lua b/lua/app/config/strings/id/chapter.lua index f94155c0..7637691b 100644 --- a/lua/app/config/strings/id/chapter.lua +++ b/lua/app/config/strings/id/chapter.lua @@ -28,9 +28,15 @@ local chapter = { }, [10]={ + }, + [11]={ + + }, + [12]={ + } } local config = { -data=chapter,count=10 +data=chapter,count=12 } return config \ No newline at end of file diff --git a/lua/app/config/strings/ja/chapter.lua b/lua/app/config/strings/ja/chapter.lua index f94155c0..7637691b 100644 --- a/lua/app/config/strings/ja/chapter.lua +++ b/lua/app/config/strings/ja/chapter.lua @@ -28,9 +28,15 @@ local chapter = { }, [10]={ + }, + [11]={ + + }, + [12]={ + } } local config = { -data=chapter,count=10 +data=chapter,count=12 } return config \ No newline at end of file diff --git a/lua/app/config/strings/ko/chapter.lua b/lua/app/config/strings/ko/chapter.lua index f94155c0..7637691b 100644 --- a/lua/app/config/strings/ko/chapter.lua +++ b/lua/app/config/strings/ko/chapter.lua @@ -28,9 +28,15 @@ local chapter = { }, [10]={ + }, + [11]={ + + }, + [12]={ + } } local config = { -data=chapter,count=10 +data=chapter,count=12 } return config \ No newline at end of file diff --git a/lua/app/config/strings/pt/chapter.lua b/lua/app/config/strings/pt/chapter.lua index f94155c0..7637691b 100644 --- a/lua/app/config/strings/pt/chapter.lua +++ b/lua/app/config/strings/pt/chapter.lua @@ -28,9 +28,15 @@ local chapter = { }, [10]={ + }, + [11]={ + + }, + [12]={ + } } local config = { -data=chapter,count=10 +data=chapter,count=12 } return config \ No newline at end of file diff --git a/lua/app/config/strings/ru/chapter.lua b/lua/app/config/strings/ru/chapter.lua index f94155c0..7637691b 100644 --- a/lua/app/config/strings/ru/chapter.lua +++ b/lua/app/config/strings/ru/chapter.lua @@ -28,9 +28,15 @@ local chapter = { }, [10]={ + }, + [11]={ + + }, + [12]={ + } } local config = { -data=chapter,count=10 +data=chapter,count=12 } return config \ No newline at end of file diff --git a/lua/app/config/strings/th/chapter.lua b/lua/app/config/strings/th/chapter.lua index f94155c0..7637691b 100644 --- a/lua/app/config/strings/th/chapter.lua +++ b/lua/app/config/strings/th/chapter.lua @@ -28,9 +28,15 @@ local chapter = { }, [10]={ + }, + [11]={ + + }, + [12]={ + } } local config = { -data=chapter,count=10 +data=chapter,count=12 } return config \ No newline at end of file diff --git a/lua/app/config/strings/vi/chapter.lua b/lua/app/config/strings/vi/chapter.lua index f94155c0..7637691b 100644 --- a/lua/app/config/strings/vi/chapter.lua +++ b/lua/app/config/strings/vi/chapter.lua @@ -28,9 +28,15 @@ local chapter = { }, [10]={ + }, + [11]={ + + }, + [12]={ + } } local config = { -data=chapter,count=10 +data=chapter,count=12 } return config \ No newline at end of file diff --git a/lua/app/config/strings/zh/chapter.lua b/lua/app/config/strings/zh/chapter.lua index df33b2e1..41411b15 100644 --- a/lua/app/config/strings/zh/chapter.lua +++ b/lua/app/config/strings/zh/chapter.lua @@ -28,9 +28,15 @@ local chapter = { }, [10]={ ["name"]="10.城堡深處" + }, + [11]={ + ["name"]="11.城堡內部" + }, + [12]={ + ["name"]="12.城堡深處" } } local config = { -data=chapter,count=10 +data=chapter,count=12 } return config \ No newline at end of file diff --git a/lua/app/global/global_func.lua b/lua/app/global/global_func.lua index e14914f0..141d5707 100644 --- a/lua/app/global/global_func.lua +++ b/lua/app/global/global_func.lua @@ -1301,29 +1301,19 @@ function GFunc.doScaleQuickZoom(img,callback) end -- colorType 1 白色, 2 黑色 -function GFunc.setAdsSprite(img, isGrey, colorType) +function GFunc.setAdsSprite(img, isGrey) if not img then return end - - colorType = colorType or 1 - local skip = DataManager.MallActData:skipAd() - local icon = "" - if colorType == 1 then - icon = skip and "common_ad_4" or "common_ad_3" - end - - if colorType == 2 then - icon = skip and "common_ad_2" or "common_ad_1" - end - + -- local skip = DataManager.MallActData:skipAd() + local skip = false + local icon = nil if isGrey then icon = skip and "common_ad_6" or "common_ad_5" + else + icon = skip and "common_ad_4" or "common_ad_3" end img:setSprite(GConst.ATLAS_PATH.COMMON, icon) - --img:setSprite(GConst.ATLAS_PATH.COMMON, icon, function () - -- img:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize() - --end) end function GFunc.getAdSprite() diff --git a/lua/app/module/battle/battle_const.lua b/lua/app/module/battle/battle_const.lua index 40610180..53688d46 100644 --- a/lua/app/module/battle/battle_const.lua +++ b/lua/app/module/battle/battle_const.lua @@ -744,6 +744,7 @@ BattleConst.BATTLE_TASK_FIELD = { LINK_COUNT_OVER_8 = "clear_8_combo", -- 8连消个数 COMBO_OVER_10 = "clear_10_hit", -- 10连击以上次数 BOARD_SKILL_RELEASE_COUNT = "skills_cast", -- 释放技能次数 + PASS_WAVE = "pass_wave", -- 通关波数 } return BattleConst \ No newline at end of file diff --git a/lua/app/module/battle/controller/battle_controller.lua b/lua/app/module/battle/controller/battle_controller.lua index 6501cf6c..22a7785a 100644 --- a/lua/app/module/battle/controller/battle_controller.lua +++ b/lua/app/module/battle/controller/battle_controller.lua @@ -456,20 +456,33 @@ end function BattleController:enterRoundBegin() self.roundStep = BattleConst.BATTLE_ROUND_STEP.ON_BEGIN + self:takeGridEffect() + self:enterEliminationBegin() +end +function BattleController:takeGridEffect() local gridEntities = self.battleData:getGridEnties() local effectGrid = {} for posId, entity in pairs(gridEntities) do if entity:getEffectType() then - table.insert(effectGrid, posId) + table.insert(effectGrid, entity) end end - for _, posId in ipairs(effectGrid) do - BATTLE_GRID_EFFECT_HANDLE.gridEffectOn(posId, gridEntities, BattleConst.GRID_EFFECT_TRIGGER_TYPE.ON_ROUND_BEGIN, self) + effectGrid = table.shuffle(effectGrid) + local availableEffectTypeMap + for _, entity in ipairs(effectGrid) do + local effectType = entity:getEffectType() + if not availableEffectTypeMap or not availableEffectTypeMap[effectType] then + local succ = BATTLE_GRID_EFFECT_HANDLE.gridEffectOn(entity:getPosId(), gridEntities, BattleConst.GRID_EFFECT_TRIGGER_TYPE.ON_ROUND_BEGIN, self) + if succ and effectType == BattleConst.GRID_EFFECT_TYPE.CROSS_SPREAD then + if not availableEffectTypeMap then + availableEffectTypeMap = {} + end + availableEffectTypeMap[effectType] = true + end + end end - - self:enterEliminationBegin() end function BattleController:enterEliminationBegin() @@ -1959,8 +1972,8 @@ function BattleController:getShuffleBoardInfo() else if entity:getSkillId() then haveSkill = true - add = entity:canLink() end + add = entity:canLink() end if add then table.insert(tempList, entity) diff --git a/lua/app/module/battle/skill/battle_grid_effect_handle.lua b/lua/app/module/battle/skill/battle_grid_effect_handle.lua index ee4b1966..513b984c 100644 --- a/lua/app/module/battle/skill/battle_grid_effect_handle.lua +++ b/lua/app/module/battle/skill/battle_grid_effect_handle.lua @@ -25,15 +25,18 @@ local function _crossSpread(entity, gridEntities, battleController, onlyCheck) return end + local succ = false + tempList = table.shuffle(GFunc.getTable(tempList)) for _, posId in ipairs(tempList) do local gridEntity = gridEntities[posId] if gridEntity:isEmptyIdle() then battleController.battleData:setGridType(posId, BattleConst.GRID_TYPE.JELLY) + succ = true + break end end - local list = GFunc.getTable(tempList) - return list + return succ end local function _selectCommonSkill(entity, gridEntities, battleController, onlyCheck) @@ -42,6 +45,7 @@ local function _selectCommonSkill(entity, gridEntities, battleController, onlyCh end battleController:addTaskProgress(BattleConst.BATTLE_TASK_FIELD.SKILL_BOX_OPEN, 1) battleController.battleData:addCommonSelectSkillCount() + return true end local function _rewardBox(entity, gridEntities, battleController, onlyCheck) @@ -49,6 +53,7 @@ local function _rewardBox(entity, gridEntities, battleController, onlyCheck) return end battleController:onGotMysteryBoxIndexs() + return true end BattleGridEffectHandle._gridEffectOn = { diff --git a/lua/app/module/maincity/maincity_const.lua b/lua/app/module/maincity/maincity_const.lua index c492e842..d1ee7297 100644 --- a/lua/app/module/maincity/maincity_const.lua +++ b/lua/app/module/maincity/maincity_const.lua @@ -23,7 +23,6 @@ MainCityConst.LEFT_SIDE_BARS = { } MainCityConst.RIGHT_SIDE_BARS = { - "app/ui/main_city/cell/side_bar_mail_cell", "app/ui/main_city/cell/side_bar_god_pig_cell", } diff --git a/lua/app/module/task/task_manager.lua b/lua/app/module/task/task_manager.lua index 7cf848ae..32d6a78c 100644 --- a/lua/app/module/task/task_manager.lua +++ b/lua/app/module/task/task_manager.lua @@ -220,6 +220,10 @@ function TaskManager:xUseSkill(count) self:dispatchTask(GConst.TaskConst.TASK_TYPE.X_USE_SKILL, count) end +function TaskManager:xBattlePassWave(count) + self:dispatchTask(GConst.TaskConst.TASK_TYPE.X_BATTLE_PASS_WAVE, count) +end + ---- 没有特殊说明,方法均返回任务增量 TaskManager.TYPE_DEAL_FUNC = { [GConst.TaskConst.TASK_TYPE.X_WATCH_AD] = TaskManager.xWatchAd, @@ -240,6 +244,7 @@ TaskManager.TYPE_DEAL_FUNC = { [GConst.TaskConst.TASK_TYPE.X_ELIMINATE_EIGHT_ONCE] = TaskManager.xEliminateEightOnce, [GConst.TaskConst.TASK_TYPE.X_COMBO_TEN] = TaskManager.xComboTen, [GConst.TaskConst.TASK_TYPE.X_USE_SKILL] = TaskManager.xUseSkill, + [GConst.TaskConst.TASK_TYPE.X_BATTLE_PASS_WAVE] = TaskManager.xBattlePassWave, } function TaskManager:taskGoto(taskType) @@ -316,6 +321,7 @@ TaskManager.fightTaskProgressToTaskType = { [BATTLE_TASK_FIELD.LINK_COUNT_OVER_8] = GConst.TaskConst.TASK_TYPE.X_ELIMINATE_EIGHT_ONCE, [BATTLE_TASK_FIELD.COMBO_OVER_10] = GConst.TaskConst.TASK_TYPE.X_COMBO_TEN, [BATTLE_TASK_FIELD.BOARD_SKILL_RELEASE_COUNT] = GConst.TaskConst.TASK_TYPE.X_USE_SKILL, + [BATTLE_TASK_FIELD.PASS_WAVE] = GConst.TaskConst.TASK_TYPE.X_BATTLE_PASS_WAVE, } return TaskManager \ No newline at end of file diff --git a/lua/app/ui/mail/mail_ui.lua b/lua/app/ui/mail/mail_ui.lua index 0703ce82..c60916bc 100644 --- a/lua/app/ui/mail/mail_ui.lua +++ b/lua/app/ui/mail/mail_ui.lua @@ -66,18 +66,8 @@ function MailUI:_display() self:closeUI() end) uiMap["mail_ui.bg.title_bg.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.MAIL_TITLE)) - uiMap["mail_ui.bg.btn_delect.btn_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_DELETE_ALL)) + uiMap["mail_ui.bg.btn_delect.btn_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_DELETE_ALL_READ_MAIL)) uiMap["mail_ui.bg.btn_claimed.btn_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM_ALL)) - - local uiSpine1 = uiMap["mail_ui.ui_spine_1"] - local uiSpine2 = uiMap["mail_ui.ui_spine_2"] - uiSpine1:playAnimComplete("born", false, false, function () - uiSpine1:playAnim("idle", true, false) - end) - uiSpine2:clearTrack() - uiSpine2:playAnimComplete("born", false, true, function () - uiSpine2:playAnim("idle", true, false) - end) end function MailUI:_addListeners() diff --git a/lua/app/ui/main_city/cell/side_bar_mail_cell.lua b/lua/app/ui/main_city/cell/side_bar_mail_cell.lua deleted file mode 100644 index de21800b..00000000 --- a/lua/app/ui/main_city/cell/side_bar_mail_cell.lua +++ /dev/null @@ -1,15 +0,0 @@ -local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell" -local SideBarMailCell = class("SideBarMailCell", SideBarBaseCellComp) - -function SideBarMailCell:getIsOpen() - return true -end - -function SideBarMailCell:getIconRes() - return "main_btn_mail" -end - -function SideBarMailCell:onClick() -end - -return SideBarMailCell \ No newline at end of file diff --git a/lua/app/ui/main_city/cell/side_bar_mail_cell.lua.meta b/lua/app/ui/main_city/cell/side_bar_mail_cell.lua.meta deleted file mode 100644 index 01f6308e..00000000 --- a/lua/app/ui/main_city/cell/side_bar_mail_cell.lua.meta +++ /dev/null @@ -1,10 +0,0 @@ -fileFormatVersion: 2 -guid: 7e49deed89eef454ab79c3dd35a4be9d -ScriptedImporter: - internalIDToNameTable: [] - externalObjects: {} - serializedVersion: 2 - userData: - assetBundleName: - assetBundleVariant: - script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3} diff --git a/lua/app/ui/main_city/main_city_ui.lua b/lua/app/ui/main_city/main_city_ui.lua index 8c724f5a..069a78c4 100644 --- a/lua/app/ui/main_city/main_city_ui.lua +++ b/lua/app/ui/main_city/main_city_ui.lua @@ -342,6 +342,11 @@ function MainCityUI:refreshLeftBtns() table.insert(self.leftBarList, cell) end end + if #self.leftBarList <= 0 then + self.leftNode:setAnchoredPositionX(GConst.NOT_VISIBLE_POS) + return + end + self.leftNode:setAnchoredPositionX(0) local y = - 2 - self.sideBarHeight/2 if isClose then -- 只显示一个 local first = self.leftBarList[1] @@ -399,6 +404,11 @@ function MainCityUI:refreshRightBtns() table.insert(self.rightBarList, cell) end end + if #self.rightBarList <= 0 then + self.rightNode:setAnchoredPositionX(GConst.NOT_VISIBLE_POS) + return + end + self.rightNode:setAnchoredPositionX(0) local y = -2 - self.sideBarHeight/2 if isClose then -- 只显示一个 local first = self.rightBarList[1] diff --git a/lua/app/ui/task/task_main_ui.lua b/lua/app/ui/task/task_main_ui.lua index b8593ab5..09bff2d7 100644 --- a/lua/app/ui/task/task_main_ui.lua +++ b/lua/app/ui/task/task_main_ui.lua @@ -243,6 +243,11 @@ function TaskMainUI:switchPage(page) self.dailyNode:setAnchoredPositionX(0) self.challengeNode:setAnchoredPositionX(GConst.NOT_VISIBLE_POS) self:refreshDaily() + if DataManager.DailyTaskData:getIsShowChallengeTaskRedPoint() then + self.menuTwoOff:addRedPoint(118, -22) + else + self.menuTwoOff:removeRedPoint() + end else self.menuOneOn:setVisible(false) self.menuOneOff:setVisible(true) @@ -251,6 +256,11 @@ function TaskMainUI:switchPage(page) self.dailyNode:setAnchoredPositionX(GConst.NOT_VISIBLE_POS) self.challengeNode:setAnchoredPositionX(0) self:refreshChallenge() + if DataManager.DailyTaskData:getIsShowDailyTaskRedPoint() then + self.menuOneOff:addRedPoint(118, -22) + else + self.menuOneOff:removeRedPoint() + end end end diff --git a/lua/app/userdata/mail/mail_entity.lua b/lua/app/userdata/mail/mail_entity.lua index 7801ba46..86057e32 100644 --- a/lua/app/userdata/mail/mail_entity.lua +++ b/lua/app/userdata/mail/mail_entity.lua @@ -11,6 +11,10 @@ function MailEntity:ctor(info) self.title = json.decode(info.title or "{}") self.body = json.decode(info.body or "{}") self.rewards = info.rewards or {} + -- 处理一下格式 + for i, v in ipairs(self.rewards) do + v.num = v.count + end self.data.isDirty = false if self.title.key then diff --git a/lua/app/userdata/task/daily_task_data.lua b/lua/app/userdata/task/daily_task_data.lua index dea2de24..e66ffa3e 100644 --- a/lua/app/userdata/task/daily_task_data.lua +++ b/lua/app/userdata/task/daily_task_data.lua @@ -8,7 +8,8 @@ function DailyTaskData:ctor() self.data.dailyTaskDirty = false self.data.resetFlag = false self.data.redPointFlag = false - self.redPoint = 0 + self.dailyTaskRedPoint = 0 + self.challengeTaskRedPoint = 0 self.isInReset = false self.taskTypeMap = {} self.dailyTasks = {} @@ -28,7 +29,8 @@ function DailyTaskData:init(data) end end self.isUnlockBountyDailyTask = DataManager.BountyData:getBought() - local redPoint = 0 + local dailyRedPoint = 0 + local challengeRedPoint = 0 ModuleManager.TaskManager:unRegisterAllModuleTask(DATA_NAME) for k, v in pairs(cfg) do local task = tasks and tasks[k] or GConst.EMPTY_TABLE @@ -46,7 +48,11 @@ function DailyTaskData:init(data) } if not dailyTaskObj.claimed and dailyTaskObj.progress >= dailyTaskObj.needProgress then dailyTaskObj.redPoint = true - redPoint = redPoint + 1 + if dailyTaskObj.type == 1 then + dailyRedPoint = dailyRedPoint + 1 + else + challengeRedPoint = challengeRedPoint + 1 + end else dailyTaskObj.redPoint = false end @@ -74,14 +80,27 @@ function DailyTaskData:init(data) self.initDay = Time:getBeginningOfServerToday() self.isInReset = false self.data.resetFlag = not self.data.resetFlag - if self.redPoint ~= redPoint then - if self.redPoint > 0 and redPoint > 0 then - self.redPoint = redPoint + + local redPointDirty = false + if self.dailyTaskRedPoint ~= dailyRedPoint then + if self.dailyTaskRedPoint > 0 and dailyRedPoint > 0 then + self.dailyTaskRedPoint = dailyRedPoint else - self.redPoint = redPoint - self.data.redPointFlag = not self.data.redPointFlag + self.dailyTaskRedPoint = dailyRedPoint + redPointDirty = true end end + if self.challengeTaskRedPoint ~= challengeRedPoint then + if self.challengeTaskRedPoint > 0 and challengeRedPoint > 0 then + self.challengeTaskRedPoint = challengeRedPoint + else + self.challengeTaskRedPoint = challengeRedPoint + redPointDirty = true + end + end + if redPointDirty then + self.data.redPointFlag = not self.data.redPointFlag + end end function DailyTaskData:refreshDailyTask(task) @@ -124,13 +143,21 @@ function DailyTaskData:refreshDailyTask(task) if dailyTaskObj.redPoint ~= redPoint then dailyTaskObj.redPoint = redPoint if redPoint then - self.redPoint = self.redPoint + 1 - if self.redPoint == 1 then + if dailyTaskObj.type == 1 then + self.dailyTaskRedPoint = self.dailyTaskRedPoint + 1 + else + self.challengeTaskRedPoint = self.challengeTaskRedPoint + 1 + end + if self.dailyTaskRedPoint + self.challengeTaskRedPoint == 1 then self.data.redPointFlag = not self.data.redPointFlag end else - self.redPoint = self.redPoint - 1 - if self.redPoint == 0 then + if dailyTaskObj.type == 1 then + self.dailyTaskRedPoint = self.dailyTaskRedPoint - 1 + else + self.challengeTaskRedPoint = self.challengeTaskRedPoint - 1 + end + if self.dailyTaskRedPoint + self.challengeTaskRedPoint == 0 then self.data.redPointFlag = not self.data.redPointFlag end end @@ -293,8 +320,12 @@ function DailyTaskData:addTaskProgress(task, taskType, count) end BIReport:postDailyTaskFinish(BIReport.TASK_TYPE.DAILY, task.id, task.taskId, task.refresh) task.redPoint = true - self.redPoint = self.redPoint + 1 - if self.redPoint == 1 then + if task.type == 1 then + self.dailyTaskRedPoint = self.dailyTaskRedPoint + 1 + else + self.challengeTaskRedPoint = self.challengeTaskRedPoint + 1 + end + if self.dailyTaskRedPoint + self.challengeTaskRedPoint == 1 then self.data.redPointFlag = not self.data.redPointFlag end end @@ -356,7 +387,15 @@ function DailyTaskData:getIsInReset() end function DailyTaskData:getIsShowRedPoint() - return self.redPoint > 0 + return self.dailyTaskRedPoint > 0 or self.challengeTaskRedPoint > 0 +end + +function DailyTaskData:getIsShowDailyTaskRedPoint() + return self.dailyTaskRedPoint > 0 +end + +function DailyTaskData:getIsShowChallengeTaskRedPoint() + return self.challengeTaskRedPoint > 0 end function DailyTaskData:unlockBountyTask()