diff --git a/Assets/ManagedResources/Atlas/baibaoshanghuiAtlas.meta b/Assets/ManagedResources/Atlas/baibaoshanghuiAtlas.meta new file mode 100644 index 0000000000..1f883d2d27 --- /dev/null +++ b/Assets/ManagedResources/Atlas/baibaoshanghuiAtlas.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: d960c3d87a3322341af388f55799e4fc +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/ArtFont/b_baibao_banzi12.png b/Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/b_baibao_banzi12.png similarity index 100% rename from Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/ArtFont/b_baibao_banzi12.png rename to Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/b_baibao_banzi12.png diff --git a/Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/ArtFont/b_baibao_banzi12.png.meta b/Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/b_baibao_banzi12.png.meta similarity index 100% rename from Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/ArtFont/b_baibao_banzi12.png.meta rename to Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/b_baibao_banzi12.png.meta diff --git a/Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/b_baibao_heidi.png b/Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/b_baibao_heidi.png new file mode 100644 index 0000000000..807acbe323 Binary files /dev/null and b/Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/b_baibao_heidi.png differ diff --git a/Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/b_baibao_heidi.png.meta b/Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/b_baibao_heidi.png.meta new file mode 100644 index 0000000000..6c5800d4e6 --- /dev/null +++ b/Assets/ManagedResources/Atlas/baibaoshanghuiAtlas/b_baibao_heidi.png.meta @@ -0,0 +1,99 @@ +fileFormatVersion: 2 +guid: 8dcdf995c1368a44d97fe1f5c7fab7ef +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 65 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 56 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: df0c42917ed220942818cbaf864f90c7 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: baibaoshanghuiAtlas + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ManagedResources/Prefabs/UI/DynamicActicity/TimeLimitUpHero.prefab b/Assets/ManagedResources/Prefabs/UI/DynamicActicity/TimeLimitUpHero.prefab index c9c6911a5a..d8b6f5e9eb 100644 --- a/Assets/ManagedResources/Prefabs/UI/DynamicActicity/TimeLimitUpHero.prefab +++ b/Assets/ManagedResources/Prefabs/UI/DynamicActicity/TimeLimitUpHero.prefab @@ -7725,9 +7725,9 @@ RectTransform: m_Father: {fileID: 7816124763777208762} m_RootOrder: 7 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: 448.4, y: 749.7} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -88, y: -210.29999} m_SizeDelta: {x: 128, y: 126} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5589450041689530360 @@ -8419,7 +8419,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -48, y: -473.59998} + m_AnchoredPosition: {x: -88, y: -473.59998} m_SizeDelta: {x: 71.599976, y: 69.92993} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7359118887627014995 diff --git a/Assets/ManagedResources/Prefabs/UI/TreasureStore/TreasureStorePopup.prefab b/Assets/ManagedResources/Prefabs/UI/TreasureStore/TreasureStorePopup.prefab index 08071c23ed..de337d970c 100644 --- a/Assets/ManagedResources/Prefabs/UI/TreasureStore/TreasureStorePopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/TreasureStore/TreasureStorePopup.prefab @@ -6198,7 +6198,7 @@ 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: 77.18, y: 116.99999} + m_AnchoredPosition: {x: 83, y: 116.99999} m_SizeDelta: {x: 33.55, y: 263.8} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3946196506950791481 diff --git a/Assets/ManagedResources/~Lua/Data/UIData.lua b/Assets/ManagedResources/~Lua/Data/UIData.lua index 669b101e1d..497f20b7da 100644 --- a/Assets/ManagedResources/~Lua/Data/UIData.lua +++ b/Assets/ManagedResources/~Lua/Data/UIData.lua @@ -437,8 +437,8 @@ SubUIConfig = { [14] = {name = "ExChangePage",assetName = "ExChangePage",script = "Modules/NewActivity/ExChangePage"},--限时兑换界面预设 [15] = {name = "page2",assetName = "page2",script = "Modules/DynamicActivity/SheJiDaDian"}, --社稷大典 - [16] = {name = "TimeLimitUpHero",assetName = "TimeLimitUpHero",script = "Modules/DynamicActivity/TimeLimitUpHero"}, --限时召唤 - --[16] = {name = "page3",assetName = "page3",script = "Modules/DynamicActivity/TimeLimitedCall"}, --限时召唤 + --[16] = {name = "TimeLimitUpHero",assetName = "TimeLimitUpHero",script = "Modules/DynamicActivity/TimeLimitUpHero"}, --限时召唤 + [16] = {name = "page3",assetName = "page3",script = "Modules/DynamicActivity/TimeLimitedCall"}, --限时召唤 [17] = {name = "page4",assetName = "page4",script = "Modules/DynamicActivity/QianKunBox"},--乾坤宝盒 [18] = {name = "page9",assetName = "page9",script = "Modules/DynamicActivity/YiJingBaoKu"},--易经宝库 [19] = {name = "page10",assetName = "page10",script = "Modules/DynamicActivity/ShengYiTianJiang"},--神衣天降 @@ -449,5 +449,5 @@ SubUIConfig = { [24] = { name = "ShopView", assetName = "ShopView", script = "View/ShopViewNew" }, [25] = { name = "FuXingGaoZhaoPanel", assetName = "FuXingGaoZhaoPanel", script = "Modules/FuXingGaoZhao/FuXingGaoZhaoPanel" }, [26] = { name = "NiuQiChongTianPanel", assetName = "NiuQiChongTianPanel", script = "Modules/NiuQiChongTian/NiuQiChongTianPanel" }, - --[27] = {name = "TimeLimitUpHero",assetName = "TimeLimitUpHero",script = "Modules/DynamicActivity/TimeLimitUpHero"}, --限时英雄up界面 + [27] = {name = "TimeLimitUpHero",assetName = "TimeLimitUpHero",script = "Modules/DynamicActivity/TimeLimitUpHero"}, --限时英雄up界面 } \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua index d2778c8993..a121d758bd 100644 --- a/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Battle/View/Unit/PlayerView.lua @@ -340,7 +340,9 @@ end function PlayerView:OnSkillPlay() - + if not self.GameObject then + return + end local battleSorting = BattleManager.GetBattleSorting() self:ChangeCardSorting(battleSorting + 20) -- 立绘缩小 @@ -361,6 +363,9 @@ function PlayerView:OnSkillPlay() end function PlayerView:OnSkillEnd() + if not self.GameObject then + return + end local battleSorting = BattleManager.GetBattleSorting() self:ChangeCardSorting(battleSorting + self.role.position) self.liveRender.transform:SetParent(Util.GetGameObject(self.GameObject, "Mask").transform) diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyOnePanel.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyOnePanel.lua index 2d5bc1e7e0..be98a0a7b4 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyOnePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyOnePanel.lua @@ -132,7 +132,8 @@ function QianKunBoxBuyOnePanel:OnOpen(...) local wish=ConfigManager.GetConfigData(ConfigName.WishActivitySetting,1) if wish then this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.TimelimitCall }) - d = RecruitManager.GetExpendDataByCostItem(wish.CostItemSingle) + local num=PrivilegeManager.GetPrivilegeRemainValue(wish.DiamondMaxTimes) + d = RecruitManager.GetExpendDataByCostItem(wish.CostItemSingle,1,num) isLimitUpHero=true end else diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyTenPanel.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyTenPanel.lua index 834bbbaaf7..37ec248d52 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyTenPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/QianKunBoxBuyTenPanel.lua @@ -24,7 +24,7 @@ local isLimitUpHero=false --初始化组件(用于子类重写) function QianKunBoxBuyTenPanel:InitComponent() this.spLoader = SpriteLoader.New() - + this.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft, panelType = PanelType.ElementDrawCard }) orginLayer = 0 self.bg = Util.GetGameObject(self.gameObject, "effect") screenAdapte(self.bg) @@ -44,7 +44,7 @@ function QianKunBoxBuyTenPanel:InitComponent() this.detailImage3=Util.GetGameObject(this.content3, "Tip") this.itemIcon3=Util.GetGameObject(this.content3, "icon"):GetComponent("Image") this.itemNum3=Util.GetGameObject(this.content3, "num"):GetComponent("Text") - + this.itemInfo3=Util.GetGameObject(this.content3, "info"):GetComponent("Text") this.content2=Util.GetGameObject(self.gameObject,"bottom/openTenAgainButton/Content2") this.itemIcon2=Util.GetGameObject(this.content2,"Icon"):GetComponent("Image") this.itemNum2=Util.GetGameObject(this.content2,"Num"):GetComponent("Text") @@ -143,15 +143,19 @@ function QianKunBoxBuyTenPanel:OnOpen(...) local itemId=0 local itemNum=0 local d - local upConfig=ConfigManager.GetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId",this.recruitType) + local upConfig=ConfigManager.TryGetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId",this.recruitType) if upConfig then local wish=ConfigManager.GetConfigData(ConfigName.WishActivitySetting,1) if wish then + this.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.TimelimitCall }) isLimitUpHero=true - d = RecruitManager.GetExpendDataByCostItem(wish.CostItemMul) + this.itemInfo3.text="10次" + local num=PrivilegeManager.GetPrivilegeRemainValue(wish.DiamondMaxTimes) + d = RecruitManager.GetExpendDataByCostItem(wish.CostItemMul,2,num) end else d = RecruitManager.GetExpendData(this.recruitType) + SubUIManager.Close(this.UpView) end itemId=d[1] itemNum=d[2] @@ -211,6 +215,7 @@ end --界面销毁时调用(用于子类重写) function QianKunBoxBuyTenPanel:OnDestroy() this.spLoader:Destroy() + SubUIManager.Close(this.UpView) this.views = nil end diff --git a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua index 88f9acd86a..e0af934f92 100644 --- a/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua +++ b/Assets/ManagedResources/~Lua/Modules/DynamicActivity/TimeLimitUpHero.lua @@ -23,6 +23,7 @@ local Setting=nil local oneFunc=nil local tenFunc=nil local oneFunc2=nil +local isYaojing=false --初始化组件(用于子类重写) function TimeLimitUpHero:InitComponent() self.spLoader = SpriteLoader.New() @@ -33,7 +34,7 @@ function TimeLimitUpHero:InitComponent() self.btnActivity:GetComponent("Image").sprite=self.spLoader:LoadSprite("r_shilian-jiangli_zh") self.btnRewardBtn = Util.GetGameObject(self.gameObject,"btngroup/btnRewardBtn") self.btnRewardBtn:SetActive(false) - + self.btns = {} self.bgs = {} for i = 1 , 2 do @@ -80,6 +81,7 @@ function TimeLimitUpHero:InitComponent() local SkeletonGraphic = heroLiveObj:GetComponent("SkeletonGraphic") SkeletonGraphic.AnimationState:SetAnimation(0, "touch", false) end) + end --绑定事件(用于子类重写) @@ -141,7 +143,6 @@ function TimeLimitUpHero:OnShow(_sortingOrder) for k,v in ipairs(self.bgs) do v.bg.gameObject:SetActive(false) end - LogError("actId "..self.actId) wishConfig=ConfigManager.GetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId",self.actId) self.titleImg.sprite=self.spLoader:LoadSprite(self.actConfig.Icon[3]) Setting= ConfigManager.GetConfigData(ConfigName.WishActivitySetting,1) @@ -150,6 +151,8 @@ function TimeLimitUpHero:OnShow(_sortingOrder) self.yaojingMaxTimeId =Setting.DiamondMaxTimes activityData=ActivityGiftManager.GetActivityInfoByType(self.actId) curHeroId=activityData.choiceRewardId + local curTimes = PrivilegeManager.GetPrivilegeUsedTimes(self.maxtimesId) + self.upper.text= "今日召唤上限:"..curTimes.."/"..privilegeConfig[self.maxtimesId].Condition[1][2]--特权上限 LogError("活动数据英雄id: "..activityData.choiceRewardId) self:RefreshHeroData() self:RefreshGetHeroTimes() @@ -166,25 +169,22 @@ function TimeLimitUpHero:RefreshHeroData() poolManager:UnLoadLive(lastLiveName, heroLiveObj) end lastLiveName=GetResourcePath(curConfig.Live) - LogError("lastLiveName=="..lastLiveName) heroLiveObj=HeroManager.LoadHerolive1(curConfig,self.heroPar) end -local isYaojing=false local freeTime = 0 --刷新剩余次数 function TimeLimitUpHero:RefreshGetHeroTimes() - local curTimes = PrivilegeManager.GetPrivilegeUsedTimes(self.maxtimesId) - self.upper.text= "今日召唤上限:"..curTimes.."/"..privilegeConfig[self.maxtimesId].Condition[1][2]--特权上限 + self.timeupdate.gameObject:SetActive(true) if self.freeTimesId and self.freeTimesId > 0 then freeTime = PrivilegeManager.GetPrivilegeRemainValue(self.freeTimesId) - LogError("self freetimes "..freeTime) RecruitManager.freeUseTimeList[self.freeTimesId]=freeTime end --按钮赋值 - + local num=PrivilegeManager.GetPrivilegeRemainValue(Setting.DiamondMaxTimes) + self.recruitTimesUpdate.text = string.format("今日剩余妖晶召唤次数:%s",num) for n, m in ipairs(self.btns) do --存在免费次数 并且 免费>=1 并且是1按钮 local isFree = freeTime >= 1 and n == 1 @@ -206,7 +206,7 @@ function TimeLimitUpHero:RefreshGetHeroTimes() self.timeupdate.gameObject:SetActive(false) m.info.text="免费抽取" else - local d = RecruitManager.GetExpendDataByCostItem(type) + local d = RecruitManager.GetExpendDataByCostItem(type,n,num) itemId=d[1] if itemId==16 then isYaojing=true @@ -216,8 +216,12 @@ function TimeLimitUpHero:RefreshGetHeroTimes() m.num.text= tostring(itemNum) end local sureFunc=function() + local isFree = PrivilegeManager.GetPrivilegeRemainValue(self.freeTimesId)>= 1 and n == 1 if not isFree then - if BagManager.GetItemCountById(itemId)%s",num) self.callTimeTxt.text=reMaintimes end -function TimeLimitUpHero:Recruit(actId,type) +function TimeLimitUpHero:Recruit(actId,type,itemId) local recrutType =type==1 and 1 or 10 if PrivilegeManager.GetPrivilegeUsedTimes(self.maxtimesId)+recrutType>privilegeConfig[self.maxtimesId].Condition[1][2] then PopupTipPanel.ShowTip("无法超出每日召唤次数上限!") @@ -271,29 +271,20 @@ function TimeLimitUpHero:Recruit(actId,type) PrivilegeManager.RefreshPrivilegeUsedTimes(self.freeTimesId,recrutType)--记录抽卡次数 end PrivilegeManager.RefreshPrivilegeUsedTimes(self.maxtimesId,recrutType)--记录抽卡次数 - -- if then - -- freeTime = PrivilegeManager.GetPrivilegeRemainValue(self.freeTimesId) - -- end --记录妖晶抽卡 - if isYaojing then + if itemId==16 then + LogError("记录妖晶次数") PrivilegeManager.RefreshPrivilegeUsedTimes(self.yaojingMaxTimeId,recrutType)--记录妖晶抽卡次数 end if type == 1 then - LogError("len=="..LengthOfTable(msg.drop.Hero)) - local data=msg.drop.Hero - if oneFunc then - LogError(" one func ==") - end + UIManager.OpenPanel(UIName.QianKunBoxBuyOnePanel, msg.drop,actId,{RecruitType.PrayerSingle,RecruitType.PrayerTen},oneFunc) else --UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero,actId,type,{RecruitType.TimeLimitSingle,RecruitType.TimeLimitTen}) UIManager.OpenPanel(UIName.QianKunBoxBuyTenPanel, msg.drop,actId,{RecruitType.PrayerSingle,RecruitType.PrayerTen},tenFunc) end if msg.drop.Hero[1] then - if not oneFunc then - LogError(" one func ==nil") - end UIManager.OpenPanel(UIName.SingleRecruitPanel, msg.drop.Hero[1],actId,1,{RecruitType.TimeLimitSingle,RecruitType.TimeLimitTen},oneFunc2) end CheckRedPointStatus(RedPointType.TimeLimited) diff --git a/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_14.lua b/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_14.lua index 6ef2c026f6..bfcdc99c6a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_14.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_14.lua @@ -37,7 +37,7 @@ function this.Show() end _itemsList[index]:SetActive(true) local data = ConfigManager.GetConfigDataByKey(ConfigName.HeroConfig,"Id",tonumber(answerId)) - Util.GetGameObject(_itemsList[index], "icon"):GetComponent("Image").sprite = self.context.spLoader:LoadSprite(GetResourcePath(data.Icon)) + Util.GetGameObject(_itemsList[index], "icon"):GetComponent("Image").sprite = this.context.spLoader:LoadSprite(GetResourcePath(data.Icon)) Util.GetGameObject(_itemsList[index], "name/name"):GetComponent("Text").text = GetLanguageStrById(data.ReadingName) Util.AddOnceClick(Util.GetGameObject(_itemsList[index], "btnAns"), function() this.ChooseAnswer(index) diff --git a/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_15.lua b/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_15.lua index bb505f0c2a..f78d5f13e9 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_15.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_15.lua @@ -40,9 +40,9 @@ function this.Show() this.ChooseAnswer(index) end) kuang:SetActive(false) - Num.sprite = self.context.spLoader:LoadSprite("r_gonghui_pipeiwenhao") + Num.sprite = this.context.spLoader:LoadSprite("r_gonghui_pipeiwenhao") else - Num.sprite = self.context.spLoader:LoadSprite("r_fxgz_shuzi_"..tonumber(num)) + Num.sprite = this.context.spLoader:LoadSprite("r_fxgz_shuzi_"..tonumber(num)) end end end diff --git a/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_17.lua b/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_17.lua index ad14dbd28e..2e1e1ec212 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_17.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/TrialMiniGame/Logic/Game_17.lua @@ -41,13 +41,13 @@ function this.Show() local ItemId = this.TrialGameConfig[this.list[index]].RewardID local reward = Util.GetGameObject(item,"reward"):GetComponent("Image") local Name = this.ArtConfig[this.ItemConfig[ItemId].ResourceID].Name--(Index->奖励id->itemID->资源名字) - reward.sprite = self.context.spLoader:LoadSprite(Name) + reward.sprite = this.context.spLoader:LoadSprite(Name) local Num = Util.GetGameObject(item,"Num"):GetComponent("Text") Num.text =this.TrialGameConfig[this.list[index]].Max local piece = Util.GetGameObject(item,"piece"):GetComponent("Image") if this.ItemConfig[ItemId].ItemType == 22 then piece.gameObject:SetActive(true) - piece.sprite = self.context.spLoader:LoadSprite(GetHeroChipQuantityImageByquality(this.ItemConfig[ItemId].Quantity)) + piece.sprite = this.context.spLoader:LoadSprite(GetHeroChipQuantityImageByquality(this.ItemConfig[ItemId].Quantity)) else piece.gameObject:SetActive(false) end diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_Onhook.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_Onhook.lua index 11d784cf97..597f9eca75 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_Onhook.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_Onhook.lua @@ -12,6 +12,7 @@ this.timer = Timer.New() function this:InitComponent(gameObject) this.spLoader = SpriteLoader.New() this.backBtn=Util.GetGameObject(gameObject,"bg/backBtn") + this.backBtn:SetActive(true) this.Root=Util.GetGameObject(gameObject,"Root") this.proPre=Util.GetGameObject(gameObject,"proPre") this.shengxingIma=Util.GetGameObject(gameObject,"bg/shengxing"):GetComponent("Image") @@ -21,6 +22,10 @@ end function this:BindEvent() Util.AddClick(this.backBtn,function() parent:ClosePanel() + if this.timer then + this.timer:Stop() + this.timer = nil + end end) end diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitConfirm.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitConfirm.lua index 1376840ff9..5efa2759df 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitConfirm.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitConfirm.lua @@ -63,12 +63,13 @@ function this:OnShow(_parent,...) this.rootText.text = string.format(Language[11595],_args[3]) elseif _args[1] =="timeLimitHero" then local wishSettingConfig=ConfigManager.GetConfigData(ConfigName.WishActivitySetting,1) + local num=PrivilegeManager.GetPrivilegeRemainValue(wishSettingConfig.DiamondMaxTimes) var = PlayerManager.uid.."GeneralPopup_RecruitConfirm"..RecruitType.PrayerTen local d = 0 if _args[3]==1 then - d=RecruitManager.GetExpendDataByCostItem(wishSettingConfig.CostItemSingle) + d=RecruitManager.GetExpendDataByCostItem(wishSettingConfig.CostItemSingle,1,num) elseif _args[3]==2 then - d=RecruitManager.GetExpendDataByCostItem(wishSettingConfig.CostItemMul) + d=RecruitManager.GetExpendDataByCostItem(wishSettingConfig.CostItemMul,2,num) end if _args[3] == 1 then diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua index 7005c91490..9a3a6a900e 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitManager.lua @@ -327,22 +327,35 @@ function this.GetExpendData(type) return d end -function this.GetExpendDataByCostItem(str) +function this.GetExpendDataByCostItem(str,type,LimitNum) local d local k=0 - for i, v in ipairs(str) do - if BagManager.GetItemCountById(v[1])>=v[2] then - d=v - break + local needNum= 0 + if type==1 then + needNum=1 + else + needNum=10 + end + local cost=nil + for key, value in pairs(str) do + local bagNum=BagManager.GetItemCountById(value[1]) + --不是妖晶 背包数量>=需要数量 + if value[1]~=16 then + if bagNum>=needNum then + return value + else + cost=value + end + cost=value + else - k=k+1 + --如果是妖晶 背包有足够妖晶 能抽的次数>=抽的次数 + if bagNum>=needNum and LimitNum>=needNum then + return value + end end end - local l=#str - if k==l then - return str[l] - end - return d + return cost end diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua index 1ad0f7acbd..354d956053 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua @@ -156,6 +156,9 @@ function SingleRecruitPanel:BindEvent() if state==1 then this.goBtn:SetActive(false) this.againBtn:SetActive(true) + if recruitType and recruitType[1]==RecruitType.PrayerSingle then + this.againBtn:SetActive(false) + end this.sureBtn:SetActive(true) this.info:SetActive(false) elseif state==2 then @@ -399,7 +402,8 @@ function SingleRecruitPanel:UpdataPanelData(_heroData) SetTextVerTial(self.posText.gameObject,Vector3.New(63.76,1.5,0),"MiddleLeft") local d=nil if recruitType and recruitType[1]==RecruitType.PrayerSingle then - d=RecruitManager.GetExpendDataByCostItem(wishSettingConfig[1].CostItemSingle) + local num=PrivilegeManager.GetPrivilegeRemainValue(wishSettingConfig[1].DiamondMaxTimes) + d=RecruitManager.GetExpendDataByCostItem(wishSettingConfig[1].CostItemSingle,1,num) else d=RecruitManager.GetExpendData(type) end @@ -419,6 +423,9 @@ function SingleRecruitPanel:UpdataPanelData(_heroData) this.goBtn:SetActive(heroStaticData.Star == 5 or heroStaticData.Star == 4) this.sureBtn:SetActive(heroStaticData.Star ~= 5 and heroStaticData.Star ~= 4) this.againBtn:SetActive(heroStaticData.Star ~= 5 and heroStaticData.Star ~= 4) + if recruitType and recruitType[1]==RecruitType.PrayerSingle then + this.againBtn:SetActive(false) + end Util.GetGameObject(self.transform, "rolePanel/rolePanel2"):SetActive(true) if heroStaticData.Quality == 5 and heroStaticData.Natural >= 13 then HeroManager.DetectionOpenFiveStarActivity(heroStaticData.Star) diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua index b84d157b81..3dc157e661 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua @@ -114,7 +114,8 @@ function TenRecruitPanel:OnOpen(...) local config=ConfigManager.TryGetConfigDataByKey(ConfigName.WishActivityUp,"ActivityId",type) if config then local Setting= ConfigManager.GetConfigData(ConfigName.WishActivitySetting,1) - d=RecruitManager.GetExpendDataByCostItem(Setting.CostItemMul) + local num=PrivilegeManager.GetPrivilegeRemainValue(Setting.DiamondMaxTimes) + d=RecruitManager.GetExpendDataByCostItem(Setting.CostItemMul,2,num) else d=RecruitManager.GetExpendData(type) end