主角礼物修改提交

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
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.Strength = 2
@ -134,40 +134,44 @@ function this:SetUpHero()
local heroId = curHeroId
choosed:SetActive(false)
if heroId and heroId~="" then
go:SetActive(true)
local heroData = HeroManager.GetSingleHeroData(heroId)
frame.sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(heroData.heroConfig.Natural))
icon.sprite = self.spLoader:LoadSprite(GetResourcePath(heroData.heroConfig.Icon))
proIcon.sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName))
trainObj:SetActive(heroData.HeroTraining.trainingLv>0)
trainLv.text="特训等级"..heroData.HeroTraining.trainingLv
name.text=heroData.heroConfig.Name
lv.text=heroData.lv
SetHeroStars(self.spLoader,starGrid, heroData.star)
Util.SetParticleSortLayer(starGrid,this.sortingOrder + 1)
Util.AddOnceClick(go,function ()
end)
local pos=buildData.dataSingle.Position
local max=0
local curValue=0
local train=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.Train,"HeroID",heroData.heroConfig.Id,"Level",heroData.HeroTraining.trainingLv)
if train then
local aaa=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.TrainSetting,"PoolID",train.TrainSettingID,"Level",heroData.HeroTraining.trainingLv)
if pos==1 then
max=aaa.TrainExp1
curValue=heroData.HeroTraining.attackExp
elseif pos==2 then
max=aaa.TrainExp2
curValue=heroData.HeroTraining.defenseExp
elseif pos==3 then
max=aaa.TrainExp3
curValue=heroData.HeroTraining.hpExp
if heroData then
go:SetActive(true)
frame.sprite = self.spLoader:LoadSprite(GetBgByHeroNatural(heroData.heroConfig.Natural))
icon.sprite = self.spLoader:LoadSprite(GetResourcePath(heroData.heroConfig.Icon))
proIcon.sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName))
trainObj:SetActive(heroData.HeroTraining.trainingLv>0)
trainLv.text="特训等级"..heroData.HeroTraining.trainingLv
name.text=heroData.heroConfig.Name
lv.text=heroData.lv
SetHeroStars(self.spLoader,starGrid, heroData.star)
Util.SetParticleSortLayer(starGrid,this.sortingOrder + 1)
Util.AddOnceClick(go,function ()
end)
local pos=buildData.dataSingle.Position
local max=0
local curValue=0
local train=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.Train,"HeroID",heroData.heroConfig.Id,"Level",heroData.HeroTraining.trainingLv)
if train then
local aaa=ConfigManager.TryGetConfigDataByDoubleKey(ConfigName.TrainSetting,"PoolID",train.TrainSettingID,"Level",heroData.HeroTraining.trainingLv)
if pos==1 then
max=aaa.TrainExp1
curValue=heroData.HeroTraining.attackExp
elseif pos==2 then
max=aaa.TrainExp2
curValue=heroData.HeroTraining.defenseExp
elseif pos==3 then
max=aaa.TrainExp3
curValue=heroData.HeroTraining.hpExp
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
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
go:SetActive(false)
end

View File

@ -410,6 +410,17 @@ function RewardEquipSingleShowPopup2:OnShow()
_BaseProList[num]:GetComponent("Text").text = "神将潜能等级+"..equipConfigData.PotentialNew[2]
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
-- for index, prop in ipairs(equipConfigData.PlayerProperty) do
-- LogError("prop[1]=========="..prop[1])

View File

@ -512,7 +512,7 @@ function this.EquipInfo()
Util.AddOnceClick(btn,function()
if did and data then
-- 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

View File

@ -384,7 +384,7 @@ function RoleInfoPanel:OnShow()
this.curLiveObj = HeroManager.LoadHerolive(curHeroData,this.curObj)
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
if leftHeroData.skinId and leftHeroData.skinId~=0 then
local roleCon=ConfigManager.TryGetConfigData(ConfigName.RoleConfig,leftHeroData.skinId)