This commit is contained in:
chenxi 2023-05-18 22:09:43 +08:00
parent a1e98528ca
commit b6da2f4bd6
24 changed files with 634 additions and 56 deletions

View File

@ -814,6 +814,56 @@ local hero = {
[43002]={
["position"]=4,
["qlt"]=3,
["hurt_skill"]={
4300210,
4300211,
4300212,
4300213
},
["base_skill"]=4300220,
["rouge_skill"]=4300300,
["rouge_skill_1"]=4300301,
["rouge_skill_2"]=4300302,
["rouge_skill_3"]=4300303,
["rouge_skill_4"]=4300304,
["rouge_skill_5"]=4300305,
["rouge_skill_6"]=4300306,
["rouge_skill_7"]=4300307,
["begin_lv"]=3,
["hp"]={
2000000,
2400000,
2800000,
3220000,
3660000,
4120000,
4620000,
5160000,
5760000,
6420000,
7140000,
7940000,
8840000,
9840000,
10980000
},
["atk"]={
1000000,
1200000,
1400000,
1610000,
1830000,
2060000,
2310000,
2580000,
2880000,
3210000,
3570000,
3970000,
4420000,
4920000,
5490000
},
["model_id"]="p0003",
["icon"]="3",
["item_id"]=43002,
@ -934,9 +984,67 @@ local hero = {
["icon"]="4",
["item_id"]=52001,
["unlock_chapter"]=1
},
[53001]={
["position"]=5,
["qlt"]=3,
["hurt_skill"]={
5200110,
5200111,
5200112,
5200113
},
["base_skill"]=5200120,
["rouge_skill"]=5200100,
["rouge_skill_1"]=5200101,
["rouge_skill_2"]=5200102,
["rouge_skill_3"]=5200103,
["rouge_skill_4"]=5200104,
["rouge_skill_5"]=5200105,
["rouge_skill_6"]=5200106,
["rouge_skill_7"]=5200107,
["begin_lv"]=3,
["hp"]={
2000000,
2400000,
2800000,
3220000,
3660000,
4120000,
4620000,
5160000,
5760000,
6420000,
7140000,
7940000,
8840000,
9840000,
10980000
},
["atk"]={
1000000,
1200000,
1400000,
1610000,
1830000,
2060000,
2310000,
2580000,
2880000,
3210000,
3570000,
3970000,
4420000,
4920000,
5490000
},
["model_id"]="p0004",
["icon"]="4",
["item_id"]=53001,
["unlock_chapter"]=1
}
}
local config = {
data=hero,count=17
data=hero,count=18
}
return config

View File

@ -293,6 +293,11 @@ local item = {
}
}
},
[19]={
["type"]=2,
["qlt"]=1,
["icon"]="19"
},
[12001]={
["type"]=5,
["parameter"]=12001,
@ -367,6 +372,6 @@ local item = {
}
}
local config = {
data=item,count=30
data=item,count=31
}
return config

View File

@ -3053,6 +3053,7 @@ local skill = {
["boardrange"]={
},
["battle_icon"]="8",
["effect_type"]=1,
["trigger"]=1,
["effect"]={
@ -3157,6 +3158,190 @@ local skill = {
["name_act"]="attack01",
["fx_target"]=300009
},
[4300211]={
["position"]=4,
["effect_type"]=1,
["trigger"]=1,
["effect"]={
{
["type"]="hurt_blue",
["num"]=10000,
["ratio"]=10000,
["round"]=0
}
},
["obj"]=2,
["skill_position"]=2,
["shake_time"]=100,
["shake_type"]=1,
["sound_hit"]=4200112,
["name_act"]="attack02",
["fx_target"]=300010
},
[4300212]={
["position"]=4,
["effect_type"]=1,
["trigger"]=1,
["effect"]={
{
["type"]="hurt_blue",
["num"]=10000,
["ratio"]=10000,
["round"]=0
}
},
["obj"]=2,
["skill_position"]=2,
["shake_time"]=100,
["shake_type"]=1,
["sound_hit"]=4200113,
["name_act"]="attack03",
["fx_target"]=300011
},
[4300213]={
["position"]=4,
["effect_type"]=1,
["trigger"]=1,
["effect"]={
{
["type"]="hurt_blue",
["num"]=10000,
["ratio"]=10000,
["round"]=0
}
},
["obj"]=2,
["skill_position"]=2,
["shake_time"]=100,
["shake_type"]=1,
["sound_hit"]=4200114,
["name_act"]="attack04",
["fx_target"]=300012
},
[4300220]={
["energy"]=10,
["link"]=1,
["position"]=4,
["method"]=2,
["skill_type"]=4,
["boardrange"]={
},
["battle_icon"]="8",
["effect_type"]=1,
["trigger"]=1,
["effect"]={
{
["type"]="hurt_blue",
["num"]=40000,
["ratio"]=10000,
["round"]=0
},
{
["type"]="corrupt",
["num"]=5000,
["ratio"]=10000,
["round"]=1
}
},
["obj"]=2,
["skill_position"]=2,
["shake_time"]=200,
["shake_type"]=6,
["sound_hit"]=4200120,
["name_act"]="skill01",
["fx_target"]=300011
},
[4300221]={
["position"]=4,
["buff_condition"]={
{
{
["type"]="state",
["attr"]="vulnerable",
["op"]=">",
["v"]=0,
["side"]=2
}
}
},
["condition_rel"]={
{
1,
1
}
},
["effect_type"]=2,
["trigger"]=6,
["effect"]={
{
["type"]="normal_attack_dec",
["num"]=1,
["ratio"]=10000,
["round"]=1
}
},
["obj"]=2
},
[4300222]={
["position"]=4,
["buff_condition"]={
{
{
["type"]="state",
["attr"]="vulnerable",
["op"]=">",
["v"]=0,
["side"]=2
}
}
},
["condition_rel"]={
{
1,
1
}
},
["effect_type"]=2,
["trigger"]=6,
["effect"]={
{
["type"]="normal_attack_dec",
["num"]=2,
["ratio"]=10000,
["round"]=1
}
},
["obj"]=2
},
[4300223]={
["position"]=4,
["effect_type"]=2,
["trigger"]=6,
["effect"]={
{
["type"]="weaken",
["num"]=2500,
["ratio"]=10000,
["round"]=2
}
},
["obj"]=2
},
[4300224]={
["position"]=4,
["effect_type"]=2,
["trigger"]=6,
["effect"]={
{
["type"]="weaken",
["num"]=2500,
["ratio"]=10000,
["round"]=4
}
},
["obj"]=2
},
[4400110]={
["position"]=4,
["effect_type"]=1,
@ -5133,6 +5318,6 @@ local skill = {
}
}
local config = {
data=skill,count=238
data=skill,count=246
}
return config

View File

@ -2356,7 +2356,8 @@ local skill_rogue = {
["limit_times"]=1,
["weight"]=3000,
["qlt"]=4,
["type"]=6
["type"]=6,
["icon"]="57"
},
[4300101]={
["limit_times"]=1,
@ -2381,7 +2382,8 @@ local skill_rogue = {
["type"]=4,
["range"]=1
}
}
},
["icon"]="39"
},
[4300102]={
["limit_times"]=1,
@ -2396,7 +2398,9 @@ local skill_rogue = {
["ratio"]=10000,
["round"]=1
}
}
},
["obj"]=6,
["icon"]="38"
},
[4300103]={
["limit_times"]=1,
@ -2407,7 +2411,8 @@ local skill_rogue = {
2,
1
},
["skill_position"]=4
["skill_position"]=4,
["icon"]="45"
},
[4300104]={
["limit_times"]=1,
@ -2418,7 +2423,8 @@ local skill_rogue = {
1,
30000
},
["skill_position"]=4
["skill_position"]=4,
["icon"]="39"
},
[4300105]={
["limit_times"]=1,
@ -2433,7 +2439,9 @@ local skill_rogue = {
["ratio"]=10000,
["round"]=1
}
}
},
["obj"]=6,
["icon"]="38"
},
[4300106]={
["limit_times"]=1,
@ -2448,7 +2456,9 @@ local skill_rogue = {
["ratio"]=10000,
["round"]=1
}
}
},
["obj"]=6,
["icon"]="45"
},
[4300107]={
["unlock"]=4300106,
@ -2465,16 +2475,35 @@ local skill_rogue = {
["ratio"]=10000,
["round"]=1
}
}
},
["obj"]=6,
["icon"]="39"
},
[4300300]={
["limit_times"]=1
["limit_times"]=1,
["icon"]="57"
},
[4300301]={
["limit_times"]=1
["limit_times"]=1,
["type"]=8,
["parameter"]={
2,
1
},
["icon"]="39"
},
[4300302]={
["limit_times"]=1
["limit_times"]=1,
["effect"]={
{
["type"]="add_skill",
["num"]=4300221,
["ratio"]=10000,
["round"]=1
}
},
["obj"]=6,
["icon"]="38"
},
[4300303]={
["limit_times"]=1,
@ -2491,13 +2520,35 @@ local skill_rogue = {
}
},
["obj"]=1,
["icon"]="44"
["icon"]="45"
},
[4300304]={
["limit_times"]=1
["unlock"]=4300302,
["cover_unlock"]=4300302,
["limit_times"]=1,
["effect"]={
{
["type"]="add_skill",
["num"]=4300222,
["ratio"]=10000,
["round"]=1
}
},
["obj"]=6,
["icon"]="39"
},
[4300305]={
["limit_times"]=1
["limit_times"]=1,
["effect"]={
{
["type"]="add_skill",
["num"]=4300223,
["ratio"]=10000,
["round"]=1
}
},
["obj"]=6,
["icon"]="38"
},
[4300306]={
["limit_times"]=1,
@ -2522,10 +2573,23 @@ local skill_rogue = {
["type"]=4,
["range"]=1
}
}
},
["icon"]="45"
},
[4300307]={
["limit_times"]=1
["unlock"]=4300305,
["cover_unlock"]=4300305,
["limit_times"]=1,
["effect"]={
{
["type"]="add_skill",
["num"]=4300224,
["ratio"]=10000,
["round"]=1
}
},
["obj"]=6,
["icon"]="39"
},
[4400100]={
["limit_times"]=1,

View File

@ -28,16 +28,20 @@ local item = {
["desc"]="累计积分可提升通行证等级。"
},
[8]={
["name"]="木箱(优秀,稀有)"
["name"]="木箱(优秀,稀有)",
["desc"]="木箱(优秀,稀有)"
},
[9]={
["name"]="木箱2优秀稀有"
["name"]="木箱2优秀稀有",
["desc"]="木箱2优秀稀有"
},
[10]={
["name"]="金箱(优秀,稀有)"
["name"]="金箱(优秀,稀有)",
["desc"]="金箱(优秀,稀有)"
},
[11]={
["name"]="铂金箱(稀有,史诗)"
["name"]="铂金箱(稀有,史诗)",
["desc"]="铂金箱(稀有,史诗)"
},
[12]={
["name"]="经验",
@ -63,6 +67,14 @@ local item = {
["name"]="广告累计宝箱",
["desc"]="你可以在游戏种任何地点看广告,获得奖励"
},
[18]={
["name"]="铂金箱(稀有,史诗)",
["desc"]="铂金箱(稀有,史诗)"
},
[19]={
["name"]="随机碎片",
["desc"]="挂机可获得随机碎片,领取后数量和品质将根据关卡提升。"
},
[12001]={
["name"]="红R舞女碎片",
["desc"]="凑齐可解锁或升级。"
@ -113,6 +125,6 @@ local item = {
}
}
local config = {
data=item,count=29
data=item,count=31
}
return config

View File

@ -52,6 +52,12 @@ local item = {
},
[17]={
},
[18]={
},
[19]={
},
[12001]={
@ -91,6 +97,6 @@ local item = {
}
}
local config = {
data=item,count=29
data=item,count=31
}
return config

View File

@ -55,6 +55,12 @@ local item = {
},
[17]={
},
[18]={
},
[19]={
},
[12001]={
["name"]="Roxy Shard",
@ -102,6 +108,6 @@ local item = {
}
}
local config = {
data=item,count=29
data=item,count=31
}
return config

View File

@ -52,6 +52,12 @@ local item = {
},
[17]={
},
[18]={
},
[19]={
},
[12001]={
@ -91,6 +97,6 @@ local item = {
}
}
local config = {
data=item,count=29
data=item,count=31
}
return config

View File

@ -52,6 +52,12 @@ local item = {
},
[17]={
},
[18]={
},
[19]={
},
[12001]={
@ -91,6 +97,6 @@ local item = {
}
}
local config = {
data=item,count=29
data=item,count=31
}
return config

View File

@ -52,6 +52,12 @@ local item = {
},
[17]={
},
[18]={
},
[19]={
},
[12001]={
@ -91,6 +97,6 @@ local item = {
}
}
local config = {
data=item,count=29
data=item,count=31
}
return config

View File

@ -52,6 +52,12 @@ local item = {
},
[17]={
},
[18]={
},
[19]={
},
[12001]={
@ -91,6 +97,6 @@ local item = {
}
}
local config = {
data=item,count=29
data=item,count=31
}
return config

View File

@ -51,6 +51,12 @@ local item = {
},
[17]={
},
[18]={
},
[19]={
},
[12001]={
@ -90,6 +96,6 @@ local item = {
}
}
local config = {
data=item,count=29
data=item,count=31
}
return config

View File

@ -49,6 +49,12 @@ local item = {
},
[17]={
},
[18]={
},
[19]={
},
[12001]={
@ -88,6 +94,6 @@ local item = {
}
}
local config = {
data=item,count=29
data=item,count=31
}
return config

View File

@ -49,6 +49,12 @@ local item = {
},
[17]={
},
[18]={
},
[19]={
},
[12001]={
@ -88,6 +94,6 @@ local item = {
}
}
local config = {
data=item,count=29
data=item,count=31
}
return config

View File

@ -52,6 +52,12 @@ local item = {
},
[17]={
},
[18]={
},
[19]={
},
[12001]={
@ -91,6 +97,6 @@ local item = {
}
}
local config = {
data=item,count=29
data=item,count=31
}
return config

View File

@ -55,6 +55,12 @@ local item = {
},
[17]={
},
[18]={
},
[19]={
},
[12001]={
["name"]="红R舞女碎片",
@ -102,6 +108,6 @@ local item = {
}
}
local config = {
data=item,count=29
data=item,count=31
}
return config

View File

@ -3,9 +3,9 @@ local ItemConst = {}
ItemConst.ITEM_ID_GOLD = 1
ItemConst.ITEM_ID_GEM = 2
ItemConst.ITEM_ID_VIT = 3
ItemConst.ITEM_ID_HERO_FRAGMENT_2 = 4
ItemConst.ITEM_ID_BOUNTY_EXP = 7
ItemConst.ITEM_ID_EXP = 12
ItemConst.ITEM_ID_RANDOM_FRAGMENT = 19
ItemConst.ITEM_TYPE = {
RES = 1,

View File

@ -65,7 +65,11 @@ function RewardCell:_refreshItem(info, count)
self.numTx:setVisible(true)
self.frameBg:setSprite(GConst.ATLAS_PATH.ICON_ITEM, GConst.FRAME_QLT[info.qlt])
if count > 0 then
self.numTx:setText(GFunc.intToString(count))
if count > 100 then
self.numTx:setText(GFunc.num2Str(count))
else
self.numTx:setText(GFunc.intToString(count))
end
else
self.numTx:setText(GConst.EMPTY_STRING)
end

View File

@ -29,27 +29,28 @@ end
function IdleDropUI:onLoadRootComplete()
local uiMap = self.root:genAllChildren()
self.uiMap = uiMap
uiMap["idle_drop_ui.bg.title_text"]:setText("临时文本:挂机奖励")
uiMap["idle_drop_ui.bg.desc_tx_1"]:setText("临时文本:章节越高,收益越大")
uiMap["idle_drop_ui.bg.title_text"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_REWARD))
uiMap["idle_drop_ui.bg.desc_tx_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_1))
self.timeTx = uiMap["idle_drop_ui.bg.time_tx"]
local goldPerHour = GFunc.num2Str(DataManager.IdleData:getGoldPerHour())
local expPerHour = GFunc.num2Str(DataManager.IdleData:getExpPerHour())
uiMap["idle_drop_ui.bg.bg_1.desc"]:setText("临时文本:" .. goldPerHour .. "/小时")
uiMap["idle_drop_ui.bg.bg_2.desc"]:setText("临时文本:" .. expPerHour .. "/小时")
uiMap["idle_drop_ui.bg.bg_1.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.PER_HOUR, goldPerHour))
uiMap["idle_drop_ui.bg.bg_2.desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.PER_HOUR, expPerHour))
uiMap["idle_drop_ui.bg.desc_tx_2"]:setText("临时文本:最长挂机16小时")
local idleMaxTime = DataManager.IdleData:getIdleMaxTime()
uiMap["idle_drop_ui.bg.desc_tx_2"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_2, idleMaxTime // 3600))
self.quickBtn = uiMap["idle_drop_ui.bg.quick_btn"]
self.quickBtn:addClickListener(function()
ModuleManager.IdleManager:showIdleQuickDropUI()
end)
uiMap["idle_drop_ui.bg.quick_btn.text"]:setText("临时文本:快速挂机")
uiMap["idle_drop_ui.bg.quick_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_QUICK))
self.getBtn = uiMap["idle_drop_ui.bg.get_btn"]
self.getBtn:addClickListener(function()
self.lastRefreshTime = Time:getServerTime()
ModuleManager.IdleManager:getIdleRewrad()
end)
uiMap["idle_drop_ui.bg.get_btn.text"]:setText("临时文本:领取")
uiMap["idle_drop_ui.bg.get_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.BTN_CLAIM))
uiMap["idle_drop_ui.bg.close_btn"]:addClickListener(function()
self:closeUI()
end)
@ -78,6 +79,7 @@ function IdleDropUI:bindData()
self:bind(DataManager.IdleData, "dirty", function()
self:onRefresh()
self.canRefreshReward = true
self:refreshCD()
end)
end
@ -145,8 +147,12 @@ end
function IdleDropUI:refreshCD()
local time = Time:getServerTime() - DataManager.IdleData:getLastDropTime()
local idleMaxTime = DataManager.IdleData:getIdleMaxTime()
if time >= idleMaxTime and #self.itemList > 0 then
self:addGetBtnRedPoint()
if time >= idleMaxTime then
if #self.itemList > 0 then
self:addGetBtnRedPoint()
else
self:removeGetBtnRedPoint()
end
self.timeTx:setText(Time:formatNumTime(idleMaxTime))
else
self:removeGetBtnRedPoint()

View File

@ -42,8 +42,9 @@ function IdleQuickDropUI:onLoadRootComplete()
uiMap["idle_quick_drop_ui.mask"]:addClickListener(function()
self:closeUI()
end)
uiMap["idle_quick_drop_ui.bg.title_text"]:setText("临时文本:快速挂机")
uiMap["idle_quick_drop_ui.bg.desc_tx"]:setText("临时文本:立刻获得6小时挂机奖励")
uiMap["idle_quick_drop_ui.bg.title_text"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_QUICK))
local quickIdleTime = DataManager.IdleData:getQuickIdleTime()
uiMap["idle_quick_drop_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_DESC_3, quickIdleTime // 3600))
self:initRewards()
self:initBtns()
@ -67,7 +68,7 @@ function IdleQuickDropUI:initBtns()
self.adBtn:addClickListener(function()
ModuleManager.IdleManager:getIdleQuickRewrad(true)
end)
self.uiMap["idle_quick_drop_ui.bg.ad_btn.text"]:setText("临时文本:免费")
self.uiMap["idle_quick_drop_ui.bg.ad_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.STR_FREE))
self.itemBtn = self.uiMap["idle_quick_drop_ui.bg.item_btn"]
self.itemBtn:addClickListener(function()
ModuleManager.IdleManager:getIdleQuickRewrad(false)
@ -115,7 +116,7 @@ function IdleQuickDropUI:onRefresh()
self.adBtn:setSprite(GConst.ATLAS_PATH.COMMON, "common_btn_blue_2")
self.adBtn:addRedPoint(94, 42, 0.8)
end
self.descTx2:setText(string.format("临时文本:今日剩余%s次", adRemainTimes))
self.descTx2:setText(I18N:getGlobalText(I18N.GlobalConst.TODAY_REMAIN_TIMES, adRemainTimes))
local vitRemainTimes = DataManager.IdleData:getQuickIdleVitRemainTimes()
if vitRemainTimes <= 0 then
vitRemainTimes = 0
@ -134,7 +135,7 @@ function IdleQuickDropUI:onRefresh()
self.itemBtn:removeRedPoint()
end
end
self.descTx3:setText(string.format("临时文本:今日剩余%s次", vitRemainTimes))
self.descTx3:setText(I18N:getGlobalText(I18N.GlobalConst.TODAY_REMAIN_TIMES, vitRemainTimes))
end
return IdleQuickDropUI

View File

@ -48,6 +48,10 @@ function SideBarBaseCellComp:getInfo()
return nil
end
function SideBarBaseCellComp:getIsShowRedPoint()
return false
end
-- 红点偏移位置
function SideBarBaseCellComp:getRedPointPosition()
return DEFAULT_RED_POINT_POS_X, DEFAULT_RED_POINT_POS_Y
@ -106,4 +110,21 @@ function SideBarBaseCellComp:setCellPath(cellPath)
self.cellPath = cellPath
end
function SideBarBaseCellComp:showRedPoint()
if self.redPoint then
return
end
self.redPoint = true
local x, y = self:getRedPointPosition()
self.baseObject:addRedPoint(x, y, self:getRedPointScale())
end
function SideBarBaseCellComp:hideRedPoint()
if self.redPoint == false then
return
end
self.redPoint = false
self.baseObject:removeRedPoint()
end
return SideBarBaseCellComp

View File

@ -13,4 +13,13 @@ function SideBarIdleCell:onClick()
ModuleManager.IdleManager:showIdleDropUI()
end
function SideBarIdleCell:getIsShowRedPoint()
local time = Time:getServerTime() - DataManager.IdleData:getLastDropTime()
local idleMaxTime = DataManager.IdleData:getIdleMaxTime()
if time >= idleMaxTime then
return true
end
return DataManager.IdleData:getQuickIdleRemainTimes() > 0
end
return SideBarIdleCell

View File

@ -68,17 +68,19 @@ function MainCityUI:onLoadRootComplete()
self:_display()
self:_addListeners()
self:_bind()
self:updateTime()
self:refreshBottomRp()
self:updateTime()
self:scheduleGlobal(function()
self:updateTime()
self:updateSideBarStatus()
self:updateTime()
end, 1)
end
function MainCityUI:onRefresh()
self:refreshLeftBtns()
self:refreshRightBtns()
self:updateSideBarStatus()
end
function MainCityUI:onReshow()
@ -310,6 +312,11 @@ end
function MainCityUI:openOrCloseLeftSideBar()
ModuleManager.MaincityManager:changeMainCityLeftSideBarOpenOrClose()
self:refreshLeftBtns()
if self.isShowLeftSideBarArrowRedPoint ~= nil then
local isShowLeftSideBarArrowRedPoint = self.isShowLeftSideBarArrowRedPoint
self.isShowLeftSideBarArrowRedPoint = nil
self:setLeftSideBarArrowRedPoint(isShowLeftSideBarArrowRedPoint)
end
end
function MainCityUI:refreshLeftBtns()
@ -362,6 +369,11 @@ end
function MainCityUI:openOrCloseRightSideBar()
ModuleManager.MaincityManager:changeMainCityRightSideBarOpenOrClose()
self:refreshRightBtns()
if self.isShowRightSideBarArrowRedPoint ~= nil then
local isShowRightSideBarArrowRedPoint = self.isShowRightSideBarArrowRedPoint
self.isShowRightSideBarArrowRedPoint = nil
self:setRightSideBarArrowRedPoint(isShowRightSideBarArrowRedPoint)
end
end
function MainCityUI:refreshRightBtns()
@ -548,6 +560,91 @@ end
function MainCityUI:updateTime()
end
function MainCityUI:updateSideBarStatus()
if self.leftBarList then
local first = self.leftBarList[1]
if first then
if first:getIsShowRedPoint() then
first:showRedPoint()
else
first:hideRedPoint()
end
local count = 0
for i = 2, #self.leftBarList do
if self.leftBarList[i]:getIsShowRedPoint() then
self.leftBarList[i]:showRedPoint()
count = count + 1
else
self.leftBarList[i]:hideRedPoint()
end
end
if count > 0 then
self:setLeftSideBarArrowRedPoint(true)
else
self:setLeftSideBarArrowRedPoint(false)
end
else
self:setLeftSideBarArrowRedPoint(false)
end
end
if self.rightBarList then
local first = self.rightBarList[1]
if first then
if first:getIsShowRedPoint() then
first:showRedPoint()
else
first:hideRedPoint()
end
local count = 0
for i = 2, #self.rightBarList do
if self.rightBarList[i]:getIsShowRedPoint() then
self.rightBarList[i]:showRedPoint()
count = count + 1
else
self.rightBarList[i]:hideRedPoint()
end
end
if count > 0 then
self:setRightSideBarArrowRedPoint(true)
else
self:setRightSideBarArrowRedPoint(false)
end
else
self:setRightSideBarArrowRedPoint(false)
end
end
end
function MainCityUI:setLeftSideBarArrowRedPoint(isShow)
if self.isShowLeftSideBarArrowRedPoint == isShow then
return
end
if isShow then
if ModelManager.MaincityManager:getIsMainCityLeftSideBarClose() then
self.leftArrowBtn:removeRedPoint()
else
self.leftArrowBtn:addRedPoint()
end
else
self.leftArrowBtn:removeRedPoint()
end
end
function MainCityUI:setRightSideBarArrowRedPoint(isShow)
if self.isShowRightSideBarArrowRedPoint == isShow then
return
end
if isShow then
if ModelManager.MaincityManager:getIsMainCityRightSideBarClose() then
self.rightArrowBtn:removeRedPoint()
else
self.rightArrowBtn:addRedPoint()
end
else
self.rightArrowBtn:removeRedPoint()
end
end
function MainCityUI:refreshBottomRp()
local uiMap = self.root:genAllChildren()
local heroRpObj = uiMap["main_ui.bottom_node.icons.ui_spine_obj_2.rp_node"]

View File

@ -103,12 +103,12 @@ function IdleData:getIdleQuickDropPreviewRewards()
end
itemExp.num = math.floor(cfg.idle_exp * (time // expPerTime))
local itemCard = self.idleQuickPreviewRewardMap[GConst.ItemConst.ITEM_ID_HERO_FRAGMENT_2]
local itemCard = self.idleQuickPreviewRewardMap[GConst.ItemConst.ITEM_ID_RANDOM_FRAGMENT]
if itemCard == nil then
itemCard = {}
itemCard.id = GConst.ItemConst.ITEM_ID_HERO_FRAGMENT_2
itemCard.id = GConst.ItemConst.ITEM_ID_RANDOM_FRAGMENT
itemCard.type = GConst.REWARD_TYPE.ITEM
self.idleQuickPreviewRewardMap[GConst.ItemConst.ITEM_ID_HERO_FRAGMENT_2] = itemCard
self.idleQuickPreviewRewardMap[GConst.ItemConst.ITEM_ID_RANDOM_FRAGMENT] = itemCard
end
itemCard.num = math.floor((time // itemPerTime))