查看其他玩家信息,变身卡信息不对bug

dev_chengFeng
yuanshuai 2022-04-26 17:20:19 +08:00
parent 81122369c6
commit 4199ea504a
7 changed files with 806 additions and 105 deletions

View File

@ -1626,8 +1626,8 @@ RectTransform:
m_Father: {fileID: 6594472603124481167}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 442.9, y: 0}
m_SizeDelta: {x: 825.8, y: 0}
m_Pivot: {x: 0.5, y: 1}
@ -1863,9 +1863,9 @@ RectTransform:
m_Father: {fileID: 5981932543035177726}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 460, y: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 460, y: -355}
m_SizeDelta: {x: 905, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5201084322800259043

View File

@ -702,7 +702,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
m_IsActive: 1
--- !u!224 &7269427067276365907
RectTransform:
m_ObjectHideFlags: 0
@ -719,7 +719,7 @@ RectTransform:
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: 0, y: 0}
m_AnchoredPosition: {x: 1000, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7145830168866473298

View File

@ -351,6 +351,44 @@ function this.GetChangeCardProperty(cardId,isNextLv,isNextStar)
return nil
end
function this.GetChangeCardPropertyAdd(cardId,level,star)
local cardConfig=ConfigManager.GetConfigData(ConfigName.ChangingCard,cardId)
local propList={}
for k,v in pairs(cardConfig.PropList) do
propList[v[1]]=v[2]
end
if star>0 then
local startProp
if star==1 then
startProp=cardConfig.Star1UpProps
elseif star==2 then
startProp=cardConfig.Star2UpProps
elseif star==3 then
startProp=cardConfig.Star3UpProps
end
for k,v in pairs(startProp) do
if propList[v[1]] then
propList[v[1]]=propList[v[1]]+v[2]
else
propList[v[1]]=v[2]
end
end
end
if level>0 then
local cardLvConfig=ConfigManager.GetConfigDataByDoubleKey(ConfigName.ChangingCardLevel,"Level",level,"PoolId",cardConfig.LevelUpPool)
for k,v in pairs(cardLvConfig.PropList) do
if propList[v[1]] then
propList[v[1]]=propList[v[1]]+v[2]
else
propList[v[1]]=v[2]
end
end
end
return propList
end
return this

View File

@ -588,9 +588,19 @@ function this.huashenInfoShow(teamInfo,Grid)
local itemview = SubUIManager.Open(SubUIConfig.ItemView, item.transform)
this.ItemList[i] = itemview
this.ItemList[i].transform:SetSiblingIndex(1)
end
this.ItemList[i]:OnOpen(false, {ChangingCard[value.id].CardId,0}, 1,false,false,false,this.sortingOrder)
this.ItemList[i]:OnOpen(false, {ChangingCard[value.id].CardId,0,0,value.level,value.star}, 1,false,false,false,this.sortingOrder)
Util.GetGameObject(item,"Name"):GetComponent("Text").text = ItemConfig[ChangingCard[value.id].CardId].Name
Util.GetGameObject(item,"lvbg/levelText"):GetComponent("Text").text = value.level
local starGrid= Util.GetGameObject(item,"starGrid")
for i = 0, 3 do
if i<value.star then
starGrid.transform:GetChild(i).gameObject:SetActive(true)
else
starGrid.transform:GetChild(i).gameObject:SetActive(false)
end
end
this.ItemList[i].gameObject:SetActive(true)
item:SetActive(true)
end

View File

@ -4,13 +4,7 @@ local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
local propertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
local passiveSkillConfig = ConfigManager.GetConfig(ConfigName.PassiveSkillConfig)
local _BaseProList = {}--基础属性对象
local _suitProList = {}--套装属性对象
local _superProList = {}--白金属性对象
local typeToUpdate = {
[2] = 2,--已穿戴->卸载单件
[3] = 1,--未穿戴->穿单件
[4] = 3,--未穿戴->替换单件
}
--初始化组件(用于子类重写)
function RewardTailsmanChipShowPopup:InitComponent()
self.spLoader = SpriteLoader.New()
@ -33,12 +27,10 @@ function RewardTailsmanChipShowPopup:InitComponent()
self.baseProGrid = Util.GetGameObject(self.basePro, "grid")
self.baseProPre = Util.GetGameObject(self.basePro, "grid/curProName")
self.baseProPre:SetActive(false)
--superPro
self.superPro = Util.GetGameObject(self.midBar, "superPro")
self.superProGrid = Util.GetGameObject(self.superPro, "proGrid")
self.superProPre = Util.GetGameObject(self.superPro, "proGrid/Desc")
self.superProPre:SetActive(false)
--装备获取途径--btmBar
self.btmBar = Util.GetGameObject(self.transform, "Content/btmBar/howGet")
@ -71,38 +63,45 @@ function RewardTailsmanChipShowPopup:RemoveListener()
end
--界面打开时调用(用于子类重写)
function RewardTailsmanChipShowPopup:OnOpen(_equipData,_func)
if not _equipData then
return
function RewardTailsmanChipShowPopup:OnOpen(_cardId,_cardLv,_cardStar)
self.cardItemId = _cardId --化身卡道具id
self.level=0
self.star=0
if _cardLv then
self.level = _cardLv --化身卡等级
end
self.equipData = _equipData --当前装备数据
self.func = _func
if _cardStar then
self.star = _cardStar --化身卡星级
end
end
function RewardTailsmanChipShowPopup:OnShow()
local itemConfigData = IncarnationManager.GetIncarnationDataById(self.equipData)
local equipConfigData = ConfigManager.GetConfigData(ConfigName.ItemConfig,self.equipData)
self.topBar:GetComponent("Image").sprite = self.spLoader:LoadSprite("t_tongyong_di_"..equipConfigData.Quantity)
local itemData = itemConfig[tonumber(self.cardItemId)]
local cardId=ConfigManager.GetConfigDataByKey(ConfigName.ChangingCard,"CardId",self.cardItemId).Id
local proDatas = IncarnationManager.GetChangeCardPropertyAdd(cardId,self.level,self.star)
self.topBar:GetComponent("Image").sprite = self.spLoader:LoadSprite("t_tongyong_di_"..itemData.Quantity)
self.equipQuaText.text=GetStringByEquipQua(equipConfigData.Quantity,GetQuaStringByEquipQua(equipConfigData.Quantity))
self.eqiopName.text=GetStringByEquipQua(equipConfigData.Quantity,GetLanguageStrById(equipConfigData.Name))
self.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(equipConfigData.Quantity))
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(equipConfigData.ResourceID))
self.equipInfoText.text = GetLanguageStrById(equipConfigData.ItemDescribe)
self.equipQuaText.text=GetStringByEquipQua(itemData.Quantity,GetQuaStringByEquipQua(itemData.Quantity))
self.eqiopName.text=GetStringByEquipQua(itemData.Quantity,GetLanguageStrById(itemData.Name))
self.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(itemData.Quantity))
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemData.ResourceID))
self.equipInfoText.text = GetLanguageStrById(itemData.ItemDescribe)
self.equipType.text = ""
--下部按钮信息
self.effectbaijin:SetActive(equipConfigData.Quantity==7)
self.effectbaijin:SetActive(itemData.Quantity==7)
Util.SetParticleSortLayer(self.effectbaijin,self.sortingOrder + 1)
--basePro基础属性
if itemConfigData.proDatas then
if proDatas then
self.basePro:SetActive(true)
for _, pro in ipairs(_BaseProList) do
pro:SetActive(false)
end
for index, prop in ipairs(itemConfigData.proDatas) do
local proConfigData = ConfigManager.GetConfigData(ConfigName.PropertyConfig, index)
for index, prop in ipairs(proDatas) do
local proConfigData = propertyConfig[index]
if proConfigData then
if not _BaseProList[index] then
_BaseProList[index] = newObjToParent(self.baseProPre, self.baseProGrid)
@ -120,11 +119,7 @@ function RewardTailsmanChipShowPopup:OnShow()
else
self.basePro:SetActive(false)
end
if not _superProList[1] then
_superProList[1] = newObjToParent(self.superProPre, self.superProGrid)
end
_superProList[1].gameObject:SetActive(true)
_superProList[1]:GetComponent("Text").text = itemConfigData.skillDes
self.superProPre:GetComponent("Text").text = IncarnationManager.GetSkillDesStr(cardId,self.star)
--获取途径
if self.jumpViewList and #self.jumpViewList > 0 then
@ -132,15 +127,15 @@ function RewardTailsmanChipShowPopup:OnShow()
SubUIManager.Close(self.jumpViewList[i])
end
end
local curitemData = itemConfig[tonumber(self.equipData)]
if curitemData and curitemData.Jump then
if curitemData.Jump and #curitemData.Jump>0 then
self.canGetScrollView:SetData(curitemData.Jump,function (index, item)
if itemData and itemData.Jump then
if itemData.Jump and #itemData.Jump>0 then
self.canGetScrollView:SetData(itemData.Jump,function (index, item)
local tempView = nil
if self.isShowGo then
tempView = SubUIManager.Open(SubUIConfig.JumpView, item.transform, curitemData.Jump[index],true)
tempView = SubUIManager.Open(SubUIConfig.JumpView, item.transform, itemData.Jump[index],true)
else
tempView = SubUIManager.Open(SubUIConfig.JumpView, item.transform, curitemData.Jump[index],false)
tempView = SubUIManager.Open(SubUIConfig.JumpView, item.transform, itemData.Jump[index],false)
end
table.insert(self.jumpViewList,tempView)
end,true,true)
@ -152,10 +147,6 @@ function RewardTailsmanChipShowPopup:OnShow()
ForceRebuildLayout(self.midBar.transform)
ForceRebuildLayout(self.midBar.transform)
ForceRebuildLayout(self.midBar.transform)
if self.func then
self.func()
end
end
--界面关闭时调用(用于子类重写)
@ -169,8 +160,6 @@ end
function RewardTailsmanChipShowPopup:OnDestroy()
self.spLoader:Destroy()
_BaseProList = {}
_suitProList = {}
_superProList = {}
self.jumpViewList = {}
end

View File

@ -413,8 +413,7 @@ function ItemView:GetRewardShow(_itemData, effectLayer)
Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.PokemonGetInfoPopup, true, _itemData.backData)
end)
elseif _itemData.ItemType == ItemType.Incarnation then
--5随机道具6符文
elseif _itemData.ItemType == ItemType.Incarnation then--化身卡
self.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(itemConfig[ _itemData.backData.itemId].Quantity))
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfig[ _itemData.backData.itemId].ResourceID))
Util.AddOnceClick(self.frameBtn, function()
@ -795,12 +794,11 @@ function ItemView:NoGetRewardShow(_reward, effectLayer, isShowAddImage)
Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, itemSId,nil,self.isRewardItemPop,true)
end)
elseif itemDataConFig.ItemType == ItemType.Incarnation then
--5随机道具6符文
elseif itemDataConFig.ItemType == ItemType.Incarnation then--化身卡
self.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(itemConfig[itemSId].Quantity))
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfig[itemSId].ResourceID))
Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.RewardTailsmanChipShowPopup, itemSId, nil)
UIManager.OpenPanel(UIName.RewardTailsmanChipShowPopup, itemSId,_reward[4],_reward[5])
end)
elseif itemDataConFig.ItemType == ItemType.Ride then--坐骑
self.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(itemConfig[itemSId].Quantity))