diff --git a/Assets/ManagedResources/Prefabs/UI/TreasureStore/TreasureStorePopup.prefab b/Assets/ManagedResources/Prefabs/UI/TreasureStore/TreasureStorePopup.prefab index de337d970c..6232aea267 100644 --- a/Assets/ManagedResources/Prefabs/UI/TreasureStore/TreasureStorePopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/TreasureStore/TreasureStorePopup.prefab @@ -16,7 +16,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &3073281026589723369 RectTransform: m_ObjectHideFlags: 0 @@ -34,9 +34,9 @@ RectTransform: m_Father: {fileID: 6886638989263466640} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 54.905, y: -444.75497} m_SizeDelta: {x: 109.81, y: 109.93} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4700869063048308914 @@ -482,8 +482,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -14.1, y: -69.5} - m_SizeDelta: {x: 138, y: 30} + m_AnchoredPosition: {x: 4, y: -69.5} + m_SizeDelta: {x: 174.3, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4641972924122469392 CanvasRenderer: @@ -515,16 +515,16 @@ MonoBehaviour: Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 12800000, guid: 6fa15837529b0e640af6620b07d3207d, type: 3} - m_FontSize: 14 + m_FontSize: 22 m_FontStyle: 0 - m_BestFit: 1 - m_MinSize: 10 + m_BestFit: 0 + m_MinSize: 2 m_MaxSize: 40 - m_Alignment: 5 + m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 + m_VerticalOverflow: 1 m_LineSpacing: 1 m_Text: New Text --- !u!1 &1096337136158421641 @@ -1010,16 +1010,16 @@ MonoBehaviour: Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 12800000, guid: 6fa15837529b0e640af6620b07d3207d, type: 3} - m_FontSize: 14 + m_FontSize: 25 m_FontStyle: 0 - m_BestFit: 1 - m_MinSize: 10 + m_BestFit: 0 + m_MinSize: 2 m_MaxSize: 40 m_Alignment: 5 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 + m_VerticalOverflow: 1 m_LineSpacing: 1 m_Text: New Text --- !u!1 &2336331734209450075 @@ -6367,8 +6367,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -14.1, y: -69.5} - m_SizeDelta: {x: 138, y: 30} + m_AnchoredPosition: {x: 5.53, y: -69.5} + m_SizeDelta: {x: 185.11, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3382910129785109417 CanvasRenderer: @@ -6400,16 +6400,16 @@ MonoBehaviour: Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 12800000, guid: 6fa15837529b0e640af6620b07d3207d, type: 3} - m_FontSize: 14 + m_FontSize: 22 m_FontStyle: 0 - m_BestFit: 1 - m_MinSize: 10 + m_BestFit: 0 + m_MinSize: 2 m_MaxSize: 40 - m_Alignment: 5 + m_Alignment: 4 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 + m_VerticalOverflow: 1 m_LineSpacing: 1 m_Text: New Text --- !u!1 &4113140305433002634 @@ -12557,16 +12557,16 @@ MonoBehaviour: Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: m_Font: {fileID: 12800000, guid: 6fa15837529b0e640af6620b07d3207d, type: 3} - m_FontSize: 14 + m_FontSize: 22 m_FontStyle: 0 - m_BestFit: 1 - m_MinSize: 10 + m_BestFit: 0 + m_MinSize: 2 m_MaxSize: 40 m_Alignment: 5 m_AlignByGeometry: 0 m_RichText: 1 m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 + m_VerticalOverflow: 1 m_LineSpacing: 1 m_Text: New Text --- !u!1 &8524300251712960252 diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index 85bbfa2db7..0e52a94d9a 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -1708,6 +1708,7 @@ FormationTypeDef = { GUILD_TRANSCRIPT = 1501, --公会副本 FIGHT_LEVEL = 1701, --山河社稷图主关卡编队 FIGHT_ASSISTANTLEVEL = 1801, --山河社稷图副主关卡编队 + FORMATION_TSLX = 1901, --踏碎凌霄编队 没有实际意义后端做特殊操作 其实就是主线编队 } --编队需要拉取主线 @@ -1731,6 +1732,7 @@ PLAYER_INFO_VIEW_TYPE = { GO_TO_BLACK = 3, ARENA = 4, MIND_DEMON = 5, + TSLX = 6,--踏碎凌霄当前排行编队 } --限时达人 周卡 限时活动 拍脸 异妖直购 diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyTenPanel.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyTenPanel.lua index 37ec248d52..b68dca1380 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyTenPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyTenPanel.lua @@ -175,7 +175,6 @@ function QianKunBoxBuyTenPanel:OnOpen(...) end) this.views = {} this.itemDataList = itemDataList - LogError("item len=="..#itemDataList) local dataNum = #itemDataList > 10 and 10 or #itemDataList for i = dataNum, 1, -1 do Util.ClearChild(this.contentList[i].transform) diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua index e0af934f92..895418213c 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua @@ -274,7 +274,6 @@ function TimeLimitUpHero:Recruit(actId,type,itemId) --记录妖晶抽卡 if itemId==16 then - LogError("记录妖晶次数") PrivilegeManager.RefreshPrivilegeUsedTimes(self.yaojingMaxTimeId,recrutType)--记录妖晶抽卡次数 end if type == 1 then @@ -394,7 +393,7 @@ function TimeLimitUpHero:RefreshNextLevelReward() Util.GetGameObject(self.slider.gameObject,"Text"):GetComponent("Text").text="300/300" self.sliderText.text="奖励已全部领取" Util.AddOnceClick(self.getBtn,function() - UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecrutReward,self.actType,self.actId) + UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.RecrutReward,self.actType,self.actId,curHeroId) end) else self.slider.gameObject:SetActive(true) diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index 5d8ec08066..455f2be3c4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -331,6 +331,11 @@ function this:BindEvent() for i = 1, #NPCList do local view = MainPlayerView.New(false, this.btnClickMove, rect, Vector2.New(math.random(rect.xMin, rect.xMax), math.random(rect.yMin, rect.yMax)),NPCList[i],this.sortingOrder) view.NameText.text = NPCList[i].userName or NPCList[i].name + LogYellow("username:"..tostring( NPCList[i].userName).." name:"..tostring(NPCList[i].name).." lv:"..tostring(NPCList[i].lv).." practiceLevel:"..tostring(NPCList[i].practiceLevel)) + if NPCList[i].lv and NPCList[i].lv >= GlobalSysConfig[108].OpenRules[2] then + view.ImprintImg:SetActive(true) + PracticeManager.SetPracticeIcon(view.ImprintImg,NPCList[i].practiceLevel) + end view:SetAutoMove() view.leader.transform.name = "MainPlayerView"..i table.insert(curNPCList,view) diff --git a/Assets/ManagedResources/~Lua/Modules/Main/View/MainPlayerView.lua b/Assets/ManagedResources/~Lua/Modules/Main/View/MainPlayerView.lua index c285ab21f6..baadeb2e51 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/View/MainPlayerView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/View/MainPlayerView.lua @@ -43,11 +43,11 @@ function MainPlayerView.New(isSelf, root, rect, pos,_NpvData,sortingOrder) Util.GetGameObject(instance.leader, "name/text"):SetActive(false) Util.GetGameObject(instance.leader, "name/text2"):SetActive(true) _sex = _NpvData.sex - --如果修行开启设置修行标识 - if _NpvData.lv and _NpvData.lv >= GlobalSysConfig[108].OpenRules[2] then - instance.ImprintImg:SetActive(true) - PracticeManager.SetPracticeIcon(instance.ImprintImg,_NpvData.practiceLevel) - end + -- --如果修行开启设置修行标识 + -- if _NpvData.lv and _NpvData.lv >= GlobalSysConfig[108].OpenRules[2] then + -- instance.ImprintImg:SetActive(true) + -- PracticeManager.SetPracticeIcon(instance.ImprintImg,_NpvData.practiceLevel) + -- end if _sex == 0 then zuoqi = 80008 end local PlayerLiveViewData = { skin = _NpvData.userSkin, diff --git a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua index 436df4d13a..1e7110ba8f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/EndLessMapManager.lua @@ -44,6 +44,9 @@ end function this.RefreshItemData() local id,level = this.GetTreasureLevel() + if not this.treasureData then + return + end if id ~= this.treasureData.curDataId then this.treasureData.curDataId = id this.treasureData.curDataLevel = level diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua index 3b46ef853b..1f3f1628f2 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/PlayerInfoPopup.lua @@ -36,6 +36,13 @@ local _ViewConfig = { tip = Language[12306], btnType = { + } + }, + [PLAYER_INFO_VIEW_TYPE.TSLX] = { + formationType = FormationTypeDef.FORMATION_TSLX, + tip = "挑战阵容", + btnType = { + } }, } @@ -279,16 +286,22 @@ function this.FormationAdapter(teamInfo) SetHeroIcon(this.spLoader, hero,Util.GetGameObject(heroGo, "icon"):GetComponent("Image"),heroConfig) local frameBtn = Util.GetGameObject(this.Demons[hero.position], "frame") local heroData = {} - Util.AddOnceClick(frameBtn, function() - NetManager.ViewHeroInfoRequest(this._PlayerId,hero.heroid,function(msg) - if not hero.heroid then - return - end - heroData= GoodFriendManager.GetHeroDatas(msg.hero,msg.force,msg.SpecialEffects,msg.guildSkill) - GoodFriendManager.InitEquipData(msg.equip,heroData)--HeroManager.GetSingleHeroData(heroData.dynamicId) - UIManager.OpenPanel(UIName.RoleInfoPopup, heroData,true) + if this._Config.formationType == FormationTypeDef.FORMATION_TSLX then + Util.AddOnceClick(frameBtn, function() + UIManager.OpenPanel(UIName.RoleGetInfoPopup,false,demonId,hero.star) end) - end) + else + Util.AddOnceClick(frameBtn, function() + NetManager.ViewHeroInfoRequest(this._PlayerId,hero.heroid,function(msg) + if not hero.heroid then + return + end + heroData= GoodFriendManager.GetHeroDatas(msg.hero,msg.force,msg.SpecialEffects,msg.guildSkill) + GoodFriendManager.InitEquipData(msg.equip,heroData)--HeroManager.GetSingleHeroData(heroData.dynamicId) + UIManager.OpenPanel(UIName.RoleInfoPopup, heroData,true) + end) + end) + end end end local len=#teamInfo.PokemonInfos diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitReward.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitReward.lua index 3dc5c6a27a..0d5a28d827 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitReward.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitReward.lua @@ -45,21 +45,20 @@ function this:OnShow(_parent,...) -- local maxtimesId = lotterySetting[singleRecruit.Id].MaxTimes curtimes = OperatingManager.TimeLimitedTimes - local wishConfig=ConfigManager.GetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId", curActivityId) - if not wishConfig then - LogError("") - return - end local reward=nil - for i = 1,#wishConfig.UpList do - if wishConfig.UpList[i][1]==heroId then - reward=wishConfig.RewardList[i] - end - end data = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig, "ActivityId", curActivityId) - --替换奖励数据 - for i = 1, #data do + local wishConfig=ConfigManager.TryGetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId", curActivityId) + if wishConfig then + LogError("curActivityId=="..curActivityId.." heroId=="..heroId) + for i = 1,#wishConfig.UpList do + if wishConfig.UpList[i][1]==heroId then + reward=wishConfig.RewardList[i] + end + end + --替换奖励数据 + for i = 1, #data do data[i].Reward[1][1]=reward[i] + end end this:RefreshRewarid() this.curtimes.text = "当前已招募次数:" .. curtimes diff --git a/Assets/ManagedResources/~Lua/Modules/Practice/PracticePanel.lua b/Assets/ManagedResources/~Lua/Modules/Practice/PracticePanel.lua index f30a090fcc..5113f36101 100644 --- a/Assets/ManagedResources/~Lua/Modules/Practice/PracticePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Practice/PracticePanel.lua @@ -150,6 +150,7 @@ end function Practice:OnSortingOrderChange() orginLayer = self.sortingOrder + Util.SetParticleSortLayer(self.effect, self.sortingOrder+1) -- 头像层级 if self.playerInfoView then self.playerInfoView:SetLayer(self.sortingOrder) @@ -178,6 +179,7 @@ function Practice:RefreshMid() self.starNum.text = PracticeManager.StarNum local playerImg = NameManager.roleSex == 0 and "x_xiuxing_liangongren_nan" or "x_xiuxing_liangongren_nv" self.img.sprite = self.spLoader:LoadSprite(playerImg) + -- Util.SetParticleSortLayer(self.effect, self.sortingOrder+1) end --刷新点 @@ -199,8 +201,12 @@ function Practice:RefreshPoints() self.pointList[i]:SetActive(true) self.pointList[i]:GetComponent("Image").sprite = self.spLoader:LoadSprite(data.Img) self.pointList[i]:GetComponent("RectTransform").localPosition = data.Pos - Util.GetGameObject(self.pointList[i],"looping"):SetActive(data.State == 1) + local loopEffect = Util.GetGameObject(self.pointList[i],"looping") + loopEffect:SetActive(data.State == 1) self.effectUpgradeList[i] = Util.GetGameObject(self.pointList[i],"Fx_xiuxing_qiu_brust") + -- LogGreen("self.sortingOrder:"..tostring(self.sortingOrder)) + Util.SetParticleSortLayer(loopEffect, self.sortingOrder+1) + Util.SetParticleSortLayer(self.effectUpgradeList[i], self.sortingOrder+1) -- self.effectUpgradeList[i]:SetActive(false) Util.AddOnceClick(self.pointList[i],function () UIManager.OpenPanel(UIName.GeneralInfoPopup,GENERALINFO_TYPE.PracticeLevel,data) diff --git a/Assets/ManagedResources/~Lua/Modules/Ranking/RankingSingleListPanel.lua b/Assets/ManagedResources/~Lua/Modules/Ranking/RankingSingleListPanel.lua index 0a9a82207b..79ea3fdf18 100644 --- a/Assets/ManagedResources/~Lua/Modules/Ranking/RankingSingleListPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Ranking/RankingSingleListPanel.lua @@ -286,7 +286,11 @@ function this.SetHeadsInfo(data,root,index,name,level) npc:OnOpen(GetPlayerRoleSingleConFig().Scale6,Vector3.New(0,-118.65,0),WALK_DIR.IDLE_LEFT) Util.AddOnceClick(this.firstheadClick,function() - UIManager.OpenPanel(UIName.PlayerInfoPopup, data.uid) + if sData.rankType == RANK_TYPE.TASUILINGXIAO then + UIManager.OpenPanel(UIName.PlayerInfoPopup, data.uid,PLAYER_INFO_VIEW_TYPE.TSLX) + else + UIManager.OpenPanel(UIName.PlayerInfoPopup, data.uid) + end end) end @@ -316,7 +320,11 @@ end function this.AddPlayerInfoClick(root,uid) local clickBtn=Util.GetGameObject(root,"ClickBtn") Util.AddOnceClick(clickBtn,function() - UIManager.OpenPanel(UIName.PlayerInfoPopup, uid) + if sData.rankType == RANK_TYPE.TASUILINGXIAO then + UIManager.OpenPanel(UIName.PlayerInfoPopup, uid,PLAYER_INFO_VIEW_TYPE.TSLX) + else + UIManager.OpenPanel(UIName.PlayerInfoPopup, uid) + end end) end --设置自身背景 diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua index 354d956053..14aa100aab 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua @@ -153,6 +153,10 @@ function SingleRecruitPanel:BindEvent() end) --确定按钮 Util.AddClick(self.goBtn,function() + if recruitType and recruitType[1]==RecruitType.PrayerSingle then + self:ClosePanel() + return + end if state==1 then this.goBtn:SetActive(false) this.againBtn:SetActive(true) diff --git a/Assets/ManagedResources/~Lua/Modules/TaSuiLingXiao/TaSuiLingXiaoPanel.lua b/Assets/ManagedResources/~Lua/Modules/TaSuiLingXiao/TaSuiLingXiaoPanel.lua index 46bea7d56c..536e536b34 100644 --- a/Assets/ManagedResources/~Lua/Modules/TaSuiLingXiao/TaSuiLingXiaoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/TaSuiLingXiao/TaSuiLingXiaoPanel.lua @@ -13,7 +13,6 @@ function TaSuiLingXiao:InitComponent() self.btnBack = Util.GetGameObject(self.gameObject, "btnBack") self.btnHelp = Util.GetGameObject(self.gameObject, "btnHelp") self.btnRank = Util.GetGameObject(self.gameObject, "btnRank") - self.btnRank:SetActive(false) self.btnBox = Util.GetGameObject(self.gameObject, "progress/box") self.mid = Util.GetGameObject(self.gameObject, "mid") self.finishedText = Util.GetGameObject(self.mid, "FinishedText") diff --git a/Assets/ManagedResources/~Lua/Modules/TreasureOfHeaven/EndLessTreasurePanel.lua b/Assets/ManagedResources/~Lua/Modules/TreasureOfHeaven/EndLessTreasurePanel.lua index 4254d13726..ba78c8520e 100644 --- a/Assets/ManagedResources/~Lua/Modules/TreasureOfHeaven/EndLessTreasurePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/TreasureOfHeaven/EndLessTreasurePanel.lua @@ -64,12 +64,12 @@ function EndLessTreasurePanel:OnShow() self.time.text = "重置时间:"..TimeToDHMS(self.treasureData.resetTime - GetTimeStamp()) self:ShowTime() self:topBar() - self:showTaskList() + self:showTaskList(true,true) end -function EndLessTreasurePanel:refresh() +function EndLessTreasurePanel:refresh(isTop,isAni) self:topBar() - self:showTaskList() + self:showTaskList(isTop,isAni) end --topBar按钮状态 @@ -83,7 +83,7 @@ function EndLessTreasurePanel:topBar() end --任务列表 -function EndLessTreasurePanel:showTaskList() +function EndLessTreasurePanel:showTaskList(isTop,isAni) itemnum = BagManager.GetItemCountById(EndLessMapManager.scoreValueId) or 0 self.scoreText.text = itemnum if not self.itemsList then @@ -91,26 +91,25 @@ function EndLessTreasurePanel:showTaskList() end self.ScrollView:SetData(self.treasureData.rewardData,function(index, rewardItem) self:SingleTask(rewardItem, self.treasureData.rewardData[index]) - end) - - -- --定位打开界面时位置 - -- local t = 0 - -- if self.treasureData.treasureState == 0 then - -- for i = 1, #self.treasureData.rewardData do - -- if self.treasureData.rewardData[i].state == 0 then - -- t = i - -- break - -- end - -- end - -- elseif self.treasureData.treasureState == 1 then - -- for i = 1, #self.treasureData.rewardData do - -- if self.treasureData.rewardData[i].state == 1 or self.treasureData.rewardData[i].state == 0 then - -- t = i - -- break - -- end - -- end - -- end - -- self.ScrollView:SetIndex(t-2) + end,not isTop,not isAni) + --4 未达成 3 可再次领取 2 可领取 1 已领取 -1 完美领取(充钱领取过的) + --定位打开界面时位置 + local t = 0 + for i = 1, #self.treasureData.rewardData do + if self.treasureData.rewardData[i].state == 2 or self.treasureData.rewardData[i].state == 3 then + t = i + break + end + end + if t == 0 then + for i = 1, #self.treasureData.rewardData do + if self.treasureData.rewardData[i].state == 4 or self.treasureData.rewardData[i].state == 4 then + t = i + break + end + end + end + self.ScrollView:SetIndex(t) end --单个任务 diff --git a/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua b/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua index a99a4a6d37..f0ed45f10e 100644 --- a/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/TreasureStore/TreasureStorePopup.lua @@ -117,13 +117,13 @@ function this.SortData(allData) return end table.sort(allData, function(a,b) - local aboughtNum = a.Limit - OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, a.Id) > 0 and 2 or 1 - local bboughtNum = b.Limit - OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, b.Id) > 0 and 2 or 1 - if aboughtNum == bboughtNum then + -- local aboughtNum = a.Limit - OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, a.Id) > 0 and 2 or 1 + -- local bboughtNum = b.Limit - OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, b.Id) > 0 and 2 or 1 + -- if aboughtNum == bboughtNum then return a.Id < b.Id - else - return aboughtNum > bboughtNum - end + -- else + -- return aboughtNum > bboughtNum + -- end end) return allData end @@ -148,10 +148,6 @@ function this:SetScrollPre(root,data) itemList[i].Name = Util.GetGameObject(itemList[i].go,"Name"):GetComponent("Text") end local config = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,data.Id) - --title.text = GetLanguageStrById(data.Name) - LogGreen("data.Id:"..data.Id) - LogGreen("config.Rebate:"..config.Rebate) - LogGreen("config.Price:"..config.Price) title.text = string.format("价值%s现仅需%s",MoneyUtil.GetMoneyUnitNameWithMoney(config.Rebate),MoneyUtil.GetMoneyUnitNameWithMoney(config.Price)) local rewardArray = data.RewardShow if not itemsGrid then @@ -186,20 +182,15 @@ function this:SetScrollPre(root,data) end local boughtNum = OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, data.Id) or 0 - + tip.text =Language[10580].. (data.Limit-boughtNum) ..Language[10048] + buyNum.text =string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(data.Price))--shopItemData.Price..MoneyUtil.GetMoneyUnitName() if data.Limit - boughtNum > 0 then - buyNum.text = string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(data.Price))--shopItemData.Price..MoneyUtil.GetMoneyUnitName() buyBtn:GetComponent("Button").enabled = true Util.SetGray(buyBtn, false) - tip.text =Language[10580].. (data.Limit-boughtNum) ..Language[10048] - else - buyNum.text = Language[10514] + else buyBtn:GetComponent("Button").enabled = false Util.SetGray(buyBtn, true) - tip.text = "" end - - --local costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.FINDTREASURE_GIFT, data.id, 1) Util.AddOnceClick(buyBtn, function() if data.Limit <= boughtNum then PopupTipPanel.ShowTip(Language[10515])