Merge branch '0功能/法宝归元和神将置换' of http://60.1.1.230/gaoxin/JL_Client into 0功能/法宝归元和神将置换
commit
ed373d1851
|
@ -2281,4 +2281,11 @@
|
||||||
[12280] = "巅峰赛阵容",
|
[12280] = "巅峰赛阵容",
|
||||||
[12281] = "属性提升",
|
[12281] = "属性提升",
|
||||||
[12282] = "解锁天赋",
|
[12282] = "解锁天赋",
|
||||||
|
[12283] = "请选择一个",
|
||||||
|
[12284] = "需要法宝归元的神将",
|
||||||
|
[12285] = "无可归元的法宝!",
|
||||||
|
[12286] = "法宝归元成功!",
|
||||||
|
[12287] = "确定归元",
|
||||||
|
[12288] = "<color=#6DFA55>%s</color>的法宝会重置为<color=#6DFA55>1</color>,并返还进阶时消耗的金币和陨铁,是否确认归元?\n\n\t\t\t\t\t\t\t归元后获得:",
|
||||||
|
[12289] = "请选择一个需要归元的法宝神将!",
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ function this:BindEvent()
|
||||||
for i = 1, #data do
|
for i = 1, #data do
|
||||||
HeroManager.SetTalismanLv(data[i], 1)
|
HeroManager.SetTalismanLv(data[i], 1)
|
||||||
end
|
end
|
||||||
PopupTipPanel.ShowTip("法宝归元成功!")
|
PopupTipPanel.ShowTip(Language[12286])
|
||||||
parent:ClosePanel()
|
parent:ClosePanel()
|
||||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function ()
|
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function ()
|
||||||
ResolvePanel.SwitchView(3)
|
ResolvePanel.SwitchView(3)
|
||||||
|
@ -60,10 +60,14 @@ function this:OnShow(_parent,...)
|
||||||
selectHeroData=args[2]
|
selectHeroData=args[2]
|
||||||
this.root.transform:GetComponent("RectTransform"):DOAnchorPosX(0, 0)
|
this.root.transform:GetComponent("RectTransform"):DOAnchorPosX(0, 0)
|
||||||
|
|
||||||
this.titleText.text="确定归元"
|
this.titleText.text=Language[12287]
|
||||||
|
local heroReadingName = ReadingName
|
||||||
|
for key, value in pairs(selectHeroData) do
|
||||||
|
heroReadingName = value.heroConfig.ReadingName
|
||||||
|
end
|
||||||
--返还比
|
--返还比
|
||||||
local num=tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig,34).Value)/100
|
-- local num=tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig,34).Value)/100
|
||||||
this.bodyText.text = string.format("%s的法宝会重置为1阶,并返还进阶时消耗的金币和陨铁,是否确认归元?", num, "%")
|
this.bodyText.text = string.format(Language[12288],heroReadingName)
|
||||||
|
|
||||||
local _data={}
|
local _data={}
|
||||||
for i=1,#dropList do
|
for i=1,#dropList do
|
||||||
|
|
|
@ -12,9 +12,11 @@ function this:InitComponent(gameObject)
|
||||||
this.helpPos=this.helpBtn:GetComponent("RectTransform").localPosition
|
this.helpPos=this.helpBtn:GetComponent("RectTransform").localPosition
|
||||||
this.confirmBtn=Util.GetGameObject(gameObject,"Content/Resolve_Talisman/ConfirmBtn")
|
this.confirmBtn=Util.GetGameObject(gameObject,"Content/Resolve_Talisman/ConfirmBtn")
|
||||||
--道具数量信息
|
--道具数量信息
|
||||||
Util.GetGameObject(gameObject,"Content/Resolve_Talisman/UseProps/Info"):GetComponent("Text").text = "请选择一个"
|
this.info1 = Util.GetGameObject(gameObject,"Content/Resolve_Talisman/UseProps/Info")
|
||||||
Util.GetGameObject(gameObject,"Content/Resolve_Talisman/UseProps/Info (1)"):GetComponent("Text").text = "需要法宝归元的神将"
|
this.info1:GetComponent("Text").text = Language[12283]
|
||||||
Util.GetGameObject(gameObject,"Content/Resolve_Talisman/Empty/Bg/Text"):GetComponent("Text").text = "无可归元的法宝!"
|
this.info2 = Util.GetGameObject(gameObject,"Content/Resolve_Talisman/UseProps/Info (1)")
|
||||||
|
this.info2:GetComponent("Text").text = Language[12284]
|
||||||
|
Util.GetGameObject(gameObject,"Content/Resolve_Talisman/Empty/Bg/Text"):GetComponent("Text").text = Language[12285]
|
||||||
this.empty=Util.GetGameObject(gameObject,"Content/Resolve_Talisman/Empty")
|
this.empty=Util.GetGameObject(gameObject,"Content/Resolve_Talisman/Empty")
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,7 +35,7 @@ function this:BindEvent()
|
||||||
end)
|
end)
|
||||||
Util.AddClick(this.confirmBtn,function()
|
Util.AddClick(this.confirmBtn,function()
|
||||||
if tonumber(LengthOfTable(selectHeroData))==0 then
|
if tonumber(LengthOfTable(selectHeroData))==0 then
|
||||||
PopupTipPanel.ShowTip(Language[11792])
|
PopupTipPanel.ShowTip(Language[12289])
|
||||||
else
|
else
|
||||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.TalismanResolve,
|
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.TalismanResolve,
|
||||||
HeroManager.GetHeroReturnItems(selectHeroData,GENERAL_POPUP_TYPE.TalismanResolve),selectHeroData)
|
HeroManager.GetHeroReturnItems(selectHeroData,GENERAL_POPUP_TYPE.TalismanResolve),selectHeroData)
|
||||||
|
@ -130,44 +132,17 @@ function this.SingleHeroDataShow(go,_heroData)
|
||||||
oldChoosed:SetActive(false)
|
oldChoosed:SetActive(false)
|
||||||
end
|
end
|
||||||
if oldChoosed==choosed then
|
if oldChoosed==choosed then
|
||||||
--LogColor("green",Language[11794])
|
|
||||||
oldChoosed:SetActive(LengthOfTable(selectHeroData)==0)
|
oldChoosed:SetActive(LengthOfTable(selectHeroData)==0)
|
||||||
oldChoosed=nil
|
oldChoosed=nil
|
||||||
selectHeroData={}
|
selectHeroData={}
|
||||||
|
|
||||||
else
|
else
|
||||||
--LogColor("red",Language[11795])
|
|
||||||
choosed:SetActive(true)
|
choosed:SetActive(true)
|
||||||
oldChoosed=choosed
|
oldChoosed=choosed
|
||||||
|
|
||||||
selectHeroData = {}
|
selectHeroData = {}
|
||||||
selectHeroData[heroData.dynamicId]=heroData
|
selectHeroData[heroData.dynamicId]=heroData
|
||||||
--英雄消耗道具数量
|
|
||||||
local heroUseCount=0
|
|
||||||
local heroUseItemId=0
|
|
||||||
|
|
||||||
--等表配全后再启用
|
|
||||||
for k,v in pairs(selectHeroData) do
|
|
||||||
local pId
|
|
||||||
local curHeroData =HeroManager.GetSingleHeroData(v.dynamicId)
|
|
||||||
if not curHeroData then return end
|
|
||||||
if curHeroData.breakId == 0 then
|
|
||||||
pId=0
|
|
||||||
else
|
|
||||||
pId= heroRankupConfig[curHeroData.breakId].Phase[2]
|
|
||||||
end
|
|
||||||
local heroReturnConfig = ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.HeroReturn,"HeroId",curHeroData.id,"Star",pId)
|
|
||||||
if not heroReturnConfig then
|
|
||||||
LogRed("HeroId"..curHeroData.id.." Star"..pId.." curHeroData.breakId"..curHeroData.breakId)
|
|
||||||
heroUseCount= 50
|
|
||||||
heroUseItemId = 16
|
|
||||||
else
|
|
||||||
heroUseCount= heroReturnConfig.ReturnConsume[1][2]
|
|
||||||
heroUseItemId = heroReturnConfig.ReturnConsume[1][1]
|
|
||||||
end
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
this.info1:SetActive( not (LengthOfTable(selectHeroData) > 0))
|
||||||
|
this.info2:SetActive( not (LengthOfTable(selectHeroData) > 0))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Util.AddOnceClick(formationMask, function()
|
Util.AddOnceClick(formationMask, function()
|
||||||
|
@ -214,18 +189,18 @@ function this.SortHeroDatas(_heroDatas)
|
||||||
end
|
end
|
||||||
if a.isFormation == "" and b.isFormation == "" then
|
if a.isFormation == "" and b.isFormation == "" then
|
||||||
if a.lockState == b.lockState then
|
if a.lockState == b.lockState then
|
||||||
if a.heroConfig.Natural ==b.heroConfig.Natural then
|
if a.talismanList == b.talismanList then
|
||||||
if a.star == b.star then
|
if a.star == b.star then
|
||||||
if a.lv == b.lv then
|
if a.lv == b.lv then
|
||||||
return a.heroConfig.Id > b.heroConfig.Id
|
return a.heroConfig.Id > b.heroConfig.Id
|
||||||
|
else
|
||||||
|
return a.lv < b.lv
|
||||||
|
end
|
||||||
else
|
else
|
||||||
return a.lv < b.lv
|
return a.star < b.star
|
||||||
end
|
end
|
||||||
else
|
|
||||||
return a.star < b.star
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
return a.heroConfig.Natural < b.heroConfig.Natural
|
return a.talismanList < b.talismanList
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
return a.lockState < b.lockState
|
return a.lockState < b.lockState
|
||||||
|
|
|
@ -2280,3 +2280,10 @@
|
||||||
12280,巅峰赛阵容
|
12280,巅峰赛阵容
|
||||||
12281,属性提升
|
12281,属性提升
|
||||||
12282,解锁天赋
|
12282,解锁天赋
|
||||||
|
12283,请选择一个
|
||||||
|
12284,需要法宝归元的神将
|
||||||
|
12285,无可归元的法宝!
|
||||||
|
12286,法宝归元成功!
|
||||||
|
12287,确定归元
|
||||||
|
12288,<color=#6DFA55>%s</color>的法宝会重置为<color=#6DFA55>1</color>,并返还进阶时消耗的金币和陨铁,是否确认归元?\n\n\t\t\t\t\t\t\t归元后获得:
|
||||||
|
12289,请选择一个需要归元的法宝神将!
|
||||||
|
|
|
Loading…
Reference in New Issue