diff --git a/Assets/ManagedResources/Atlas/DynamicActivityAtlas/SuoXiangPiMi.meta b/Assets/ManagedResources/Atlas/DynamicActivityAtlas/SuoXiangPiMi.meta deleted file mode 100644 index 4fdf17ca14..0000000000 --- a/Assets/ManagedResources/Atlas/DynamicActivityAtlas/SuoXiangPiMi.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: a5f164d66e71c3046a84ec08e7876cec -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/ManagedResources/~Lua/Modules/Adventure/AdventureExploreRewardPanel.lua b/Assets/ManagedResources/~Lua/Modules/Adventure/AdventureExploreRewardPanel.lua index 2b4962ebf4..b8cd2bd92f 100644 --- a/Assets/ManagedResources/~Lua/Modules/Adventure/AdventureExploreRewardPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Adventure/AdventureExploreRewardPanel.lua @@ -25,6 +25,11 @@ end function AdventureExploreRewardPanel:BindEvent() Util.AddClick(this.btnBack, function() self:ClosePanel() + --Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.UpgradePac) + -- if PlayerManager.IsGetFiveStarHero then--and OperatingManager.IsShowFiveStarPatch then + + -- PlayerManager.IsGetFiveStarHero = false + -- end Game.GlobalEvent:AddEvent(GameEvent.PatFace.PatFaceSend end) end --添加事件监听(用于子类重写) diff --git a/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua b/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua index 0dc872dae3..929a9a9c8d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expert/PatFaceManager.lua @@ -128,25 +128,17 @@ function this.PatFaceSpecialMonitor(v,patFaceAllData,type,starUpGiftNum) end elseif v.Type == 5 then--星级成长礼特殊处理 if starUpGiftNum then - Log("星级成长礼特殊处理 starUpGiftNum == v.Star "..starUpGiftNum .." ".. v.Star) - --Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceHaveGrowGift)--激活一次发一个 - if starUpGiftNum >= v.Star then - -- local conFigData = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, v.ShopId) - -- if conFigData == nil then return end - -- local shopItemData = OperatingManager.GetGiftGoodsInfo(conFigData.Type,v.ShopId) - -- --shopItemData.startTime 大于零代表第一次开 需要拍脸 下次未购买并在时间内再次获得 shopItemData.startTime为零 - -- --shopItemData.buyTimes <= 0 今天没有购买才会弹 - -- --if shopItemData then - -- -- Log(" PatFaceManager startTime buyTimes "..shopItemData.startTime.." "..shopItemData.buyTimes) - -- --else - -- -- Log("shopItemData 为nil") - -- --end - -- if shopItemData and shopItemData.startTime > 0 and shopItemData.buyTimes <= 0 and type == 2 then - -- if RedPointManager.PlayerPrefsGetStr(v.Id.."PatFace") == "0" then--商品未开启才会激活拍脸 - -- table.insert(patFaceAllData,v) - -- end - -- end - if RedPointManager.PlayerPrefsGetStr(v.Id.."PatFace") == "0" then--商品未开启才会激活拍脸 + if starUpGiftNum == v.Star then + local pat = false + local configData = ConfigManager.GetAllConfigsDataByKey(ConfigName.RechargeCommodityConfig,"ShowType",8) + for i = 1, #configData do + local id = configData[i].Id + local giftInfo = OperatingManager.GetGiftGoodsInfo(5,id) + if giftInfo and giftInfo.dynamicBuyTimes == 1 then + pat = true + end + end + if pat and RedPointManager.PlayerPrefsGetStr(v.Id.."PatFace") == "0" then--商品未开启才会激活拍脸 table.insert(patFaceAllData,v) end end @@ -168,6 +160,7 @@ function this.PatFaceSpecialMonitor(v,patFaceAllData,type,starUpGiftNum) end elseif v.Type == 7 then--东海寻仙 if FindFairyManager.GetActivityTime() > 0 then + if RedPointManager.PlayerPrefsGetStr(v.Id.."PatFace") == "0" then table.insert(patFaceAllData,v) end @@ -300,6 +293,7 @@ end --事件触发拍脸 (如五星成长礼) function this.OnAddPatFaceData(faceConFigType, starUpGiftNum) if this.isLogin then return end--上来就弹新关卡界面 所以不弹 + if MapManager.Mapping or UIManager.IsOpen(UIName.BattlePanel) then return end--在关卡里 副本里不弹 patFaceAllData = {} local allTypeFaceConFig = ConfigManager.GetAllConfigsDataByKey(ConfigName.LoginPosterConfig,"Type",faceConFigType) diff --git a/Assets/ManagedResources/~Lua/Modules/Expert/PatFacePanel.lua b/Assets/ManagedResources/~Lua/Modules/Expert/PatFacePanel.lua index 91b9cf6c6a..9c803a0144 100644 --- a/Assets/ManagedResources/~Lua/Modules/Expert/PatFacePanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Expert/PatFacePanel.lua @@ -317,11 +317,11 @@ end --第五种显示 五星成长礼 local timeOb5 function PatFacePanel:OnShowOb5Data() - if OperatingManager.IsShowFiveStarPatch then + -- if OperatingManager.IsShowFiveStarPatch then OperatingManager.upGradePackagePanelType = 2 UIManager.OpenPanel(UIName.UpGradePackagePanel,function() self:ClosePanel() end) - OperatingManager.IsShowFiveStarPatch = false - end + -- OperatingManager.IsShowFiveStarPatch = false + -- end end function PatFacePanel:OnShowOb6Data() patFaceFindFairy.OnShow(self,patFaceSingleData) diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua index d963ddfbe1..adb4c424dd 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationManager.lua @@ -502,4 +502,31 @@ function this.GetCurFormationElementAddByType(type,heroDid) return data end +--自动一键上阵没有前端显示 +function this.SetOneKeyGoWithoutUI(formationType,limitLevel) + local heros = HeroManager.GetAllHeroDatas(limitLevel) + --按战力从大到小排序 + table.sort(heros,function(a,b) + if a.warPower == b.warPower then + return a.id>b.id + else + return a.warPower > b.warPower + end + end) + --修改 upHeroSidTable 静态id 存储 有则跳过 + local upHeroSidTable = {} + local choosedList = {} + for i = 1, 6 do + if heros[i] then + local curSingleherodata = HeroManager.GetSingleHeroData(heros[i].dynamicId) + if not upHeroSidTable[curSingleherodata.id] then + upHeroSidTable[curSingleherodata.id] = curSingleherodata.id + table.insert(choosedList, {heroId = heros[i].dynamicId, position=i}) + end + end + end + --保存编队 + FormationManager.RefreshFormation(formationType, choosedList,FormationManager.formationList[formationType].teamPokemonInfos) +end + return this \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua index 14678069ed..9cdee0f2a7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua @@ -990,4 +990,49 @@ function this.SetOneKeyGoWithCondition(Rules) this.OnClickTabBtn(proId) end +--设置大闹天宫一键上阵 +function this.SetOneKeyGoExpedition() + --获取需要上阵的位置 + local posArr=this.GetPosList() + if #posArr==0 then + PopupTipPanel.ShowTip(Language[10692]) + return + end + local theros = HeroManager.GetAllHeroDatas(limitLevel) + theros = ExpeditionManager.GetAllHeroDatas(theros,limitLevel) + --按战力从大到小排序 + table.sort(theros,function(a,b) + if a.warPower == b.warPower then + return a.id>b.id + else + return a.warPower > b.warPower + end + end) + --修改 upHeroSidTable 静态id 存储 有则跳过 + local upHeroSidTable = {} + this.order = 0 + this.choosedList = {} + for j = 1, #this.choosedList do + local curSingleherodata = HeroManager.GetSingleHeroData(this.choosedList[j].heroId) + upHeroSidTable[curSingleherodata.id] = curSingleherodata.id + end + for k, v in ipairs(theros) do + local curSingleherodata = HeroManager.GetSingleHeroData(v.dynamicId) + if not upHeroSidTable[curSingleherodata.id] then + LogGreen("this.choosedList "..#this.choosedList) + if #this.choosedList < 6 then + for n = 1, #posArr do + upHeroSidTable[curSingleherodata.id] = curSingleherodata.id + table.insert(this.choosedList, {heroId = v.dynamicId, position=posArr[n]}) + table.remove(posArr,n) + this.order = this.order + 1 + break + end + end + end + end + this.SetCardsData() + this.OnClickTabBtn(proId) +end + return FormationPanelV2 \ No newline at end of file diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/View/ExpeditionFormation.lua b/Assets/ManagedResources/~Lua/Modules/Formation/View/ExpeditionFormation.lua index b57bf001c2..a083b3df9a 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/View/ExpeditionFormation.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/View/ExpeditionFormation.lua @@ -20,7 +20,7 @@ end --- btn1点击回调事件 function this.On_Btn1_Click() - this.root.SetOneKeyGo() + this.root.SetOneKeyGoExpedition() end function this.On_Btn2_Click() diff --git a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua index 4aa757dac2..2a0ba656b1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Main/MainPanel.lua @@ -1176,7 +1176,7 @@ function this:OnShow() -- UIManager.ClosePanel(UIName.RewardItemSingleShowPopup) --end CheckRedPointStatus(RedPointType.RankingSort) - if PlayerManager.IsGetFiveStarHero and OperatingManager.IsShowFiveStarPatch then + if PlayerManager.IsGetFiveStarHero then --and OperatingManager.IsShowFiveStarPatch then Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.GrowGift, 5) PlayerManager.IsGetFiveStarHero = false end diff --git a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua index 637449ca07..89511a4a65 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/View/EndLessMapView.lua @@ -254,7 +254,6 @@ end -- 复位设置 function this.ResetRoleState() --if not this.CanClick() then return end - -- 重置角色位置(目前没有表现,做一下延迟) Timer.New(function () -- 通信一次 @@ -263,21 +262,18 @@ function this.ResetRoleState() -- 初始位置 local position = challengeMapConfig[MapManager.curMapId].Position local initPos = position[1] * 256 + position[2] - -- 前端同步位置 MapManager.curPos = initPos - -- 重置队伍以及妖灵师的血量, 同时重置位置 Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnResetFormationHp, initPos) - -- 请求一次血量, 复位之后请求一次血量 NetManager.RequestAllHeroHp(function () --Log("复位之后请求一次血量数据") end) - -- 刷新迷雾 local u,v = Map_Pos2UV(initPos) TileMapView.UpdateWarFog(u, v, MapManager.fogSize) + FormationManager.SetOneKeyGoWithoutUI(FormationTypeDef.FORMATION_ENDLESS_MAP,20) end) end, 0.2):Start() diff --git a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua index 070285266b..e2753991c7 100644 --- a/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua +++ b/Assets/ManagedResources/~Lua/Modules/Operating/OperatingManager.lua @@ -41,9 +41,9 @@ function this.SetBasicValues(giftGoodsList) local rechargeConfigLocal = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig, giftGoodsInfo.goodsId) - -- LogGreen("------充值活动-----------礼包类型:".. rechargeConfigLocal.Type .." 礼包ID:".. giftGoodsInfo.goodsId .." 已购:" - -- ..giftGoodsInfo.buyTimes.." 开始:"..giftGoodsInfo.startTime.." 结束:" - -- ..giftGoodsInfo.endTime .. " 可购(没卵用):" .. giftGoodsInfo.dynamicBuyTimes) + LogGreen("------充值活动-----------礼包类型:".. rechargeConfigLocal.Type .." 礼包ID:".. giftGoodsInfo.goodsId .." 已购:" + ..giftGoodsInfo.buyTimes.." 开始:"..giftGoodsInfo.startTime.." 结束:" + ..giftGoodsInfo.endTime .. " 可购(没卵用):" .. giftGoodsInfo.dynamicBuyTimes) if giftGoodsInfo.endTime == 0 and giftGoodsInfo.startTime == 0 and (rechargeConfigLocal.ShowType == 25 or rechargeConfigLocal.ShowType == 26 or rechargeConfigLocal.ShowType == 8) then else if giftGoodsInfoList[rechargeConfigLocal.Type] then diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua index a1335b982b..4fab817e7b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemPopup.lua @@ -90,6 +90,10 @@ function RewardItemPopup:BindEvent() if isPlayerAniEnd then PlaySoundWithoutClick(SoundConfig.Sound_UICancel) self:ClosePanel() + if PlayerManager.IsGetFiveStarHero then--and OperatingManager.IsShowFiveStarPatch then + Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.GrowGift, 5) + PlayerManager.IsGetFiveStarHero = false + end end end) Util.AddClick(this.btnMapBack, function () diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua index 025ee27f1d..35d72e2431 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua @@ -45,12 +45,13 @@ function RewardItemSingleShowPopup:BindEvent() end) Util.AddClick(this.btnSure, function() if itemConfigData.ItemType == ItemType.HeroDebris then - if BagManager.GetItemCountById(itemSid) > BagManager.bagDatas[itemSid].itemConfig.UsePerCount then + local sum = BagManager.GetItemCountById(itemSid) / BagManager.bagDatas[itemSid].itemConfig.UsePerCount + if sum >= 2 then local _itemData = BagManager.bagDatas[itemSid] UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 3, _itemData, function() func() end) - elseif BagManager.GetItemCountById(itemSid) == BagManager.bagDatas[itemSid].itemConfig.UsePerCount then + elseif sum >= 1 and sum < 2 then -- body local compoundNum = 1 local _itemData = BagManager.bagDatas[itemSid] diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua index 1da09f84f9..8f48299744 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/SingleRecruitPanel.lua @@ -61,7 +61,7 @@ function SingleRecruitPanel:BindEvent() Util.AddClick(self.sureBtn, function() -- isFirst=true self:ClosePanel() - if PlayerManager.IsGetFiveStarHero and OperatingManager.IsShowFiveStarPatch then + if PlayerManager.IsGetFiveStarHero then--and OperatingManager.IsShowFiveStarPatch then Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.GrowGift, 5) PlayerManager.IsGetFiveStarHero = false end diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua index 179cb7486a..ae7ab98ae0 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/TenRecruitPanel.lua @@ -30,6 +30,10 @@ function TenRecruitPanel:BindEvent() Util.AddClick(self.sureBtn, function() -- UIManager.OpenPanel(UIName.RecruitPanel) + if PlayerManager.IsGetFiveStarHero then--and OperatingManager.IsShowFiveStarPatch then + Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.PatFaceSend, FacePanelType.GrowGift, 5) + PlayerManager.IsGetFiveStarHero = false + end self:ClosePanel() end) Util.AddClick(self.againBtn, function()