xiyou_sanguo
parent
152754ae6a
commit
cbb3ceddde
|
|
@ -114,7 +114,7 @@ end
|
|||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function ActivityMainPanel:OnOpen(_activityType, _index, change)
|
||||
LogError("huodong:".._activityType)
|
||||
LogError("huodong:" .. _activityType)
|
||||
SoundManager.PlaySound(SoundConfig.UI_Hddakai)
|
||||
this.activityType = _activityType
|
||||
DynamicActivityManager.curActivityType = this.activityType
|
||||
|
|
@ -241,13 +241,37 @@ function this.PageTabAdapter(tab, index, status)
|
|||
--设置显示隐藏
|
||||
if not DynamicActivityManager.IsQualifiled(tabs[index].Id) then
|
||||
tab.gameObject:SetActive(false)
|
||||
if tabs[index].Id == 59 then
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].Id))
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].ActiveType))
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].FunType))
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].IfBack))
|
||||
end
|
||||
if tabs[index].Id == 60 then
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].Id))
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].ActiveType))
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].FunType))
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].IfBack))
|
||||
end
|
||||
return
|
||||
end
|
||||
if tabs[index].IsRecharge == 1 and not RECHARGEABLE then
|
||||
tab.gameObject:SetActive(false)
|
||||
if tabs[index].Id == 60 then
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].Id))
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].ActiveType))
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].FunType))
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].IfBack))
|
||||
end
|
||||
return
|
||||
end
|
||||
local isshow = false
|
||||
if tabs[index].Id == 60 then
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].Id))
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].ActiveType))
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].FunType))
|
||||
LogError("CCCCCCCCCCC" .. tostring(tabs[index].IfBack))
|
||||
end
|
||||
if tabs[index].IfBack == 1 then
|
||||
if tabs[index].ActiveType > 0 then
|
||||
local id = ActivityGiftManager.IsActivityTypeOpen(tabs[index].ActiveType)
|
||||
|
|
@ -263,6 +287,8 @@ function this.PageTabAdapter(tab, index, status)
|
|||
end
|
||||
end
|
||||
elseif tabs[index].FunType > 0 then
|
||||
--LogError("CCCCCCCCCCC" .. tostring(tabs[index].Id))
|
||||
--LogError("CCCCCCCCCCC" .. tostring(tabs[index].FunType))
|
||||
isshow = ActTimeCtrlManager.SingleFuncState(tabs[index].FunType)
|
||||
else
|
||||
isshow = true
|
||||
|
|
@ -274,7 +300,7 @@ function this.PageTabAdapter(tab, index, status)
|
|||
isshow = ActData.value ~= 2
|
||||
if ActData.value == 0 then
|
||||
local data = string.split(ConfigManager.GetConfigDataByKey(ConfigName.SpecialConfig, "Id", 109)
|
||||
.Value, "#")
|
||||
.Value, "#")
|
||||
local time = ActData.startTime + tonumber(data[1]) * 86400 - GetTimeStamp()
|
||||
if time <= 0 then
|
||||
isshow = false
|
||||
|
|
|
|||
|
|
@ -677,10 +677,8 @@ function this.IsActivityOpenByJumpIndex(pageIndex, jumpIndex)
|
|||
if not ActivityGiftManager.IsQualifiled(tb[i].ActiveType) then
|
||||
return 1
|
||||
end
|
||||
LogError("ddddddddddddddddddddddddddddd" .. tostring(id) .. "/" .. tostring(tb[i].ActiveType))
|
||||
return id and id > 0 and ActivityGiftManager.IsQualifiled(tb[i].ActiveType)
|
||||
elseif tb[i].FunType > 0 then
|
||||
LogError("ddddddddddddddddddddddddddddd")
|
||||
return ActTimeCtrlManager.SingleFuncState(tb[i].FunType)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ end
|
|||
|
||||
function this:Refresh(isTop, isAni)
|
||||
local data = tonumber(specialConfig[119].Value)
|
||||
if not RecruitManager.drawTimes[4] or RecruitManager.drawTimes[4] < data then
|
||||
if not RecruitManager.drawTimes[15] or RecruitManager.drawTimes[15] < data then
|
||||
self.parent:ClosePanel()
|
||||
return
|
||||
end
|
||||
|
|
@ -125,8 +125,8 @@ function this:SetUpHero()
|
|||
local starGrid = Util.GetGameObject(go, "star")
|
||||
local choosed = Util.GetGameObject(go, "choosed")
|
||||
local heroId = 0
|
||||
if RecruitManager.WishEquipData[i] then
|
||||
heroId = RecruitManager.WishEquipData[i].heroTid
|
||||
if RecruitManager.WishJulingData[i] then
|
||||
heroId = RecruitManager.WishJulingData[i].heroTid
|
||||
end
|
||||
choosed:SetActive(false)
|
||||
if heroId > 0 then
|
||||
|
|
@ -137,11 +137,11 @@ function this:SetUpHero()
|
|||
proIcon.gameObject:SetActive(false)
|
||||
--proIcon.sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.Name))
|
||||
--SetHeroStars(self.spLoader,starGrid, heroData.Star)
|
||||
choosed:SetActive(RecruitManager.WishEquipData[i].status == 1)
|
||||
choosed:SetActive(RecruitManager.WishJulingData[i].status == 1)
|
||||
Util.AddOnceClick(go, function()
|
||||
if RecruitManager.WishEquipData[i].status == 1 then
|
||||
if RecruitManager.WishJulingData[i].status == 1 then
|
||||
PopupTipPanel.ShowTip(Language[11082])
|
||||
elseif RecruitManager.WishEquipData[i].status == 0 then
|
||||
elseif RecruitManager.WishJulingData[i].status == 0 then
|
||||
RecruitManager.ChangeEquip(2, heroId, function()
|
||||
this:Refresh(false, false)
|
||||
end) --英雄变更:1增加、2卸下
|
||||
|
|
@ -188,7 +188,6 @@ function this:ShowSingleHero(go, data, index)
|
|||
Util.SetGray(self.itemList[self.curSelect][index], false)
|
||||
|
||||
local value = RecruitManager.CheckCurTalismanaState(equipId)
|
||||
LogError("value===========================================" .. value)
|
||||
if value == 0 then --上方存在相同阵营
|
||||
Util.SetGray(self.itemList[self.curSelect][index], true)
|
||||
Util.AddOnceClick(go, function()
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ function this.GetBlessEquipNum()
|
|||
for i = 1, #strs do
|
||||
local data = string.split(strs[i], "#")
|
||||
local waveNum = tonumber(data[1])
|
||||
if MonsterCampManager.monsterWave >= waveNum then
|
||||
if MonsterCampManager.GetFourElementTotalWave() >= waveNum then
|
||||
num = tonumber(data[2])
|
||||
end
|
||||
end
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -263,12 +263,16 @@ function RecruitEquipPanelNew:UpdataWishPanel()
|
|||
self.wishNoOpen.gameObject:SetActive(false)
|
||||
self.wishOpen.gameObject:SetActive(true)
|
||||
for i = 1, 1 do
|
||||
local data = RecruitManager.WishEquipData[i]
|
||||
local data = nil
|
||||
if self.config.ShopData[1][1] == 4 then
|
||||
data = RecruitManager.WishEquipData[i]
|
||||
else
|
||||
data = RecruitManager.WishJulingData[i]
|
||||
end
|
||||
local id = 0
|
||||
if data then
|
||||
id = data.heroTid
|
||||
end
|
||||
LogError("id================================" .. id)
|
||||
if id > 0 then
|
||||
self.upHeroPreList[i].item.gameObject:SetActive(true)
|
||||
self.upHeroPreList[i].item:OnOpen(false, { id, 0 }, 1, false, false, false, self.sortingOrder)
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ function this.Initialize()
|
|||
this.isTenRecruit = 0 --首次十连
|
||||
this.WishCardData = {}
|
||||
this.WishEquipData = {}
|
||||
this.WishJulingData = {}
|
||||
this.wishSoulData = {}
|
||||
this.isFirstEnterElementScroll = true
|
||||
this.isFirstEnterHeroScroll = true
|
||||
|
|
@ -569,7 +570,20 @@ function this.SetWishTalismanData(infoList)
|
|||
heroConfig[infoList[i].heroTid].PropertyName or nil
|
||||
end
|
||||
end
|
||||
|
||||
function this.SetWishJulingData(infoList)
|
||||
this.WishJulingData = {}
|
||||
for i = 1, #infoList do
|
||||
this.WishJulingData[i] = {}
|
||||
this.WishJulingData[i].id = infoList[i].id
|
||||
this.WishJulingData[i].heroTid = infoList[i].heroTid
|
||||
this.WishJulingData[i].status = infoList[i].status
|
||||
LogPink("Id:" ..
|
||||
tostring(infoList[i].id) .. " heroIid:" ..
|
||||
tostring(infoList[i].heroTid) .. " status:" .. tostring(infoList[i].status))
|
||||
this.WishJulingData[i].PropertyName = infoList[i].heroTid > 0 and heroConfig[infoList[i].heroTid] and
|
||||
heroConfig[infoList[i].heroTid].PropertyName or nil
|
||||
end
|
||||
end
|
||||
--心愿魂印
|
||||
function this.SetWishEquipData(infoList)
|
||||
this.wishSoulData = {}
|
||||
|
|
@ -693,7 +707,38 @@ function this.CheckCurTalismanaState(_heroTid)
|
|||
--都没有就亮着
|
||||
return 3
|
||||
end
|
||||
--检测当前法宝聚灵状态
|
||||
function this.CheckCurTalismanaState(_heroTid)
|
||||
for i = 1, #this.WishJulingData do
|
||||
if this.WishJulingData[i].heroTid == _heroTid then
|
||||
--如果上方存在自己就✔
|
||||
if this.WishJulingData[i].status == 0 then
|
||||
return 1
|
||||
elseif this.WishJulingData[i].status == 1 then
|
||||
return 4
|
||||
end
|
||||
end
|
||||
end
|
||||
for i = 1, #this.WishJulingData do
|
||||
if this.WishJulingData[i].heroTid > 0 then
|
||||
--如果上方存在和当前英雄相同阵营的就置灰
|
||||
return 0
|
||||
end
|
||||
end
|
||||
|
||||
local num = 0
|
||||
for i = 1, #this.WishJulingData do
|
||||
if this.WishJulingData[i].heroTid > 0 then
|
||||
num = num + 1
|
||||
end
|
||||
end
|
||||
if num == 1 then
|
||||
--如果上方神将满则其他全部置灰
|
||||
return 2
|
||||
end
|
||||
--都没有就亮着
|
||||
return 3
|
||||
end
|
||||
--添加和卸下神将
|
||||
function this.ChangeHero(type, _heroTid, func)
|
||||
if type == 1 then --增加神将
|
||||
|
|
|
|||
Loading…
Reference in New Issue