Merge branch 'herofund' into dev_20230829

This commit is contained in:
xiekaidong 2023-08-18 18:09:20 +08:00
commit 57682466f6
28 changed files with 2050 additions and 1 deletions

View File

@ -139,6 +139,7 @@ BIReport.ITEM_GET_TYPE = {
ARMOR_UPGRADE = "ArmorUpgrade", ARMOR_UPGRADE = "ArmorUpgrade",
OFFLINE_RECOVERY = "OfflineRecovery", OFFLINE_RECOVERY = "OfflineRecovery",
ACT_SUMMER = "ActSummer", ACT_SUMMER = "ActSummer",
ACT_HERO_FUND = "ActHeroFund",
} }
BIReport.ADS_CLICK_TYPE = { BIReport.ADS_CLICK_TYPE = {
@ -207,6 +208,7 @@ BIReport.GIFT_TYPE = {
WEAPON_GIFT = "WeaponGift", WEAPON_GIFT = "WeaponGift",
ARMOR_GIFT = "ArmorGift", ARMOR_GIFT = "ArmorGift",
ACT_SUMMER = "ActSummer", ACT_SUMMER = "ActSummer",
ACT_HERO_FUND = "ActHeroFund"
} }
BIReport.COIN_TYPE = { BIReport.COIN_TYPE = {

View File

@ -33,6 +33,7 @@ function DataManager:init()
self:initManager("ShopData", "app/userdata/shop/shop_data") self:initManager("ShopData", "app/userdata/shop/shop_data")
self:initManager("SummonData", "app/userdata/summon/summon_data") self:initManager("SummonData", "app/userdata/summon/summon_data")
self:initManager("AIHelperData", "app/userdata/game_setting/ai_helper_data") self:initManager("AIHelperData", "app/userdata/game_setting/ai_helper_data")
self:initManager("HeroFundData", "app/userdata/activity/hero_fund/hero_fund_data")
end end
function DataManager:initManager(name, path) function DataManager:initManager(name, path)
@ -117,6 +118,7 @@ function DataManager:clear()
-- 任务数据最后清理 -- 任务数据最后清理
self.TaskData:clear() self.TaskData:clear()
self.AIHelperData:clear() self.AIHelperData:clear()
self.HeroFundData:clear()
ModuleManager.TaskManager:clear() ModuleManager.TaskManager:clear()
self:clearTryOpenFunc() self:clearTryOpenFunc()
end end
@ -176,6 +178,7 @@ function DataManager:initWithServerData(data)
if data.fund then if data.fund then
self.GrowthFundData:init(data.fund.funds) self.GrowthFundData:init(data.fund.funds)
end end
self.HeroFundData:init(data.hero_fund)
-- 任务数据最后初始化,依赖其他模块的数据 -- 任务数据最后初始化,依赖其他模块的数据
self.TaskData:init() self.TaskData:init()
@ -204,6 +207,10 @@ function DataManager:getIsInCreate24Hour()
return passTime < 86400 return passTime < 86400
end end
function DataManager:getRegisterTs()
return self.registerTs or 0
end
function DataManager:getIsTodayFirstLogin() function DataManager:getIsTodayFirstLogin()
return self.todayFirstLogin or false return self.todayFirstLogin or false
end end

View File

@ -60,6 +60,7 @@ EventManager.CUSTOM_EVENT = {
-- BORAD_TOUCH_OVER = "BORAD_TOUCH_OVER" -- BORAD_TOUCH_OVER = "BORAD_TOUCH_OVER"
DUNGEON_ARMOR_TO_TARGET_ID = "DUNGEON_ARMOR_TO_TARGET_ID", DUNGEON_ARMOR_TO_TARGET_ID = "DUNGEON_ARMOR_TO_TARGET_ID",
ACTIVITY_SUMMER_END = "ACTIVITY_SUMMER_END", ACTIVITY_SUMMER_END = "ACTIVITY_SUMMER_END",
MAIN_UI_CHECK_SIDE_BAR = "MAIN_UI_CHECK_SIDE_BAR",
} }
-- 此方法不能直接在外部调用请使用例如BaseUIBaseModule等封装好的接口 -- 此方法不能直接在外部调用请使用例如BaseUIBaseModule等封装好的接口

View File

@ -69,6 +69,8 @@ local MODULE_PATHS = {
EquipManager = "app/module/equip/equip_manager", EquipManager = "app/module/equip/equip_manager",
-- 皮肤 -- 皮肤
SkinManager = "app/module/skin/skin_manager", SkinManager = "app/module/skin/skin_manager",
-- 英雄基金
HeroFundManager = "app/module/activity/hero_fund/hero_fund_manager",
} }
-- 这里的key对应func_open里的id -- 这里的key对应func_open里的id

View File

@ -23,6 +23,7 @@ PayManager.PURCHARSE_ACT_TYPE = {
WEAPON_GIFT = 11, WEAPON_GIFT = 11,
ARMOR_GIFT = 12, ARMOR_GIFT = 12,
ACT_SUMMER = 13, ACT_SUMMER = 13,
ACT_HERO_FUND = 14,
} }
PayManager.PURCHARSE_TYPE_CONFIG = { PayManager.PURCHARSE_TYPE_CONFIG = {
@ -48,6 +49,7 @@ PayManager.BI_ITEM_GET_TYPE = {
[PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = BIReport.ITEM_GET_TYPE.WEAPON_GIFT, [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_ACT_TYPE.ARMOR_GIFT] = BIReport.ITEM_GET_TYPE.ARMOR_GIFT,
[PayManager.PURCHARSE_ACT_TYPE.ACT_SUMMER] = BIReport.ITEM_GET_TYPE.ACT_SUMMER, [PayManager.PURCHARSE_ACT_TYPE.ACT_SUMMER] = BIReport.ITEM_GET_TYPE.ACT_SUMMER,
[PayManager.PURCHARSE_ACT_TYPE.ACT_HERO_FUND] = BIReport.ITEM_GET_TYPE.ACT_HERO_FUND,
}, },
[PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG] = BIReport.ITEM_GET_TYPE.GOLD_PIG, [PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG] = BIReport.ITEM_GET_TYPE.GOLD_PIG,
[PayManager.PURCHARSE_TYPE.MALL_TREASURE] = BIReport.ITEM_GET_TYPE.MALL_TREASURE, [PayManager.PURCHARSE_TYPE.MALL_TREASURE] = BIReport.ITEM_GET_TYPE.MALL_TREASURE,
@ -70,6 +72,7 @@ PayManager.BI_GIFT_TYPE = {
[PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = BIReport.GIFT_TYPE.WEAPON_GIFT, [PayManager.PURCHARSE_ACT_TYPE.WEAPON_GIFT] = BIReport.GIFT_TYPE.WEAPON_GIFT,
[PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT] = BIReport.GIFT_TYPE.ARMOR_GIFT, [PayManager.PURCHARSE_ACT_TYPE.ARMOR_GIFT] = BIReport.GIFT_TYPE.ARMOR_GIFT,
[PayManager.PURCHARSE_ACT_TYPE.ACT_SUMMER] = BIReport.GIFT_TYPE.ACT_SUMMER, [PayManager.PURCHARSE_ACT_TYPE.ACT_SUMMER] = BIReport.GIFT_TYPE.ACT_SUMMER,
[PayManager.PURCHARSE_ACT_TYPE.ACT_HERO_FUND] = BIReport.ITEM_GET_TYPE.ACT_HERO_FUND,
}, },
[PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG] = BIReport.GIFT_TYPE.GOLD_PIG, [PayManager.PURCHARSE_TYPE.ACT_GOLD_PIG] = BIReport.GIFT_TYPE.GOLD_PIG,
[PayManager.PURCHARSE_TYPE.MALL_TREASURE] = BIReport.GIFT_TYPE.MALL_TREASURE, [PayManager.PURCHARSE_TYPE.MALL_TREASURE] = BIReport.GIFT_TYPE.MALL_TREASURE,

View File

@ -1568,6 +1568,16 @@ local act_gift = {
["cd"]=1, ["cd"]=1,
["value"]=1000 ["value"]=1000
}, },
[140403]={
["type"]=14,
["recharge_id"]=11,
["limit"]=1
},
[140404]={
["type"]=14,
["recharge_id"]=12,
["limit"]=1
},
[130002]={ [130002]={
["type"]=13, ["type"]=13,
["recharge_id"]=11, ["recharge_id"]=11,
@ -1678,6 +1688,6 @@ local act_gift = {
} }
} }
local config = { local config = {
data=act_gift,count=54 data=act_gift,count=56
} }
return config return config

View File

@ -0,0 +1,600 @@
local activity_herofund = {
[1]={
["exp"]=30,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=44003,
["id_for_nothing"]="UgxcA2Y=",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=44003,
["id_for_nothing"]="UgxcA2Y=",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
[2]={
["exp"]=60,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=1000,
["num_for_nothing"]="VwhcAw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=1500,
["num_for_nothing"]="Vw1cAw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=3000,
["num_for_nothing"]="VQhcAw=="
}
},
[3]={
["exp"]=90,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=9,
["id_for_nothing"]="Xw==",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=9,
["id_for_nothing"]="Xw==",
["num"]=2,
["num_for_nothing"]="VA=="
}
},
[4]={
["exp"]=120,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=13,
["id_for_nothing"]="Vws=",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=13,
["id_for_nothing"]="Vws=",
["num"]=2,
["num_for_nothing"]="VA=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=13,
["id_for_nothing"]="Vws=",
["num"]=2,
["num_for_nothing"]="VA=="
}
},
[5]={
["exp"]=150,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=10,
["id_for_nothing"]="Vwg=",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=11,
["id_for_nothing"]="Vwk=",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=44003,
["id_for_nothing"]="UgxcA2Y=",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
[6]={
["exp"]=180,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=1000,
["num_for_nothing"]="VwhcAw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=1500,
["num_for_nothing"]="Vw1cAw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=3000,
["num_for_nothing"]="VQhcAw=="
}
},
[7]={
["exp"]=210,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=9,
["id_for_nothing"]="Xw==",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=9,
["id_for_nothing"]="Xw==",
["num"]=2,
["num_for_nothing"]="VA=="
}
},
[8]={
["exp"]=240,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=20,
["num_for_nothing"]="VAg="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=50,
["num_for_nothing"]="Uwg="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=100,
["num_for_nothing"]="Vwhc"
}
},
[9]={
["exp"]=270,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=10,
["id_for_nothing"]="Vwg=",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=10,
["id_for_nothing"]="Vwg=",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=10,
["id_for_nothing"]="Vwg=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
},
[10]={
["exp"]=300,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=11,
["id_for_nothing"]="Vwk=",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=47,
["id_for_nothing"]="Ug8=",
["num"]=2,
["num_for_nothing"]="VA=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=44003,
["id_for_nothing"]="UgxcA2Y=",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
[11]={
["exp"]=330,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=3,
["id_for_nothing"]="VQ==",
["num"]=10,
["num_for_nothing"]="Vwg="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=3,
["id_for_nothing"]="VQ==",
["num"]=15,
["num_for_nothing"]="Vw0="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=3,
["id_for_nothing"]="VQ==",
["num"]=20,
["num_for_nothing"]="VAg="
}
},
[12]={
["exp"]=360,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=1000,
["num_for_nothing"]="VwhcAw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=1500,
["num_for_nothing"]="Vw1cAw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=3000,
["num_for_nothing"]="VQhcAw=="
}
},
[13]={
["exp"]=390,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=9,
["id_for_nothing"]="Xw==",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=9,
["id_for_nothing"]="Xw==",
["num"]=2,
["num_for_nothing"]="VA=="
}
},
[14]={
["exp"]=420,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=13,
["id_for_nothing"]="Vws=",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=13,
["id_for_nothing"]="Vws=",
["num"]=2,
["num_for_nothing"]="VA=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=13,
["id_for_nothing"]="Vws=",
["num"]=2,
["num_for_nothing"]="VA=="
}
},
[15]={
["exp"]=450,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=10,
["id_for_nothing"]="Vwg=",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=11,
["id_for_nothing"]="Vwk=",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=18,
["id_for_nothing"]="VwA=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
},
[16]={
["exp"]=480,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=1000,
["num_for_nothing"]="VwhcAw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=1500,
["num_for_nothing"]="Vw1cAw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=3000,
["num_for_nothing"]="VQhcAw=="
}
},
[17]={
["exp"]=510,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=9,
["id_for_nothing"]="Xw==",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=9,
["id_for_nothing"]="Xw==",
["num"]=2,
["num_for_nothing"]="VA=="
}
},
[18]={
["exp"]=540,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=20,
["num_for_nothing"]="VAg="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=50,
["num_for_nothing"]="Uwg="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=100,
["num_for_nothing"]="Vwhc"
}
},
[19]={
["exp"]=570,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=10,
["id_for_nothing"]="Vwg=",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=10,
["id_for_nothing"]="Vwg=",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=10,
["id_for_nothing"]="Vwg=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
},
[20]={
["exp"]=600,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=11,
["id_for_nothing"]="Vwk=",
["num"]=1,
["num_for_nothing"]="Vw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=47,
["id_for_nothing"]="Ug8=",
["num"]=2,
["num_for_nothing"]="VA=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=44003,
["id_for_nothing"]="UgxcA2Y=",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
[21]={
["exp"]=630,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=3,
["id_for_nothing"]="VQ==",
["num"]=10,
["num_for_nothing"]="Vwg="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=3,
["id_for_nothing"]="VQ==",
["num"]=15,
["num_for_nothing"]="Vw0="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=3,
["id_for_nothing"]="VQ==",
["num"]=20,
["num_for_nothing"]="VAg="
}
},
[22]={
["exp"]=660,
["reward"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=1000,
["num_for_nothing"]="VwhcAw=="
},
["reward_pro"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=1500,
["num_for_nothing"]="Vw1cAw=="
},
["reward_pro_max"]={
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=3000,
["num_for_nothing"]="VQhcAw=="
}
}
}
local config = {
data=activity_herofund,count=22
}
return config

View File

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

View File

@ -0,0 +1,587 @@
local arena_gift = {
[101]={
["score"]=950,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=500,
["num_for_nothing"]="Uwhc"
}
}
},
[102]={
["score"]=1000,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=22,
["id_for_nothing"]="VAo=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[103]={
["score"]=1050,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[104]={
["score"]=1100,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=500,
["num_for_nothing"]="Uwhc"
}
},
["unlock_hero"]={
54003
}
},
[105]={
["score"]=1150,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[106]={
["score"]=1200,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=13,
["id_for_nothing"]="Vws=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
},
["unlock_hero"]={
34003
}
},
[107]={
["score"]=1250,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=22,
["id_for_nothing"]="VAo=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[108]={
["score"]=1300,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=30,
["num_for_nothing"]="VQg="
}
}
},
[109]={
["score"]=1350,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[110]={
["score"]=1400,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=50,
["num_for_nothing"]="Uwg="
}
},
["unlock_hero"]={
24003
}
},
[111]={
["score"]=1450,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[112]={
["score"]=1500,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=500,
["num_for_nothing"]="Uwhc"
}
}
},
[113]={
["score"]=1550,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[114]={
["score"]=1600,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=13,
["id_for_nothing"]="Vws=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[115]={
["score"]=1650,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=10,
["id_for_nothing"]="Vwg=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[116]={
["score"]=1700,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=22,
["id_for_nothing"]="VAo=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[117]={
["score"]=1750,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=30,
["num_for_nothing"]="VQg="
}
}
},
[118]={
["score"]=1800,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[119]={
["score"]=1850,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=500,
["num_for_nothing"]="Uwhc"
}
}
},
[120]={
["score"]=1900,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=11,
["id_for_nothing"]="Vwk=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[121]={
["score"]=1950,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[122]={
["score"]=2000,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=500,
["num_for_nothing"]="Uwhc"
}
}
},
[123]={
["score"]=2050,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[124]={
["score"]=2100,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=13,
["id_for_nothing"]="Vws=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[125]={
["score"]=2150,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=10,
["id_for_nothing"]="Vwg=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[126]={
["score"]=2200,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=22,
["id_for_nothing"]="VAo=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[127]={
["score"]=2250,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=30,
["num_for_nothing"]="VQg="
}
}
},
[128]={
["score"]=2300,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[129]={
["score"]=2350,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=500,
["num_for_nothing"]="Uwhc"
}
}
},
[130]={
["score"]=2400,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=50,
["num_for_nothing"]="Uwg="
}
}
},
[131]={
["score"]=2450,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[132]={
["score"]=2500,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=500,
["num_for_nothing"]="Uwhc"
}
}
},
[133]={
["score"]=2550,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[134]={
["score"]=2600,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=10,
["id_for_nothing"]="Vwg=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[135]={
["score"]=2650,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=13,
["id_for_nothing"]="Vws=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[136]={
["score"]=2700,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=22,
["id_for_nothing"]="VAo=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[137]={
["score"]=2750,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=30,
["num_for_nothing"]="VQg="
}
}
},
[138]={
["score"]=2800,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[139]={
["score"]=2850,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=10,
["id_for_nothing"]="Vwg=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[140]={
["score"]=2900,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=11,
["id_for_nothing"]="Vwk=",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[141]={
["score"]=2950,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[142]={
["score"]=3000,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=500,
["num_for_nothing"]="Uwhc"
}
}
},
[143]={
["score"]=3050,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
},
[144]={
["score"]=3100,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=8,
["id_for_nothing"]="Xg==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
}
}
}
local config = {
data=arena_gift,count=44
}
return config

View File

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

View File

@ -449,6 +449,8 @@ local localization_global =
["ARENA_DESC_35"] = "可能出<color=#ff8bf8>史诗</color>哦~", ["ARENA_DESC_35"] = "可能出<color=#ff8bf8>史诗</color>哦~",
["ARENA_DESC_36"] = "试试手气", ["ARENA_DESC_36"] = "试试手气",
["ONE_KEY_GET_DESC"] = "一键领取", ["ONE_KEY_GET_DESC"] = "一键领取",
["ACTIVITY_OVER_EDSC"] = "活动已结束",
} }
return localization_global return localization_global

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 182ed211dd57b7044ae0c6f66592ded7
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,51 @@
local HeroFundManager = class("HeroFundManager", BaseModule)
function HeroFundManager:showMainUI()
UIManager:showUI("app/ui/activity/hero_fund/hero_fund_ui")
end
function HeroFundManager:reqHeroFundAward(level, rewardType)
if not DataManager.HeroFundData:getIsOpen() then
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC))
return
end
-- 直接一键领取
local curLevel = DataManager.HeroFundData:getWaveCount()
local heroIdWithLv = {}
for id = 1, curLevel do
if DataManager.HeroFundData:getFreeCanGet(id) then
table.insert(heroIdWithLv, {id = id, grade = 0})
end
if DataManager.HeroFundData:getProCanGet(id) then
table.insert(heroIdWithLv, {id = id, grade = 1})
end
if DataManager.HeroFundData:getUtralCanGet(id) then
table.insert(heroIdWithLv, {id = id, grade = 2})
end
end
if not heroIdWithLv[1] then
return
end
local params = {
id_with_lv = heroIdWithLv
}
self:sendMessage(ProtoMsgType.FromMsgEnum.HeroFundAwardReq, params, {}, self.rspHeroFundAward, BIReport.ITEM_GET_TYPE.ACT_HERO_FUND)
end
function HeroFundManager:rspHeroFundAward(result)
if result.err_code == GConst.ERROR_STR.SUCCESS then
DataManager.HeroFundData:gotReward(result.id_with_lv)
GFunc.showRewardBox(result.rewards)
end
end
function HeroFundManager:purcharse(id)
PayManager:purchasePackage(id, PayManager.PURCHARSE_TYPE.ACT_GIFT)
end
return HeroFundManager

View File

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

View File

@ -30,6 +30,7 @@ MainCityConst.MAIN_MODULE = {
MainCityConst.LEFT_SIDE_BARS = { MainCityConst.LEFT_SIDE_BARS = {
"app/ui/main_city/cell/side_bar_idle_cell", "app/ui/main_city/cell/side_bar_idle_cell",
"app/ui/main_city/cell/side_bar_growth_fund_cell", "app/ui/main_city/cell/side_bar_growth_fund_cell",
"app/ui/main_city/cell/side_bar_hero_fund_cell",
"app/ui/main_city/cell/side_bar_seven_days_cell", "app/ui/main_city/cell/side_bar_seven_days_cell",
"app/ui/main_city/cell/side_bar_activity_cell", "app/ui/main_city/cell/side_bar_activity_cell",
-- gm放最后一个 -- gm放最后一个

View File

@ -22,6 +22,8 @@ local ProtoMsgType = {
[349009610] = "TriggerGrowUpGiftNtf", [349009610] = "TriggerGrowUpGiftNtf",
[433807827] = "LevelUpReq", [433807827] = "LevelUpReq",
[433809660] = "LevelUpRsp", [433809660] = "LevelUpRsp",
[448795573] = "ChapterArmorChallengeHeroesReq",
[448797406] = "ChapterArmorChallengeHeroesRsp",
[516281556] = "GuideFundMarkReq", [516281556] = "GuideFundMarkReq",
[516283389] = "GuideFundMarkRsp", [516283389] = "GuideFundMarkRsp",
[531558517] = "PigPlayUpdateNtf", [531558517] = "PigPlayUpdateNtf",
@ -59,6 +61,8 @@ local ProtoMsgType = {
[1435949623] = "AppStorePaidRsp", [1435949623] = "AppStorePaidRsp",
[1471116409] = "BindReq", [1471116409] = "BindReq",
[1471118242] = "BindRsp", [1471118242] = "BindRsp",
[1502684232] = "ChapterWeaponChallengeHeroesReq",
[1502686065] = "ChapterWeaponChallengeHeroesRsp",
[1571167683] = "ChapterArmorChallengeFarmReq", [1571167683] = "ChapterArmorChallengeFarmReq",
[1571169516] = "ChapterArmorChallengeFarmRsp", [1571169516] = "ChapterArmorChallengeFarmRsp",
[1571184475] = "ChapterShardsChallengeFarmReq", [1571184475] = "ChapterShardsChallengeFarmReq",
@ -202,6 +206,8 @@ local ProtoMsgType = {
[4152756314] = "PVPChallengeStartRsp", [4152756314] = "PVPChallengeStartRsp",
[4155165814] = "SummerTaskClaimReq", [4155165814] = "SummerTaskClaimReq",
[4155167647] = "SummerTaskClaimRsp", [4155167647] = "SummerTaskClaimRsp",
[4188104820] = "HeroFundAwardReq",
[4188106653] = "HeroFundAwardRsp",
[4256333947] = "ExistReq", [4256333947] = "ExistReq",
[4256335780] = "ExistRsp", [4256335780] = "ExistRsp",
}, },
@ -228,6 +234,8 @@ local ProtoMsgType = {
TriggerGrowUpGiftNtf = 349009610, TriggerGrowUpGiftNtf = 349009610,
LevelUpReq = 433807827, LevelUpReq = 433807827,
LevelUpRsp = 433809660, LevelUpRsp = 433809660,
ChapterArmorChallengeHeroesReq = 448795573,
ChapterArmorChallengeHeroesRsp = 448797406,
GuideFundMarkReq = 516281556, GuideFundMarkReq = 516281556,
GuideFundMarkRsp = 516283389, GuideFundMarkRsp = 516283389,
PigPlayUpdateNtf = 531558517, PigPlayUpdateNtf = 531558517,
@ -265,6 +273,8 @@ local ProtoMsgType = {
AppStorePaidRsp = 1435949623, AppStorePaidRsp = 1435949623,
BindReq = 1471116409, BindReq = 1471116409,
BindRsp = 1471118242, BindRsp = 1471118242,
ChapterWeaponChallengeHeroesReq = 1502684232,
ChapterWeaponChallengeHeroesRsp = 1502686065,
ChapterArmorChallengeFarmReq = 1571167683, ChapterArmorChallengeFarmReq = 1571167683,
ChapterArmorChallengeFarmRsp = 1571169516, ChapterArmorChallengeFarmRsp = 1571169516,
ChapterShardsChallengeFarmReq = 1571184475, ChapterShardsChallengeFarmReq = 1571184475,
@ -408,6 +418,8 @@ local ProtoMsgType = {
PVPChallengeStartRsp = 4152756314, PVPChallengeStartRsp = 4152756314,
SummerTaskClaimReq = 4155165814, SummerTaskClaimReq = 4155165814,
SummerTaskClaimRsp = 4155167647, SummerTaskClaimRsp = 4155167647,
HeroFundAwardReq = 4188104820,
HeroFundAwardRsp = 4188106653,
ExistReq = 4256333947, ExistReq = 4256333947,
ExistRsp = 4256335780, ExistRsp = 4256335780,
}, },
@ -434,6 +446,8 @@ local ProtoMsgType = {
TriggerGrowUpGiftNtf = "TriggerGrowUpGiftNtf", TriggerGrowUpGiftNtf = "TriggerGrowUpGiftNtf",
LevelUpReq = "LevelUpReq", LevelUpReq = "LevelUpReq",
LevelUpRsp = "LevelUpRsp", LevelUpRsp = "LevelUpRsp",
ChapterArmorChallengeHeroesReq = "ChapterArmorChallengeHeroesReq",
ChapterArmorChallengeHeroesRsp = "ChapterArmorChallengeHeroesRsp",
GuideFundMarkReq = "GuideFundMarkReq", GuideFundMarkReq = "GuideFundMarkReq",
GuideFundMarkRsp = "GuideFundMarkRsp", GuideFundMarkRsp = "GuideFundMarkRsp",
PigPlayUpdateNtf = "PigPlayUpdateNtf", PigPlayUpdateNtf = "PigPlayUpdateNtf",
@ -471,6 +485,8 @@ local ProtoMsgType = {
AppStorePaidRsp = "AppStorePaidRsp", AppStorePaidRsp = "AppStorePaidRsp",
BindReq = "BindReq", BindReq = "BindReq",
BindRsp = "BindRsp", BindRsp = "BindRsp",
ChapterWeaponChallengeHeroesReq = "ChapterWeaponChallengeHeroesReq",
ChapterWeaponChallengeHeroesRsp = "ChapterWeaponChallengeHeroesRsp",
ChapterArmorChallengeFarmReq = "ChapterArmorChallengeFarmReq", ChapterArmorChallengeFarmReq = "ChapterArmorChallengeFarmReq",
ChapterArmorChallengeFarmRsp = "ChapterArmorChallengeFarmRsp", ChapterArmorChallengeFarmRsp = "ChapterArmorChallengeFarmRsp",
ChapterShardsChallengeFarmReq = "ChapterShardsChallengeFarmReq", ChapterShardsChallengeFarmReq = "ChapterShardsChallengeFarmReq",
@ -614,6 +630,8 @@ local ProtoMsgType = {
PVPChallengeStartRsp = "PVPChallengeStartRsp", PVPChallengeStartRsp = "PVPChallengeStartRsp",
SummerTaskClaimReq = "SummerTaskClaimReq", SummerTaskClaimReq = "SummerTaskClaimReq",
SummerTaskClaimRsp = "SummerTaskClaimRsp", SummerTaskClaimRsp = "SummerTaskClaimRsp",
HeroFundAwardReq = "HeroFundAwardReq",
HeroFundAwardRsp = "HeroFundAwardRsp",
ExistReq = "ExistReq", ExistReq = "ExistReq",
ExistRsp = "ExistRsp", ExistRsp = "ExistRsp",
}, },

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bccad4c3ed05c9a4c92259b32009b0f1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ad4fd607b9b2d0b4ea51cd7a175ac2c0
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,70 @@
local FundCell = class("FundCell", BaseCell)
function FundCell:init()
local uiMap = self:getUIMap()
self.txLevel = uiMap["fund_cell.level.tx_level"]
self.rewardCell1 = uiMap["fund_cell.reward_cell_1"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
self.rewardCell2 = uiMap["fund_cell.reward_cell_2"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
self.rewardCell3 = uiMap["fund_cell.reward_cell_3"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.REWARD_CELL)
end
function FundCell:refresh(level)
self.txLevel:setText(DataManager.HeroFundData:getLevelWave(level))
local isGet
isGet = DataManager.HeroFundData:getFreeGot(level)
local reward = DataManager.HeroFundData:getReward(level, DataManager.HeroFundData.REWARD_TYPE.FREE)
if reward then
self.rewardCell1:refreshByConfig(reward, isGet, isGet)
end
self.rewardCell1:showLock(false)
if DataManager.HeroFundData:getFreeCanGet(level) then
self.rewardCell1.baseObject:addRedPoint(50, 50, 0.6)
self.rewardCell1:addClickListener(function()
self:onClickReward(level, DataManager.HeroFundData.REWARD_TYPE.FREE)
end)
else
self.rewardCell1.baseObject:removeRedPoint()
self.rewardCell1:addClickListener(nil)
end
isGet = DataManager.HeroFundData:getProGot(level)
local reward = DataManager.HeroFundData:getReward(level, DataManager.HeroFundData.REWARD_TYPE.PRO)
if reward then
self.rewardCell2:refreshByConfig(reward, isGet, isGet)
end
self.rewardCell2:showLock(not DataManager.HeroFundData:getProBought())
if DataManager.HeroFundData:getProCanGet(level) then
self.rewardCell2.baseObject:addRedPoint(50, 50, 0.6)
self.rewardCell2:addClickListener(function()
self:onClickReward(level, DataManager.HeroFundData.REWARD_TYPE.PRO)
end)
else
self.rewardCell2.baseObject:removeRedPoint()
self.rewardCell2:addClickListener(nil)
end
isGet = DataManager.HeroFundData:getUtralGot(level)
local reward = DataManager.HeroFundData:getReward(level, DataManager.HeroFundData.REWARD_TYPE.UTRAL)
if reward then
self.rewardCell3:refreshByConfig(reward, isGet, isGet)
end
self.rewardCell3:showLock(not DataManager.HeroFundData:getUtralBought())
if DataManager.HeroFundData:getUtralCanGet(level) then
self.rewardCell3.baseObject:addRedPoint(50, 50, 0.6)
self.rewardCell3:addClickListener(function()
self:onClickReward(level, DataManager.HeroFundData.REWARD_TYPE.UTRAL)
end)
else
self.rewardCell3.baseObject:removeRedPoint()
self.rewardCell3:addClickListener(nil)
end
end
-- 领取奖励
function FundCell:onClickReward(level, rewardType)
ModuleManager.HeroFundManager:reqHeroFundAward(level, rewardType)
end
return FundCell

View File

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

View File

@ -0,0 +1,156 @@
local HeroFundUI = class("HeroFundUI", BaseUI)
local FUND_CELL = "app/ui/activity/hero_fund/cell/fund_cell"
local BTN_ICON = {"common_btn_green_3", "common_btn_dark_4"}
function HeroFundUI:ctor()
self.rewardList = {}
for id, info in pairs(DataManager.HeroFundData:getConfig()) do
table.insert(self.rewardList, id)
end
table.sort(self.rewardList, function(a, b)
return a < b
end)
end
function HeroFundUI:getPrefabPath()
return "assets/prefabs/ui/activity/hero_fund/activity_herofund_ui.prefab"
end
function HeroFundUI:onLoadRootComplete()
self:_display()
self:_addListeners()
self:_bind()
self:refreshTime()
if self.actCountdownSid then
self:unscheduleGlobal(self.actCountdownSid)
end
self.actCountdownSid = self:scheduleGlobal(function()
self:refreshTime()
end, 1)
end
function HeroFundUI:_display()
self:refreshBtns()
self:_refreshScrollrect()
end
function HeroFundUI:_addListeners()
local uiMap = self.root:genAllChildren()
uiMap["activity_herofund_ui.bg.close_btn"]:addClickListener(function()
self:closeUI()
end)
end
function HeroFundUI:_bind()
self:bind(DataManager.HeroFundData, "isDirty", function()
self:_display()
end)
self:bind(DataManager.ShopData, "isDirty", function()
self:_display()
end)
end
function HeroFundUI:refreshBtns()
local uiMap = self.root:genAllChildren()
uiMap["activity_herofund_ui.bg.title.free.tx_free"]:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE))
local probtn = uiMap["activity_herofund_ui.bg.title.buy1"]
local proBtntx = uiMap["activity_herofund_ui.bg.title.buy1.tx_buyed"]
local proBuy = uiMap["activity_herofund_ui.bg.title.buy1.tx_buy"]
proBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE))
proBuy:setText(DataManager.HeroFundData:getProPrice())
if DataManager.HeroFundData:getProBought() then
probtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2])
probtn:setTouchEnable(false)
proBtntx:setVisible(true)
proBuy:setVisible(false)
else
probtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1])
probtn:setTouchEnable(true)
probtn:addClickListener(function()
ModuleManager.HeroFundManager:purcharse(DataManager.HeroFundData:getProActId())
end)
proBtntx:setVisible(false)
proBuy:setVisible(true)
end
local utralbtn = uiMap["activity_herofund_ui.bg.title.buy2"]
local utralBtntx = uiMap["activity_herofund_ui.bg.title.buy2.tx_buyed"]
local utralBuy = uiMap["activity_herofund_ui.bg.title.buy2.tx_buy"]
utralBtntx:setText(I18N:getGlobalText(I18N.GlobalConst.ALREADY_ACTIVE))
utralBuy:setText(DataManager.HeroFundData:getProPrice())
if DataManager.HeroFundData:getUtralBought() then
utralbtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[2])
utralbtn:setTouchEnable(false)
utralBtntx:setVisible(true)
utralBuy:setVisible(false)
else
utralbtn:setSprite(GConst.ATLAS_PATH.COMMON, BTN_ICON[1])
utralbtn:setTouchEnable(true)
utralbtn:addClickListener(function()
ModuleManager.HeroFundManager:purcharse(DataManager.HeroFundData:getUtralActId())
end)
utralBtntx:setVisible(false)
utralBuy:setVisible(true)
end
end
function HeroFundUI:_refreshScrollrect()
local uiMap = self.root:genAllChildren()
local mask = uiMap["activity_herofund_ui.bg.scrollrect.viewport.content.mask_img"]
local level = DataManager.HeroFundData:getWaveLevel()
local totalCount = #self.rewardList
local maskCount = math.max(0, totalCount - level)
mask:setAnchoredPositionY(-10 - level * 120)
mask:setSizeDeltaY(maskCount * 120 + 20)
local progSlider = uiMap["activity_herofund_ui.bg.scrollrect.viewport.content.prog.img_prog"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER)
local y = (totalCount - 1) * 120
if (level - 1) >= 0 then
progSlider.value = (73 + ((level - 1) / (totalCount - 1)) * y) / (73 + y)
else
progSlider.value = 0
end
mask:setVisible(level < totalCount)
if self.scrollRectComp then
self.scrollRectComp:updateAllCell()
return
end
local prog = uiMap["activity_herofund_ui.bg.scrollrect.viewport.content.prog"]
prog:setSizeDeltaY(73 + y)
self.scrollRectComp = uiMap["activity_herofund_ui.bg.scrollrect"]:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
self.scrollRectComp:addInitCallback(function()
return FUND_CELL
end)
self.scrollRectComp:addRefreshCallback(function(index, cell)
cell:refresh(self.rewardList[index])
mask:getTransform():SetAsLastSibling()
end)
self.scrollRectComp:clearCells()
self.scrollRectComp:setTotalCount(0)
if level < 1 then
level = 1
end
self.scrollRectComp:refillCells(totalCount, nil, level)
end
function HeroFundUI:refreshTime()
local uiMap = self.root:genAllChildren()
local remianTime = DataManager.HeroFundData:getRemainTime()
local str
if remianTime <= 0 then
str = I18N:getGlobalText(I18N.GlobalConst.ACTIVITY_OVER_EDSC)
else
str = Time:formatNumTimeStr(remianTime)
end
uiMap["activity_herofund_ui.bg.countdown.tx_countdown"]:setText(str)
end
return HeroFundUI

View File

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

View File

@ -0,0 +1,50 @@
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
local SideBarHeroFundCell = class("SideBarHeroFundCell", SideBarBaseCellComp)
function SideBarHeroFundCell:getModuleKey()
return ModuleManager.MODULE_KEY.SEVEN_DAY
end
function SideBarHeroFundCell:getHasPurchase()
return false
end
function SideBarHeroFundCell:getIsOpen()
return DataManager.HeroFundData:getIsOpen()
end
function SideBarHeroFundCell:getSpineName()
return "ui_main_btn_sevenday"
end
function SideBarHeroFundCell:onClick()
ModuleManager.HeroFundManager:showMainUI()
end
function SideBarHeroFundCell:getIsShowRedPoint()
return DataManager.HeroFundData:getHaveReward()
end
function SideBarHeroFundCell:onRefresh()
self.timeBg:setVisible(true)
self:_refreshTime()
end
function SideBarHeroFundCell:updateTime()
if self:getIsOpen() then
self:_refreshTime()
else
self:closeBtn()
end
end
function SideBarHeroFundCell:_refreshTime()
local remainTime = DataManager.HeroFundData:getRemainTime()
if remainTime >= 0 then
self.timeTx:setText(GFunc.getTimeStr(remainTime))
else
self.timeTx:setText("00:00:00")
end
end
return SideBarHeroFundCell

View File

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

View File

@ -183,6 +183,10 @@ function MainCityUI:_addListeners()
self:addEventListener(EventManager.CUSTOM_EVENT.CHANGE_MAIN_COMP_MODULE, function(module) self:addEventListener(EventManager.CUSTOM_EVENT.CHANGE_MAIN_COMP_MODULE, function(module)
self:switchMainCompModule(module) self:switchMainCompModule(module)
end) end)
self:addEventListener(EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_SIDE_BAR, function(module)
self:checkSideBarOpenStatus()
end)
DataManager.MailData:checkNewMail() DataManager.MailData:checkNewMail()
end end

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8c5f86b5807abb346a0327f5b30d1623
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,383 @@
local HeroFundData = class("HeroFundData", BaseData)
local PRO_ACT_ID = 140403
local UTRAL_ACT_ID = 140404
local OPEN_AT_DAY = 7
HeroFundData.REWARD_TYPE = {
FREE = 1,
PRO = 2,
UTRAL = 3
}
function HeroFundData:ctor()
self:clear()
end
function HeroFundData:clear()
self.data.isDirty = false
self.waveCount = 0 -- 波次
self.waveLevel = 0 -- 波次等级 可领的最高等级
self.freeLevel = 0 -- 免费领取过的等级
self.proLevel = 0 -- 付费1领取过的等级
self.utralLevel = 0 -- 付费2领取过的等级
self.free_awarded = {} -- 领取过的免费id
self.pay_low_awarded = {} -- 领取过的付费1id
self.pay_high_awarded = {} -- 领取过的付费2id
self.proBounght = false -- 付费1已购买
self.utralBounght = false -- 付费2已购买
self.waveLevelList = {} -- 缓存波次等级
self.waveLevelListCount = 0 -- 缓存最大等级
self.endTime = 0 -- 活动结束时间
DataManager:unregisterCrossDayFunc("HeroFundData")
DataManager:unregisterTryOpenFunc("HeroFundData")
end
function HeroFundData:init(data)
data = data or {}
self.waveCount = data.total_wave or 0
self.endTime = 0
if data.open_at and data.open_at > 0 then
self.endTime = GFunc.formatTimeStep(data.open_at) + (OPEN_AT_DAY + 1) * 86400
end
if data.funds then
if data.funds.free_awarded then
for _, id in ipairs(data.funds.free_awarded) do
self:setFreeGot(id)
end
end
if data.funds.pay_low_awarded then
for _, id in ipairs(data.funds.pay_low_awarded) do
self:setProGot(id)
end
end
if data.funds.pay_high_awarded then
for _, id in ipairs(data.funds.pay_high_awarded) do
self:setUtralGot(id)
end
end
end
local cfg = self:getConfig()
self.waveLevelListCount = 0
for id, info in ipairs(cfg) do
self.waveLevelList[id] = info.exp
self.waveLevelListCount = self.waveLevelListCount + 1
end
for id = 1, self.waveLevelListCount do
local wave = self.waveLevelList[id]
if wave and wave <= self.waveCount then
self.waveLevel = id
else
break
end
end
self.proBounght = false
self:getProBought()
self.utralBounght = false
self:getUtralBought()
self:initTaskListener()
if self.endTime ~= 0 then -- 开过了
return
end
DataManager:registerTryOpenFunc("HeroFundData", function()
if self.endTime ~= 0 then
return
end
if ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then
local time = Time:getServerTime()
local registerBeginTs = Time:getBeginningOfOneDay(DataManager:getRegisterTs())
if registerBeginTs + (OPEN_AT_DAY - 1) * 86400 <= time then
self.endTime = time + (OPEN_AT_DAY + 1) * 86400
end
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_SIDE_BAR)
self:setDirty()
DataManager:unregisterTryOpenFunc("HeroFundData")
end
end)
DataManager:registerCrossDayFunc("HeroFundData", function()
if self.endTime ~= 0 then -- 开过了
return
end
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then
return
end
local time = Time:getServerTime()
local registerBeginTs = Time:getBeginningOfOneDay(DataManager:getRegisterTs())
if registerBeginTs + (OPEN_AT_DAY - 1) * 86400 <= time then
self.endTime = time + (OPEN_AT_DAY + 1) * 86400
end
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.EventManager.CUSTOM_EVENT.MAIN_UI_CHECK_SIDE_BAR)
self:setDirty()
end)
end
function HeroFundData:getConfig()
return ConfigManager:getConfig("activity_herofund")
end
function HeroFundData:setDirty()
self.data.isDirty = not self.data.isDirty
end
function HeroFundData:getIsOpen()
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.SEVEN_DAY, true) then
return false
end
if self.endTime <= 0 then
return false
end
return self.endTime > Time:getServerTime()
end
function HeroFundData:getRemainTime()
local remian = math.max(0, self.endTime - Time:getServerTime())
return remian
end
function HeroFundData:getWaveLevel()
return self.waveLevel or 0
end
function HeroFundData:getLevelWave(level)
return self.waveLevelList[level] or 0
end
function HeroFundData:addWaveCount(count)
self.waveCount = self.waveCount + count
local nextLevel = self.waveLevel + 1
if self.waveLevelList[nextLevel] and self.waveCount >= self.waveLevelList[nextLevel] then -- 升级了
for id = nextLevel, self.waveLevelListCount do
local wave = self.waveLevelList[id]
if wave and wave <= self.waveCount then
self.waveLevel = id
else
break
end
end
end
self:setDirty()
end
function HeroFundData:getWaveCount()
return self.waveCount
end
function HeroFundData:getFreeGot(level)
return self.free_awarded[level]
end
function HeroFundData:setFreeGot(level)
if not self.free_awarded[level] then
self.freeLevel = self.freeLevel + 1
end
self.free_awarded[level] = true
end
function HeroFundData:getProActId()
return PRO_ACT_ID
end
function HeroFundData:getProPrice()
local cfg = ConfigManager:getConfig("act_gift")[PRO_ACT_ID]
if not cfg then
return GConst.EMPTY_STRING
end
return GFunc.getFormatPrice(cfg.recharge_id)
end
function HeroFundData:getProGot(level)
return self.pay_low_awarded[level]
end
function HeroFundData:setProGot(level)
if not self.pay_low_awarded[level] then
self.proLevel = self.proLevel + 1
end
self.pay_low_awarded[level] = true
end
function HeroFundData:getProBought()
if not self.proBounght then
if DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, PRO_ACT_ID) > 0 then
self.proBounght = true
end
end
return self.proBounght
end
function HeroFundData:setProBought()
self.proBounght = true
self:setDirty()
end
function HeroFundData:getUtralActId()
return UTRAL_ACT_ID
end
function HeroFundData:gettUtralPrice()
local cfg = ConfigManager:getConfig("act_gift")[UTRAL_ACT_ID]
if not cfg then
return GConst.EMPTY_STRING
end
return GFunc.getFormatPrice(cfg.recharge_id)
end
function HeroFundData:getUtralGot(level)
return self.pay_high_awarded[level]
end
function HeroFundData:setUtralGot(level)
if not self.pay_high_awarded[level] then
self.utralLevel = self.utralLevel + 1
end
self.pay_high_awarded[level] = true
end
function HeroFundData:getUtralBought()
if not self.utralBounght then
if DataManager.ShopData:getGiftBoughtNum(PayManager.PURCHARSE_TYPE.ACT_GIFT, UTRAL_ACT_ID) > 0 then
self.utralBounght = true
end
end
return self.utralBounght
end
function HeroFundData:setUtralBought()
self.utralBounght = true
self:setDirty()
end
function HeroFundData:gotReward(heroIdWithLv)
if not heroIdWithLv then
return
end
for _, info in ipairs(heroIdWithLv) do
if info.grade == 0 then
self:setFreeGot(info.id)
elseif info.grade == 1 then
self:setProGot(info.id)
elseif info.grade == 2 then
self:setUtralGot(info.id)
end
end
self:setDirty()
end
function HeroFundData:getFreeCanGet(level)
if self:getFreeGot(level) then
return false
end
if self.waveLevel < level then
return false
end
return true
end
function HeroFundData:getProCanGet(level)
if self:getProGot(level) then
return false
end
if not self.proBounght then
return false
end
if self.waveLevel < level then
return false
end
return true
end
function HeroFundData:getUtralCanGet(level)
if self:getUtralGot(level) then
return false
end
if not self.utralBounght then
return false
end
if self.waveLevel < level then
return false
end
return true
end
function HeroFundData:getHaveReward()
if self.freeLevel < self.waveLevel then
return true
end
if self.proBounght then
if self.proLevel < self.waveLevel then
return true
end
end
if self.utralBounght then
if self.utralLevel < self.waveLevel then
return true
end
end
return false
end
function HeroFundData:getReward(level, rewardType)
local cfg = self:getConfig()[level]
if not cfg then
return
end
if rewardType == HeroFundData.REWARD_TYPE.FREE then
return cfg.reward
elseif rewardType == HeroFundData.REWARD_TYPE.PRO then
return cfg.reward_pro
elseif rewardType == HeroFundData.REWARD_TYPE.UTRAL then
return cfg.reward_pro_max
end
end
function HeroFundData:initTaskListener()
local nowTime = Time:getServerTime()
-- 活动结束就不用监听了
if self.endTime > 0 and self.endTime < nowTime then
ModuleManager.TaskManager:unRegisterAllModuleTask("HeroFundData")
return false
end
ModuleManager.TaskManager:registerTask("HeroFundData", GConst.TaskConst.TASK_TYPE.X_BATTLE_PASS_WAVE, function(count)
if not self:getIsOpen() then
return
end
self:addWaveCount(count)
end)
end
return HeroFundData

View File

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