Merge branch '0功能/本周版本优化内容' of http://60.1.1.230/gaoxin/JL_Client into 0功能/本周版本优化内容
commit
fe881897dc
|
@ -526,7 +526,7 @@ function this.RefreshActivityProgressData(msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.RefreshActivityRedPoint()
|
function this.RefreshActivityRedPoint()
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.MissionDaily.OnMissionDailyChanged)
|
Game.GlobalEvent:DispatchEvent(GameEvent.MissionDaily.OnMissionDailyChanged,false,false)
|
||||||
CheckRedPointStatus(RedPointType.FirstRecharge)
|
CheckRedPointStatus(RedPointType.FirstRecharge)
|
||||||
CheckRedPointStatus(RedPointType.ContinuityRecharge)
|
CheckRedPointStatus(RedPointType.ContinuityRecharge)
|
||||||
CheckRedPointStatus(RedPointType.SevenDayCarnival)
|
CheckRedPointStatus(RedPointType.SevenDayCarnival)
|
||||||
|
|
|
@ -124,7 +124,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
function this.RefreshActivityRedPoint()
|
function this.RefreshActivityRedPoint()
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.MissionDaily.OnMissionDailyChanged)
|
Game.GlobalEvent:DispatchEvent(GameEvent.MissionDaily.OnMissionDailyChanged,false,false)
|
||||||
CheckRedPointStatus(RedPointType.FirstRecharge)
|
CheckRedPointStatus(RedPointType.FirstRecharge)
|
||||||
CheckRedPointStatus(RedPointType.ContinuityRecharge)
|
CheckRedPointStatus(RedPointType.ContinuityRecharge)
|
||||||
CheckRedPointStatus(RedPointType.SevenDayCarnival)
|
CheckRedPointStatus(RedPointType.SevenDayCarnival)
|
||||||
|
|
|
@ -167,7 +167,7 @@ function SevenDayGift :OpenActivityPage()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--展示活动数据
|
--展示活动数据
|
||||||
function SevenDayGift:OnShowActivityData(activityData, activityType, getRewardState, isCanReward)
|
function SevenDayGift:OnShowActivityData(activityData, activityType, getRewardState, isCanReward,isTop,isAni)
|
||||||
if (activityType == ActivityTypeDef.SevenDayRegister) then
|
if (activityType == ActivityTypeDef.SevenDayRegister) then
|
||||||
this.titleBg.sprite = Util.LoadSprite("r_huodong_qitian")
|
this.titleBg.sprite = Util.LoadSprite("r_huodong_qitian")
|
||||||
elseif (activityType == ActivityTypeDef.OnlineGift) then
|
elseif (activityType == ActivityTypeDef.OnlineGift) then
|
||||||
|
@ -215,7 +215,7 @@ function SevenDayGift:OnShowActivityData(activityData, activityType, getRewardSt
|
||||||
this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward)
|
this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward)
|
||||||
end
|
end
|
||||||
--this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward)
|
--this:ScrollActivityDataShow(item, index, activityData[index], activityType, getRewardState, isCanReward)
|
||||||
end)
|
end, not isTop,not isAni)
|
||||||
end
|
end
|
||||||
--循环滚动活动数据
|
--循环滚动活动数据
|
||||||
function SevenDayGift:ScrollActivityDataShow(item, index, data, activityType, getRewardState, isCanReward)
|
function SevenDayGift:ScrollActivityDataShow(item, index, data, activityType, getRewardState, isCanReward)
|
||||||
|
|
|
@ -148,10 +148,10 @@ end
|
||||||
|
|
||||||
-- end
|
-- end
|
||||||
function this.BagGoldChangeCallBackOnClickTabBtn()
|
function this.BagGoldChangeCallBackOnClickTabBtn()
|
||||||
this.OnClickTabBtn(sortIndex, sortIndexBtnGo)
|
this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true)
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.OnClickTabBtn(_index, _clickBtn, isTop)
|
function this.OnClickTabBtn(_index, _clickBtn, isTop,isNotAni)
|
||||||
sortIndexBtnGo = _clickBtn
|
sortIndexBtnGo = _clickBtn
|
||||||
itemData = {}
|
itemData = {}
|
||||||
local itemNumText = this.itemNumText:GetComponent("Text")
|
local itemNumText = this.itemNumText:GetComponent("Text")
|
||||||
|
@ -166,24 +166,24 @@ function this.OnClickTabBtn(_index, _clickBtn, isTop)
|
||||||
end
|
end
|
||||||
--Language[10188]
|
--Language[10188]
|
||||||
itemNumText.text = "装备种类:" ..LengthOfTable(allEquipData).."/"..ConfigManager.GetConfigData(ConfigName.GameSetting,1).EquipNumlimit
|
itemNumText.text = "装备种类:" ..LengthOfTable(allEquipData).."/"..ConfigManager.GetConfigData(ConfigName.GameSetting,1).EquipNumlimit
|
||||||
this:SetItemData(itemData, isTop)
|
this:SetItemData(itemData, isTop,isNotAni)
|
||||||
-- elseif _index == 0 then
|
-- elseif _index == 0 then
|
||||||
-- this:OnClickAllBtn()
|
-- this:OnClickAllBtn()
|
||||||
elseif (_index == ItemBaseType.SoulPrint) then
|
elseif (_index == ItemBaseType.SoulPrint) then
|
||||||
itemData = BagManager.GetAllSoulPrintData()
|
itemData = BagManager.GetAllSoulPrintData()
|
||||||
itemNumText.text = Language[10189]..#itemData.."/"..specialConfig[9].Value
|
itemNumText.text = Language[10189]..#itemData.."/"..specialConfig[9].Value
|
||||||
this:SetItemData(itemData, isTop)
|
this:SetItemData(itemData, isTop,isNotAni)
|
||||||
elseif (_index == ItemBaseType.EquipTreasure) then
|
elseif (_index == ItemBaseType.EquipTreasure) then
|
||||||
itemData = EquipTreasureManager.GetAllTreasures()
|
itemData = EquipTreasureManager.GetAllTreasures()
|
||||||
itemNumText.text = Language[10190]..LengthOfTable(itemData).."/"..specialConfig[10].Value
|
itemNumText.text = Language[10190]..LengthOfTable(itemData).."/"..specialConfig[10].Value
|
||||||
this:SetItemData(itemData, isTop)
|
this:SetItemData(itemData, isTop,isNotAni)
|
||||||
elseif (_index == ItemBaseType.Special) then
|
elseif (_index == ItemBaseType.Special) then
|
||||||
itemData = BagManager.GetBagItemDataByItemTypeV2(ItemBaseType.Special,ItemBaseType.Materials,ItemType.HeadFrame)
|
itemData = BagManager.GetBagItemDataByItemTypeV2(ItemBaseType.Special,ItemBaseType.Materials,ItemType.HeadFrame)
|
||||||
this:SetItemData(itemData)
|
this:SetItemData(itemData, isTop,isNotAni)
|
||||||
else
|
else
|
||||||
|
|
||||||
itemData = BagManager.GetBagItemDataByItemType(_index)
|
itemData = BagManager.GetBagItemDataByItemType(_index)
|
||||||
this:SetItemData(itemData, isTop)
|
this:SetItemData(itemData, isTop,isNotAni)
|
||||||
end
|
end
|
||||||
this.noneImage:SetActive(#itemData==0)
|
this.noneImage:SetActive(#itemData==0)
|
||||||
end
|
end
|
||||||
|
@ -196,8 +196,9 @@ end
|
||||||
|
|
||||||
local orginLayer2 = 0
|
local orginLayer2 = 0
|
||||||
--设置背包列表数据
|
--设置背包列表数据
|
||||||
function this:SetItemData(_itemDatas, isTop)
|
function this:SetItemData(_itemDatas, isTop,isNotAni)
|
||||||
LogPink("IsTop = "..tostring(isTop))
|
LogPink("IsTop = "..tostring(isTop))
|
||||||
|
LogPink("isNotAni = "..tostring(isNotAni))
|
||||||
list={}
|
list={}
|
||||||
this.ItemsSortDataV2(_itemDatas)
|
this.ItemsSortDataV2(_itemDatas)
|
||||||
if not this.ScrollView then
|
if not this.ScrollView then
|
||||||
|
@ -212,7 +213,7 @@ function this:SetItemData(_itemDatas, isTop)
|
||||||
if _itemDatas[index].itemConfig.ItemType == ItemType.HunYin then
|
if _itemDatas[index].itemConfig.ItemType == ItemType.HunYin then
|
||||||
table.insert(list, go)
|
table.insert(list, go)
|
||||||
end
|
end
|
||||||
end, not isTop)
|
end, not isTop,isNotAni)
|
||||||
--特效层级重设
|
--特效层级重设
|
||||||
for i=1,#list do
|
for i=1,#list do
|
||||||
Util.AddParticleSortLayer(list[i], this.sortingOrder- orginLayer2)
|
Util.AddParticleSortLayer(list[i], this.sortingOrder- orginLayer2)
|
||||||
|
@ -379,17 +380,17 @@ function this.SingleItemDataShow(_go, _itemData)
|
||||||
if _itemData.itemConfig then
|
if _itemData.itemConfig then
|
||||||
if _itemData.itemConfig.ItemBaseType == ItemBaseType.Equip then
|
if _itemData.itemConfig.ItemBaseType == ItemBaseType.Equip then
|
||||||
UIManager.OpenPanel(UIName.RewardEquipSingleShowPopup, _itemData, function()
|
UIManager.OpenPanel(UIName.RewardEquipSingleShowPopup, _itemData, function()
|
||||||
this.OnClickTabBtn(sortIndex, sortIndexBtnGo)
|
this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true)
|
||||||
end,nil,true)
|
end,nil,true)
|
||||||
elseif _itemData.itemConfig.ItemType == ItemType.SelfBox then--自选宝箱
|
elseif _itemData.itemConfig.ItemType == ItemType.SelfBox then--自选宝箱
|
||||||
UIManager.OpenPanel(UIName.RewardBoxPanel, _itemData, function()
|
UIManager.OpenPanel(UIName.RewardBoxPanel, _itemData, function()
|
||||||
this.OnClickTabBtn(sortIndex, sortIndexBtnGo)
|
this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true)
|
||||||
UIManager.ClosePanel(UIName.RewardBoxPanel)
|
UIManager.ClosePanel(UIName.RewardBoxPanel)
|
||||||
end)
|
end)
|
||||||
-- body
|
-- body
|
||||||
elseif _itemData.itemConfig.ItemBaseType == ItemBaseType.HeroChip then
|
elseif _itemData.itemConfig.ItemBaseType == ItemBaseType.HeroChip then
|
||||||
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.id, function()
|
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.id, function()
|
||||||
this.OnClickTabBtn(sortIndex, sortIndexBtnGo)
|
this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true)
|
||||||
UIManager.ClosePanel(UIName.RewardItemSingleShowPopup)
|
UIManager.ClosePanel(UIName.RewardItemSingleShowPopup)
|
||||||
end)
|
end)
|
||||||
elseif _itemData.itemConfig.ItemType == ItemType.Blueprint then
|
elseif _itemData.itemConfig.ItemType == ItemType.Blueprint then
|
||||||
|
@ -397,29 +398,29 @@ function this.SingleItemDataShow(_go, _itemData)
|
||||||
local lanTuData = WorkShopManager.GetLanTuIsOpenLock(_itemData.itemConfig.Id)
|
local lanTuData = WorkShopManager.GetLanTuIsOpenLock(_itemData.itemConfig.Id)
|
||||||
if lanTuData and lanTuData[1] == true then
|
if lanTuData and lanTuData[1] == true then
|
||||||
UIManager.OpenPanel(UIName. WorkShopArmorOnePanel, 2, 2, lanTuData[2], this, function()
|
UIManager.OpenPanel(UIName. WorkShopArmorOnePanel, 2, 2, lanTuData[2], this, function()
|
||||||
this.OnClickTabBtn(sortIndex, sortIndexBtnGo)
|
this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true)
|
||||||
end)
|
end)
|
||||||
elseif lanTuData and lanTuData[1] == false then
|
elseif lanTuData and lanTuData[1] == false then
|
||||||
UIManager.OpenPanel(UIName.WorkShopArmorOnePanel, 2, 1, lanTuData[2], this, function()
|
UIManager.OpenPanel(UIName.WorkShopArmorOnePanel, 2, 1, lanTuData[2], this, function()
|
||||||
this.OnClickTabBtn(sortIndex, sortIndexBtnGo)
|
this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
elseif _itemData.itemConfig.ItemType == ItemType.HeroDebris then
|
elseif _itemData.itemConfig.ItemType == ItemType.HeroDebris then
|
||||||
--角色碎片
|
--角色碎片
|
||||||
if _itemData.num >= _itemData.itemConfig.UsePerCount then
|
if _itemData.num >= _itemData.itemConfig.UsePerCount then
|
||||||
UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 3, _itemData, function()
|
UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 3, _itemData, function()
|
||||||
this.OnClickTabBtn(sortIndex, sortIndexBtnGo)
|
this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true)
|
||||||
end)
|
end)
|
||||||
else
|
else
|
||||||
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.id, function()
|
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.id, function()
|
||||||
this.OnClickTabBtn(sortIndex, sortIndexBtnGo)
|
this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true)
|
||||||
UIManager.ClosePanel(UIName.RewardItemSingleShowPopup)
|
UIManager.ClosePanel(UIName.RewardItemSingleShowPopup)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
elseif _itemData.itemConfig.ItemBaseType == ItemBaseType.EquipTreasure then
|
elseif _itemData.itemConfig.ItemBaseType == ItemBaseType.EquipTreasure then
|
||||||
--宝器
|
--宝器
|
||||||
UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup, 0, _itemData.idDyn,_itemData.id, _itemData.lv,_itemData.refineLv, function()
|
UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup, 0, _itemData.idDyn,_itemData.id, _itemData.lv,_itemData.refineLv, function()
|
||||||
this.OnClickTabBtn(sortIndex, sortIndexBtnGo)
|
this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true)
|
||||||
end)
|
end)
|
||||||
elseif _itemData.itemConfig.ItemBaseType == ItemBaseType.SoulPrint then
|
elseif _itemData.itemConfig.ItemBaseType == ItemBaseType.SoulPrint then
|
||||||
--魂印
|
--魂印
|
||||||
|
@ -427,7 +428,7 @@ function this.SingleItemDataShow(_go, _itemData)
|
||||||
elseif _itemData.itemConfig.ItemType == ItemType.Skin then
|
elseif _itemData.itemConfig.ItemType == ItemType.Skin then
|
||||||
--皮肤
|
--皮肤
|
||||||
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.id,function()
|
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.id,function()
|
||||||
this.OnClickTabBtn(sortIndex, sortIndexBtnGo)
|
this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true)
|
||||||
UIManager.ClosePanel(UIName.RewardItemSingleShowPopup)
|
UIManager.ClosePanel(UIName.RewardItemSingleShowPopup)
|
||||||
end)
|
end)
|
||||||
-- elseif _itemData.itemConfig.ItemType == ItemType.HeadFrame then
|
-- elseif _itemData.itemConfig.ItemType == ItemType.HeadFrame then
|
||||||
|
@ -438,7 +439,7 @@ function this.SingleItemDataShow(_go, _itemData)
|
||||||
-- end)
|
-- end)
|
||||||
else
|
else
|
||||||
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.id, function()
|
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.id, function()
|
||||||
this.OnClickTabBtn(sortIndex, sortIndexBtnGo)
|
this.OnClickTabBtn(sortIndex, sortIndexBtnGo,false,true)
|
||||||
UIManager.ClosePanel(UIName.RewardItemSingleShowPopup)
|
UIManager.ClosePanel(UIName.RewardItemSingleShowPopup)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
|
@ -52,7 +52,7 @@ end
|
||||||
function Expert_UpLv:Refresh(index)
|
function Expert_UpLv:Refresh(index)
|
||||||
activityRewardConfig = ConfigManager.GetConfig(ConfigName.ActivityRewardConfig)
|
activityRewardConfig = ConfigManager.GetConfig(ConfigName.ActivityRewardConfig)
|
||||||
ActivityGiftManager.RefreshAcitvityData({activityId},function ()
|
ActivityGiftManager.RefreshAcitvityData({activityId},function ()
|
||||||
this:OnShowData(index)
|
this:OnShowData(index,true,true)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ function Expert_UpLv:OnSortingOrderChange(cursortingOrder)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Expert_UpLv:OnShowData()
|
function Expert_UpLv:OnShowData(isTop,isAni)
|
||||||
local activityId = ActivityGiftManager.GetOpenExpertIdByActivityType(ActivityTypeDef.UpLvAct)
|
local activityId = ActivityGiftManager.GetOpenExpertIdByActivityType(ActivityTypeDef.UpLvAct)
|
||||||
if activityId <= 0 then
|
if activityId <= 0 then
|
||||||
return
|
return
|
||||||
|
@ -81,7 +81,7 @@ function Expert_UpLv:OnShowData()
|
||||||
end)
|
end)
|
||||||
this.ScrollView:SetData(activeData.mission, function (index, go)
|
this.ScrollView:SetData(activeData.mission, function (index, go)
|
||||||
this.SingleItemDataShow(go, activeData.mission[index])
|
this.SingleItemDataShow(go, activeData.mission[index])
|
||||||
end)
|
end,not isTop,not isAni)
|
||||||
if isPlayAnim then
|
if isPlayAnim then
|
||||||
SecTorPlayAnimByScroll(self.ScrollView)
|
SecTorPlayAnimByScroll(self.ScrollView)
|
||||||
isPlayAnim = false
|
isPlayAnim = false
|
||||||
|
@ -135,7 +135,7 @@ function this.SingleItemDataShow(go,data)
|
||||||
--Log("达人领取奖励 "..data.missionId.." "..activityId)
|
--Log("达人领取奖励 "..data.missionId.." "..activityId)
|
||||||
NetManager.GetActivityRewardRequest(data.missionId, activityId, function(drop)
|
NetManager.GetActivityRewardRequest(data.missionId, activityId, function(drop)
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function()
|
UIManager.OpenPanel(UIName.RewardItemPopup,drop,1,function()
|
||||||
this:OnShowData()
|
this:OnShowData(false,false)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -46,7 +46,7 @@ end
|
||||||
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
--界面打开或者重新打开后,界面刷新时调用(用于子类重写)
|
||||||
function GiftBuy:OnShow(_sortingOrder)
|
function GiftBuy:OnShow(_sortingOrder)
|
||||||
sortingOrder = _sortingOrder
|
sortingOrder = _sortingOrder
|
||||||
this:OnShowData()
|
this:OnShowData(true,true)
|
||||||
end
|
end
|
||||||
function GiftBuy:OnSortingOrderChange(_cursortingOrder)
|
function GiftBuy:OnSortingOrderChange(_cursortingOrder)
|
||||||
cursortingOrder = _cursortingOrder
|
cursortingOrder = _cursortingOrder
|
||||||
|
@ -56,12 +56,12 @@ function GiftBuy:OnSortingOrderChange(_cursortingOrder)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function GiftBuy:OnShowData()
|
function GiftBuy:OnShowData(isTop,isAni)
|
||||||
allData = ConfigManager.GetAllConfigsDataByDoubleKey(ConfigName.RechargeCommodityConfig, "ShowType", 20, "Type", GoodsTypeDef.DirectPurchaseGift)
|
allData = ConfigManager.GetAllConfigsDataByDoubleKey(ConfigName.RechargeCommodityConfig, "ShowType", 20, "Type", GoodsTypeDef.DirectPurchaseGift)
|
||||||
this.SortData(allData)
|
this.SortData(allData)
|
||||||
this.ScrollView:SetData(allData, function (index, go)
|
this.ScrollView:SetData(allData, function (index, go)
|
||||||
this.SingleDataShow(go, allData[index])
|
this.SingleDataShow(go, allData[index])
|
||||||
end)
|
end,not isTop,not isAni)
|
||||||
PatFaceManager.RemainTimeDown(this.endTimeBg,this.endTime,endTime - GetTimeStamp())
|
PatFaceManager.RemainTimeDown(this.endTimeBg,this.endTime,endTime - GetTimeStamp())
|
||||||
end
|
end
|
||||||
--刷新每一条的显示数据
|
--刷新每一条的显示数据
|
||||||
|
@ -163,7 +163,7 @@ end
|
||||||
function this.RechargeSuccessFunc(id)
|
function this.RechargeSuccessFunc(id)
|
||||||
FirstRechargeManager.RefreshAccumRechargeValue(id)
|
FirstRechargeManager.RefreshAccumRechargeValue(id)
|
||||||
--OperatingManager.RefreshGiftGoodsBuyTimes(GoodsTypeDef.GiftBuy, id)
|
--OperatingManager.RefreshGiftGoodsBuyTimes(GoodsTypeDef.GiftBuy, id)
|
||||||
this.OnShowData()
|
this.OnShowData(false,false)
|
||||||
end
|
end
|
||||||
--购买点击事件
|
--购买点击事件
|
||||||
--function this.BuyAction(costId, costNum, shopType, itemId)
|
--function this.BuyAction(costId, costNum, shopType, itemId)
|
||||||
|
|
|
@ -197,18 +197,18 @@ end
|
||||||
|
|
||||||
--添加事件监听(用于子类重写)
|
--添加事件监听(用于子类重写)
|
||||||
function GoodFriendMainPanel:AddListener()
|
function GoodFriendMainPanel:AddListener()
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.Friend.OnFriendList, this.FriendListDataShow)
|
Game.GlobalEvent:AddEvent(GameEvent.Friend.OnFriendList, this.FriendListDataShow,self)
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.Friend.OnFriendApplication, this.FriendApplicationDataShow)
|
Game.GlobalEvent:AddEvent(GameEvent.Friend.OnFriendApplication, this.FriendApplicationDataShow,self)
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.Friend.OnFriendSearch, this.FriendSearchDataShow)
|
Game.GlobalEvent:AddEvent(GameEvent.Friend.OnFriendSearch, this.FriendSearchDataShow,self)
|
||||||
Game.GlobalEvent:AddEvent(GameEvent.Friend.OnBlackFriend, this.BlackListDataShow)
|
Game.GlobalEvent:AddEvent(GameEvent.Friend.OnBlackFriend, this.BlackListDataShow,self)
|
||||||
end
|
end
|
||||||
|
|
||||||
--移除事件监听(用于子类重写)
|
--移除事件监听(用于子类重写)
|
||||||
function GoodFriendMainPanel:RemoveListener()
|
function GoodFriendMainPanel:RemoveListener()
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnFriendList, this.FriendListDataShow)
|
Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnFriendList, this.FriendListDataShow,self)
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnFriendApplication, this.FriendApplicationDataShow)
|
Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnFriendApplication, this.FriendApplicationDataShow,self)
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnFriendSearch, this.FriendSearchDataShow)
|
Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnFriendSearch, this.FriendSearchDataShow,self)
|
||||||
Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnBlackFriend, this.BlackListDataShow)
|
Game.GlobalEvent:RemoveEvent(GameEvent.Friend.OnBlackFriend, this.BlackListDataShow,self)
|
||||||
end
|
end
|
||||||
|
|
||||||
--界面打开时调用(用于子类重写)
|
--界面打开时调用(用于子类重写)
|
||||||
|
@ -227,10 +227,10 @@ function GoodFriendMainPanel:OnShow()
|
||||||
this.roleImage2:SetActive(false)
|
this.roleImage2:SetActive(false)
|
||||||
this.roleImage3:SetActive(false)
|
this.roleImage3:SetActive(false)
|
||||||
this.roleImage4:SetActive(false)
|
this.roleImage4:SetActive(false)
|
||||||
this:FriendListDataShow()
|
this:FriendListDataShow(true,true)
|
||||||
this:FriendApplicationDataShow()
|
this:FriendApplicationDataShow(true,true)
|
||||||
this:FriendSearchDataShow()
|
this:FriendSearchDataShow(true,true)
|
||||||
this:BlackListDataShow()
|
this:BlackListDataShow(true,true)
|
||||||
this.isInRecommendPage = true
|
this.isInRecommendPage = true
|
||||||
this:OnRefreshData()
|
this:OnRefreshData()
|
||||||
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.GoodFriend })
|
this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.GoodFriend })
|
||||||
|
@ -336,7 +336,7 @@ function GoodFriendMainPanel:OnDestroy()
|
||||||
end
|
end
|
||||||
|
|
||||||
--好友列表循环滚动数据
|
--好友列表循环滚动数据
|
||||||
function GoodFriendMainPanel:FriendListDataShow()
|
function GoodFriendMainPanel:FriendListDataShow(isTop,isAni)
|
||||||
CheckRedPointStatus(RedPointType.Friend_GetAllReward)
|
CheckRedPointStatus(RedPointType.Friend_GetAllReward)
|
||||||
this:OnRefreshData()
|
this:OnRefreshData()
|
||||||
local list = {}
|
local list = {}
|
||||||
|
@ -369,7 +369,7 @@ function GoodFriendMainPanel:FriendListDataShow()
|
||||||
-- else
|
-- else
|
||||||
-- item.gameObject:SetActive(true)
|
-- item.gameObject:SetActive(true)
|
||||||
-- end
|
-- end
|
||||||
end)
|
end,not isTop,not isAni)
|
||||||
if isPlayAnim then
|
if isPlayAnim then
|
||||||
SecTorPlayAnimByScroll(this.ScrollView1)
|
SecTorPlayAnimByScroll(this.ScrollView1)
|
||||||
isPlayAnim = false
|
isPlayAnim = false
|
||||||
|
@ -378,7 +378,7 @@ function GoodFriendMainPanel:FriendListDataShow()
|
||||||
this.haveGetRewardNumText.text=Language[10813]..(GoodFriendManager.MaxEnergy-GoodFriendManager.MaxEnergyGet).."/"..GoodFriendManager.MaxEnergy
|
this.haveGetRewardNumText.text=Language[10813]..(GoodFriendManager.MaxEnergy-GoodFriendManager.MaxEnergyGet).."/"..GoodFriendManager.MaxEnergy
|
||||||
end
|
end
|
||||||
--好友申请循环滚动数据
|
--好友申请循环滚动数据
|
||||||
function GoodFriendMainPanel:FriendApplicationDataShow()
|
function GoodFriendMainPanel:FriendApplicationDataShow(isTop,isAni)
|
||||||
-- 检测红点
|
-- 检测红点
|
||||||
CheckRedPointStatus(RedPointType.Friend_Application)
|
CheckRedPointStatus(RedPointType.Friend_Application)
|
||||||
this:OnRefreshData()
|
this:OnRefreshData()
|
||||||
|
@ -416,7 +416,7 @@ function GoodFriendMainPanel:FriendApplicationDataShow()
|
||||||
-- else
|
-- else
|
||||||
-- item.gameObject:SetActive(true)
|
-- item.gameObject:SetActive(true)
|
||||||
-- end
|
-- end
|
||||||
end)
|
end,not isTop,not isAni)
|
||||||
if isPlayAnim then
|
if isPlayAnim then
|
||||||
SecTorPlayAnimByScroll(this.ScrollView2)
|
SecTorPlayAnimByScroll(this.ScrollView2)
|
||||||
isPlayAnim = false
|
isPlayAnim = false
|
||||||
|
@ -424,7 +424,8 @@ function GoodFriendMainPanel:FriendApplicationDataShow()
|
||||||
end
|
end
|
||||||
|
|
||||||
--好友搜索循环滚动数据
|
--好友搜索循环滚动数据
|
||||||
function GoodFriendMainPanel:FriendSearchDataShow()
|
function GoodFriendMainPanel:FriendSearchDataShow(isTop,isAni)
|
||||||
|
LogRed("isTop "..tostring(isTop).." isAni "..tostring(isAni))
|
||||||
this:OnRefreshData()
|
this:OnRefreshData()
|
||||||
local list = {}
|
local list = {}
|
||||||
local j = 1
|
local j = 1
|
||||||
|
@ -456,7 +457,7 @@ function GoodFriendMainPanel:FriendSearchDataShow()
|
||||||
-- else
|
-- else
|
||||||
-- item.gameObject:SetActive(true)
|
-- item.gameObject:SetActive(true)
|
||||||
-- end
|
-- end
|
||||||
end)
|
end,not isTop,not isAni)
|
||||||
if isPlayAnim then
|
if isPlayAnim then
|
||||||
SecTorPlayAnimByScroll(this.ScrollView3)
|
SecTorPlayAnimByScroll(this.ScrollView3)
|
||||||
isPlayAnim = false
|
isPlayAnim = false
|
||||||
|
@ -464,7 +465,7 @@ function GoodFriendMainPanel:FriendSearchDataShow()
|
||||||
end
|
end
|
||||||
|
|
||||||
--黑名单滚动数据
|
--黑名单滚动数据
|
||||||
function GoodFriendMainPanel:BlackListDataShow()
|
function GoodFriendMainPanel:BlackListDataShow(isTop,isAni)
|
||||||
this:OnRefreshData()
|
this:OnRefreshData()
|
||||||
local list = {}
|
local list = {}
|
||||||
local j = 1
|
local j = 1
|
||||||
|
@ -496,7 +497,7 @@ function GoodFriendMainPanel:BlackListDataShow()
|
||||||
-- else
|
-- else
|
||||||
-- item.gameObject:SetActive(true)
|
-- item.gameObject:SetActive(true)
|
||||||
-- end
|
-- end
|
||||||
end)
|
end,not isTop,not isAni)
|
||||||
if isPlayAnim then
|
if isPlayAnim then
|
||||||
SecTorPlayAnimByScroll(this.ScrollView4)
|
SecTorPlayAnimByScroll(this.ScrollView4)
|
||||||
isPlayAnim = false
|
isPlayAnim = false
|
||||||
|
|
|
@ -171,7 +171,7 @@ function this.GetFriendInfoRequest(type, msg)
|
||||||
-- friendData.isHaveApplication=1s
|
-- friendData.isHaveApplication=1s
|
||||||
this.friendSearchData[friendData.id] = friendData
|
this.friendSearchData[friendData.id] = friendData
|
||||||
end
|
end
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, this.friendSearchData)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, false,false) --this.friendSearchData)
|
||||||
elseif (type == 4) then
|
elseif (type == 4) then
|
||||||
this.blackFriendList = {}
|
this.blackFriendList = {}
|
||||||
for i = 1, #msg.Friends do
|
for i = 1, #msg.Friends do
|
||||||
|
@ -222,7 +222,7 @@ function this.InviteFriendRequest(inviteUids, func)
|
||||||
if this.friendSearchData[inviteUids] then
|
if this.friendSearchData[inviteUids] then
|
||||||
this.friendSearchData[inviteUids].isApplyed = 1
|
this.friendSearchData[inviteUids].isApplyed = 1
|
||||||
end
|
end
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, this.friendSearchData)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, false,false) --this.friendSearchData)
|
||||||
if func then
|
if func then
|
||||||
func()
|
func()
|
||||||
end
|
end
|
||||||
|
@ -313,7 +313,7 @@ function this.FriendSearchRequest(name)
|
||||||
NetManager.RequestFriendSearch(name, function(msg)
|
NetManager.RequestFriendSearch(name, function(msg)
|
||||||
this.friendSearchData = {}
|
this.friendSearchData = {}
|
||||||
this.friendSearchData[msg.Friends.id] = msg.Friends
|
this.friendSearchData[msg.Friends.id] = msg.Friends
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, this.friendSearchData)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, false,false) --this.friendSearchData)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
--刷新好友在线状态
|
--刷新好友在线状态
|
||||||
|
|
|
@ -36,7 +36,7 @@ function this:OnShow(_parent,...)
|
||||||
--不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参
|
--不定参中包含的不定参 _args[1]为面板类型 _args[2]之后(包括)为打开面板后传入的不定参
|
||||||
local args = {...}
|
local args = {...}
|
||||||
fun = args[1]
|
fun = args[1]
|
||||||
this.OnShowPanelData(true)
|
this.OnShowPanelData(true,true)
|
||||||
end
|
end
|
||||||
function this:OnSortingOrderChange(sortingOrder)
|
function this:OnSortingOrderChange(sortingOrder)
|
||||||
for i, v in pairs(this.NoviceItemList) do
|
for i, v in pairs(this.NoviceItemList) do
|
||||||
|
@ -47,16 +47,17 @@ function this:OnSortingOrderChange(sortingOrder)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function this.OnShowPanelData(isTop)
|
function this.OnShowPanelData(isTop,isAni)
|
||||||
local curAllData = TaskManager.GetCurShowAllAchievementData(TaskTypeDef.Achievement)
|
local curAllData = TaskManager.GetCurShowAllAchievementData(TaskTypeDef.Achievement)
|
||||||
local AllData = {}
|
local AllData = {}
|
||||||
for i, v in pairs(curAllData) do
|
for i, v in pairs(curAllData) do
|
||||||
table.insert(AllData,v)
|
table.insert(AllData,v)
|
||||||
end
|
end
|
||||||
this.RewardTabsSort(AllData)
|
this.RewardTabsSort(AllData)
|
||||||
|
LogRed("isTop "..tostring(not isTop).." isAni "..tostring(not isAni))
|
||||||
this.ScrollView:SetData(AllData, function (index, go)
|
this.ScrollView:SetData(AllData, function (index, go)
|
||||||
this.SingleDataShow(go, AllData[index])
|
this.SingleDataShow(go, AllData[index])
|
||||||
end, not isTop)
|
end, not isTop,not isAni)
|
||||||
-- if isPlayAnim then
|
-- if isPlayAnim then
|
||||||
-- SecTorPlayAnimByScroll(this.ScrollView)
|
-- SecTorPlayAnimByScroll(this.ScrollView)
|
||||||
-- isPlayAnim = false
|
-- isPlayAnim = false
|
||||||
|
@ -117,7 +118,7 @@ function this.SingleDataShow(go,rewardData)
|
||||||
Util.AddOnceClick(lingquButton, function()
|
Util.AddOnceClick(lingquButton, function()
|
||||||
NetManager.TakeMissionRewardRequest(TaskTypeDef.Achievement,rewardData.missionId, function(msg)
|
NetManager.TakeMissionRewardRequest(TaskTypeDef.Achievement,rewardData.missionId, function(msg)
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||||
this.OnShowPanelData()
|
this.OnShowPanelData(false,false)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -78,7 +78,7 @@ function this:OnShow(_parent,...)
|
||||||
local args = {...}
|
local args = {...}
|
||||||
fun = args[1]
|
fun = args[1]
|
||||||
this.rectMask.enabled=true
|
this.rectMask.enabled=true
|
||||||
this.OnShowData(true)
|
this.OnShowData(true,true)
|
||||||
end
|
end
|
||||||
function this:OnSortingOrderChange(sortingOrder)
|
function this:OnSortingOrderChange(sortingOrder)
|
||||||
for i, v in pairs(this.NoviceItemList) do
|
for i, v in pairs(this.NoviceItemList) do
|
||||||
|
@ -93,7 +93,7 @@ function this:OnSortingOrderChange(sortingOrder)
|
||||||
Util.AddParticleSortLayer(boxList[i], sortingOrder)
|
Util.AddParticleSortLayer(boxList[i], sortingOrder)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
function this.OnShowData(isTop)
|
function this.OnShowData(isTop,isAni)
|
||||||
dailyTasksConfig=ConfigManager.GetConfig(ConfigName.DailyTasksConfig)
|
dailyTasksConfig=ConfigManager.GetConfig(ConfigName.DailyTasksConfig)
|
||||||
curDailyMissionData = {}
|
curDailyMissionData = {}
|
||||||
curDailyMissionBoxData = {}
|
curDailyMissionBoxData = {}
|
||||||
|
@ -118,7 +118,7 @@ function this.OnShowData(isTop)
|
||||||
local AllData = TaskManager.GetTypeTaskList(TaskTypeDef.Achievement)
|
local AllData = TaskManager.GetTypeTaskList(TaskTypeDef.Achievement)
|
||||||
this.ScrollView:SetData(curDailyMissionData, function (index, go)
|
this.ScrollView:SetData(curDailyMissionData, function (index, go)
|
||||||
this.SingleMissionDatasDataShow(go,curDailyMissionData[index])
|
this.SingleMissionDatasDataShow(go,curDailyMissionData[index])
|
||||||
end, not isTop)
|
end, not isTop, not isAni)
|
||||||
this.SetDailyMissionBox(curDailyMissionBoxData)
|
this.SetDailyMissionBox(curDailyMissionBoxData)
|
||||||
-- if isPlayAnim then
|
-- if isPlayAnim then
|
||||||
-- SecTorPlayAnimByScroll(this.ScrollView)
|
-- SecTorPlayAnimByScroll(this.ScrollView)
|
||||||
|
@ -189,7 +189,7 @@ function this.SingleMissionDatasDataShow(_go,_missionData)
|
||||||
NetManager.TakeMissionRewardRequest(TaskTypeDef.DayTask,missionData.missionId,function (msg)
|
NetManager.TakeMissionRewardRequest(TaskTypeDef.DayTask,missionData.missionId,function (msg)
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||||
TaskManager.SetTypeTaskState(TaskTypeDef.DayTask, missionData.missionId, SingleDailyMissionState.GetFinish)
|
TaskManager.SetTypeTaskState(TaskTypeDef.DayTask, missionData.missionId, SingleDailyMissionState.GetFinish)
|
||||||
this.OnShowData()
|
this.OnShowData(false,false)
|
||||||
-- 检测红点状态
|
-- 检测红点状态
|
||||||
CheckRedPointStatus(RedPointType.DailyTask)
|
CheckRedPointStatus(RedPointType.DailyTask)
|
||||||
CheckRedPointStatus(RedPointType.SecretTer)
|
CheckRedPointStatus(RedPointType.SecretTer)
|
||||||
|
@ -278,7 +278,7 @@ function this.MissionBoxClick(btn,_singleData)
|
||||||
NetManager.TakeMissionRewardRequest(TaskTypeDef.DayTask,_singleData.missionId,function (msg)
|
NetManager.TakeMissionRewardRequest(TaskTypeDef.DayTask,_singleData.missionId,function (msg)
|
||||||
TaskManager.SetTypeTaskState(TaskTypeDef.DayTask, _singleData.missionId, SingleDailyMissionState.GetFinish)
|
TaskManager.SetTypeTaskState(TaskTypeDef.DayTask, _singleData.missionId, SingleDailyMissionState.GetFinish)
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1)
|
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1)
|
||||||
this.OnShowData()
|
this.OnShowData(false,false)
|
||||||
end)
|
end)
|
||||||
this.timer:Stop()
|
this.timer:Stop()
|
||||||
this.timer = nil
|
this.timer = nil
|
||||||
|
|
|
@ -81,7 +81,7 @@ this.Closefunction = function()
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
this.refresh()
|
this.refresh(false,false)
|
||||||
end
|
end
|
||||||
end,1):Start()
|
end,1):Start()
|
||||||
end
|
end
|
||||||
|
@ -98,7 +98,7 @@ function this:OnShow(_parent,...)
|
||||||
this.time.text = Language[10546]..startTime.."-"..endTime
|
this.time.text = Language[10546]..startTime.."-"..endTime
|
||||||
this.remainTime.text = Language[12321]..TimeToDHMS(tonumber(endTimeScale) - GetTimeStamp())
|
this.remainTime.text = Language[12321]..TimeToDHMS(tonumber(endTimeScale) - GetTimeStamp())
|
||||||
this:ShowTime(endTimeScale)
|
this:ShowTime(endTimeScale)
|
||||||
this.refresh()
|
this.refresh(true,true)
|
||||||
|
|
||||||
end
|
end
|
||||||
function this:OnSortingOrderChange(sortingOrder)
|
function this:OnSortingOrderChange(sortingOrder)
|
||||||
|
@ -125,10 +125,10 @@ function this:OnDestroy()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
this.refresh = function()
|
this.refresh = function(isTop,isAni)
|
||||||
QinglongSerectTreasureManager.UpdateTreasureState2()
|
QinglongSerectTreasureManager.UpdateTreasureState2()
|
||||||
this:topBar()
|
this:topBar()
|
||||||
this:showTaskList()
|
this:showTaskList(isTop,isAni)
|
||||||
CheckRedPointStatus(RedPointType.QinglongSerectTreasure)
|
CheckRedPointStatus(RedPointType.QinglongSerectTreasure)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ function this:topBar()
|
||||||
PopupTipPanel.ShowTip(Language[12355])
|
PopupTipPanel.ShowTip(Language[12355])
|
||||||
Timer.New(function()
|
Timer.New(function()
|
||||||
LogBlue("level:"..QinglongSerectTreasureManager.GetLevel())
|
LogBlue("level:"..QinglongSerectTreasureManager.GetLevel())
|
||||||
this.refresh()
|
this.refresh(false,false)
|
||||||
end,1):Start()
|
end,1):Start()
|
||||||
end)
|
end)
|
||||||
end,1.5):Start()
|
end,1.5):Start()
|
||||||
|
@ -200,11 +200,11 @@ function this:topBar()
|
||||||
end
|
end
|
||||||
|
|
||||||
--任务列表
|
--任务列表
|
||||||
function this:showTaskList()
|
function this:showTaskList(isTop,isAni)
|
||||||
local rewardData = QinglongSerectTreasureManager.GetAllRewardData()
|
local rewardData = QinglongSerectTreasureManager.GetAllRewardData()
|
||||||
this.ScrollView:SetData(rewardData,function(index, rewardItem)
|
this.ScrollView:SetData(rewardData,function(index, rewardItem)
|
||||||
this:SingleTask(rewardItem, rewardData[index])
|
this:SingleTask(rewardItem, rewardData[index])
|
||||||
end)
|
end,not isTop,not isAni)
|
||||||
local index = 0
|
local index = 0
|
||||||
if QinglongSerectTreasureManager.GetLevel() == 1 then
|
if QinglongSerectTreasureManager.GetLevel() == 1 then
|
||||||
index = 1
|
index = 1
|
||||||
|
@ -351,7 +351,7 @@ function this:OnBtnDealClicked(rewardItem,rewardSingleData)
|
||||||
else
|
else
|
||||||
QinglongSerectTreasureManager.SetSingleRewardState(rewardSingleData.level,-1)
|
QinglongSerectTreasureManager.SetSingleRewardState(rewardSingleData.level,-1)
|
||||||
end
|
end
|
||||||
this.refresh()--刷新界面
|
this.refresh(false,false)--刷新界面
|
||||||
end)
|
end)
|
||||||
elseif rewardSingleData.state == 1 and (not treasureState) then----任务已领取+礼包未购买(弹出购买界面)
|
elseif rewardSingleData.state == 1 and (not treasureState) then----任务已领取+礼包未购买(弹出购买界面)
|
||||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.HeavenUnlockExtraRewardPanel,2)
|
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.HeavenUnlockExtraRewardPanel,2)
|
||||||
|
|
|
@ -44,11 +44,11 @@ end
|
||||||
function this:BindEvent()
|
function this:BindEvent()
|
||||||
Util.AddClick(this.weekTrailBtn,function()
|
Util.AddClick(this.weekTrailBtn,function()
|
||||||
curType = 1
|
curType = 1
|
||||||
this.refresh()
|
this.refresh(true,true)
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.finalTrailBtn,function()
|
Util.AddClick(this.finalTrailBtn,function()
|
||||||
curType = 2
|
curType = 2
|
||||||
this.refresh()
|
this.refresh(true,true)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -81,7 +81,7 @@ end
|
||||||
|
|
||||||
function this.RefreshTime()
|
function this.RefreshTime()
|
||||||
NetManager.RefreshTimeSLRequest(function (msg)
|
NetManager.RefreshTimeSLRequest(function (msg)
|
||||||
this.refresh()
|
this.refresh(false,false)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ function this:OnShow(_parent,...)
|
||||||
parent:ClosePanel()
|
parent:ClosePanel()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
this.refresh()
|
this.refresh(true,true)
|
||||||
end
|
end
|
||||||
|
|
||||||
--topBar按钮状态
|
--topBar按钮状态
|
||||||
|
@ -139,7 +139,7 @@ function this:SetTopBar()
|
||||||
NetManager.GetActivityRewardRequest(-2,id,function(msg)
|
NetManager.GetActivityRewardRequest(-2,id,function(msg)
|
||||||
PrivilegeManager.RefreshPrivilegeUsedTimes(1007, 1)
|
PrivilegeManager.RefreshPrivilegeUsedTimes(1007, 1)
|
||||||
PopupTipPanel.ShowTip(Language[12355])
|
PopupTipPanel.ShowTip(Language[12355])
|
||||||
this.refresh()
|
this.refresh(false,false)
|
||||||
end)
|
end)
|
||||||
end,1.5):Start()
|
end,1.5):Start()
|
||||||
end)
|
end)
|
||||||
|
@ -163,12 +163,12 @@ function this:OnDestroy()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function this.refresh()
|
function this.refresh(isTop,isAni)
|
||||||
QinglongSerectTreasureManager.UpdateTreasureState2()
|
QinglongSerectTreasureManager.UpdateTreasureState2()
|
||||||
this:SetTopBar()
|
this:SetTopBar()
|
||||||
this:SetSelect()
|
this:SetSelect()
|
||||||
this:ShowTime(curType)
|
this:ShowTime(curType)
|
||||||
this:showTaskList(curType)
|
this:showTaskList(curType,isTop,isAni)
|
||||||
this:SetRedPoint()
|
this:SetRedPoint()
|
||||||
CheckRedPointStatus(RedPointType.QinglongSerectTreasureTrail)
|
CheckRedPointStatus(RedPointType.QinglongSerectTreasureTrail)
|
||||||
CheckRedPointStatus(RedPointType.QinglongSerectTreasure)
|
CheckRedPointStatus(RedPointType.QinglongSerectTreasure)
|
||||||
|
@ -186,7 +186,7 @@ local state = {
|
||||||
[2] = 2,
|
[2] = 2,
|
||||||
}
|
}
|
||||||
--任务列表
|
--任务列表
|
||||||
function this:showTaskList(type)
|
function this:showTaskList(type,isTop,isAni)
|
||||||
local rewardData = QinglongSerectTreasureManager.GetQinglongTaskData(type)
|
local rewardData = QinglongSerectTreasureManager.GetQinglongTaskData(type)
|
||||||
table.sort(rewardData,function(a,b)
|
table.sort(rewardData,function(a,b)
|
||||||
if state[a.state] == state[b.state] then
|
if state[a.state] == state[b.state] then
|
||||||
|
@ -197,8 +197,8 @@ function this:showTaskList(type)
|
||||||
end)
|
end)
|
||||||
this.ScrollView:SetData(rewardData,function(index, rewardItem)
|
this.ScrollView:SetData(rewardData,function(index, rewardItem)
|
||||||
this:SingleTask(rewardItem, rewardData[index])
|
this:SingleTask(rewardItem, rewardData[index])
|
||||||
end)
|
end,not isTop,not isAni)
|
||||||
this.ScrollView:SetIndex(1)
|
-- this.ScrollView:SetIndex(1)
|
||||||
-- if isPlayAnim then
|
-- if isPlayAnim then
|
||||||
-- SecTorPlayAnimByScroll(this.ScrollView)
|
-- SecTorPlayAnimByScroll(this.ScrollView)
|
||||||
-- isPlayAnim = false
|
-- isPlayAnim = false
|
||||||
|
@ -238,7 +238,7 @@ function this:SingleTask(go, rewardSingleData)
|
||||||
NetManager.TakeMissionRewardRequest(TaskTypeDef.TreasureOfSomeBody,sConFigData.id, function(msg)
|
NetManager.TakeMissionRewardRequest(TaskTypeDef.TreasureOfSomeBody,sConFigData.id, function(msg)
|
||||||
PopupTipPanel.ShowTip(Language[12358]..sConFigData.integral[1][2]..itemConfig[tonumber(sConFigData.integral[1][1])].Name)
|
PopupTipPanel.ShowTip(Language[12358]..sConFigData.integral[1][2]..itemConfig[tonumber(sConFigData.integral[1][1])].Name)
|
||||||
Timer.New(function()
|
Timer.New(function()
|
||||||
this.refresh()
|
this.refresh(false,false)
|
||||||
end,1):Start()
|
end,1):Start()
|
||||||
end)
|
end)
|
||||||
elseif state == 0 then
|
elseif state == 0 then
|
||||||
|
|
|
@ -1847,7 +1847,7 @@ function this.RequestFriendSearch(name, func)
|
||||||
data.name = name
|
data.name = name
|
||||||
local msg = data:SerializeToString()
|
local msg = data:SerializeToString()
|
||||||
GoodFriendManager.friendSearchInfo = {}
|
GoodFriendManager.friendSearchInfo = {}
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, this.friendSearchInfo)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Friend.OnFriendSearch, false,false) --this.friendSearchInfo)
|
||||||
Network:SendMessageWithCallBack(MessageTypeProto_pb.FRIEND_SEARCH_REQUEST, MessageTypeProto_pb.FRIEND_SEARCH_RESPONSE, msg, function(buffer)
|
Network:SendMessageWithCallBack(MessageTypeProto_pb.FRIEND_SEARCH_REQUEST, MessageTypeProto_pb.FRIEND_SEARCH_RESPONSE, msg, function(buffer)
|
||||||
local data = buffer:DataByte()
|
local data = buffer:DataByte()
|
||||||
local msg = PlayerInfoProto_pb.FriendSearchResponse()
|
local msg = PlayerInfoProto_pb.FriendSearchResponse()
|
||||||
|
|
|
@ -56,10 +56,10 @@ end
|
||||||
|
|
||||||
function GrowthGiftPage:RefreshData()
|
function GrowthGiftPage:RefreshData()
|
||||||
self:SetBtnInvestState()
|
self:SetBtnInvestState()
|
||||||
self:RefreshGiftData()
|
self:RefreshGiftData(true,true)
|
||||||
end
|
end
|
||||||
|
|
||||||
function GrowthGiftPage:RefreshGiftData()
|
function GrowthGiftPage:RefreshGiftData(isTop,isAni)
|
||||||
|
|
||||||
local list = {}
|
local list = {}
|
||||||
--判断是否已经有了List
|
--判断是否已经有了List
|
||||||
|
@ -92,7 +92,7 @@ function GrowthGiftPage:RefreshGiftData()
|
||||||
local callBack = function(index, item)
|
local callBack = function(index, item)
|
||||||
self:RefreshShowData(item, list[index])
|
self:RefreshShowData(item, list[index])
|
||||||
end
|
end
|
||||||
self.scrollView:SetData(list, callBack)
|
self.scrollView:SetData(list, callBack, not isTop,not isAni)
|
||||||
if isPlayAnim then
|
if isPlayAnim then
|
||||||
SecTorPlayAnimByScroll(self.scrollView)
|
SecTorPlayAnimByScroll(self.scrollView)
|
||||||
isPlayAnim = false
|
isPlayAnim = false
|
||||||
|
@ -192,7 +192,7 @@ function GrowthGiftPage:RefreshShowData(item, data)
|
||||||
local info = ActivityGiftManager.GetActivityInfo(GrowthRewardId, t[i].Id)
|
local info = ActivityGiftManager.GetActivityInfo(GrowthRewardId, t[i].Id)
|
||||||
if info.state ~= 1 then
|
if info.state ~= 1 then
|
||||||
-- Game.GlobalEvent:DispatchEvent(GameEvent.GrowGift.GetAllGift)
|
-- Game.GlobalEvent:DispatchEvent(GameEvent.GrowGift.GetAllGift)
|
||||||
self:RefreshGiftData()
|
self:RefreshGiftData(false,false)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -52,12 +52,12 @@ end
|
||||||
|
|
||||||
function WeekMonthGiftPackPage:RefreshData()
|
function WeekMonthGiftPackPage:RefreshData()
|
||||||
-- 刷新商品数据
|
-- 刷新商品数据
|
||||||
self:RefreshGiftData(true)
|
self:RefreshGiftData(true,true)
|
||||||
-- 刷新剩余时间
|
-- 刷新剩余时间
|
||||||
self:GetRemainTime()
|
self:GetRemainTime()
|
||||||
end
|
end
|
||||||
|
|
||||||
function WeekMonthGiftPackPage:RefreshGiftData(isTop)
|
function WeekMonthGiftPackPage:RefreshGiftData(isTop,isAni)
|
||||||
local shopData = {}
|
local shopData = {}
|
||||||
self.titleBg.sprite = Util.LoadSprite(data[extra].picture)
|
self.titleBg.sprite = Util.LoadSprite(data[extra].picture)
|
||||||
if extra <= 2 then
|
if extra <= 2 then
|
||||||
|
@ -88,7 +88,7 @@ function WeekMonthGiftPackPage:RefreshGiftData(isTop)
|
||||||
local callBack = function(index, item)
|
local callBack = function(index, item)
|
||||||
self:RefreshShowData(item, shopData[index].data)
|
self:RefreshShowData(item, shopData[index].data)
|
||||||
end
|
end
|
||||||
self.scrollView:SetData(shopData, callBack, not isTop)
|
self.scrollView:SetData(shopData, callBack, not isTop,not isAni)
|
||||||
if isPlayAnim then
|
if isPlayAnim then
|
||||||
SecTorPlayAnimByScroll(self.scrollView)
|
SecTorPlayAnimByScroll(self.scrollView)
|
||||||
isPlayAnim = false
|
isPlayAnim = false
|
||||||
|
@ -182,7 +182,7 @@ function WeekMonthGiftPackPage:RefreshShowData(item, data)
|
||||||
--直购商品
|
--直购商品
|
||||||
PayManager.Pay(data.goodsId, function(id)
|
PayManager.Pay(data.goodsId, function(id)
|
||||||
FirstRechargeManager.RefreshAccumRechargeValue(data.goodsId)
|
FirstRechargeManager.RefreshAccumRechargeValue(data.goodsId)
|
||||||
self:RefreshGiftData(false)
|
self:RefreshGiftData(false,false)
|
||||||
CheckRedPointStatus(RedPointType.DailyGift)
|
CheckRedPointStatus(RedPointType.DailyGift)
|
||||||
CheckRedPointStatus(RedPointType.WeekGiftPage)
|
CheckRedPointStatus(RedPointType.WeekGiftPage)
|
||||||
CheckRedPointStatus(RedPointType.MonthGiftPage)
|
CheckRedPointStatus(RedPointType.MonthGiftPage)
|
||||||
|
|
|
@ -70,7 +70,7 @@ function this:RechargeSuccessFunc()
|
||||||
TreasureOfHeavenManger.SetTreasureState()
|
TreasureOfHeavenManger.SetTreasureState()
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeSuccess)
|
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeSuccess)
|
||||||
elseif curType == 2 then
|
elseif curType == 2 then
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess)
|
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess,false,false)
|
||||||
end
|
end
|
||||||
parent:ClosePanel()
|
parent:ClosePanel()
|
||||||
end
|
end
|
||||||
|
|
|
@ -203,26 +203,43 @@ function this.SwitchView(index)
|
||||||
this.List2[i].gameObject:SetActive(true)
|
this.List2[i].gameObject:SetActive(true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
for i = 1, #this.List3 do
|
||||||
|
if this.List3[i] then
|
||||||
|
this.List3[i].gameObject:SetActive(false)
|
||||||
|
end
|
||||||
|
end
|
||||||
for i = 1, #threeData do
|
for i = 1, #threeData do
|
||||||
if not this.List3[i] then
|
if not this.List3[i] then
|
||||||
this.List3[i] = SubUIManager.Open(SubUIConfig.ItemView,this.threeGrid.transform)
|
this.List3[i] = SubUIManager.Open(SubUIConfig.ItemView,this.threeGrid.transform)
|
||||||
|
this.List3[i].gameObject:SetActive(true)
|
||||||
end
|
end
|
||||||
this.List3[i]:OnOpen(false, {threeData[i].Reward[1], threeData[i].Reward[2]}, 1.1, true)
|
this.List3[i]:OnOpen(false, {threeData[i].Reward[1], threeData[i].Reward[2]}, 1.1, true)
|
||||||
this.List3[i].name:GetComponent("Text").text="<color=#EDB64C>"..string.format("%.2f", (threeData[i].Weight/100000)*100) .."%</color>"
|
this.List3[i].name:GetComponent("Text").text="<color=#EDB64C>"..string.format("%.2f", (threeData[i].Weight/100000)*100) .."%</color>"
|
||||||
this.List3[i].gameObject:SetActive(true)
|
this.List3[i].gameObject:SetActive(true)
|
||||||
end
|
end
|
||||||
|
for i = 1, #this.List4 do
|
||||||
|
if this.List4[i] then
|
||||||
|
this.List4[i].gameObject:SetActive(false)
|
||||||
|
end
|
||||||
|
end
|
||||||
for i = 1, #fourData do
|
for i = 1, #fourData do
|
||||||
if not this.List4[i] then
|
if not this.List4[i] then
|
||||||
this.List4[i] = SubUIManager.Open(SubUIConfig.ItemView,this.fourGrid.transform)
|
this.List4[i] = SubUIManager.Open(SubUIConfig.ItemView,this.fourGrid.transform)
|
||||||
|
this.List4[i].gameObject:SetActive(true)
|
||||||
end
|
end
|
||||||
this.List4[i]:OnOpen(false, {fourData[i].Reward[1], fourData[i].Reward[2]}, 1.1, true)
|
this.List4[i]:OnOpen(false, {fourData[i].Reward[1], fourData[i].Reward[2]}, 1.1, true)
|
||||||
this.List4[i].name:GetComponent("Text").text="<color=#EDB64C>"..string.format("%.2f", (fourData[i].Weight/100000)*100) .."%</color>"
|
this.List4[i].name:GetComponent("Text").text="<color=#EDB64C>"..string.format("%.2f", (fourData[i].Weight/100000)*100) .."%</color>"
|
||||||
this.List4[i].gameObject:SetActive(true)
|
this.List4[i].gameObject:SetActive(true)
|
||||||
end
|
end
|
||||||
|
for i = 1, #this.List5 do
|
||||||
|
if this.List5[i] then
|
||||||
|
this.List5[i].gameObject:SetActive(false)
|
||||||
|
end
|
||||||
|
end
|
||||||
for i = 1, #fiveData do
|
for i = 1, #fiveData do
|
||||||
if not this.List5[i] then
|
if not this.List5[i] then
|
||||||
this.List5[i] = SubUIManager.Open(SubUIConfig.ItemView,this.fiveGrid.transform)
|
this.List5[i] = SubUIManager.Open(SubUIConfig.ItemView,this.fiveGrid.transform)
|
||||||
|
this.List5[i].gameObject:SetActive(true)
|
||||||
end
|
end
|
||||||
this.List5[i]:OnOpen(false, {fiveData[i].Reward[1], fiveData[i].Reward[2]}, 1.1, true)
|
this.List5[i]:OnOpen(false, {fiveData[i].Reward[1], fiveData[i].Reward[2]}, 1.1, true)
|
||||||
this.List5[i].name:GetComponent("Text").text="<color=#EDB64C>"..string.format("%.2f", (fiveData[i].Weight/100000)*100) .."%</color>"
|
this.List5[i].name:GetComponent("Text").text="<color=#EDB64C>"..string.format("%.2f", (fiveData[i].Weight/100000)*100) .."%</color>"
|
||||||
|
|
|
@ -100,7 +100,7 @@ function HeadChangePopup:BindEvent()
|
||||||
PopupTipPanel.ShowTip(Language[11891])
|
PopupTipPanel.ShowTip(Language[11891])
|
||||||
HeadManager.SetCurFrameId(frameId)
|
HeadManager.SetCurFrameId(frameId)
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnHeadFrameChange)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnHeadFrameChange)
|
||||||
this.RefreshCurShow()
|
this.RefreshCurShow(false,false)
|
||||||
end)
|
end)
|
||||||
elseif this.CurSelectType == SELECT_TYPE.HEAD then
|
elseif this.CurSelectType == SELECT_TYPE.HEAD then
|
||||||
local headId = _HeadList[this.CurSelectIndex].Id
|
local headId = _HeadList[this.CurSelectIndex].Id
|
||||||
|
@ -113,7 +113,7 @@ function HeadChangePopup:BindEvent()
|
||||||
PopupTipPanel.ShowTip(Language[11891])
|
PopupTipPanel.ShowTip(Language[11891])
|
||||||
PlayerManager.head = headId
|
PlayerManager.head = headId
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnHeadChange)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Player.OnHeadChange)
|
||||||
this.RefreshCurShow()
|
this.RefreshCurShow(false,false)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
@ -207,12 +207,12 @@ function this.OnTabChange(index, lastIndex)
|
||||||
this.CurSelectIndex = 1
|
this.CurSelectIndex = 1
|
||||||
this.ScrollView:SetData(datalist, function(index, go)
|
this.ScrollView:SetData(datalist, function(index, go)
|
||||||
this.HeadFrameItemAdapter(go, datalist[index], index)
|
this.HeadFrameItemAdapter(go, datalist[index], index)
|
||||||
end)
|
end,not true,not true)
|
||||||
this.ScrollView:SetIndex(1)
|
-- this.ScrollView:SetIndex(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
--
|
--
|
||||||
function this.RefreshCurShow()
|
function this.RefreshCurShow(isTop,isAni)
|
||||||
local datalist = {}
|
local datalist = {}
|
||||||
if this.CurSelectType == SELECT_TYPE.FRAME then
|
if this.CurSelectType == SELECT_TYPE.FRAME then
|
||||||
datalist = _HeadFrameList
|
datalist = _HeadFrameList
|
||||||
|
@ -221,7 +221,7 @@ function this.RefreshCurShow()
|
||||||
end
|
end
|
||||||
this.ScrollView:SetData(datalist, function(index, go)
|
this.ScrollView:SetData(datalist, function(index, go)
|
||||||
this.HeadFrameItemAdapter(go, datalist[index], index)
|
this.HeadFrameItemAdapter(go, datalist[index], index)
|
||||||
end)
|
end,not isTop,not isAni)
|
||||||
end
|
end
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
|
@ -198,7 +198,7 @@ function this.RequestBuyShopItem(shopType, shopItemId, num, func,isShowReward)
|
||||||
this.SortItemList(shopType)
|
this.SortItemList(shopType)
|
||||||
|
|
||||||
-- 更新事件
|
-- 更新事件
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Shop.OnShopInfoChange)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Shop.OnShopInfoChange,false,false,false)
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold)
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.Adventure.OnRefreshNextDayData)
|
Game.GlobalEvent:DispatchEvent(GameEvent.Adventure.OnRefreshNextDayData)
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -67,7 +67,7 @@ function HeavenUnlockExtraRewardPanel:RechargeSuccessFunc()
|
||||||
TreasureOfHeavenManger.SetTreasureState()
|
TreasureOfHeavenManger.SetTreasureState()
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeSuccess)
|
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeSuccess)
|
||||||
elseif curType == 2 then
|
elseif curType == 2 then
|
||||||
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess)
|
Game.GlobalEvent:DispatchEvent(GameEvent.TreasureOfHeaven.RechargeQinglongSerectSuccess,false,false)
|
||||||
end
|
end
|
||||||
|
|
||||||
this:ClosePanel()
|
this:ClosePanel()
|
||||||
|
|
|
@ -376,10 +376,55 @@ function this:SetShow(showIndex)
|
||||||
if self.co then
|
if self.co then
|
||||||
coroutine.stop(self.co)
|
coroutine.stop(self.co)
|
||||||
end
|
end
|
||||||
self.co = coroutine.start(function()
|
if self.isPlayAnim then
|
||||||
-- 分帧加载期间不可拖动
|
self.co = coroutine.start(function()
|
||||||
self.isCanDrag = false
|
-- 分帧加载期间不可拖动
|
||||||
|
self.isCanDrag = false
|
||||||
|
|
||||||
|
for i=1, self.itemCount do
|
||||||
|
-- local isNew = false
|
||||||
|
for j=1, self.fixedCount do
|
||||||
|
item = self.cellItemList[j][i]
|
||||||
|
index = j+(i-1)*self.fixedCount
|
||||||
|
dataIndex = j+(i-1 + self.dataLine)*self.fixedCount
|
||||||
|
|
||||||
|
if not item.go then
|
||||||
|
local go = newObject(self.item)
|
||||||
|
go.transform:SetParent(self.dragGO.transform)
|
||||||
|
go.transform.localScale = Vector3.one
|
||||||
|
go.transform.localPosition = Vector3.zero
|
||||||
|
go:SetActive(false)
|
||||||
|
|
||||||
|
local tran = go:GetComponent("RectTransform")
|
||||||
|
tran.anchorMin = Vector2.New(0, 1)
|
||||||
|
tran.anchorMax = Vector2.New(0, 1)
|
||||||
|
|
||||||
|
item.go = go
|
||||||
|
item.tran = tran
|
||||||
|
|
||||||
|
-- coroutine.wait(0.01)
|
||||||
|
-- isNew = true
|
||||||
|
end
|
||||||
|
|
||||||
|
if item.go then
|
||||||
|
item.go.name = "item"..index
|
||||||
|
if self.dragType == 1 then
|
||||||
|
item.tran.anchoredPosition = Vector2.New(self.itemWidth * (j-1), (0.5-i - self.dataLine) * self.itemHeight)
|
||||||
|
else
|
||||||
|
item.tran.anchoredPosition = Vector2.New((i-0.5 + self.dataLine) * self.itemWidth, self.itemHeight * (1-j))
|
||||||
|
end
|
||||||
|
self.goItemList[index] = item.go
|
||||||
|
end
|
||||||
|
SetUpdate(self, dataIndex, item)
|
||||||
|
end
|
||||||
|
-- if not isNew then
|
||||||
|
coroutine.wait(0.01)
|
||||||
|
-- end
|
||||||
|
end
|
||||||
|
-- 加载完成可以拖动了
|
||||||
|
self.isCanDrag = true
|
||||||
|
end)
|
||||||
|
else
|
||||||
for i=1, self.itemCount do
|
for i=1, self.itemCount do
|
||||||
-- local isNew = false
|
-- local isNew = false
|
||||||
for j=1, self.fixedCount do
|
for j=1, self.fixedCount do
|
||||||
|
@ -416,13 +461,9 @@ function this:SetShow(showIndex)
|
||||||
end
|
end
|
||||||
SetUpdate(self, dataIndex, item)
|
SetUpdate(self, dataIndex, item)
|
||||||
end
|
end
|
||||||
-- if not isNew then
|
|
||||||
coroutine.wait(0.01)
|
|
||||||
-- end
|
|
||||||
end
|
end
|
||||||
-- 加载完成可以拖动了
|
end
|
||||||
self.isCanDrag = true
|
|
||||||
end)
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -176,7 +176,7 @@ end
|
||||||
|
|
||||||
---===================================内部函数========================================
|
---===================================内部函数========================================
|
||||||
-- 刷新商店内容显示
|
-- 刷新商店内容显示
|
||||||
function this:RefreshShopInfo(isRefresh, isTop)
|
function this:RefreshShopInfo(isRefresh, isTop,isAni)
|
||||||
if self.ShopType == SHOP_TYPE.SOUL_STONE_SHOP then
|
if self.ShopType == SHOP_TYPE.SOUL_STONE_SHOP then
|
||||||
self.RechargeShopData = OperatingManager.GetGiftGoodsInfoList(GoodsTypeDef.DemonCrystal)
|
self.RechargeShopData = OperatingManager.GetGiftGoodsInfoList(GoodsTypeDef.DemonCrystal)
|
||||||
else
|
else
|
||||||
|
@ -185,7 +185,7 @@ function this:RefreshShopInfo(isRefresh, isTop)
|
||||||
|
|
||||||
self:RefreshLive()
|
self:RefreshLive()
|
||||||
self:RefreshBase()
|
self:RefreshBase()
|
||||||
self:RefreshItemList(isTop)
|
self:RefreshItemList(isRefresh,isTop,isAni)
|
||||||
|
|
||||||
-- 刷新商店的查看时间
|
-- 刷新商店的查看时间
|
||||||
ShopManager.RefreshShopCheckTime(self.ShopType)
|
ShopManager.RefreshShopCheckTime(self.ShopType)
|
||||||
|
@ -379,7 +379,7 @@ function this:RefreshBase()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- 刷新物品列表
|
-- 刷新物品列表
|
||||||
function this:RefreshItemList(isTop)
|
function this:RefreshItemList(isRefresh,isTop,isAni)
|
||||||
if self.ShopType == SHOP_TYPE.SOUL_STONE_SHOP then
|
if self.ShopType == SHOP_TYPE.SOUL_STONE_SHOP then
|
||||||
self.ScrollView.gameObject:SetActive(false)
|
self.ScrollView.gameObject:SetActive(false)
|
||||||
self.RechargeScrollView.gameObject:SetActive(true)
|
self.RechargeScrollView.gameObject:SetActive(true)
|
||||||
|
@ -390,7 +390,7 @@ function this:RefreshItemList(isTop)
|
||||||
-- if isPlayShow then
|
-- if isPlayShow then
|
||||||
-- shopItem.gameObject:SetActive(false)
|
-- shopItem.gameObject:SetActive(false)
|
||||||
-- end
|
-- end
|
||||||
end, not isTop)
|
end, not isTop,not isAni)
|
||||||
-- if isPlayShow then
|
-- if isPlayShow then
|
||||||
-- SecTorPlayAnimByScroll(self.RechargeScrollView,0.03)
|
-- SecTorPlayAnimByScroll(self.RechargeScrollView,0.03)
|
||||||
-- isPlayShow = false
|
-- isPlayShow = false
|
||||||
|
@ -406,7 +406,7 @@ function this:RefreshItemList(isTop)
|
||||||
if isPlayShow then
|
if isPlayShow then
|
||||||
shopItem.gameObject:SetActive(true)
|
shopItem.gameObject:SetActive(true)
|
||||||
end
|
end
|
||||||
end, not isTop)
|
end, not isTop,not isAni)
|
||||||
-- if isPlayShow then
|
-- if isPlayShow then
|
||||||
-- -- SecTorPlayAnimByScroll(self.ScrollView, 0.03)
|
-- -- SecTorPlayAnimByScroll(self.ScrollView, 0.03)
|
||||||
-- isPlayShow = false
|
-- isPlayShow = false
|
||||||
|
@ -557,7 +557,7 @@ end
|
||||||
function this:RechargeSuccessFunc(id)
|
function this:RechargeSuccessFunc(id)
|
||||||
FirstRechargeManager.RefreshAccumRechargeValue(id)
|
FirstRechargeManager.RefreshAccumRechargeValue(id)
|
||||||
OperatingManager.RefreshGiftGoodsBuyTimes(GoodsTypeDef.DemonCrystal, id)
|
OperatingManager.RefreshGiftGoodsBuyTimes(GoodsTypeDef.DemonCrystal, id)
|
||||||
self:RefreshShopInfo(false, false)
|
self:RefreshShopInfo(false, false,true)
|
||||||
--PopupTipPanel.ShowTip("购买成功,请到邮箱中领取!")
|
--PopupTipPanel.ShowTip("购买成功,请到邮箱中领取!")
|
||||||
PlayerPrefs.SetInt(PlayerManager.uid.."czlb", 0)
|
PlayerPrefs.SetInt(PlayerManager.uid.."czlb", 0)
|
||||||
CheckRedPointStatus(RedPointType.GrowthPackage)--成长礼包红点检测
|
CheckRedPointStatus(RedPointType.GrowthPackage)--成长礼包红点检测
|
||||||
|
@ -588,7 +588,7 @@ function this:ShowShop(shopType,_sortingOrder)
|
||||||
self.ShopConfig = _ShopTypeConfig[self.ShopId]
|
self.ShopConfig = _ShopTypeConfig[self.ShopId]
|
||||||
-- 显示帮助按钮
|
-- 显示帮助按钮
|
||||||
self.helpBtn:SetActive(self.ShopConfig.HelpId ~= 0)
|
self.helpBtn:SetActive(self.ShopConfig.HelpId ~= 0)
|
||||||
self:RefreshShopInfo(false, true)
|
self:RefreshShopInfo(false, true,true)
|
||||||
-- 设置tip显隐
|
-- 设置tip显隐
|
||||||
local isSSSHop = self.ShopType == SHOP_TYPE.SOUL_STONE_SHOP
|
local isSSSHop = self.ShopType == SHOP_TYPE.SOUL_STONE_SHOP
|
||||||
self.scrollBg1:SetActive(not isSSSHop)
|
self.scrollBg1:SetActive(not isSSSHop)
|
||||||
|
|
Loading…
Reference in New Issue