【神印】===========================神印修改代码提交

TCX_dev_realOne_master
PC-202302260912\Administrator 2023-12-14 17:18:44 +08:00
parent e9864b4585
commit d0eb636999
9 changed files with 111 additions and 22 deletions

View File

@ -527,7 +527,7 @@ function this.SingleItemDataShow(_go, _itemData)
SetHeroStars(this.spLoader, talismanStar,_itemData.refineLv ,1,Vector2.New(32.5,32.5),-15)
end
elseif _itemData.itemConfig.ItemType == ItemType.HunYin or _itemData.itemConfig.ItemType == ItemType.GodPrint then
elseif _itemData.itemConfig.ItemType == ItemType.HunYin then
SetSoulEffect(itemConfig[_itemData.itemConfig.Id].Quantity1,Util.GetGameObject(_go.transform, "GameObject/effects"))
Util.GetGameObject(_go.transform, "GameObject/item/resetLv"):SetActive(false)
Util.GetGameObject(_go.gameObject, "GameObject/item/icon"):SetActive(false)
@ -536,6 +536,22 @@ function this.SingleItemDataShow(_go, _itemData)
Util.GetGameObject(_go.gameObject,"GameObject/item/circleFrameBg/Icon"):GetComponent("Image").sprite=this.spLoader:LoadSprite(_itemData.icon)
Util.GetGameObject(_go.gameObject,"GameObject/item/circleFrameBg/circleFrame"):GetComponent("Image").sprite=this.spLoader:LoadSprite(SoulPrintSpriteByQuantity[itemConfig[_itemData.itemConfig.Id].Quantity].circle)
num:SetActive(false)
elseif _itemData.itemConfig.ItemType == ItemType.GodPrint then
SetSoulEffect(itemConfig[_itemData.itemConfig.Id].Quantity1,Util.GetGameObject(_go.transform, "GameObject/effects"))
Util.GetGameObject(_go.transform, "GameObject/item/resetLv"):SetActive(false)
Util.GetGameObject(_go.gameObject, "GameObject/item/icon"):SetActive(false)
Util.GetGameObject(_go.gameObject, "GameObject/item/circleFrameBg"):SetActive(true)
Util.GetGameObject(_go.gameObject,"GameObject/item/circleFrameBg"):GetComponent("Image").sprite=this.spLoader:LoadSprite(SoulPrintSpriteByQuantity[itemConfig[_itemData.itemConfig.Id].Quantity].circleBg2)
Util.GetGameObject(_go.gameObject,"GameObject/item/circleFrameBg/Icon"):GetComponent("Image").sprite=this.spLoader:LoadSprite(_itemData.icon)
Util.GetGameObject(_go.gameObject,"GameObject/item/circleFrameBg/circleFrame"):GetComponent("Image").sprite=this.spLoader:LoadSprite(SoulPrintSpriteByQuantity[itemConfig[_itemData.itemConfig.Id].Quantity].circle)
num:SetActive(false)
local equip=ConfigManager.TryGetConfigData(ConfigName.EquipConfig,_itemData.itemConfig.Id)
--LogError("itemSId==================="..itemSId)
if equip then
strongLv.gameObject:SetActive(equip.Star>0)
LogError("equip.Star==============="..equip.Star)
strongLv.text="+"..equip.Star
end
elseif _itemData.itemConfig.ItemType == ItemType.heroDogFood then
num:SetActive(true)
num:GetComponent("Text").text = _itemData.num

View File

@ -193,7 +193,7 @@ function this.GetHeroPotencyLvById(did)
if this.playerGifts and #this.playerGifts>0 then
for i=1,#this.playerGifts do
local id=this.playerGifts[i]
if equipConfig[id] and equipConfig[id].PotentialNew and #equipConfig[id].PotentialNew>0 then
if equipConfig[id] and equipConfig[id].PotentialNew and #equipConfig[id].PotentialNew>0 and type(equipConfig[id].PotentialNew[1])~="userdata" then
lv=lv+equipConfig[id].PotentialNew[2]
end
end

View File

@ -23,6 +23,7 @@ function this:InitComponent(gameObject)
this.frame=Util.GetGameObject(gameObject,"curGem"):GetComponent("Image")
this.icon=Util.GetGameObject(gameObject,"curGem/icon"):GetComponent("Image")
this.quan=Util.GetGameObject(gameObject,"curGem/quan"):GetComponent("Image")
this.lvTxt=Util.GetGameObject(gameObject,"curGem/lv"):GetComponent("Text")
this.nameTxt1=Util.GetGameObject(gameObject,"Property/Text"):GetComponent("Text")
this.infoTxt1=Util.GetGameObject(gameObject,"Property/proText"):GetComponent("Text")
this.nameTxt2=Util.GetGameObject(gameObject,"Property2/Text"):GetComponent("Text")
@ -83,8 +84,10 @@ function this:OnShow(_parent,_args)
this.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(equipConfig[soulId].Quality))
this.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfig[soulId].ResourceID))
this.quan.sprite = self.spLoader:LoadSprite(SoulPrintSpriteByQuantity[equipConfig[soulId].Quality].circle)
this.lvTxt.gameObject:SetActive(equipConfig[soulId].Star>0)
this.lvTxt.text="+"..equipConfig[soulId].Star
this.nameTxt1.text=GetStringByEquipQua(equipConfig[soulId].Quality, GetLanguageStrById(equipConfig[soulId].Name))
this.nameTxt2.text=GetStringByEquipQua(equipConfig[nextSoulId].Quality, GetLanguageStrById(equipConfig[soulId+1].Name))
this.nameTxt2.text=GetStringByEquipQua(equipConfig[nextSoulId].Quality, GetLanguageStrById(equipConfig[nextSoulId].Name))
this.infoTxt1.text= this:GetGodPrintDes(soulId)
this.infoTxt2.text= this:GetGodPrintDes(nextSoulId)
local list=equipConfig[soulId].Resource
@ -138,6 +141,7 @@ function this:GetGodPrintDes(id)
txt=str1
end
else
LogError("equipConfig[id].Property len========================="..#equipConfig[id].Property)
if equipConfig[id].Property then
for index, value in ipairs(equipConfig[id].Property) do --propertyconfig
if index > 1 then
@ -149,6 +153,7 @@ function this:GetGodPrintDes(id)
txt=txt..GetLanguageStrById(propertyconfig[value[1]].Info).."+"..math.floor((value[2]/100)).."%"
end
end
end
end

View File

@ -266,6 +266,8 @@ function this.SetLoopPre(root,type,index,data,curIndex)
local lock= Util.GetGameObject(root,"Lock")
local unlock= Util.GetGameObject(root,"UnLock")
local bg=Util.GetGameObject(root,"Bg")
local lvTxt= Util.GetGameObject(root,"lv"):GetComponent("Text")
lvTxt.gameObject:SetActive(false)
Util.GetGameObject(bg,"Frame"):GetComponent("Image").enabled=false
if curIndex then
bg.transform:DORotate(Vector3.New(0,0,(360/loopCount)*(curIndex-1) + root.transform.localRotation.z),0)
@ -287,6 +289,8 @@ function this.SetLoopPre(root,type,index,data,curIndex)
Util.GetGameObject(unlock,"Icon"):GetComponent("Image").sprite=this.spLoader:LoadSprite(GetResourcePath(itemConfig[data.equipId].ResourceID))
Util.GetGameObject(unlock,"circle"):GetComponent("Image").sprite=this.spLoader:LoadSprite(SoulPrintSpriteByQuantity[equipConfig[data.equipId].Quality].circle)
Util.GetGameObject(unlock,"Name"):GetComponent("Text").text=GetLanguageStrById(itemConfig[data.equipId].Name)
lvTxt.gameObject:SetActive(equipConfig[data.equipId].Star>0)
lvTxt.text="+"..equipConfig[data.equipId].Star
Util.AddOnceClick(root,function()
local pos=index
LogBlue("卸下时 "..data.equipId)
@ -363,13 +367,15 @@ function this.SetScrollPre(root,data)
local heroIcon=Util.GetGameObject(hero,"Icon"):GetComponent("Image")
local circle=Util.GetGameObject(root,"circle"):GetComponent("Image")
local equipped=Util.GetGameObject(root,"Equipped") --是否已装备
local lvTxt=Util.GetGameObject(root,"lv"):GetComponent("Text")
Util.GetGameObject(root,"limit"):SetActive(equipConfig[data.id].limit == 1 and not GodPrintManager.GetCurGodPrintIsCanUp(data.id) and data.upHero=="")
frame.sprite=this.spLoader:LoadSprite(GetQuantityImageByquality(equipConfig[data.id].Quality))
circle.sprite=this.spLoader:LoadSprite(SoulPrintSpriteByQuantity[equipConfig[data.id].Quality].circle)
icon.sprite=this.spLoader:LoadSprite(GetResourcePath(itemConfig[data.id].ResourceID))
name.text=SubString2(GetLanguageStrById(equipConfig[data.id].Name),8)
hero.gameObject:SetActive(data.upHero~="")
lvTxt.gameObject:SetActive(equipConfig[data.id].Star>0)
lvTxt.text="+"..equipConfig[data.id].Star
Util.GetGameObject(root,"redPoint"):SetActive(data.isShowRedPot == 1)
equipped.gameObject:SetActive(this.GetCurHeroSoulPrintState(data.id))
if data.upHero~="" then

View File

@ -40,6 +40,7 @@ function GodPrintPopUp:InitComponent()
self.circleFrameBg=Util.GetGameObject(self.topBar,"circleFrameBg"):GetComponent("Image")
self.circleFrame=Util.GetGameObject(self.topBar,"circleFrame"):GetComponent("Image")
self.equipType=Util.GetGameObject(self.topBar, "equipType"):GetComponent("Text")
self.lvTxt=Util.GetGameObject(self.topBar, "lv"):GetComponent("Text")
self.equipQuaText=Util.GetGameObject(self.topBar, "equipQuaText"):GetComponent("Text")
self.equipInfoText=Util.GetGameObject(self.topBar, "equipInfoText"):GetComponent("Text")
self.powerNum=Util.GetGameObject(self.topBar, "powerNum"):GetComponent("Text")
@ -48,7 +49,7 @@ function GodPrintPopUp:InitComponent()
--魂印效果
self.midBar = Util.GetGameObject(self.transform, "Panel/midBar")
self.effectText=Util.GetGameObject(self.midBar,"basePro/Info"):GetComponent("Text")
self.effectText=Util.GetGameObject(self.midBar,"basePro/Info/Text"):GetComponent("Text")
self.desText=Util.GetGameObject(self.midBar,"basePro/PropertyName"):GetComponent("Text")
self.desText.text="神印效果:"
--技能效果
@ -232,12 +233,12 @@ local x= function(index)
return string.format(GetLanguageStrById(equipConfig[soulId].Describe),unpack(args))
end
--刷新面板
function GodPrintPopUp:RefreshShow(type)
function GodPrintPopUp:RefreshShow(_type)
--self.btns:SetActive(type==Type.Up or type==Type.Down)
self.btns:SetActive(true)
self.upBtn:SetActive(type==Type.Up)
self.downBtn:SetActive(type==Type.Down)
self.upStarBtn:SetActive(type~=0 and equipConfig[soulId].Quality<7)
self.upBtn:SetActive(_type==Type.Up)
self.downBtn:SetActive(_type==Type.Down)
self.upStarBtn:SetActive(_type~=0 and equipConfig[soulId].Formula~=nil and type(equipConfig[soulId].Formula[1][1])~="userdata")
--基础信息
self.soulName.text = GetLanguageStrById(equipConfig[soulId].Name)
self.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(equipConfig[soulId].Quality))
@ -245,6 +246,8 @@ function GodPrintPopUp:RefreshShow(type)
self.circleFrameBg.sprite = self.spLoader:LoadSprite(SoulPrintSpriteByQuantity[itemConfig[soulId].Quantity].circleBg2)
self.circleFrame.sprite = self.spLoader:LoadSprite(SoulPrintSpriteByQuantity[itemConfig[soulId].Quantity].circle)
self.powerNum.text = equipConfig[soulId].Score--战力
self.lvTxt.gameObject:SetActive(equipConfig[soulId].Star>0)
self.lvTxt.text="+"..equipConfig[soulId].Star
self.equipInfoText.text = GetLanguageStrById(itemConfig[soulId].ItemDescribe)
self.equipQuaText.text= GetStringByEquipQua(equipConfig[soulId].Quality, GetQuaStringByEquipQua(equipConfig[soulId].Quality))
self.equipType.text= Language[11089]..GetEquipPosStrByEquipPosNum(equipConfig[soulId].Position)
@ -259,18 +262,54 @@ function GodPrintPopUp:RefreshShow(type)
if pass~=nil and tonumber(pass[1])~=nil and tonumber(pass[1])~=0 then
self.effectText.text = GetLanguageStrById(passiveSkillConfig[pass[1]].Desc)
else
if equipConfig[soulId].Property then
for index, value in ipairs(equipConfig[soulId].Property) do --propertyconfig
if index > 1 then
txt = txt .. ""
end
if propertyconfig[value[1]].Style==1 then
txt=txt..GetLanguageStrById(propertyconfig[value[1]].Info).."+"..value[2]
elseif propertyconfig[value[1]].Style==2 then
txt=txt..GetLanguageStrById(propertyconfig[value[1]].Info).."+"..math.floor((value[2]/100)).."%"
--local num=1
local firstStr=""
if equipConfig[soulId].Star>0 then
local allConfig=ConfigManager.TryGetConfigDataByThreeKey(ConfigName.EquipConfig,"SuiteID",equipConfig[soulId].SuiteID,"SuiteID1",equipConfig[soulId].SuiteID1,"Star",9)
if allConfig then
for index, value in ipairs(allConfig.Property) do --propertyconfig
local curStr=""
if propertyconfig[value[1]].Style==1 then
curStr=GetLanguageStrById(propertyconfig[value[1]].Info).."+"..value[2]
elseif propertyconfig[value[1]].Style==2 then
curStr=GetLanguageStrById(propertyconfig[value[1]].Info).."+"..math.floor((value[2]/100)).."%"
end
if index==1 then
firstStr=curStr
elseif index==2 then
if equipConfig[soulId].Star>=index-1 then
txt=txt.."<color=#00F800>"..firstStr.." "..curStr..string.format(" (+%s解锁)",index-1).."</color>\n"
else
txt=txt.."<color=#FCEBCA>"..firstStr.." "..curStr..string.format(" (+%s解锁)",index-1).."</color>\n"
end
else
if equipConfig[soulId].Star>=index-1 then
txt=txt.."<color=#00F800>"..curStr..string.format(" (+%s解锁)",index-1).."</color>\n"
else
txt=txt.."<color=#FCEBCA>"..curStr..string.format(" (+%s解锁)",index-1).."</color>\n"
end
end
LogError("txt")
--num=num+1
end
end
else
if equipConfig[soulId].Property then
for index, value in ipairs(equipConfig[soulId].Property) do --propertyconfig
if index > 1 then
txt = txt .. ""
end
if propertyconfig[value[1]].Style==1 then
txt=txt..GetLanguageStrById(propertyconfig[value[1]].Info).."+"..value[2]
elseif propertyconfig[value[1]].Style==2 then
txt=txt..GetLanguageStrById(propertyconfig[value[1]].Info).."+"..math.floor((value[2]/100)).."%"
end
end
end
end
self.effectText.text =txt
end
local curID=0

View File

@ -463,6 +463,10 @@ function this.GetHeroDatas(_msgHeroData, force, specialEffects,guildSkill)
heroData.faxiang = _msgHeroData.faxiang
heroData.giftIds=_msgHeroData.giftEquipIds
heroData.potential=HeroManager.SetPotentialData(_msgHeroData.potential,_msgHeroData.id)
if _msgHeroData.training==nil then
LogError("-----------------------------------------------==nil")
end
---↓↓↓↓↓↓↓↓↓↓↓摘星阁
heroData.equipStrong={}
for i = 1, #_msgHeroData.equipStrong do
@ -560,6 +564,7 @@ function this.GetHeroDatas(_msgHeroData, force, specialEffects,guildSkill)
end
return heroData.star,index
end
heroData.HeroTraining=_msgHeroData.training
return heroData
end

View File

@ -98,11 +98,11 @@ function this.CheckGiftFrontIsOpen(gift)
local buyTime= this.GetGoodsBuyTime(rechargeConfig[v.FrontCommodity].Type, v.FrontCommodity)
--无限次
if time==-1 then
LogError("   "..gift)
--LogError("   "..gift)
return true
end
LogError("time================="..time.." v.FrontCommodityNumber==========="..v.FrontCommodityNumber.." buyTime=="..buyTime.."   "..gift)
--LogError("time================="..time.." v.FrontCommodityNumber==========="..v.FrontCommodityNumber.." buyTime=="..buyTime.."   "..gift)
if time>v.FrontCommodityNumber then
return false
end

View File

@ -692,9 +692,12 @@ function this.GodPrintInfo()
orginLayer=this.sortingOrder
local frame=Util.GetGameObject(godPrintPreList[i],"Frame"):GetComponent("Image")
local lvTxt=Util.GetGameObject(godPrintPreList[i],"lv"):GetComponent("Text")
local icon=Util.GetGameObject(godPrintPreList[i],"circleFrameBg/Icon"):GetComponent("Image")
frame.sprite=this.spLoader:LoadSprite(GetQuantityImageByquality(equipConfig[v.equipId].Quality))
icon.sprite=this.spLoader:LoadSprite(GetResourcePath(itemConfig[v.equipId].ResourceID))
lvTxt.gameObject:SetActive(equipConfig[v.equipId].Star>0)
lvTxt.text="+"..equipConfig[v.equipId].Star
Util.GetGameObject(godPrintPreList[i],"circleFrameBg"):GetComponent("Image").sprite=this.spLoader:LoadSprite(SoulPrintSpriteByQuantity[itemConfig[v.equipId].Quantity].circleBg2)
Util.GetGameObject(godPrintPreList[i],"circleFrameBg/circleFrame"):GetComponent("Image").sprite=this.spLoader:LoadSprite(SoulPrintSpriteByQuantity[itemConfig[v.equipId].Quantity].circle)
Util.AddOnceClick(godPrintPreList[i],function()

View File

@ -148,7 +148,6 @@ function ItemView:GetRewardShow(_itemData, effectLayer)
self.homeLv.text = ""
self.homeProLv.text = ""
self.upImg:SetActive(false)
self.name:GetComponent("Text").text = GetCutOutStr(GetLanguageStrById( _itemData.configData.Name),4)
Util.AddParticleSortLayer(self.UI_Effect_Kuang_JinSe, effectLayer - self.EffectOrginLayerQu)
@ -166,7 +165,7 @@ function ItemView:GetRewardShow(_itemData, effectLayer)
-- 卸载头像框特效
self:UnLoadFrameEffect()
-- LogGreen("itemType:"..tostring(_itemData.itemType).." Name:"..tostring(_itemData.configData.Name).." 数量:"..tostring(_itemData.num))
LogGreen("itemType:"..tostring(_itemData.itemType).." Name:"..tostring(_itemData.configData.Name).." 数量:"..tostring(_itemData.num))
if _itemData.itemType == 1 or _itemData.itemType == 0 then--物品
--item
if effectLayer > 0 and _itemData.configData.Quantity1 then
@ -303,6 +302,15 @@ function ItemView:GetRewardShow(_itemData, effectLayer)
Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,_itemData.backData.itemId,nil,self.isRewardItemPop,true)
end)
elseif _itemData.configData.ItemType == ItemType.GodPrint then
local equip=ConfigManager.TryGetConfigData(ConfigName.EquipConfig,_itemData.backData.itemId)
if equip then
self.homeLv.gameObject:SetActive(equip.Star>0)
self.homeLv:GetComponent("Text").text="+"..equip.Star
end
Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.backData.itemId,nil,self.isRewardItemPop)
end)
elseif _itemData.configData.ItemType == ItemType.Gem then
if _itemData.isReplace then
self.upImg:SetActive(true)
@ -956,6 +964,13 @@ function ItemView:NoGetRewardShow(_reward, effectLayer, isShowAddImage)
elseif itemDataConFig.ItemType == ItemType.GodPrint then
self.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(itemConfig[itemSId].Quantity))
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfig[itemSId].ResourceID))
local equip=ConfigManager.TryGetConfigData(ConfigName.EquipConfig,itemSId)
LogError("itemSId==================="..itemSId)
if equip then
self.homeLv.gameObject:SetActive(equip.Star>0)
LogError("equip.Star==============="..equip.Star)
self.homeLv:GetComponent("Text").text="+"..equip.Star
end
Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.GodPrintPopUp,0,nil,itemSId )
end)