diff --git a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua index 7a1127620d..cefd34bd31 100644 --- a/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua +++ b/Assets/ManagedResources/~Lua/Common/GlobalDefine.lua @@ -2678,4 +2678,13 @@ PreConfigure={ [4] = {type=RecruitType.FriendTen}, [5] = {type=RecruitType.Single,privilegeId=14}, [6] = {type=RecruitType.Ten} +} + +RevertPreConfigure={ + [RecruitType.NormalSingle]= 1, + [RecruitType.NormalTen]=2, + [RecruitType.FriendSingle]=3, + [RecruitType.FriendTen]=4, + [RecruitType.Single]=5, + [RecruitType.Ten]=6, } \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua b/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua index 244bde8b47..f648cf2d14 100644 --- a/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Bag/BagManager.lua @@ -88,6 +88,9 @@ end function this.UpDataBagItemIdNumber(_itemData) this.UpdateBagData(_itemData) Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold) + CheckRedPointStatus(RedPointType.Recruit_Normal) + CheckRedPointStatus(RedPointType.Recruit_ShenJiang) + CheckRedPointStatus(RedPointType.Recruit_Friend) end --后端刷新 @@ -103,6 +106,8 @@ function this.BackDataRefreshEnerny(msgItemInfo) Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold) RedpotManager.CheckRedPointStatus(RedPointType.LuckyTurn) CheckRedPointStatus(RedPointType.Recruit_Normal) + CheckRedPointStatus(RedPointType.Recruit_ShenJiang) + CheckRedPointStatus(RedPointType.Recruit_Friend) end end @@ -591,6 +596,9 @@ function this.GoIntoBackData(drop) if (#drop.itemlist > 0) then --BagManager.UpDataBagItemIdNumber(drop.itemlist) --Game.GlobalEvent:DispatchEvent(GameEvent.Bag.BagGold) + CheckRedPointStatus(RedPointType.Recruit_Normal) + CheckRedPointStatus(RedPointType.Recruit_ShenJiang) + CheckRedPointStatus(RedPointType.Recruit_Friend) end if (#drop.equipId > 0) then for i = 1, #drop.equipId do @@ -655,7 +663,6 @@ end function this.GetTableByBackDropData(drop) local itemDataList = {} if drop.itemlist ~= nil and #drop.itemlist > 0 then - Log("drop.itemlist " .. #drop.itemlist) for i = 1, #drop.itemlist do local itemdata = {} itemdata.itemType = 1 @@ -670,6 +677,9 @@ function this.GetTableByBackDropData(drop) table.insert(itemDataList, itemdata) --BagManager.UpdateBagData(itemdata.backData) end + CheckRedPointStatus(RedPointType.Recruit_Normal) + CheckRedPointStatus(RedPointType.Recruit_ShenJiang) + CheckRedPointStatus(RedPointType.Recruit_Friend) end if drop.equipId ~= nil and #drop.equipId > 0 then Log("drop.equipId " .. #drop.equipId) @@ -1102,6 +1112,8 @@ function this.BagIndicationRefresh(msg) CheckRedPointStatus(RedPointType.Bag_HeroDebris) CheckRedPointStatus(RedPointType.Bag_BoxAndBlueprint) CheckRedPointStatus(RedPointType.Recruit_Normal) + CheckRedPointStatus(RedPointType.Recruit_ShenJiang) + CheckRedPointStatus(RedPointType.Recruit_Friend) -- 超出最大数量限制提示 if msg.isMax and msg.isMax == 1 then diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua index 26295f0b91..f87679f195 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua @@ -94,6 +94,8 @@ function this.RefreshFreeTime() if (ActTimeCtrlManager.SingleFuncState(1)) then -- CheckRedPointStatus(RedPointType.Recruit_Red) CheckRedPointStatus(RedPointType.Recruit_Normal) + CheckRedPointStatus(RedPointType.Recruit_ShenJiang) + CheckRedPointStatus(RedPointType.Recruit_Friend) CheckRedPointStatus(RedPointType.TimeLimited) CheckRedPointStatus(RedPointType.TimeLimitWish) CheckRedPointStatus(RedPointType.QianKunBox) @@ -101,23 +103,6 @@ function this.RefreshFreeTime() Game.GlobalEvent:DispatchEvent(GameEvent.Recruit.OnRecruitRefreshData) end ---刷新招募红点 -function this.CheckRecuritRedPoint() - if (PrivilegeManager.GetPrivilegeRemainValue(14) >= 1) then--this.freeUseTimeList[14]) - return true - else - return false - end -end - ---刷新普通招募红点 -function this.CheckRecuritNormalPoint() - if (PrivilegeManager.GetPrivilegeRemainValue(38) >= 1) then--this.freeUseTimeList[38] - return true - else - return false - end -end function this.InitPreData() this.previewHeroData = {} diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanelNew.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanelNew.lua index a7a8294ec5..c3c9aa6759 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanelNew.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitPanelNew.lua @@ -287,7 +287,6 @@ function RecruitPanelNew:UpdatePanelData() for n, m in ipairs(self.btns) do --存在免费次数 并且 免费>=1 并且是1按钮 local isFree = freeTime >= 1 and n == 1 - m.red.gameObject:SetActive(isFree) m.icon.gameObject:SetActive(not isFree) m.num.gameObject:SetActive(not isFree) local itemId=0 @@ -297,10 +296,12 @@ function RecruitPanelNew:UpdatePanelData() type = self.singleConfig.Id m.info.text = "1次" m.time.gameObject:SetActive(true) + m.red.gameObject:SetActive(RecruitManager.GetRecruitBtnRedpoint1(PreConfigure[RevertPreConfigure[self.config.ShopData[3][1]]])) else m.time.gameObject:SetActive(false) type = self.tenConfig.Id m.info.text = "10次" + m.red.gameObject:SetActive(RecruitManager.GetRecruitBtnRedpoint1(PreConfigure[RevertPreConfigure[self.config.ShopData[3][2]]])) end if self.config.ShopData[1][1] == TableRecruitType.Youqing then m.time.gameObject:SetActive(false)