主角礼物修改提交

TCX_dev_realOne_master hotfix/you_gu/cdn_realOne_ios/1.1.10
wangzhenxing 2023-12-21 18:45:52 +08:00
parent a9ad3a8751
commit 4068849dd0
4 changed files with 49 additions and 34 deletions

View File

@ -26,7 +26,7 @@ function this:InitComponent()
local width = self.scroll.transform.rect.width local width = self.scroll.transform.rect.width
self.scrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.scroll.transform, self.scrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, self.scroll.transform,
self.itemPre, nil, Vector2.New(width, rootHight), 1, 5, Vector2.New(20, 45)) self.itemPre, nil, Vector2.New(width, rootHight), 1, 5, Vector2.New(20,75))
self.scrollView.moveTween.MomentumAmount = 1 self.scrollView.moveTween.MomentumAmount = 1
self.scrollView.moveTween.Strength = 2 self.scrollView.moveTween.Strength = 2
@ -134,40 +134,44 @@ function this:SetUpHero()
local heroId = curHeroId local heroId = curHeroId
choosed:SetActive(false) choosed:SetActive(false)
if heroId and heroId~="" then if heroId and heroId~="" then
go:SetActive(true)
local heroData = HeroManager.GetSingleHeroData(heroId) local heroData = HeroManager.GetSingleHeroData(heroId)
frame.sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(heroData.heroConfig.Natural)) if heroData then
icon.sprite = self.spLoader:LoadSprite(GetResourcePath(heroData.heroConfig.Icon)) go:SetActive(true)
proIcon.sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName)) frame.sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(heroData.heroConfig.Natural))
trainObj:SetActive(heroData.HeroTraining.trainingLv>0) icon.sprite = self.spLoader:LoadSprite(GetResourcePath(heroData.heroConfig.Icon))
trainLv.text="特训等级"..heroData.HeroTraining.trainingLv proIcon.sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName))
name.text=heroData.heroConfig.Name trainObj:SetActive(heroData.HeroTraining.trainingLv>0)
lv.text=heroData.lv trainLv.text="特训等级"..heroData.HeroTraining.trainingLv
SetHeroStars(self.spLoader,starGrid, heroData.star) name.text=heroData.heroConfig.Name
Util.SetParticleSortLayer(starGrid,this.sortingOrder + 1) lv.text=heroData.lv
Util.AddOnceClick(go,function () SetHeroStars(self.spLoader,starGrid, heroData.star)
end) Util.SetParticleSortLayer(starGrid,this.sortingOrder + 1)
local pos=buildData.dataSingle.Position Util.AddOnceClick(go,function ()
local max=0 end)
local curValue=0 local pos=buildData.dataSingle.Position
local train=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.Train,"HeroID",heroData.heroConfig.Id,"Level",heroData.HeroTraining.trainingLv) local max=0
if train then local curValue=0
local aaa=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.TrainSetting,"PoolID",train.TrainSettingID,"Level",heroData.HeroTraining.trainingLv) local train=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.Train,"HeroID",heroData.heroConfig.Id,"Level",heroData.HeroTraining.trainingLv)
if pos==1 then if train then
max=aaa.TrainExp1 local aaa=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.TrainSetting,"PoolID",train.TrainSettingID,"Level",heroData.HeroTraining.trainingLv)
curValue=heroData.HeroTraining.attackExp if pos==1 then
elseif pos==2 then max=aaa.TrainExp1
max=aaa.TrainExp2 curValue=heroData.HeroTraining.attackExp
curValue=heroData.HeroTraining.defenseExp elseif pos==2 then
elseif pos==3 then max=aaa.TrainExp2
max=aaa.TrainExp3 curValue=heroData.HeroTraining.defenseExp
curValue=heroData.HeroTraining.hpExp elseif pos==3 then
max=aaa.TrainExp3
curValue=heroData.HeroTraining.hpExp
end
end end
LogError("curvalue==========================="..curValue.." max=="..max.." buildData.dataSingle.Gain=="..buildData.dataSingle.Gain)
local endTime=buildData.heroStarTime+math.ceil((max-curValue)/buildData.dataSingle.Gain)*60
leftTime=endTime-GetTimeStamp()
this:SetTime(name)
end end
LogError("curvalue==========================="..curValue.." max=="..max.." buildData.dataSingle.Gain=="..buildData.dataSingle.Gain)
local endTime=buildData.heroStarTime+math.ceil((max-curValue)/buildData.dataSingle.Gain)*60
leftTime=endTime-GetTimeStamp()
this:SetTime(name)
else else
go:SetActive(false) go:SetActive(false)
end end

View File

@ -410,6 +410,17 @@ function RewardEquipSingleShowPopup2:OnShow()
_BaseProList[num]:GetComponent("Text").text = "神将潜能等级+"..equipConfigData.PotentialNew[2] _BaseProList[num]:GetComponent("Text").text = "神将潜能等级+"..equipConfigData.PotentialNew[2]
end end
end end
if equipConfigData.HeroGitUp>0 then
num=num+1
if not _BaseProList[num] then
_BaseProList[num] = newObjToParent(self.baseProPre, self.baseProGrid)
end
_BaseProList[num]:SetActive(true)
Util.GetGameObject(_BaseProList[num], "curProVale").gameObject:SetActive(false)
if equipConfigData.Position==7 then
_BaseProList[num]:GetComponent("Text").text =string.format("全体神将礼物属性+%s%%",equipConfigData.HeroGitUp/100)
end
end
end end
-- for index, prop in ipairs(equipConfigData.PlayerProperty) do -- for index, prop in ipairs(equipConfigData.PlayerProperty) do
-- LogError("prop[1]=========="..prop[1]) -- LogError("prop[1]=========="..prop[1])

View File

@ -512,7 +512,7 @@ function this.EquipInfo()
Util.AddOnceClick(btn,function() Util.AddOnceClick(btn,function()
if did and data then if did and data then
-- UIManager.OpenPanel(UIName.RoleEquipTreasureChangePopup,this,2,curHeroData,data,nil,pos,0) -- UIManager.OpenPanel(UIName.RoleEquipTreasureChangePopup,this,2,curHeroData,data,nil,pos,0)
UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup2,this,data,0,false,nil,curHeroData,5) UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup2,this,data,0,false,nil,curHeroData,n+4)
end end
end) end)
end end

View File

@ -384,7 +384,7 @@ function RoleInfoPanel:OnShow()
this.curLiveObj = HeroManager.LoadHerolive(curHeroData,this.curObj) this.curLiveObj = HeroManager.LoadHerolive(curHeroData,this.curObj)
local t=ConfigManager.TryGetAllConfigsDataByKey(ConfigName.Train,"HeroID",curHeroData.id) local t=ConfigManager.TryGetAllConfigsDataByKey(ConfigName.Train,"HeroID",curHeroData.id)
this.trainingBtn:SetActive(#t~=0) this.trainingBtn:SetActive(CheckFunctionOpen(FUNCTION_OPEN_TYPE.Train) and #t~=0)
local leftToward=0 local leftToward=0
if leftHeroData.skinId and leftHeroData.skinId~=0 then if leftHeroData.skinId and leftHeroData.skinId~=0 then
local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,leftHeroData.skinId) local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,leftHeroData.skinId)