Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop
commit
9777af3709
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a5f164d66e71c3046a84ec08e7876cec
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -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
|
||||
--添加事件监听(用于子类重写)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -20,7 +20,7 @@ end
|
|||
--- btn1点击回调事件
|
||||
|
||||
function this.On_Btn1_Click()
|
||||
this.root.SetOneKeyGo()
|
||||
this.root.SetOneKeyGoExpedition()
|
||||
end
|
||||
|
||||
function this.On_Btn2_Click()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ()
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue