[飞升]=======飞升逻辑提交

dev_chengFeng
wangzhenxing 2021-12-28 16:20:07 +08:00
parent 380b0bdb78
commit 73d92664de
15 changed files with 148016 additions and 33 deletions

View File

@ -2636,6 +2636,7 @@ RectTransform:
- {fileID: 7442245723974504381}
- {fileID: 4181577197407190672}
- {fileID: 1015799324}
- {fileID: 5593319260201448112}
m_Father: {fileID: 5594356597870185692}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -2974,7 +2975,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 201.75, y: 35.16998}
m_AnchoredPosition: {x: 201.75, y: 35.169983}
m_SizeDelta: {x: 150.89, y: 181.69}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7302987473867368606
@ -3956,6 +3957,80 @@ MonoBehaviour:
m_Calls: []
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!1 &3945989752590275561
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5593319260201448112}
- component: {fileID: 2489847176098062259}
- component: {fileID: 3048106457463576231}
m_Layer: 5
m_Name: img
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5593319260201448112
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3945989752590275561}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 8599379674280193571}
m_RootOrder: 6
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: -232.7, y: 289.7}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2489847176098062259
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3945989752590275561}
m_CullTransparentMesh: 0
--- !u!114 &3048106457463576231
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3945989752590275561}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &4027810708663513038
GameObject:
m_ObjectHideFlags: 0
@ -5700,7 +5775,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -168.4, y: -7.8}
m_AnchoredPosition: {x: -168.4, y: -7.800003}
m_SizeDelta: {x: 100, y: 115.9}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &5672899113965607730

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 06972ed0d41a3b540a087b7b6771f3ef
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1626,6 +1626,7 @@ FUNCTION_OPEN_TYPE = {
Incarnation = 120,
ChouJiangRukou = 121,--限时招募,乾坤宝盒、灵兽宝阁入口
Gem = 122,--命格
FlyUp = 125,--飞升
}
TaskGetBtnIconDef = {
@ -2968,6 +2969,7 @@ MoneyNumViewImageType = { -- 控制 元 和 $ 符号的大小 可自定义
}
----------------------------------
RoleUpStarMatType = {
flyDan = 3,--飞升丹
item = 2,--万能狗粮
hero = 1,--英雄
}

View File

@ -440,6 +440,7 @@ UIName = {
SupremeHeroPopupNew = 448,
PremiumRebatePanel = 449,
JingjishiLianPatface = 452,
RoleFlyUpSuccessPanel = 455, --角色飞升成功界面
}
SubUIConfig = {

View File

@ -10658,6 +10658,32 @@ local passivityList = {
end
BattleLogic.Event:AddEvent(BattleEventName.BattleRoundChange, onBattleRoundChange)
end,
-- 每有一个[a]阵营神将改变[b]%[c]属性 改变类型[d](战前全体生效用)
--a[int],b[float],c[属性],d[int]
[413] =function(role,args,id,judge)
end,
--释放技能后随机[a]次目标,每次改变[b]目标[c]点怒气
--a[int],b[int],c[int]
[414]=function(role,args,id,judge)
local t1 = args[1]
local ct = args[2]
local num = args[3]
local OnSkillCastEnd = function(skill)
if skill and not skill.isTriggerJudge and judge==1 then
return
end
local arr=RoleManager.Query(function(v) return v.camp~=role.camp end)
if arr==nil or #arr==0 then
return
end
for i = 1, t1 do
local index = Random.RangeInt(1, #arr)
BattleUtil.CalRage(role,arr[i],num,ct)
end
end
role.Event:AddEvent(BattleEventName.SkillCastEnd, OnSkillCastEnd,nil,nil,role)
end,
}

View File

@ -200,6 +200,7 @@ end
function HandBookHeroAndEquipListPanel:GetHeroData()
--得到所有的对应星级的英雄
local fourteenHeroList = {}
local elevenHeroList = {}
local tenHeroList = {}
local sexHeroList = {}
@ -216,6 +217,11 @@ function HandBookHeroAndEquipListPanel:GetHeroData()
if v.MaxRank >= 11 and ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.RoleAwake) then
table.insert(elevenHeroList,v)
end
--and ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.FlyUp)
if v.MaxRank >= 14 then
LogError("aaaaaa")
table.insert(fourteenHeroList,v)
end
end
--所有的5星都要在六星里面显示出来
if v.Star == 5 and (proId == 0 or v.PropertyName == proId) then
@ -232,6 +238,7 @@ function HandBookHeroAndEquipListPanel:GetHeroData()
end
end
end
self:SortHeroNatural(fourteenHeroList)
self:SortHeroNatural(elevenHeroList)
self:SortHeroNatural(tenHeroList)
self:SortHeroNatural(sexHeroList)
@ -242,6 +249,7 @@ function HandBookHeroAndEquipListPanel:GetHeroData()
self:SortHeroNatural(oneHeroList)
--设置图鉴的循环列表
local herodatas={}
herodatas[14]=fourteenHeroList
herodatas[11]=elevenHeroList
herodatas[10]=tenHeroList
herodatas[6]=sexHeroList
@ -268,10 +276,14 @@ function HandBookHeroAndEquipListPanel:GetHeroData()
table.insert(tempData,v[n])
--LogBlue("v[n].id:"..v[n].Id)
end
local heroStar=k
if heroStar==12 then
heroStar=14
end
if i%5 ==0 then
table.insert(heroScrolldatas,{type = 1,star = k,index = math.floor(i/5), content = tempData})
table.insert(heroScrolldatas,{type = 1,star = heroStar,index = math.floor(i/5), content = tempData})
else
table.insert(heroScrolldatas,{type = 1,star = k,index = math.floor(i/5) + 1, content = tempData})
table.insert(heroScrolldatas,{type = 1,star = heroStar,index = math.floor(i/5) + 1, content = tempData})
end
temp = i
end
@ -301,6 +313,7 @@ function HandBookHeroAndEquipListPanel:GetHeroData()
end
function HandBookHeroAndEquipListPanel:HeroHaveNum()
local curefourTeenStarActiveNum = 0
local curelevenStarActiveNum = 0
local curtenStarActiveNum = 0
local cursexStarActiveNum = 0
@ -343,6 +356,7 @@ function HandBookHeroAndEquipListPanel:HeroHaveNum()
heroNumList[6] = cursexStarActiveNum
heroNumList[10] = curtenStarActiveNum
heroNumList[11] = curelevenStarActiveNum
heroNumList[14] = curefourTeenStarActiveNum
end
--英雄展示

View File

@ -80,7 +80,7 @@ function HandBookRoleInfoLayout:OnShowHeroData(_starType,_star)
self.talentBtn:SetActive(heroConFigData.OpenPassiveSkillRules ~= nil)
local talentBtnImage = _star == HeroManager.awakeNextStarIndex and "r_hero_tianfu2_zh" or "r_hero_tianfu1_zh"
self.talentBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite(talentBtnImage)
local OpenPassiveSkillRules = _star == HeroManager.awakeNextStarIndex and heroConFigData.Awaken or heroConFigData.OpenPassiveSkillRules
local OpenPassiveSkillRules = _star >= HeroManager.awakeNextStarIndex and heroConFigData.Awaken or heroConFigData.OpenPassiveSkillRules
if OpenPassiveSkillRules then
local openlists,compoundOpenNum,compoundNum = HeroManager.GetAllPassiveSkillIds(heroConFigData,breakId,upStarId)
self.talentProgress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum

View File

@ -759,8 +759,7 @@ function this.GetHeroCurUpStarInfo(heroDId)
if v.heroConfig.RankupConsumeMaterial[j][1] == indexStar then
local heroUpStarMaterialsData = {}
heroUpStarMaterialsData.upStarData = v.heroConfig.RankupConsumeMaterial[j]
heroUpStarMaterialsData.upStarMaterialsData =
heroRankUpGroup[v.heroConfig.RankupConsumeMaterial[j][3]]
heroUpStarMaterialsData.upStarMaterialsData =heroRankUpGroup[v.heroConfig.RankupConsumeMaterial[j][3]]
table.insert(RankupConsumeMaterial, heroUpStarMaterialsData)
end
end
@ -2396,7 +2395,7 @@ function this.GetCurHeroSidAndCurStarAllSkillDatas(sid, star)
end
end
end
local OpenPassiveSkillRules = star == this.awakeNextStarIndex and curHeroConfig.Awaken or curHeroConfig.OpenPassiveSkillRules
local OpenPassiveSkillRules = star >= this.awakeNextStarIndex and curHeroConfig.Awaken or curHeroConfig.OpenPassiveSkillRules
if OpenPassiveSkillRules then
for i = 1, #OpenPassiveSkillRules do
if OpenPassiveSkillRules[i][1] == star then
@ -2563,6 +2562,7 @@ function this.GetHeroReturnItems(selectHeroData, type)
LogRed("pId:"..pId.." curHeroData.breakId:"..curHeroData.breakId.." curHeroData.id:"..curHeroData.id)
end
end
if curHeroData.star > 1 then
local heroRankUpConfig = ConfigManager.GetConfigDataByDoubleKey(ConfigName.HeroSacrifice,"Type",1,"Key",curHeroData.star)
if heroRankUpConfig then
@ -2789,7 +2789,7 @@ function this.GetAllPassiveSkillIds(heroConfig, breakId, upStarId)
--只用于界面升星开放技能提示显示用
local compoundNum = 0
local compoundOPenNum = 0
local OpenPassiveSkillRules = (upStarId and upStarId ~=0 and heroRankUpConfig[upStarId].OpenStar == this.awakeNextStarIndex) and heroConfig.Awaken or heroConfig.OpenPassiveSkillRules
local OpenPassiveSkillRules = (upStarId and upStarId ~=0 and heroRankUpConfig[upStarId].OpenStar >= this.awakeNextStarIndex) and heroConfig.Awaken or heroConfig.OpenPassiveSkillRules
if OpenPassiveSkillRules then
for i = 1, #OpenPassiveSkillRules do
if OpenPassiveSkillRules[i][1] == 1 then --突破
@ -2956,6 +2956,7 @@ function this.GetFormationHeroRedPoint()
if
this.GetCurHeroUpLvOrUpStarSData(curHeroData) or this.LvUpBtnRedPoint(curHeroData) or
this.IsShowUpStarRedPoint(curHeroData) or
this.IsShowFlyUpRedPoint(curHeroData) or
#this.GetHeroIsUpEquip(curHeroData.dynamicId) > 0 or
this.GetIsShowSoulPrintRedPoint(curHeroData) or
this.GetIsShowTalismanRedPoint(curHeroData) or
@ -3167,6 +3168,98 @@ function this.IsShowUpStarRedPoint(curHeroData,isNoDeleFormation)--isNoDeleForma
end
return true
end
--单个英雄升星红点
function this.IsShowFlyUpRedPoint(curHeroData,isNoDeleFormation)--isNoDeleFormation 可选传参数 材料筛选是否去除上阵英雄
HeroManager.GetCurHeroUpLvOrUpStarSData(curHeroData)
-- if curHeroData.lv >= HeroManager.heroLvEnd[curHeroData.heroConfig.Id] then
-- return false
-- --培养已满
-- end
local curUpStarData= HeroManager.GetHeroCurUpStarInfo(curHeroData.dynamicId)
if curUpStarData and #curUpStarData>0 then
else
--培养已满
return false
end
if upStarRankUpConfig and upStarRankUpConfig.LimitLevel then
if curHeroData.lv < upStarRankUpConfig.LimitLevel then
return false
--等级不够
end
else
--不能升星
return false
end
if upStarRankUpConfig then
local ConsumeMaterial = upStarRankUpConfig.ConsumeMaterial
for i = 1, #ConsumeMaterial do
if ConsumeMaterial[i][2] > 0 then
if BagManager.GetItemCountById(ConsumeMaterial[i][1]) < ConsumeMaterial[i][2] then
return false
--材料不足
end
end
end
end
local upStarConsumeMaterial = {}
local upStarMaterialIsAll = {}
local curUpStarData = HeroManager.GetHeroCurUpStarInfo(curHeroData.dynamicId)
if curUpStarData and #curUpStarData > 0 then
for i = 1, #curUpStarData do
local curSelectUpStarData = curUpStarData[i]
upStarMaterialIsAll[curSelectUpStarData.upStarData[2]] = 2
if curSelectUpStarData.upStarMaterialsData.Id==184 then
local itemId=curSelectUpStarData.upStarMaterialsData.IsId
local num=curSelectUpStarData.upStarData[4]
if BagManager.GetItemCountById(itemId)>=num then
upStarMaterialIsAll[curSelectUpStarData.upStarData[2]] = 1
end
else
local upStarHeroListData =HeroManager.GetUpStarHeroListData(curSelectUpStarData.upStarMaterialsData.Id, curHeroData)
local curSelectHeroList = {}
if #upStarHeroListData.heroList >= curSelectUpStarData.upStarData[4] then
for j = 1, #upStarHeroListData.heroList do
if (upStarHeroListData.heroList[j].type == RoleUpStarMatType.hero and upStarHeroListData.heroList[j].lockState == 0 and
(upStarHeroListData.heroList[j].isFormation == "" or isNoDeleFormation) and
#curSelectHeroList < curSelectUpStarData.upStarData[4] and
not upStarConsumeMaterial[upStarHeroListData.heroList[j].dynamicId] and
not HarmonyManager.IsChangeColor(upStarHeroListData.heroList[j].dynamicId) and
not (HarmonyManager:IsEnvoy(upStarHeroListData.heroList[j].dynamicId) and HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv) and HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).heroTid == 0))
or upStarHeroListData.heroList[j].type == RoleUpStarMatType.item
then
table.insert(curSelectHeroList, upStarHeroListData.heroList[j])
end
end
if LengthOfTable(curSelectHeroList) >= curSelectUpStarData.upStarData[4] then
upStarMaterialIsAll[curSelectUpStarData.upStarData[2]] = 1
end
for _i, v in pairs(curSelectHeroList) do
if v.dynamicId then
upStarConsumeMaterial[v.dynamicId] = v.dynamicId
end
end
end
end
end
end
-- 消耗位置材料状态
for i = 1, #upStarMaterialIsAll do
if upStarMaterialIsAll[i] == 2 then
return false
end
end
return true
end
--单个英雄装备红点 --检测单个英雄是否有可穿的装备
function this.GetHeroIsUpEquip(heroDid)
if heroDatas[heroDid] then

View File

@ -794,6 +794,8 @@ function this.HeroUpStarEvent(heroId, consumeMaterials, func)
e.itemId = consumeMaterials[i][j].dynamicId
elseif consumeMaterials[i][j].type == RoleUpStarMatType.item then
e.itemId = tostring(consumeMaterials[i][j].id)
elseif consumeMaterials[i][j].type == RoleUpStarMatType.flyDan then
e.itemId = tostring(consumeMaterials[i][j].id)
end
else--英雄合成 没有做英雄狗粮逻辑
e.type = RoleUpStarMatType.hero

View File

@ -55,6 +55,7 @@ function RoleFlyUpLayout:InitComponent()
this.hpPro_UpStar=Util.GetGameObject(self.gameObject,"upStar/upStarProInfo/pro/hp")
this.phyDef_UpStar=Util.GetGameObject(self.gameObject,"upStar/upStarProInfo/pro/phyDef")
this.magDef_UpStar=Util.GetGameObject(self.gameObject,"upStar/upStarProInfo/pro/magDef")
this.flyImage=Util.GetGameObject(self.gameObject,"upStar/upStarProInfo/img"):GetComponent("Image")
this.help=Util.GetGameObject(self.gameObject,"upStar/btns/help")
this.heroSource = Util.GetGameObject(self.gameObject,"upStar/btns/heroSource")
@ -130,15 +131,24 @@ function RoleFlyUpLayout:UpdateHeroUpStarData()
if upStarRankUpConfig and upStarRankUpConfig.Id then
this:UpdateHeroUpStarProUpShow()
end
local str=""
if curHeroData.upStarId==12 then
str="r_hero_tianfu2_zh"
elseif curHeroData.upStarId==13 then
str="r_hero_tianfu2_zh"
elseif curHeroData.upStarId==14 then
str="r_hero_tianfu2_zh"
else
str="r_hero_tianfu2_zh"
end
this.flyImage.sprite=this.spLoader:LoadSprite(str)
local awaken=curHeroData.heroConfig.Awaken
LogError("upstarid=="..curHeroData.upStarId)
if awaken then
for key, value in pairs(awaken) do
if value[2]==curHeroData.upStarId+1 then
LogError("11111111111")
local aaa=ConfigManager.TryGetConfigData(ConfigName.PassiveSkillConfig,value[3])
if aaa then
LogError("22222222 ")
this.skillInfoGrid.text=aaa.Desc
break
end
@ -148,7 +158,6 @@ function RoleFlyUpLayout:UpdateHeroUpStarData()
end
LogError("3333333333333")
--进阶吞英雄条件
Util.ClearChild(this.upStarGrid.transform)
local curUpStarData= HeroManager.GetHeroCurUpStarInfo(curHeroData.dynamicId)
@ -173,6 +182,7 @@ function RoleFlyUpLayout:UpdateHeroUpStarData()
local isItem=false
Util.GetGameObject(go.transform, "iconbg/proImage"):SetActive(false)
local itemConfig=nil
local numTxt=Util.GetGameObject(go.transform,"num"):GetComponent("Text")
if curUpStarData[i].upStarMaterialsData.Issame==1 or curUpStarData[i].upStarMaterialsData.IsId>0 then
Util.GetGameObject(go.transform,"iconDefault"):SetActive(false)
Util.GetGameObject(go.transform,"icon"):SetActive(true)
@ -211,12 +221,31 @@ function RoleFlyUpLayout:UpdateHeroUpStarData()
--
end
local upStarHeroListData=HeroManager.GetUpStarHeroListData(curUpStarData[i].upStarMaterialsData.Id,curHeroData)
local needNum=curUpStarData[i].upStarData[4]
if isItem then
local bagNum=BagManager.GetItemCountById(itemConfig.Id)
--upStarConsumeMaterial[i][1].type=RoleUpStarMatType.item
LogError("bagnum=="..bagNum.." neddnum=="..needNum)
if bagNum<needNum then
isUpStarMaterials=false
numTxt.text=string.format("<color=#FF0000FF>%s/%s</color>",bagNum,needNum)
else
upStarMaterialIsAll[i]=1
numTxt.text=string.format("<color=#FFFFFFFF>%s/%s</color>",bagNum,needNum)
for m = 1, needNum do
upStarConsumeMaterial[i][m]={type=RoleUpStarMatType.flyDan,id=tostring(itemConfig.Id)}
end
end
else
numTxt.text=string.format("<color=#FF0000FF>%s/%s</color>",0,needNum)
end
if upStarHeroListData.state>0 then
Util.GetGameObject(go.transform,"add/add"):SetActive(true)
else
Util.GetGameObject(go.transform,"add/add"):SetActive(false)
end
Util.GetGameObject(go.transform,"num"):GetComponent("Text").text=string.format("<color=#FF0000FF>%s/%s</color>",0,curUpStarData[i].upStarData[4])
SetHeroStars(this.spLoader, Util.GetGameObject(go.transform, "iconbg/starGrid"), curUpStarData[i].upStarMaterialsData.StarLimit,1,nil,-15.3)
Util.SetParticleSortLayer(Util.GetGameObject(go.transform, "iconbg/starGrid"),self.sortingOrder + 1)
Util.AddOnceClick(addBtn, function()
@ -360,7 +389,7 @@ function RoleFlyUpLayout:AutoSelectUpStarHeroList(_curUpStarData)
end
end
--进阶红点
local upStarRedPointState = HeroManager.IsShowUpStarRedPoint(curHeroData)
local upStarRedPointState = HeroManager.IsShowFlyUpRedPoint(curHeroData)
this.upStarBtnRedPoint:SetActive(upStarRedPointState)
parent:CheckRedPointType(RoleInfoPanelIndex.jinjie,upStarRedPointState)
end
@ -431,20 +460,12 @@ end
--进阶按钮点击事件处理
function RoleFlyUpLayout:StarUpClick()
if (not HarmonyManager.IsInfo(curHeroData.dynamicId)) and (not HarmonyManager:IsEnvoy(curHeroData.dynamicId)) then
-- body curHeroData
-- print("1111111111",1111111111,tostring(HarmonyManager.IsInfo(curHeroData.dynamicId)),tostring(HarmonyManager:IsEnvoy(curHeroData.dynamicId)))
if curHeroData.oriLv>=HeroManager.heroLvEnd[curHeroData.heroConfig.Id] then
if curHeroData.oriLv>=HeroManager.heroLvEnd[curHeroData.heroConfig.Id] and curHeroData.star==curHeroData.heroConfig.MaxStar then
PopupTipPanel.ShowTip(Language[11788])
return
end
-- elseif then
-- -- body
-- print("2222222",1111111111)
-- if curHeroData.lv>=HeroManager.heroLvEnd[curHeroData.heroConfig.Id] then
-- PopupTipPanel.ShowTip("当前培养已满")
-- return
-- end
end
if curHeroData.lv<upStarRankUpConfig.LimitLevel then
@ -459,7 +480,7 @@ function RoleFlyUpLayout:StarUpClick()
end
if isUpStarMaterials and isUpStarMaterialsHero then
NetManager.HeroUpStarEvent(curHeroData.dynamicId,upStarConsumeMaterial ,function (msg)
UIManager.OpenPanel(UIName.RoleUpStarSuccessPanel,curHeroData,upStarRankUpConfig.Id,upStarRankUpConfig.OpenLevel,function ()
UIManager.OpenPanel(UIName.RoleFlyUpSuccessPanel,curHeroData,upStarRankUpConfig.Id,upStarRankUpConfig.OpenLevel,function ()
local dropItemTabs = BagManager.GetTableByBackDropData(msg)
if #dropItemTabs > 0 then
BagManager.SetDropIsSHowEquipPrint(false)
@ -475,7 +496,7 @@ function RoleFlyUpLayout:StarUpClick()
-- 进阶音效
PlaySoundWithoutClick(SoundConfig.Sound_Recruit3)
else
PopupTipPanel.ShowTip(Language[10415])
PopupTipPanel.ShowTip("材料不足无法飞升")
end
end
--扣除升星 消耗的材料 更新英雄数据

View File

@ -0,0 +1,218 @@
require("Base/BasePanel")
RoleFlyUpSuccessPanel = Inherit(BasePanel)
local this=RoleFlyUpSuccessPanel
this.skillConfig=ConfigManager.GetConfig(ConfigName.SkillConfig)
local passiveSkillConfig=ConfigManager.GetConfig(ConfigName.PassiveSkillConfig)
local orginLayer = 20
local callBack = nil
local heroRankupConfig = ConfigManager.GetConfig(ConfigName.HeroRankupConfig)
local heroConfig = ConfigManager.GetConfig(ConfigName.HeroConfig)
--初始化组件(用于子类重写)
function RoleFlyUpSuccessPanel:InitComponent()
this.spLoader = SpriteLoader.New()
orginLayer = 20
this.BtnBack = Util.GetGameObject(self.transform, "backBtn")
this.mask = Util.GetGameObject(self.transform, "mask")
this.live2dRoot=Util.GetGameObject(self.transform,"live2dRoot")
this.heroName = Util.GetGameObject(self.transform, "heroInfo/nameAndPossLayout/heroName"):GetComponent("Text")
this.profession = Util.GetGameObject(self.transform, "Pos/PosImage"):GetComponent("Image")
this.proImage = Util.GetGameObject(self.transform, "heroInfo/nameAndPossLayout/proImage/proImage"):GetComponent("Image")
--this.posText = Util.GetGameObject(self.transform, "heroInfo/nameAndPossLayout/posText/posText"):GetComponent("Text")
this.starGrid = Util.GetGameObject(self.transform, "heroInfo/sartAndLvLayout")
--this.qualityImage=Util.GetGameObject(self.transform,"quality"):GetComponent("Image")
--this.quality=Util.GetGameObject(self.transform,"quality/qualityText")
--this.doubleQuality=Util.GetGameObject(self.transform,"quality/qualityDoubleText")
this.posBgImage=Util.GetGameObject(self.transform,"Pos"):GetComponent("Image")
-- this.posImage=Util.GetGameObject(self.transform,"Pos/PosImage"):GetComponent("Image")
this.posText=Util.GetGameObject(self.transform,"Pos/PosText"):GetComponent("Text")
this.flyImage=Util.GetGameObject(self.transform,"heroInfo/Image"):GetComponent("Image")
this.upLvMaskPanleProAtk=Util.GetGameObject(self.transform,"proInfo/GameObject/proInfo/curPros/mainPro/curProVale"):GetComponent("Text")
this.upLvMaskPanleProHp=Util.GetGameObject(self.transform,"proInfo/GameObject/proInfo/curPros/otherPro1/curProVale"):GetComponent("Text")
this.upLvMaskPanleProPhyDef=Util.GetGameObject(self.transform,"proInfo/GameObject/proInfo/curPros/otherPro2/curProVale"):GetComponent("Text")
this.upLvMaskPanleProMagDef=Util.GetGameObject(self.transform,"proInfo/GameObject/proInfo/curPros/otherPro3/curProVale"):GetComponent("Text")
this.upLvMaskPanleProSpeed=Util.GetGameObject(self.transform,"proInfo/GameObject/proInfo/curPros/otherPro4/curProVale"):GetComponent("Text")
this.upLvMaskPanleNextProAtk=Util.GetGameObject(self.transform,"proInfo/GameObject/proInfo/nextPros/mainPro/curProVale"):GetComponent("Text")
this.upLvMaskPanleNextProHp=Util.GetGameObject(self.transform,"proInfo/GameObject/proInfo/nextPros/otherPro1/curProVale"):GetComponent("Text")
this.upLvMaskPanleNextProPhyDef=Util.GetGameObject(self.transform,"proInfo/GameObject/proInfo/nextPros/otherPro2/curProVale"):GetComponent("Text")
this.upLvMaskPanleNextProMagDef=Util.GetGameObject(self.transform,"proInfo/GameObject/proInfo/nextPros/otherPro3/curProVale"):GetComponent("Text")
this.upLvMaskPanleNextProSpeed=Util.GetGameObject(self.transform,"proInfo/GameObject/proInfo/nextPros/otherPro4/curProVale"):GetComponent("Text")
this.upLvShowGoText=Util.GetGameObject(self.transform,"proInfo/GameObject/proInfo/Text"):GetComponent("Text")
this.talentInfoText=Util.GetGameObject(self.transform,"proInfo/GameObject/talentInfo/Text"):GetComponent("Text")
this.curTalentVale=Util.GetGameObject(self.transform,"proInfo/GameObject/talentInfo/curTalentVale"):GetComponent("Text")
this.talentInfoShowGo=Util.GetGameObject(self.transform,"proInfo/GameObject/talentInfo")
-- this.s1=Util.GetGameObject(self.transform,"proInfo/skillGrid/skillInfo1")
-- this.s1MiddleImage=Util.GetGameObject(self.transform,"proInfo/skillGrid/skillInfo1/Image (2)")
-- this.s1nextSkill=Util.GetGameObject(self.transform,"proInfo/skillGrid/skillInfo1/nextSkill")
-- this.s2=Util.GetGameObject(self.transform,"proInfo/skillGrid/skillInfo2")
-- this.s2MiddleImage=Util.GetGameObject(self.transform,"proInfo/skillGrid/skillInfo2/Image (2)")
-- this.s2nextSkill=Util.GetGameObject(self.transform,"proInfo/skillGrid/skillInfo2/nextSkill")
this.lvEndInfo=Util.GetGameObject(self.transform, "proInfo/lvEndText"):GetComponent("Text")
this.lvEndInfo.gameObject:SetActive(false)
this.UI_Effect_choukaSSR = Util.GetGameObject(self.transform, "UI_Effect_chouka_SSR")
this.UI_Effect_choukaSR = Util.GetGameObject(self.transform, "UI_Effect_chouka_SR")
this.UI_Effect_choukaR = Util.GetGameObject(self.transform, "UI_Effect_chouka_R")
-- this.skillTiShi = Util.GetGameObject(self.transform,"proInfo/skillTiShi"):GetComponent("Text")
end
--绑定事件(用于子类重写)
function RoleFlyUpSuccessPanel:BindEvent()
Util.AddClick(this.BtnBack, function()
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
self:ClosePanel()
end)
end
--添加事件监听(用于子类重写)
function RoleFlyUpSuccessPanel:AddListener()
end
--移除事件监听(用于子类重写)
function RoleFlyUpSuccessPanel:RemoveListener()
end
function RoleFlyUpSuccessPanel:OnSortingOrderChange()
Util.AddParticleSortLayer(this.UI_Effect_choukaSSR, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.UI_Effect_choukaSR, self.sortingOrder - orginLayer)
Util.AddParticleSortLayer(this.UI_Effect_choukaR, self.sortingOrder - orginLayer)
this.mask:GetComponent("Canvas").overrideSorting = true
this.mask:GetComponent("Canvas").sortingOrder = self.sortingOrder - 30
orginLayer = self.sortingOrder
end
--界面打开时调用(用于子类重写)
function RoleFlyUpSuccessPanel:OnOpen(...)
Util.GetGameObject(self.transform,"proInfo/GameObject/proInfo/curPros/mainPro/curProName"):GetComponent("Text").text = Language[11838]
Util.GetGameObject(self.transform,"proInfo/GameObject/proInfo/nextPros/mainPro/curProName"):GetComponent("Text").text = Language[11838]
this.upLvShowGoText.text = Language[11430]
local args = {...}
local curHeroData=args[1]
local nextHeroUpStarId=args[2]
local curHeroRankUpConfigOpenLevel=args[3]
callBack = args[4]
--this.OnShowPanelData()
this.UI_Effect_choukaSSR:SetActive(curHeroData.heroConfig.Quality == 5)
this.UI_Effect_choukaSR:SetActive(curHeroData.heroConfig.Quality == 4)
this.UI_Effect_choukaR:SetActive(curHeroData.heroConfig.Quality == 3)
this.LiveName = curHeroData.live
this.LiveGO = poolManager:LoadLive(this.LiveName, this.live2dRoot.transform,
Vector3.one * curHeroData.heroConfig.Scale, Vector3.New(curHeroData.heroConfig.Position[1],curHeroData.heroConfig.Position[2],0))
SetHEeroLiveToward(this.LiveGO,curHeroData.heroConfig.Toward)
this.profession.sprite = this.spLoader:LoadSprite(GetHeroPosStr(curHeroData.heroConfig.Profession))
LogPink("curHeroData.heroConfig.PropertyName"..curHeroData.heroConfig.PropertyName)
this.proImage.sprite =this.spLoader:LoadSprite(GetProStrImageByProNum(curHeroData.heroConfig.PropertyName))
local upStar=curHeroData.star+1
local flyImg=""
if upStar==12 then
flyImg="r_hero_tianfu2_zh"
elseif upStar==13 then
flyImg="r_hero_tianfu2_zh"
elseif upStar==14 then
flyImg="r_hero_tianfu2_zh"
end
this.flyImage.sprite=this.spLoader:LoadSprite(flyImg)
this.heroName.text=GetLanguageStrById(curHeroData.heroConfig.ReadingName)
--定位描述相关
this.posBgImage.sprite=this.spLoader:LoadSprite(GetHeroPosBgStr(curHeroData.heroConfig.Profession))
-- this.posImage.sprite=this.spLoader:LoadSprite(GetHeroPosStr(curHeroData.heroConfig.Profession))
this.posText.text=GetLanguageStrById(curHeroData.heroConfig.HeroLocation)
SetTextVerTial(this.posText.gameObject,Vector3.New(64,0,0),"MiddleLeft")
this.lvEndInfo.text=string.format(Language[11791],curHeroRankUpConfigOpenLevel)
--计算面板属性old
local oldLvAllAddProVal= HeroPropManager.GetHeroProp(curHeroData.dynamicId)
this.upLvMaskPanleProAtk.text=oldLvAllAddProVal[HeroProType.Attack]
this.upLvMaskPanleProHp.text=oldLvAllAddProVal[HeroProType.Hp]
this.upLvMaskPanleProPhyDef.text=oldLvAllAddProVal[HeroProType.PhysicalDefence]
this.upLvMaskPanleProMagDef.text=oldLvAllAddProVal[HeroProType.MagicDefence]
this.upLvMaskPanleProSpeed.text= oldLvAllAddProVal[HeroProType.Speed]
--计算面板属性cur
-- local curLvAllAddProVal=HeroManager.CalculateHeroAllProValList(2,curHeroData.dynamicId,false,curHeroData.breakId,nextHeroUpStarId)
-- 生成一个临时英雄数据,使用完成后需主动清理
local tempDId, tempData = HeroTempPropManager.CreateTempHero(curHeroData.dynamicId)
tempData.upStarId = nextHeroUpStarId
tempData.breakId = curHeroData.breakId
local curLvAllAddProVal = HeroTempPropManager.GetTempHeroProp(tempDId)--HeroPowerManager.GetNextHeroPower(curHeroData.dynamicId, nil,curHeroData.breakId,nextHeroUpStarId)
HeroTempPropManager.ClearTempHero(tempDId)-- 清理
this.upLvMaskPanleNextProAtk.text=curLvAllAddProVal[HeroProType.Attack]
this.upLvMaskPanleNextProHp.text=curLvAllAddProVal[HeroProType.Hp]
this.upLvMaskPanleNextProPhyDef.text=curLvAllAddProVal[HeroProType.PhysicalDefence]
this.upLvMaskPanleNextProMagDef.text=curLvAllAddProVal[HeroProType.MagicDefence]
this.upLvMaskPanleNextProSpeed.text= curLvAllAddProVal[HeroProType.Speed]
--天赋2#7#127107
LogPink("curHeroData.upStarId "..nextHeroUpStarId)
local talentSKillsConFig = ConfigManager.GetConfigData(ConfigName.HeroConfig,curHeroData.id).OpenPassiveSkillRules
local upStarSkillDataList = {}
for i = 1, #talentSKillsConFig do
if talentSKillsConFig[i][1] == 2 then--升星
LogPink("talentSKillsConFig[i][2] "..talentSKillsConFig[i][2])
if nextHeroUpStarId == talentSKillsConFig[i][2] then
local _titleStr = NumToSimplenessFont[heroRankupConfig[nextHeroUpStarId].Phase[2]] .. Language[11792]
local _passiveSkillId = passiveSkillConfig[talentSKillsConFig[i][3]].Id
if upStarSkillDataList[nextHeroUpStarId] then
upStarSkillDataList[nextHeroUpStarId] = {titleStr = _titleStr,str = upStarSkillDataList[nextHeroUpStarId].str .. "  "..GetLanguageStrById(passiveSkillConfig[talentSKillsConFig[i][3]].Desc)}
else
upStarSkillDataList[nextHeroUpStarId] = {titleStr = _titleStr,str = GetLanguageStrById(passiveSkillConfig[talentSKillsConFig[i][3]].Desc)}
end
end
end
end
this.curTalentVale=Util.GetGameObject(self.transform,"proInfo/GameObject/talentInfo/curTalentVale"):GetComponent("Text")
this.talentInfoShowGo=Util.GetGameObject(self.transform,"proInfo/GameObject/talentInfo")
if upStarSkillDataList and LengthOfTable(upStarSkillDataList) > 0 then
this.talentInfoShowGo:SetActive(true)
this.talentInfoText.text = Language[11839]
this.curTalentVale.text = upStarSkillDataList[nextHeroUpStarId].str
else
this.talentInfoShowGo:SetActive(false)
end
if curHeroData.heroConfig.Quality == 5 and curHeroData.heroConfig.Natural >= 13 then
if curHeroData.star+1 >= 5 and curHeroData.star+1 < 15 then
HeroManager.DetectionOpenFiveStarActivity(curHeroData.star+1)
end
end
end
function RoleFlyUpSuccessPanel:GetEquipSkillData(skillId)
return this.skillConfig[skillId]
end
--界面关闭时调用(用于子类重写)
function RoleFlyUpSuccessPanel:OnClose()
if this.LiveName then
poolManager:UnLoadLive(this.LiveName, this.LiveGO)
this.LiveName = nil
end
if callBack then
callBack()
callBack = nil
end
end
--界面销毁时调用(用于子类重写)
function RoleFlyUpSuccessPanel:OnDestroy()
this.spLoader:Destroy()
end
return RoleFlyUpSuccessPanel

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: cd0e880fd38b7df478ec1a2f71488b3d
timeCreated: 1551753698
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -558,7 +558,8 @@ function this:UpdateBtnList()
tabsList[k].gameObject:SetActive(false)
end
elseif k== RoleInfoPanelIndex.feiSheng then
if curHeroData.star >=11 and curHeroData.heroConfig.MaxRank>11 then
--and ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.FlyUp)
if curHeroData.star >=11 and curHeroData.heroConfig.MaxRank>11 and curHeroData.star<14 then
tabsList[k].gameObject:SetActive(true)
else
tabsList[k].gameObject:SetActive(false)
@ -587,6 +588,9 @@ function this:UpdateBtnList()
-- redpot.gameObject:SetActive(upStarRedPointState)
-- else
redpot.gameObject:SetActive(false)
elseif k == RoleInfoPanelIndex.feiSheng then
local upStarRedPointState = HeroManager.IsShowFlyUpRedPoint(curHeroData)
redpot.gameObject:SetActive(upStarRedPointState)
end
Util.AddOnceClick(tabsList[k],function()
if k == _CurPageIndex then
@ -776,7 +780,7 @@ function this:UpdateHeroInfoData()
end
this.talentBtnIcon.sprite = this.spLoader:LoadSprite(talentBtnImage)
local OpenPassiveSkillRules = curHeroData.star == HeroManager.awakeNextStarIndex and curHeroData.heroConfig.Awaken or curHeroData.heroConfig.OpenPassiveSkillRules
local OpenPassiveSkillRules = curHeroData.star >= HeroManager.awakeNextStarIndex and curHeroData.heroConfig.Awaken or curHeroData.heroConfig.OpenPassiveSkillRules
if OpenPassiveSkillRules then
local openlists,compoundOpenNum,compoundNum,allUpStarOpenData = HeroManager.GetAllPassiveSkillIds(curHeroData.heroConfig,curHeroData.breakId,curHeroData.upStarId)
this.talentProgress.text = #openlists - compoundOpenNum .."/"..#OpenPassiveSkillRules - compoundNum

View File

@ -57,7 +57,7 @@ function RoleTalentPopup:GetTalentDataShow()
local heroRankUpConfig = ConfigManager.GetConfig(ConfigName.HeroRankupConfig)
LogError("upstarid =="..upStarId)
local openNum=0
local OpenPassiveSkillRules = (upStarId and upStarId ~=0 and heroRankUpConfig[upStarId].OpenStar == HeroManager.awakeNextStarIndex) and heroConfig.Awaken or heroConfig.OpenPassiveSkillRules
local OpenPassiveSkillRules = (upStarId and upStarId ~=0 and heroRankUpConfig[upStarId].OpenStar >= HeroManager.awakeNextStarIndex) and heroConfig.Awaken or heroConfig.OpenPassiveSkillRules
if OpenPassiveSkillRules then
for i = 1, #OpenPassiveSkillRules do
if OpenPassiveSkillRules[i][1] == 1 then--突破
@ -85,11 +85,11 @@ function RoleTalentPopup:GetTalentDataShow()
if curUpStarId>11 then
--self.grid.sizeDelta=Vector2.New(969,1000)
if curUpStarId==12 then
if curUpStarId==25 then
titleStr="飞升一阶激活:\n"
elseif curUpStarId==13 then
elseif curUpStarId==26 then
titleStr="飞升二阶激活:\n"
elseif curUpStarId==14 then
elseif curUpStarId==27 then
titleStr="飞升三阶激活:\n"
end
else