Merge branch 'dev' into battle_buff

# Conflicts:
#	lua/app/config/act_gift.lua
#	lua/app/config/act_gift.lua.meta
#	lua/app/config/bounty_level.lua.meta
#	lua/app/config/bounty_time.lua.meta
#	lua/app/config/buff.lua
#	lua/app/config/task.lua.meta
#	lua/app/config/task_daily.lua.meta
This commit is contained in:
xiekaidong 2023-05-10 21:11:51 +08:00
commit a864b53830
47 changed files with 673 additions and 1220 deletions

View File

@ -50,10 +50,13 @@ BIReport.ITEM_GET_TYPE = {
CHAPTER_BOX = "ChapterBox",
CROSS_DAY = "CrossDay",
RECOVERY_TIME = "RecoveryTime",
ADS_BUY_VIT = "AdsBuyVit",
GEM_BUY_VIT = "GemBuyVit",
}
BIReport.ADS_CLICK_TYPE = {
BATTLE_SKILL_REFRESH = "BattleSkillRefresh"
BATTLE_SKILL_REFRESH = "BattleSkillRefresh",
AD_ENERGY = "AdEnergy",
}
BIReport.FIGHT_OPT_TYPE = {

View File

@ -15,6 +15,7 @@ function DataManager:init()
self:initManager("TutorialData", "app/userdata/tutorial/tutorial_data")
self:initManager("ActivityData", "app/userdata/activity/activity_data")
self:initManager("GodPigData", "app/userdata/activity/god_pig/god_pig_data")
self:initManager("TaskData", "app/userdata/task/task_data")
self:initManager("BountyData", "app/userdata/bounty/bounty_data")
-- self:initManager("IdleData", "app/userdata/idle/idle_data")
-- self:initManager("SevenDayData", "app/userdata/activity/seven_day/seven_day_data")
@ -83,6 +84,7 @@ function DataManager:clear()
self.ActivityData:clear()
self.GodPigData:clear()
self.BountyData:clear()
self.TaskData:clear()
-- self.IdleData:clear()
-- self.SevenDayData:clear()
@ -102,7 +104,7 @@ function DataManager:initWithServerData(data)
Logger.printTable(data)
end
self.todayFirstLogin = data.today_first_login
-- self.PlayerData:init(data.PlayerData)
self.PlayerData:init(data)
self.ChapterData:init(data.chapter)
self.HeroData:init(data.bag.heroes)
self.BagData:init(data.bag)
@ -111,6 +113,7 @@ function DataManager:initWithServerData(data)
self.ActivityData:init()
self.GodPigData:init()
self.BountyData:init()
self.TaskData:init()
-- self.IdleData:clear(data.IdleData)
-- self.SevenDayData:init(data.SevenDayData)

View File

@ -1,18 +1,26 @@
local ModuleManager = {}
local MODULE_PATHS = {
-- 登录
LoginManager = "app/module/login/login_manager",
TipsManager = "app/module/tips/tips_manager",
LoadingManager = "app/module/loading/loading_manager",
-- GM
DevToolManager = "app/module/gm/dev_tool_manager",
-- 主城
MaincityManager = "app/module/maincity/maincity_manager",
-- 引导
TutorialManager = "app/module/tutorial/tutorial_manager",
ToastManager = "app/ui/common/toast",
-- 任务
TaskManager = "app/module/task/task_manager",
-- 战斗
BattleManager = "app/module/battle/battle_manager",
-- 战斗阵容
FormationManager = "app/module/formation/formation_manager",
-- 英雄
HeroManager = "app/module/hero/hero_manager",
-- 主线关卡
ChapterManager = "app/module/chapter/chapter_manager",
-- 挂机
IdleManager = "app/module/idle/idle_manager",
@ -22,11 +30,14 @@ local MODULE_PATHS = {
GameSettingManager = "app/module/game_setting/game_setting_manager",
-- 活动
ActivityManager = "app/module/activity/activity_manager",
-- 商城,礼包
CommerceManager = "app/module/commerce/commerce_manager",
}
-- 这里的key对应func_open里的id
ModuleManager.MODULE_KEY = {
GOLD_PIG = "act_gold_pig",
TASK = "task",
}
local _moduleMgrs = {}

View File

@ -1,822 +1,20 @@
local act_gift = {
[70102]={
["type"]=7,
[10002]={
["type"]=1,
["recharge_id"]=11,
["time_type"]=3,
["limit"]=1,
["value"]=3000
},
[70202]={
["type"]=7,
[10102]={
["type"]=1,
["recharge_id"]=12,
["time_type"]=3,
["limit"]=1,
["value"]=25
},
[20102]={
["type"]=2,
["pay_condition"]={
0,
5
},
["recharge_id"]=4,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=80000,
["num_for_nothing"]="XghcA2U="
}
},
["time_type"]=1,
["limit_time"]=1,
["cd"]=6,
["limit"]=1,
["value"]=800
},
[20202]={
["type"]=2,
["pay_condition"]={
5,
20
},
["recharge_id"]=5,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=120000,
["num_for_nothing"]="VwpcA2VR"
}
},
["time_type"]=1,
["limit_time"]=1,
["cd"]=6,
["limit"]=1,
["value"]=800
},
[20302]={
["type"]=2,
["pay_condition"]={
20,
9999
},
["recharge_id"]=7,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=1,
["id_for_nothing"]="Vw==",
["num"]=180000,
["num_for_nothing"]="VwBcA2VR"
}
},
["time_type"]=1,
["limit_time"]=1,
["cd"]=6,
["limit"]=1,
["value"]=800
},
[50102]={
["type"]=5,
["pay_condition"]={
0,
10
},
["parameter"]=5,
["recharge_id"]=4,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=20,
["num_for_nothing"]="VAg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=4,
["id_for_nothing"]="Ug==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[50202]={
["type"]=5,
["pay_condition"]={
10,
20
},
["parameter"]=5,
["recharge_id"]=6,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=40,
["num_for_nothing"]="Ugg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=4,
["id_for_nothing"]="Ug==",
["num"]=2,
["num_for_nothing"]="VA=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[50302]={
["type"]=5,
["pay_condition"]={
20,
9999
},
["parameter"]=5,
["recharge_id"]=8,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=60,
["num_for_nothing"]="UAg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=4,
["id_for_nothing"]="Ug==",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[50402]={
["type"]=5,
["pay_condition"]={
0,
10
},
["parameter"]=10,
["recharge_id"]=4,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=50,
["num_for_nothing"]="Uwg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[50502]={
["type"]=5,
["pay_condition"]={
10,
20
},
["parameter"]=10,
["recharge_id"]=6,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=60,
["num_for_nothing"]="UAg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=2,
["num_for_nothing"]="VA=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[50602]={
["type"]=5,
["pay_condition"]={
20,
30
},
["parameter"]=10,
["recharge_id"]=8,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=70,
["num_for_nothing"]="UQg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[50702]={
["type"]=5,
["pay_condition"]={
30,
9999
},
["parameter"]=10,
["recharge_id"]=9,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=80,
["num_for_nothing"]="Xgg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[50802]={
["type"]=5,
["pay_condition"]={
0,
10
},
["parameter"]=15,
["recharge_id"]=4,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=50,
["num_for_nothing"]="Uwg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[50902]={
["type"]=5,
["pay_condition"]={
10,
20
},
["parameter"]=15,
["recharge_id"]=6,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=60,
["num_for_nothing"]="UAg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=2,
["num_for_nothing"]="VA=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[51002]={
["type"]=5,
["pay_condition"]={
20,
30
},
["parameter"]=15,
["recharge_id"]=8,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=70,
["num_for_nothing"]="UQg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[51102]={
["type"]=5,
["pay_condition"]={
30,
9999
},
["parameter"]=15,
["recharge_id"]=9,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=80,
["num_for_nothing"]="Xgg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[51202]={
["type"]=5,
["pay_condition"]={
0,
10
},
["parameter"]=20,
["recharge_id"]=4,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=55,
["num_for_nothing"]="Uw0="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[51302]={
["type"]=5,
["pay_condition"]={
10,
20
},
["parameter"]=20,
["recharge_id"]=6,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=65,
["num_for_nothing"]="UA0="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=2,
["num_for_nothing"]="VA=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[51402]={
["type"]=5,
["pay_condition"]={
20,
30
},
["parameter"]=20,
["recharge_id"]=8,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=75,
["num_for_nothing"]="UQ0="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[51502]={
["type"]=5,
["pay_condition"]={
30,
9999
},
["parameter"]=20,
["recharge_id"]=9,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=85,
["num_for_nothing"]="Xg0="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[51602]={
["type"]=5,
["pay_condition"]={
0,
10
},
["parameter"]=25,
["recharge_id"]=4,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=50,
["num_for_nothing"]="Uwg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=1,
["num_for_nothing"]="Vw=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[51702]={
["type"]=5,
["pay_condition"]={
10,
20
},
["parameter"]=25,
["recharge_id"]=6,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=60,
["num_for_nothing"]="UAg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=2,
["num_for_nothing"]="VA=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[51802]={
["type"]=5,
["pay_condition"]={
20,
30
},
["parameter"]=25,
["recharge_id"]=8,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=70,
["num_for_nothing"]="UQg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[51902]={
["type"]=5,
["pay_condition"]={
30,
9999
},
["parameter"]=25,
["recharge_id"]=9,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=80,
["num_for_nothing"]="Xgg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=3,
["num_for_nothing"]="VQ=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[52002]={
["type"]=5,
["pay_condition"]={
0,
10
},
["parameter"]=30,
["recharge_id"]=4,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=50,
["num_for_nothing"]="Uwg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=2,
["num_for_nothing"]="VA=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[52102]={
["type"]=5,
["pay_condition"]={
10,
20
},
["parameter"]=30,
["recharge_id"]=6,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=60,
["num_for_nothing"]="UAg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=4,
["num_for_nothing"]="Ug=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[52202]={
["type"]=5,
["pay_condition"]={
20,
30
},
["parameter"]=30,
["recharge_id"]=8,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=70,
["num_for_nothing"]="UQg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=5,
["num_for_nothing"]="Uw=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[52302]={
["type"]=5,
["pay_condition"]={
30,
9999
},
["parameter"]=30,
["recharge_id"]=9,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=80,
["num_for_nothing"]="Xgg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=6,
["num_for_nothing"]="UA=="
}
},
["time_type"]=3,
["limit"]=1,
["value"]=800
},
[40102]={
["type"]=4,
["recharge_id"]=2,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=6,
["num_for_nothing"]="UA=="
}
}
},
[10102]={
["type"]=1,
["reward"]={
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=2,
["id_for_nothing"]="VA==",
["num"]=10,
["num_for_nothing"]="Vwg="
},
{
["type"]=1,
["type_for_nothing"]="Vw==",
["id"]=5,
["id_for_nothing"]="Uw==",
["num"]=6,
["num_for_nothing"]="UA=="
}
}
}
}
local config = {
data=act_gift,count=30
data=act_gift,count=2
}
return config

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5d4e36b21dd4c58408962b5a7f47a459
guid: 9037b2202013c9046ac4eedf305785f4
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 69710b76d77270f40aafa0077807c9dd
guid: 199d01ef77e81dc44abed0f43f5216b4
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b6823cf4d657ca14290f9453c0dedebf
guid: 2decbbf35f1a242498a1f08a5b279630
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}

View File

@ -2,42 +2,36 @@ local buff = {
[1]={
["name"]="hurt",
["buff_type"]=3,
["decr"]=3,
["formula"]=1
},
[2]={
["name"]="hurt_red",
["buff_type"]=3,
["position"]=1,
["decr"]=3,
["formula"]=1
},
[3]={
["name"]="hurt_yellow",
["buff_type"]=3,
["position"]=2,
["decr"]=3,
["formula"]=1
},
[4]={
["name"]="hurt_green",
["buff_type"]=3,
["position"]=3,
["decr"]=3,
["formula"]=1
},
[5]={
["name"]="hurt_blue",
["buff_type"]=3,
["position"]=4,
["decr"]=3,
["formula"]=1
},
[6]={
["name"]="hurt_purple",
["buff_type"]=3,
["position"]=5,
["decr"]=3,
["formula"]=1
},
[7]={
@ -45,7 +39,6 @@ local buff = {
["buff_type"]=1,
["stack"]=2,
["position"]=1,
["decr"]=1,
["icon"]="dec_dmg_red_add"
},
[8]={
@ -53,7 +46,6 @@ local buff = {
["buff_type"]=1,
["stack"]=2,
["position"]=2,
["decr"]=1,
["icon"]="dec_dmg_yellow_add"
},
[9]={
@ -61,7 +53,6 @@ local buff = {
["buff_type"]=1,
["stack"]=2,
["position"]=3,
["decr"]=1,
["icon"]="dec_dmg_green_add"
},
[10]={
@ -69,7 +60,6 @@ local buff = {
["buff_type"]=1,
["stack"]=2,
["position"]=4,
["decr"]=1,
["icon"]="dec_dmg_blue_add"
},
[11]={
@ -77,14 +67,12 @@ local buff = {
["buff_type"]=1,
["stack"]=2,
["position"]=5,
["decr"]=1,
["icon"]="dec_dmg_purple_add"
},
[12]={
["name"]="dec_dmg_all_add",
["buff_type"]=1,
["stack"]=2,
["decr"]=1,
["icon"]="dec_dmg_all_add"
},
[13]={
@ -92,7 +80,6 @@ local buff = {
["buff_type"]=1,
["stack"]=2,
["position"]=1,
["decr"]=2,
["icon"]="weakness_red_add"
},
[14]={
@ -100,7 +87,6 @@ local buff = {
["buff_type"]=1,
["stack"]=2,
["position"]=2,
["decr"]=2,
["icon"]="weakness_yellow_add"
},
[15]={
@ -108,7 +94,6 @@ local buff = {
["buff_type"]=1,
["stack"]=2,
["position"]=3,
["decr"]=2,
["icon"]="weakness_green_add"
},
[16]={
@ -116,7 +101,6 @@ local buff = {
["buff_type"]=1,
["stack"]=2,
["position"]=4,
["decr"]=2,
["icon"]="weakness_blue_add"
},
[17]={
@ -124,110 +108,94 @@ local buff = {
["buff_type"]=1,
["stack"]=2,
["position"]=5,
["decr"]=2,
["icon"]="weakness_purple_add"
},
[18]={
["name"]="weakness_all_add",
["buff_type"]=1,
["stack"]=2,
["decr"]=2,
["icon"]="weakness_all_add"
},
[19]={
["name"]="dmg_addition_red_add",
["buff_type"]=1,
["stack"]=2,
["position"]=1,
["decr"]=1
["position"]=1
},
[20]={
["name"]="dmg_addition_yellow_add",
["buff_type"]=1,
["stack"]=2,
["position"]=2,
["decr"]=1
["position"]=2
},
[21]={
["name"]="dmg_addition_green_add",
["buff_type"]=1,
["stack"]=2,
["position"]=3,
["decr"]=1
["position"]=3
},
[22]={
["name"]="dmg_addition_blue_add",
["buff_type"]=1,
["stack"]=2,
["position"]=4,
["decr"]=1
["position"]=4
},
[23]={
["name"]="dmg_addition_purple_add",
["buff_type"]=1,
["stack"]=2,
["position"]=5,
["decr"]=1
["position"]=5
},
[24]={
["name"]="dmg_addition_all_add",
["buff_type"]=1,
["stack"]=2,
["decr"]=1
["stack"]=2
},
[25]={
["name"]="atkp_color_add",
["buff_type"]=1,
["stack"]=2,
["decr"]=1
["stack"]=2
},
[26]={
["name"]="atkp_red_add",
["buff_type"]=1,
["stack"]=2,
["position"]=1,
["decr"]=1
["position"]=1
},
[27]={
["name"]="atkp_yellow_add",
["buff_type"]=1,
["stack"]=2,
["position"]=2,
["decr"]=1
["position"]=2
},
[28]={
["name"]="atkp_green_add",
["buff_type"]=1,
["stack"]=2,
["position"]=3,
["decr"]=1
["position"]=3
},
[29]={
["name"]="atkp_blue_add",
["buff_type"]=1,
["stack"]=2,
["position"]=4,
["decr"]=1
["position"]=4
},
[30]={
["name"]="atkp_purple_add",
["buff_type"]=1,
["stack"]=2,
["position"]=5,
["decr"]=1
["position"]=5
},
[31]={
["name"]="wavehealp",
["buff_type"]=5,
["stack"]=2,
["decr"]=1,
["formula"]=2
},
[32]={
["name"]="heal",
["buff_type"]=5,
["stack"]=2,
["decr"]=1,
["formula"]=3,
["fx_get"]={
300025
@ -237,7 +205,6 @@ local buff = {
["name"]="stun",
["buff_type"]=8,
["stack"]=2,
["decr"]=2,
["icon"]="stun",
["fx_continued"]={
13
@ -246,7 +213,6 @@ local buff = {
[34]={
["name"]="shield",
["buff_type"]=2,
["decr"]=1,
["icon"]="shield",
["fx_continued"]={
11
@ -258,14 +224,12 @@ local buff = {
[35]={
["name"]="atkp_add",
["buff_type"]=1,
["stack"]=2,
["decr"]=1
["stack"]=2
},
[36]={
["name"]="normal_attack_dec",
["buff_type"]=1,
["stack"]=2,
["decr"]=2,
["icon"]="normal_attack_dec",
["fx_continued"]={
12
@ -274,67 +238,51 @@ local buff = {
[37]={
["name"]="normal_attack_add",
["buff_type"]=1,
["stack"]=2,
["decr"]=1
["stack"]=2
},
[38]={
["name"]="block",
["buff_type"]=1,
["stack"]=2,
["decr"]=1
["stack"]=2
},
[39]={
["name"]="hpp_add",
["buff_type"]=1,
["stack"]=2,
["decr"]=1
["stack"]=2
},
[40]={
["name"]="crit_add",
["buff_type"]=1,
["stack"]=2,
["decr"]=1
["stack"]=2
},
[41]={
["name"]="crit_time_add",
["buff_type"]=1,
["stack"]=2,
["decr"]=1
["stack"]=2
},
[42]={
["name"]="exp_time_add",
["buff_type"]=7,
["stack"]=2,
["decr"]=1
["stack"]=2
},
[43]={
["name"]="cured_add",
["buff_type"]=1,
["stack"]=2,
["decr"]=1
["stack"]=2
},
[44]={
["name"]="cured_dec",
["buff_type"]=1,
["stack"]=2,
["decr"]=2
},
[45]={
["name"]="add_skill",
["buff_type"]=7,
["stack"]=2,
["decr"]=3
["stack"]=2
},
[46]={
[45]={
["name"]="skill_fire_times",
["buff_type"]=7,
["stack"]=2,
["decr"]=3
["stack"]=2
},
[47]={
[46]={
["name"]="shield_rebound_200",
["buff_type"]=2,
["decr"]=1,
["icon"]="shield",
["fx_continued"]={
11
@ -343,143 +291,74 @@ local buff = {
14
}
},
[48]={
[47]={
["name"]="burn",
["buff_type"]=4,
["stack"]=1,
["decr"]=2,
["formula"]=4
},
[48]={
["name"]="vulnerable",
["buff_type"]=1
},
[49]={
["name"]="vulnerable",
["buff_type"]=1,
["decr"]=2
["name"]="frozen",
["buff_type"]=8
},
[50]={
["name"]="frozen",
["buff_type"]=8,
["decr"]=2
},
[51]={
["name"]="poison",
["buff_type"]=4,
["stack"]=2,
["decr"]=2,
["formula"]=4
["stack"]=2
},
[51]={
["name"]="Imprison",
["buff_type"]=7
},
[52]={
["name"]="Imprison",
["buff_type"]=7,
["decr"]=2
["name"]="corrupt",
["buff_type"]=1
},
[53]={
["name"]="corrupt",
["buff_type"]=1,
["decr"]=2
["name"]="bleed",
["buff_type"]=7
},
[54]={
["name"]="bleed",
["buff_type"]=7,
["decr"]=2,
["formula"]=4
["name"]="weaken",
["buff_type"]=1
},
[55]={
["name"]="weaken",
["buff_type"]=1,
["decr"]=2
},
[56]={
["name"]="lethargy",
["buff_type"]=8,
["stack"]=1,
["decr"]=2
["stack"]=1
},
[56]={
["name"]="curse",
["buff_type"]=7
},
[57]={
["name"]="curse",
["buff_type"]=1,
["decr"]=2
["name"]="lock",
["buff_type"]=7
},
[58]={
["name"]="lock",
["buff_type"]=7,
["decr"]=2
["name"]="first_hand",
["buff_type"]=7
},
[59]={
["name"]="first_hand",
["buff_type"]=1,
["decr"]=1
["name"]="skill_hurt_add",
["buff_type"]=1
},
[60]={
["name"]="skill_hurt_add",
["buff_type"]=1,
["decr"]=1
["name"]="undead",
["buff_type"]=7
},
[61]={
["name"]="undead",
["name"]="counterattack",
["buff_type"]=7,
["decr"]=1
["stack"]=1
},
[62]={
["name"]="counterattack",
["buff_type"]=1,
["stack"]=1,
["decr"]=1
},
[63]={
["name"]="thorns",
["buff_type"]=1,
["decr"]=1
},
[64]={
["name"]="dmg_dec_red_add",
["buff_type"]=1,
["stack"]=2,
["position"]=1,
["decr"]=2
},
[65]={
["name"]="dmg_dec_yellow_add",
["buff_type"]=1,
["stack"]=2,
["position"]=2,
["decr"]=2
},
[66]={
["name"]="dmg_dec_green_add",
["buff_type"]=1,
["stack"]=2,
["position"]=3,
["decr"]=2
},
[67]={
["name"]="dmg_dec_blue_add",
["buff_type"]=1,
["stack"]=2,
["position"]=4,
["decr"]=2
},
[68]={
["name"]="dmg_dec_purple_add",
["buff_type"]=1,
["stack"]=2,
["position"]=5,
["decr"]=2
},
[69]={
["name"]="dmg_dec_all_add",
["buff_type"]=1,
["stack"]=2,
["decr"]=2
},
[70]={
["name"]="be_sucked",
["buff_type"]=1,
["decr"]=2
},
[71]={
["name"]="be_dmg_to_heal",
["buff_type"]=1,
["decr"]=2
["buff_type"]=7
}
}
local keys = {
@ -527,39 +406,30 @@ local keys = {
["crit_time_add"]=buff[41],
["exp_time_add"]=buff[42],
["cured_add"]=buff[43],
["cured_dec"]=buff[44],
["add_skill"]=buff[45],
["skill_fire_times"]=buff[46],
["shield_rebound_200"]=buff[47],
["burn"]=buff[48],
["vulnerable"]=buff[49],
["frozen"]=buff[50],
["poison"]=buff[51],
["Imprison"]=buff[52],
["corrupt"]=buff[53],
["bleed"]=buff[54],
["weaken"]=buff[55],
["lethargy"]=buff[56],
["curse"]=buff[57],
["lock"]=buff[58],
["first_hand"]=buff[59],
["skill_hurt_add"]=buff[60],
["undead"]=buff[61],
["counterattack"]=buff[62],
["thorns"]=buff[63],
["dmg_dec_red_add"]=buff[64],
["dmg_dec_yellow_add"]=buff[65],
["dmg_dec_green_add"]=buff[66],
["dmg_dec_blue_add"]=buff[67],
["dmg_dec_purple_add"]=buff[68],
["dmg_dec_all_add"]=buff[69],
["be_sucked"]=buff[70],
["be_dmg_to_heal"]=buff[71]
["add_skill"]=buff[44],
["skill_fire_times"]=buff[45],
["shield_rebound_200"]=buff[46],
["burn"]=buff[47],
["vulnerable"]=buff[48],
["frozen"]=buff[49],
["poison"]=buff[50],
["Imprison"]=buff[51],
["corrupt"]=buff[52],
["bleed"]=buff[53],
["weaken"]=buff[54],
["lethargy"]=buff[55],
["curse"]=buff[56],
["lock"]=buff[57],
["first_hand"]=buff[58],
["skill_hurt_add"]=buff[59],
["undead"]=buff[60],
["counterattack"]=buff[61],
["thorns"]=buff[62]
}
}
local config = {
data=buff,
keys=keys,
count=71
count=62
}
return config

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8ae000b3de17b394088b2cfc1a04796f
guid: 5124369656d774c49b1c69aae81c3f9e
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 022c70d6a5d937d41b72d559d006efb8
guid: 3f8b7577440284a40a0c05d699d80292
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}

View File

@ -177,6 +177,7 @@ GConst.ATLAS_PATH = {
ICON_SKILL_ROGUE = "assets/arts/atlas/icon/skill_rogue.asset",
ICON_BUFF = "assets/arts/atlas/icon/buff.asset",
BOUNTY = "assets/arts/atlas/ui/bounty.asset",
UI_SETTING = "assets/arts/atlas/ui/setting.asset",
}
GConst.TOUCH_EVENT = {

View File

@ -1453,11 +1453,34 @@ function GFunc.getRewardTable(type, id, count)
return {
type = type,
id = id,
count = {
unit = count.unit,
value = count.value,
count = count
}
end
function GFunc.formatRewardsToServerStruct(rewardList)
local rewards = {}
for _, reward in ipairs(rewardList) do
local serverReward = GFunc.getServerRewardTable(reward.type, reward.id, reward.count)
table.insert(rewards, serverReward)
end
return rewards
end
function GFunc.getServerRewardTable(type, id, count)
if type == GConst.REWARD_TYPE.ITEM then
return GFunc.getServerItemRewardTable(id, count)
end
end
function GFunc.getServerItemRewardTable(id, count)
local reward = {
type = GConst.REWARD_TYPE.ITEM,
item = {
id = id,
count = count
},
}
return reward
end
function GFunc.getServerRuneRewardTable(id, level)

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 62ee7f8438dd807449866595e04c6600
guid: 7d54bbe4cb4f12b40a7468ffd4f3e6c0
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -0,0 +1,41 @@
local CommerceManager = class("CommerceManager", BaseModule)
function CommerceManager:showBuyVitUI()
UIManager:showUI("app/ui/commerce/buy_vit_ui")
end
function CommerceManager:onBuyVit(isFree)
local responseData = {
energy_limit = {
diamond_count = 0,
ad_count = 0
}
}
if isFree then
local reward = ConfigManager:getConfig("const")["stamina_ad_buy"].reward
responseData.rewards = {reward}
self:sendMessage(ProtoMsgType.FromMsgEnum.EnergyByADReq, {}, responseData, self.onBuyBitFinish, BIReport.ITEM_GET_TYPE.ADS_BUY_VIT)
else
local reward = ConfigManager:getConfig("const")["stamina_diamond_buy"].reward
responseData.rewards = {reward}
local cost = ConfigManager:getConfig("const")["stamina_diamond_cost"].reward
responseData.costs = {cost}
self:sendMessage(ProtoMsgType.FromMsgEnum.EnergyByDiamondReq, {}, responseData, self.onBuyBitFinish, BIReport.ITEM_GET_TYPE.GEM_BUY_VIT)
end
end
function CommerceManager:onBuyBitFinish(data)
if data.status ~= 0 then
return
end
if data.costs then -- 钻石购买
DataManager.PlayerData:addVitGemBuyCount()
else -- 激励视频
DataManager.PlayerData:addVitAdBuyCount()
if data.rewards then
GFunc.showRewardBox(data.rewards)
end
end
end
return CommerceManager

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3d6207c01bdc5884b8306334809a2a99
guid: 34276d361623dd54288d830ef1884b98
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}

View File

@ -1,5 +1,9 @@
local GameSettingManager = class("GameSettingManager", BaseModule)
function GameSettingManager:showSelectOtherBtnUI()
UIManager:showUI("app/ui/game_setting/select_other_btn_ui", {aniType = UIManager.ANI_TYPE.NONE})
end
function GameSettingManager:showSettingUI()
UIManager:showUI("app/ui/game_setting/game_setting_ui")
end

View File

@ -56,7 +56,6 @@ function LoginManager:getClientInfo()
return clientInfo
end
function LoginManager:initSocket()
local isConnected = NetManager:isConnected(NetManager.MAIN_SOCKET_NAME)
if EDITOR_MODE then
@ -144,7 +143,7 @@ function LoginManager:loginFinish(data)
data.max_chapter = DataManager.ChapterData:getNewChapterId()
-- data.ads_num = DataManager.PlayerData:getAdCount()
-- data.pay_money = DataManager.PlayerData:getPaymentCount()
data.play_days = DataManager.PlayerData:getLoginDay()
-- data.play_days = DataManager.PlayerData:getLoginDay()
data.now_version = Platform:getClientVersion()
CS.ThinkingAnalytics.ThinkingAnalyticsAPI.UserSet(data)

View File

@ -17,7 +17,6 @@ MainCityConst.BOTTOM_MODULE_KEY = {
MainCityConst.BOTTOM_COUNT = 2
MainCityConst.LEFT_SIDE_BARS = {
"app/ui/main_city/cell/side_bar_setting_cell",
"app/ui/main_city/cell/side_bar_idle_cell",
"app/ui/main_city/cell/side_bar_seven_days_cell",
-- gm放最后一个

View File

@ -1,5 +1,9 @@
local TaskManager = class("TaskManager", BaseModule)
function TaskManager:showTaskMainUI()
UIManager:showUI("app/ui/task/task_main_ui")
end
function TaskManager:registerTask(moduleName, taskType, callback)
if not self.registerTaskInfo then
self.registerTaskInfo = {}

View File

@ -954,44 +954,6 @@ function NetManager:isNotSave(msgName)
end
function NetManager:getNotCheckResponse(msgName)
if not EDITOR_MODE then
return false
end
-- if msgName == ProtoMsgType.FromMsgEnum.LoginReq or
-- msgName == ProtoMsgType.FromMsgEnum.SyncReq or
-- msgName == ProtoMsgType.FromMsgEnum.ArenaInfoReq or
-- msgName == ProtoMsgType.FromMsgEnum.SummonReq or
-- msgName == ProtoMsgType.FromMsgEnum.MineResearchADReq or
-- msgName == ProtoMsgType.FromMsgEnum.MineResearchResultReq or
-- msgName == ProtoMsgType.FromMsgEnum.IdleRewardReq or
-- msgName == ProtoMsgType.FromMsgEnum.IdleExtraRewardReq or
-- msgName == ProtoMsgType.FromMsgEnum.GMReq or
-- msgName == ProtoMsgType.FromMsgEnum.MallPayReq or
-- msgName == ProtoMsgType.FromMsgEnum.ChapterPassReq or
-- msgName == ProtoMsgType.FromMsgEnum.MallPaidResultReq or
-- msgName == ProtoMsgType.FromMsgEnum.MineDoReq or
-- msgName == ProtoMsgType.FromMsgEnum.TaskTutorRewardReq or
-- msgName == ProtoMsgType.FromMsgEnum.BlessingReq or
-- msgName == ProtoMsgType.FromMsgEnum.MarkGuideReq or
-- msgName == ProtoMsgType.FromMsgEnum.EnterDungeonReq or
-- msgName == ProtoMsgType.FromMsgEnum.FinishedArenaReq or
-- msgName == ProtoMsgType.FromMsgEnum.SettleArenaReq or
-- msgName == ProtoMsgType.FromMsgEnum.SevenDayRewardReq or
-- msgName == ProtoMsgType.FromMsgEnum.MonCardRewardReq or
-- msgName == ProtoMsgType.FromMsgEnum.ChapterStageRewardReq or
-- msgName == ProtoMsgType.FromMsgEnum.BattlePassRewardReq or
-- msgName == ProtoMsgType.FromMsgEnum.ChapterRebornReq or
-- msgName == ProtoMsgType.FromMsgEnum.MineReceiveAwardReq or
-- msgName == ProtoMsgType.FromMsgEnum.MailExtractReq or
-- msgName == ProtoMsgType.FromMsgEnum.MailListReq or
-- msgName == ProtoMsgType.FromMsgEnum.MailDeleteReq or
-- msgName == ProtoMsgType.FromMsgEnum.ExistReq or
-- msgName == ProtoMsgType.FromMsgEnum.BindReq or
-- msgName == ProtoMsgType.FromMsgEnum.DeleteReq
-- then
-- return true
-- end
return true
end

View File

@ -5,9 +5,13 @@ local ProtoMsgType = {
[109702075] = "PigLevelDownRsp",
[132242856] = "ChapterSettlementReq",
[132244689] = "ChapterSettlementRsp",
[147147672] = "EnergyByADReq",
[147149505] = "EnergyByADRsp",
[516281556] = "GuideFundMarkReq",
[516283389] = "GuideFundMarkRsp",
[531558517] = "PigPlayUpdateNtf",
[554454681] = "EnergyByDiamondReq",
[554456514] = "EnergyByDiamondRsp",
[565555292] = "MallPayNtf",
[565621982] = "MallPayReq",
[565623815] = "MallPayRsp",
@ -82,9 +86,13 @@ local ProtoMsgType = {
PigLevelDownRsp = 109702075,
ChapterSettlementReq = 132242856,
ChapterSettlementRsp = 132244689,
EnergyByADReq = 147147672,
EnergyByADRsp = 147149505,
GuideFundMarkReq = 516281556,
GuideFundMarkRsp = 516283389,
PigPlayUpdateNtf = 531558517,
EnergyByDiamondReq = 554454681,
EnergyByDiamondRsp = 554456514,
MallPayNtf = 565555292,
MallPayReq = 565621982,
MallPayRsp = 565623815,
@ -159,9 +167,13 @@ local ProtoMsgType = {
PigLevelDownRsp = "PigLevelDownRsp",
ChapterSettlementReq = "ChapterSettlementReq",
ChapterSettlementRsp = "ChapterSettlementRsp",
EnergyByADReq = "EnergyByADReq",
EnergyByADRsp = "EnergyByADRsp",
GuideFundMarkReq = "GuideFundMarkReq",
GuideFundMarkRsp = "GuideFundMarkRsp",
PigPlayUpdateNtf = "PigPlayUpdateNtf",
EnergyByDiamondReq = "EnergyByDiamondReq",
EnergyByDiamondRsp = "EnergyByDiamondRsp",
MallPayNtf = "MallPayNtf",
MallPayReq = "MallPayReq",
MallPayRsp = "MallPayRsp",

8
lua/app/ui/commerce.meta Normal file
View File

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

View File

@ -0,0 +1,106 @@
local BuyVitUI = class("BuyVitUI", BaseUI)
function BuyVitUI:isFullScreen()
return false
end
function BuyVitUI:showCommonBG()
return false
end
function BuyVitUI:getPrefabPath()
return "assets/prefabs/ui/commerce/buy_vit_ui.prefab"
end
function BuyVitUI:onLoadRootComplete()
local uiMap = self.root:genAllChildren()
self.root:addClickListener(function()
self:closeUI()
end)
uiMap["buy_vit_ui.bg.close_btn"]:addClickListener(function()
self:closeUI()
end)
-- uiMap["buy_vit_ui.bg.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.BUY_VIT_DESC_1))
local constCfg = ConfigManager:getConfig("const")
local diamondReward = constCfg["stamina_diamond_buy"].reward
local adReward = constCfg["stamina_ad_buy"].reward
uiMap["buy_vit_ui.bg.cell_1.num_tx"]:setText("x" .. GFunc.getRewardNum(diamondReward))
uiMap["buy_vit_ui.bg.cell_2.num_tx"]:setText("x" .. GFunc.getRewardNum(adReward))
self.descTx1 = uiMap["buy_vit_ui.bg.cell_1.desc_tx"]
self.descTx2 = uiMap["buy_vit_ui.bg.cell_2.desc_tx"]
self.numTx1 = uiMap["buy_vit_ui.bg.cell_1.num_tx_1"]
self.numTx2 = uiMap["buy_vit_ui.bg.cell_2.num_tx_1"]
self.checkImg1 = uiMap["buy_vit_ui.bg.cell_1.check_img"]
self.checkImg2 = uiMap["buy_vit_ui.bg.cell_2.check_img"]
self.iconImg1 = uiMap["buy_vit_ui.bg.cell_1.icon_img_1"]
self.iconImg2 = uiMap["buy_vit_ui.bg.cell_2.icon_img_1"]
self.buyBtn1 = uiMap["buy_vit_ui.bg.cell_1"]
self.buyBtn2 = uiMap["buy_vit_ui.bg.cell_2"]
self.buyBtn1:addClickListener(function()
local diamondCost = constCfg["stamina_diamond_cost"].reward
if not GFunc.checkCost(GFunc.getRewardId(diamondCost), GFunc.getRewardNum(diamondCost), true, BIReport.ITEM_GET_TYPE.BUY_VIT) then
return
end
ModuleManager.CommerceManager:onBuyVit(false)
end)
self.buyBtn2:addClickListener(function()
BIReport:postAdClick(BIReport.ADS_CLICK_TYPE.AD_ENERGY)
SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.AD_ENERGY, function ()
ModuleManager.CommerceManager:onBuyVit(true)
end)
end)
self:bind(DataManager.PlayerData, "vitGemCount", function()
self:onRefresh()
end)
self:bind(DataManager.PlayerData, "vitADCount", function()
self:onRefresh()
end)
end
function BuyVitUI:onRefresh()
local gemBuyCount = DataManager.PlayerData:getVitGemBuyCount()
local adBuyCount = DataManager.PlayerData:getVitAdBuyCount()
local maxGemBuy = GFunc.getConstIntValue("stamina_diamond_times")
local maxAdBuy = GFunc.getConstIntValue("stamina_ad_times")
if gemBuyCount < maxGemBuy then
self.buyBtn1:setTouchEnable(true)
self.checkImg1:setVisible(false)
self.iconImg1:setVisible(true)
self.numTx1:setVisible(true)
else
self.buyBtn1:setTouchEnable(false)
self.checkImg1:setVisible(true)
self.iconImg1:setVisible(false)
self.numTx1:setVisible(false)
end
if adBuyCount < maxAdBuy then
self.buyBtn2:setTouchEnable(true)
self.checkImg2:setVisible(false)
self.iconImg2:setVisible(true)
self.numTx2:setVisible(true)
self.iconImg2:setSprite(GConst.ATLAS_PATH.COMMON, "common_ad", function ()
self.iconImg2:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize()
end)
else
self.buyBtn2:setTouchEnable(false)
self.checkImg2:setVisible(true)
self.iconImg2:setVisible(false)
self.numTx2:setVisible(false)
end
self.descTx1:setText(I18N:getGlobalText(I18N.GlobalConst.BUY_VIT_DESC_2, maxGemBuy - gemBuyCount))
self.descTx2:setText(I18N:getGlobalText(I18N.GlobalConst.BUY_VIT_DESC_2, maxAdBuy - adBuyCount))
local constCfg = ConfigManager:getConfig("const")
local diamondCost = constCfg["stamina_diamond_cost"].reward
self.numTx1:setText(tostring(GFunc.getRewardNum(diamondCost)))
self.numTx2:setText((maxAdBuy - adBuyCount) .. "/" .. GFunc.getConstIntValue("stamina_ad_times"))
end
return BuyVitUI

View File

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

View File

@ -31,14 +31,18 @@ function ResourceCell:show(itemId, hideAddImg)
self:refreshTextRightNow()
end)
self.baseObject:removeClickListener()
if itemId == GConst.ItemConst.ITEM_ID_VIT then
self.baseObject:addClickListener(function()
ModuleManager.CommerceManager:showBuyVitUI()
end)
self.addImg:setVisible(true)
self.timeTx:setVisible(true)
else
self.baseObject:removeClickListener()
self.addImg:setVisible(false)
self.timeTx:setVisible(false)
end
self.itemId = itemId
self.addImg:setVisible(false) -- 没有来源,直接隐藏
end
function ResourceCell:updateTime()

View File

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

View File

@ -0,0 +1,17 @@
local LanguageCell = class("LanguageCell", BaseCell)
function LanguageCell:refresh(language)
local uiMap = self:getUIMap()
if language == I18N:getCurLanguage() then
uiMap["language_cell.bg"]:setSprite(GConst.ATLAS_PATH.COMMON, "common_board_12")
else
uiMap["language_cell.bg"]:setSprite(GConst.ATLAS_PATH.COMMON, "common_board_3")
end
uiMap["language_cell.name_bg"]:setSprite(GConst.ATLAS_PATH.UI_SETTING, "language_" .. language)
end
function LanguageCell:addClickListener(func)
self:getBaseObject():addClickListener(func)
end
return LanguageCell

View File

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

View File

@ -1,14 +1,5 @@
local GameSettingUI = class("GameSettingUI", BaseUI)
local BG_HEIGHT = {
NORMAL = 930,
[GConst.LANGUAGE.VIETNAMESE] = 812
}
local SWITCH_TX_COLOR = "#707390"
local IOS_ICON = "setting_decoration_8"
local GOOGLE_ICON = "setting_decoration_9"
local CHECK_WHITE_LIST_COUNT = 5
function GameSettingUI:ctor()
@ -24,6 +15,7 @@ function GameSettingUI:getPrefabPath()
end
function GameSettingUI:onLoadRootComplete()
self.uiMap = self.root:genAllChildren()
self:_display()
self:_addListeners()
self:_bind()
@ -34,44 +26,51 @@ function GameSettingUI:onPressBackspace()
end
function GameSettingUI:_display()
local uiMap = self.root:genAllChildren()
uiMap["game_setting_ui.bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC))
uiMap["game_setting_ui.bg.support_btn.status"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUPPORT_DESSC))
uiMap["game_setting_ui.bg.player_id_btn.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.COPY_ID))
uiMap["game_setting_ui.bg.exchange_btn.status"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC_1))
self.uiMap["game_setting_ui.bg.title"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC))
self.uiMap["game_setting_ui.bg.music_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC_MUSIC))
self.uiMap["game_setting_ui.bg.voice_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC_VOICE))
self.uiMap["game_setting_ui.bg.language_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC_LANGUAGE))
self.uiMap["game_setting_ui.bg.tx_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.SERVICE_DESC))
self.uiMap["game_setting_ui.bg.tx_2"]:setText(I18N:getGlobalText(I18N.GlobalConst.PRIVACY_DESC))
local version = CS.BF.BFMain.Instance.GameLaunchMgr:GetCurrentVersion()
self.uiMap["game_setting_ui.bg.version_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.CLIENT_VERSION, version))
local language = I18N:getCurLanguage()
uiMap["game_setting_ui.bg.language_btn.status"]:setSprite(GConst.ATLAS_PATH.UI_SETTING, "language_" .. language)
if CS.BF.BFMain.IsShenhe then
uiMap["game_setting_ui.bg.bg"]:setVisible(false)
end
uiMap["game_setting_ui.bg.tx_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.SERVICE_DESC))
uiMap["game_setting_ui.bg.tx_2"]:setText(I18N:getGlobalText(I18N.GlobalConst.PRIVACY_DESC))
self.helpNode = uiMap["game_setting_ui.help_node"]
local helpTipsBG = uiMap["game_setting_ui.help_node.help_tips"]
local helpTips = uiMap["game_setting_ui.help_node.help_tips.desc"]
helpTips:setText(I18N:getGlobalText(I18N.GlobalConst.BIND_INFO_TIPS))
local h = helpTips:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredHeight
helpTips:setSizeDeltaY(h)
helpTipsBG:setSizeDeltaY(h + 39)
self.helpNode:setActive(false)
self.uiMap["game_setting_ui.bg.language_btn.status"]:setSprite(GConst.ATLAS_PATH.UI_SETTING, "language_" .. language)
local acountId = DataManager.PlayerData:getAcountId() or GConst.EMPTY_STRING
self.uiMap["game_setting_ui.bg.player_bg.player_id"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC_1, acountId))
self:initLoginBtn()
self:refreshMusic()
self:refreshVoice()
end
self:refreshShenhe()
self:refreshBGHeight()
function GameSettingUI:initLoginBtn()
self.uiMap["game_setting_ui.bg.google_sign_btn"]:addClickListener(function()
end)
if DataManager.PlayerData:getIsBinded() then
self.uiMap["game_setting_ui.bg.google_sign_btn.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.ACCOUNT_ALREADY_BINDED_DESC))
else
self.uiMap["game_setting_ui.bg.google_sign_btn.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.BIND_ACCOUNT_DESC))
end
self.uiMap["game_setting_ui.bg.google_switch_btn"]:addClickListener(function()
end)
self.uiMap["game_setting_ui.bg.google_switch_btn.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.CHANGE_ACCOUNT_DESC))
local deleteTx = self.uiMap["game_setting_ui.bg.delete_tx"]
deleteTx:setText(I18N:getGlobalText(I18N.GlobalConst.DELETE_ACCOUNT_DESC))
deleteTx:addClickListener(function()
end)
end
function GameSettingUI:_addListeners()
local uiMap = self.root:genAllChildren()
uiMap["game_setting_ui.bg.close_btn"]:addClickListener(function()
self.uiMap["game_setting_ui.bg.close_btn"]:addClickListener(function()
self:closeUI()
end)
uiMap["game_setting_ui.bg.music_bg"]:addClickListener(function()
self.uiMap["game_setting_ui.bg.music_bg"]:addClickListener(function()
local status = AudioManager:isMusicEnabled()
if not status then
AudioManager:setMusicVolume(1)
@ -82,14 +81,14 @@ function GameSettingUI:_addListeners()
if CS.BF.BFMain.IsWhite then
self.clickMusicCount = self.clickMusicCount + 1
if self.clickMusicCount > CHECK_WHITE_LIST_COUNT then
GFunc.showToast("Please dont frequently operate")
GFunc.showToast("Please don't frequently operate")
end
end
self:refreshMusic()
end)
uiMap["game_setting_ui.bg.voice_bg"]:addClickListener(function()
self.uiMap["game_setting_ui.bg.voice_bg"]:addClickListener(function()
local status = AudioManager:isEffectEnabled()
if not status then
AudioManager:setEffectVolume(1)
@ -99,65 +98,30 @@ function GameSettingUI:_addListeners()
self:refreshVoice()
end)
uiMap["game_setting_ui.bg.language_btn"]:addClickListener(function()
self.uiMap["game_setting_ui.bg.language_btn"]:addClickListener(function()
ModuleManager.GameSettingManager:showLanguageUI()
end)
uiMap["game_setting_ui.bg.support_btn"]:addClickListener(function()
ModuleManager.GameSettingManager:sendSupport()
DataManager.AiHelpData:setUnreadCount()
self.uiMap["game_setting_ui.bg.player_bg.player_id_btn"]:addClickListener(function()
local acountId = DataManager.PlayerData:getAcountId() or GConst.EMPTY_STRING
GFunc.copyStr(acountId)
end)
uiMap["game_setting_ui.bg.player_id_btn"]:addClickListener(function()
-- GFunc.copyStr(objectId)
end)
uiMap["game_setting_ui.bg.bg.facebook"]:addClickListener(function()
local url = GConst.GameSettingConst.SOCIAL_URL[I18N:getCurLanguage()]
if not url then
url = GConst.GameSettingConst.SOCIAL_URL.normal
end
GFunc.openUrl(url)
end)
uiMap["game_setting_ui.bg.bg.discord"]:addClickListener(function()
local url = GConst.GameSettingConst.COMMUNITY_URL[I18N:getCurLanguage()]
if not url then
url = GConst.GameSettingConst.COMMUNITY_URL.normal
end
GFunc.openUrl(url)
end)
uiMap["game_setting_ui.bg.exchange_btn"]:addClickListener(function()
ModuleManager.GameSettingManager:showCdkeyUI()
end)
uiMap["game_setting_ui.bg.tx_1"]:addClickListener(function()
self.uiMap["game_setting_ui.bg.tx_1"]:addClickListener(function()
GFunc.openUrl("https://cobbygame.com/tos.html")
end)
uiMap["game_setting_ui.bg.tx_2"]:addClickListener(function()
self.uiMap["game_setting_ui.bg.tx_2"]:addClickListener(function()
GFunc.openUrl("https://www.cobbygame.com/pp.html")
end)
uiMap["game_setting_ui.bg.point"]:addClickListener(function()
if self.helpNode then
self.helpNode:setActive(true)
end
end)
self.helpNode:addClickListener(function()
self.helpNode:setActive(false)
end)
end
function GameSettingUI:_bind()
end
function GameSettingUI:refreshMusic()
local uiMap = self.root:genAllChildren()
local offIcon = uiMap["game_setting_ui.bg.music_bg.off"]
local onIcon = uiMap["game_setting_ui.bg.music_bg.on"]
local offIcon = self.uiMap["game_setting_ui.bg.music_bg.off"]
local onIcon = self.uiMap["game_setting_ui.bg.music_bg.on"]
local status = AudioManager:isMusicEnabled()
offIcon:setVisible(status ~= true)
@ -165,37 +129,12 @@ function GameSettingUI:refreshMusic()
end
function GameSettingUI:refreshVoice()
local uiMap = self.root:genAllChildren()
local offIcon = uiMap["game_setting_ui.bg.voice_bg.off"]
local onIcon = uiMap["game_setting_ui.bg.voice_bg.on"]
local offIcon = self.uiMap["game_setting_ui.bg.voice_bg.off"]
local onIcon = self.uiMap["game_setting_ui.bg.voice_bg.on"]
local status = AudioManager:isEffectEnabled()
offIcon:setVisible(status ~= true)
onIcon:setVisible(status == true)
end
function GameSettingUI:refreshShenhe()
local uiMap = self.root:genAllChildren()
local codeBtn = uiMap["game_setting_ui.bg.exchange_btn"]
local codeBg = uiMap["game_setting_ui.bg.exchange_bg"]
local supportBtn = uiMap["game_setting_ui.bg.support_btn"]
local supportBg = uiMap["game_setting_ui.bg.support_bg"]
codeBtn:setActive(not GFunc.isShenhe())
codeBg:setActive(not GFunc.isShenhe())
supportBtn:setActive(not GFunc.isShenhe())
supportBg:setActive(not GFunc.isShenhe())
end
function GameSettingUI:refreshBGHeight()
local uiMap = self.root:genAllChildren()
local bg = uiMap["game_setting_ui.bg"]
local communityBg = uiMap["game_setting_ui.bg.bg"]
local h = BG_HEIGHT[I18N:getCurLanguage()]
h = h or BG_HEIGHT.NORMAL
bg:setSizeDeltaY(h)
communityBg:setVisible(BG_HEIGHT[I18N:getCurLanguage()] == nil)
end
return GameSettingUI

View File

@ -0,0 +1,67 @@
local LanguageUI = class("LanguageUI", BaseUI)
local LANGUAGE_CELL = "app/ui/game_setting/cell/language_cell"
function LanguageUI:isFullScreen()
return false
end
function LanguageUI:ctor()
self.languageList = I18N:getSupportLanguageList()
end
function LanguageUI:getPrefabPath()
return "assets/prefabs/ui/setting/language_ui.prefab"
end
function LanguageUI:onLoadRootComplete()
self.uiMap = self.root:genAllChildren()
self:_display()
self:_addListeners()
self:refreshScrollRect()
end
function LanguageUI:_display()
local titleTx = self.uiMap["language_ui.bg.title_tx"]
titleTx:setText(I18N:getGlobalText(I18N.GlobalConst.LANGUAGE_DESC))
end
function LanguageUI:_addListeners()
local closeBtn = self.uiMap["language_ui.bg.close_btn"]
closeBtn:addClickListener(function()
self:closeUI()
end)
end
function LanguageUI:refreshScrollRect()
local scroll = self.uiMap["language_ui.bg.scrollrect"]
self.scrollRect = scroll:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
self.scrollRect:addInitCallback(function()
return LANGUAGE_CELL
end)
self.scrollRect:addRefreshCallback(function(index, cell)
local language = self.languageList[index]
cell:refresh(language)
cell:addClickListener(function()
self:closeUI()
local changeStatus = I18N:setLanguage(language)
if changeStatus then
local FontManager = require "app/common/font_manager"
FontManager:changeLanguage(I18N:getCurLanguage() or GConst.LANGUAGE.ENGLISH, function()
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.I18N_CHANGE_LANGUAGE)
UIManager:closeAllUI()
UIManager:hideToastAndMessageBox()
UIManager:clearUIPrefabCache()
UIManager:refreshOnChangeLanguage()
ModuleManager.MaincityManager:showMainCityUI()
end)
end
end)
end)
self.scrollRect:clearCells()
self.scrollRect:refillCells(#self.languageList)
end
return LanguageUI

View File

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

View File

@ -0,0 +1,31 @@
local SelectOtherBtnUI = class("SelectOtherBtnUI", BaseUI)
function SelectOtherBtnUI:ctor()
end
function SelectOtherBtnUI:isFullScreen()
return false
end
function SelectOtherBtnUI:getPrefabPath()
return "assets/prefabs/ui/setting/select_other_btn_ui.prefab"
end
function SelectOtherBtnUI:onLoadRootComplete()
self.uiMap = self.root:genAllChildren()
self.uiMap["select_other_btn_ui.mask"]:addClickListener(function()
self:closeUI()
end)
self.uiMap["select_other_btn_ui.bg.mail_btn"]:addClickListener(function()
self:closeUI()
end)
self.uiMap["select_other_btn_ui.bg.mail_btn.text"]:setText("临时文本:邮箱")
self.uiMap["select_other_btn_ui.bg.setting_btn"]:addClickListener(function()
self:closeUI()
ModuleManager.GameSettingManager:showSettingUI()
end)
self.uiMap["select_other_btn_ui.bg.setting_btn.text"]:setText("临时文本:设置")
end
return SelectOtherBtnUI

View File

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

View File

@ -1,16 +0,0 @@
local SideBarBaseCellComp = require "app/ui/main_city/cell/side_bar_base_cell"
local SideBarSettingCell = class("SideBarMailCell", SideBarBaseCellComp)
function SideBarSettingCell:getIsOpen()
return true
end
function SideBarSettingCell:getIconRes()
return "maincity_gm"
end
function SideBarSettingCell:onClick()
ModuleManager.GameSettingManager:showSettingUI()
end
return SideBarSettingCell

View File

@ -416,6 +416,7 @@ end
function MainCityUI:initTask()
self.taskBtn = self.uiMap["main_ui.top_node.task_btn"]
self.taskBtn:addClickListener(function()
ModuleManager.TaskManager:showTaskMainUI()
end)
end
@ -427,6 +428,7 @@ end
function MainCityUI:initSetting()
self.settingbtn = self.uiMap["main_ui.top_node.setting_btn"]
self.settingbtn:addClickListener(function()
ModuleManager.GameSettingManager:showSelectOtherBtnUI()
end)
end
@ -436,6 +438,7 @@ end
function MainCityUI:refreshTopNode()
self:refreshBounty()
self:refreshTask()
end
function MainCityUI:refreshBounty()
@ -449,6 +452,15 @@ function MainCityUI:refreshBounty()
self.bountyBanner:setSprite(GConst.ATLAS_PATH.BOUNTY, bannerName)
end
function MainCityUI:refreshTask()
local isOpen = DataManager.TaskData:getIsOpen()
if not isOpen then
self.taskBtn:setVisible(false)
return
end
self.taskBtn:setVisible(true)
end
function MainCityUI:switchComp(index)
index = index or self.selectedIndex
for i, comp in pairs(self.subComps) do

8
lua/app/ui/task.meta Normal file
View File

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

View File

@ -0,0 +1,21 @@
local TaskMainUI = class("TaskMainUI", BaseUI)
function TaskMainUI:ctor()
end
function TaskMainUI:isFullScreen()
return false
end
function TaskMainUI:getPrefabPath()
return "assets/prefabs/ui/task/task_main_ui.prefab"
end
function TaskMainUI:onLoadRootComplete()
self.uiMap = self.root:genAllChildren()
self.uiMap["task_main_ui.bg.close_btn"]:addClickListener(function()
self:closeUI()
end)
end
return TaskMainUI

View File

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

View File

@ -1,7 +1,5 @@
local BagData = class("BagData", BaseData)
local ItemConst = require "app/module/item/item_const"
BagData.RECOVERY_TYPE = {
TIMELY = 1,
DAILY = 2,

View File

@ -39,12 +39,12 @@ function ItemData:init(data)
self.recoveryMap = {}
if data.recoveries then
local recoveryCfg = ConfigManager:getConfig("recovery")
for k, v in ipairs(data.recoveries) do
for k, v in pairs(data.recoveries) do
local recoveryInfo = recoveryCfg[v.id]
if recoveryInfo then
local obj = {
id = v.id,
ts = v.ts,
ts = v.ts // 1000,
limit = recoveryInfo.limit,
recoveryType = recoveryInfo.type,
time = recoveryInfo.time
@ -264,6 +264,16 @@ function ItemData:resetItemRecoveryTime(itemId)
local obj = self.recoveryMap[itemId]
if obj then
obj.ts = Time:getServerTime()
-- else
-- local obj = {
-- id = v.id,
-- ts = v.ts // 1000,
-- limit = recoveryInfo.limit,
-- recoveryType = recoveryInfo.type,
-- time = recoveryInfo.time
-- }
-- self.recoveryMap[v.id] = obj
-- table.insert(self.recoveryList, obj)
end
end

View File

@ -223,14 +223,16 @@ function ChapterData:getIsHaveRewardsMinId()
break
end
chapterBefore = chapterInfo.next_chapter
if chapterBefore == nil then
break
end
if chapterBefore == self.data.maxChapterId then
chapterBefore = self:getNextChapter(self.data.maxChapterId)
break
end
chapterBefore = chapterInfo.next_chapter
if chapterBefore == nil then
break
end
chapterInfo = chapterCfg[chapterBefore]
if chapterInfo == nil then
break

View File

@ -3,15 +3,13 @@ local FormationData = class("FormationData", BaseData)
function FormationData:init(data)
self.data.dirty = false
self.formations = {}
-- 目前只有主线关卡的
if data and data.heroes then
-- for formationType, formation in pairs(data.heroes) do
local clientFormation = {}
-- self.formations[formationType] = clientFormation
self.formations[GConst.BattleConst.BATTLE_TYPE.STAGE] = clientFormation -- 暂时写死
for matchType, heroId in pairs(data.heroes) do
clientFormation[matchType] = heroId
clientFormation[tonumber(matchType)] = heroId
end
-- end
self.formations[GConst.BattleConst.BATTLE_TYPE.STAGE] = clientFormation
end
end

View File

@ -1,8 +1,6 @@
local HeroEntity = require "app/userdata/hero/hero_entity"
local HeroData = class("HeroData", BaseData)
local HERO_CFG = ConfigManager:getConfig("hero")
function HeroData:ctor()
self.heroes = {}
self.data.activeCount = 0
@ -22,7 +20,8 @@ function HeroData:init(data)
end
end
for heroId, info in pairs(HERO_CFG) do
local heroCfg = ConfigManager:getConfig("hero")
for heroId, info in pairs(heroCfg) do
local entity = self:getHeroById(heroId)
if entity:isActived() then
local matchType = entity:getMatchType()

View File

@ -1,11 +1,17 @@
local PlayerData = class("PlayerData", BaseData)
function PlayerData:init(data)
data = data or {}
self.data.level = data.level or 1
local basicInfo = data.basic_info or GConst.EMPTY_TABLE
self.data.level = basicInfo.level or 1
self.data.exp = basicInfo.exp or 0
self.data.dirty = false
self.loginDay = data.loginDay or 1
self.lastLoginTime = data.lastLoginTime or Time:getBeginningOfServerToday()
self.data.payAmount = basicInfo.pay_amount or 0
local energyLimit = data.energyLimit or GConst.EMPTY_TABLE
self.data.vitGemCount = energyLimit.diamond_count or 0
self.data.vitADCount = energyLimit.ad_count or 0
self.lastLoginTime = basicInfo.lastLoginTime or Time:getBeginningOfServerToday()
end
function PlayerData:setVit(vit)
@ -31,8 +37,35 @@ function PlayerData:getExpPercent()
return 0
end
function PlayerData:getLoginDay()
return self.loginDay
function PlayerData:getAccountInfo()
if not self.accountInfo then
self.accountInfo = LocalData:getAccountInfo()
end
return self.accountInfo
end
function PlayerData:getAcountId()
return self:getAccountInfo().id or GConst.EMPTY_STRING
end
function PlayerData:getIsBinded()
return false
end
function PlayerData:addVitGemBuyCount()
self.data.vitGemCount = self.data.vitGemCount + 1
end
function PlayerData:addVitAdBuyCount()
self.data.vitADCount = self.data.vitADCount + 1
end
function PlayerData:getVitGemBuyCount()
return self.data.vitGemCount
end
function PlayerData:getVitAdBuyCount()
return self.data.vitADCount
end
return PlayerData

View File

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

View File

@ -0,0 +1,10 @@
local TaskData = class("TaskData", BaseData)
function TaskData:init(data)
end
function TaskData:getIsOpen()
return ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.TASK, true)
end
return TaskData

View File

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