拥有可替换/战斗力较高的宝物时,应在宝物图标右上角,及下方的魂宝/灵宝按钮上显示红点,不应当在魂宝/灵宝装备格子上显示红点

dev_chengFeng
jiaoyangna 2021-07-27 18:34:37 +08:00
parent b75d869c8a
commit 94c92a7f22
3 changed files with 417 additions and 47 deletions

View File

@ -4801,7 +4801,6 @@ RectTransform:
- {fileID: 8774033395780499746}
- {fileID: 8862571522086670896}
- {fileID: 3023044278107649644}
- {fileID: 8190598087958095264}
m_Father: {fileID: 224353427390833726}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -5779,6 +5778,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 8773448523010894990}
- {fileID: 3872982342584125137}
m_Father: {fileID: 224358324289722092}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -6592,7 +6592,6 @@ RectTransform:
- {fileID: 8773627431056639320}
- {fileID: 8449794685537844724}
- {fileID: 8978057814494715040}
- {fileID: 7945689178143511619}
m_Father: {fileID: 224353427390833726}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -12975,6 +12974,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1855971254598297351}
- {fileID: 7928370875628351766}
m_Father: {fileID: 224358324289722092}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -27544,6 +27544,80 @@ ParticleSystemRenderer:
m_Mesh2: {fileID: 0}
m_Mesh3: {fileID: 0}
m_MaskInteraction: 0
--- !u!1 &674907718154863897
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5562314239632533987}
- component: {fileID: 8780208245769105486}
- component: {fileID: 2634523168441862}
m_Layer: 5
m_Name: red
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5562314239632533987
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 674907718154863897}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.0526316, y: 1.0526316, z: 1}
m_Children: []
m_Father: {fileID: 5547263014786898986}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 1, y: 1}
--- !u!222 &8780208245769105486
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 674907718154863897}
m_CullTransparentMesh: 0
--- !u!114 &2634523168441862
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 674907718154863897}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: f9ea4c4aff328ff4abcc21aae0a4fa10, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &783226758764677169
GameObject:
m_ObjectHideFlags: 0
@ -32322,6 +32396,80 @@ MonoBehaviour:
m_LineSpacing: 1
m_Text: "\u7A7A\u7A7A\u5982\u4E5F"
LanguageIndex: 10146
--- !u!1 &896312311464022284
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3331608735531554825}
- component: {fileID: 5023391603448844935}
- component: {fileID: 1714769946256811726}
m_Layer: 5
m_Name: red
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3331608735531554825
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 896312311464022284}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.0526316, y: 1.0526316, z: 1}
m_Children: []
m_Father: {fileID: 6899818899209617428}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 1, y: 1}
--- !u!222 &5023391603448844935
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 896312311464022284}
m_CullTransparentMesh: 0
--- !u!114 &1714769946256811726
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 896312311464022284}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: f9ea4c4aff328ff4abcc21aae0a4fa10, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &989376882943233475
GameObject:
m_ObjectHideFlags: 0
@ -56815,6 +56963,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 2267630491343136932}
- {fileID: 7945689178143511619}
m_Father: {fileID: 224358324289722092}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -57226,6 +57375,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 6535649544919870789}
- {fileID: 3331608735531554825}
m_Father: {fileID: 224358324289722092}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -77110,6 +77260,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 3633862736134845077}
- {fileID: 5562314239632533987}
m_Father: {fileID: 224358324289722092}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -82011,6 +82162,80 @@ ParticleSystemRenderer:
m_Mesh2: {fileID: 0}
m_Mesh3: {fileID: 0}
m_MaskInteraction: 0
--- !u!1 &4503940246623040311
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7928370875628351766}
- component: {fileID: 3348770014262829798}
- component: {fileID: 655044156626572997}
m_Layer: 5
m_Name: red
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &7928370875628351766
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4503940246623040311}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.0526316, y: 1.0526316, z: 1}
m_Children: []
m_Father: {fileID: 2704563871681906179}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 1, y: 1}
--- !u!222 &3348770014262829798
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4503940246623040311}
m_CullTransparentMesh: 0
--- !u!114 &655044156626572997
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4503940246623040311}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: f9ea4c4aff328ff4abcc21aae0a4fa10, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &4539629265314529395
GameObject:
m_ObjectHideFlags: 0
@ -91795,6 +92020,80 @@ Animator:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!1 &5094996967533614036
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3872982342584125137}
- component: {fileID: 4740191870909916858}
- component: {fileID: 1294245621284993448}
m_Layer: 5
m_Name: red
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3872982342584125137
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5094996967533614036}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.0526316, y: 1.0526316, z: 1}
m_Children: []
m_Father: {fileID: 224903305027616404}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 1, y: 1}
--- !u!222 &4740191870909916858
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5094996967533614036}
m_CullTransparentMesh: 0
--- !u!114 &1294245621284993448
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5094996967533614036}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: f9ea4c4aff328ff4abcc21aae0a4fa10, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
--- !u!1 &5132229464341787920
GameObject:
m_ObjectHideFlags: 0
@ -106450,6 +106749,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1413699182369538693}
- {fileID: 8190598087958095264}
m_Father: {fileID: 224358324289722092}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -140105,7 +140405,7 @@ GameObject:
- component: {fileID: 5191567546156269120}
- component: {fileID: 1600545108952195152}
m_Layer: 5
m_Name: add
m_Name: red
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -140118,18 +140418,18 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7036352974766236995}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 1.0526316, y: 1.0526316, z: 1}
m_Children: []
m_Father: {fileID: 224737750581944100}
m_RootOrder: 5
m_Father: {fileID: 3212256103326608528}
m_RootOrder: 1
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: 58, y: 49}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 1, y: 1}
--- !u!222 &5191567546156269120
CanvasRenderer:
m_ObjectHideFlags: 0
@ -178974,7 +179274,7 @@ GameObject:
- component: {fileID: 6052895282540631022}
- component: {fileID: 4289030200688911065}
m_Layer: 5
m_Name: add
m_Name: red
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -178987,18 +179287,18 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8319119871204570417}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalScale: {x: 1.0526316, y: 1.0526316, z: 1}
m_Children: []
m_Father: {fileID: 224461338842806296}
m_RootOrder: 5
m_Father: {fileID: 6693951770865703983}
m_RootOrder: 1
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: 58, y: 49}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
m_Pivot: {x: 1, y: 1}
--- !u!222 &6052895282540631022
CanvasRenderer:
m_ObjectHideFlags: 0

View File

@ -3733,7 +3733,9 @@ function this.CheckIsUpTreasure(Did,index)
else
isMax = (curEquipData.lv == curEquipData.maxLv) and (curEquipData.refineLv==curEquipData.maxRefineLv)
items,isMatEnough = this.GetCostItems(curEquipData,curEquipData.refineConfig)
isMatEnough = isMatEnough or this.GetCostItems(curEquipData,curEquipData.strongConfig)
if not isMatEnough then
items,isMatEnough = this.GetCostItems(curEquipData,curEquipData.strongConfig)
end
end
local teamHero=FormationManager.GetWuJinFormationHeroIds(FormationTypeDef.FORMATION_NORMAL)
if not isMax and isMatEnough and teamHero[curEquipData.upHeroDid] then

View File

@ -42,6 +42,7 @@ local typeTab = {
[5] = Language[10552],
[6] = Language[10553]}
local tabs = {}
local redTabs = {}
local openThisPanel
local effectList = {}
local orginLayer1
@ -89,6 +90,7 @@ function RoleEquipPanel:InitComponent()
for i = 1, 6 do
tabs[i] = Util.GetGameObject(self.transform, "Tabs/Btn" .. i)
Util.GetGameObject(tabs[i], "Text"):GetComponent("Text").fontSize = GetCurLanguage() == 0 and 48 or 40
redTabs[i] = Util.GetGameObject(tabs[i], "red")
effectList[i] = Util.GetGameObject(self.transform, "bg/equipInfo/equip" .. i .. "/effect")
end
this.selectBtn = Util.GetGameObject(self.gameObject, "selectBtn")
@ -139,8 +141,8 @@ function RoleEquipPanel:InitComponent()
this.mask = Util.GetGameObject(self.gameObject, "mask")
this.equipBtn5 = Util.GetGameObject(self.gameObject,"bg/equipInfo/equip5/Image")
this.equipBtn6 = Util.GetGameObject(self.gameObject,"bg/equipInfo/equip6/Image")
this.equipBTn5Add = Util.GetGameObject(self.gameObject,"bg/equipInfo/equip5/add")
this.equipBtn6Add = Util.GetGameObject(self.gameObject,"bg/equipInfo/equip6/add")
-- this.equipBTn5Add = Util.GetGameObject(self.gameObject,"bg/equipInfo/equip5/add")
-- this.equipBtn6Add = Util.GetGameObject(self.gameObject,"bg/equipInfo/equip6/add")
for i = 1, 6 do
Util.GetGameObject(self.gameObject,"bg/equipInfo/equip"..i.."/mask"):GetComponent("Image").sprite = this.spLoader:LoadSprite(EquipPositionIcon[i])
end
@ -254,6 +256,7 @@ function this.CurrEquipDataChange()
-- else
-- this:OnClickTabBtn(indexBtnNum)
-- end
this.CheckRedTab()
end
--界面打开时调用(用于子类重写)
@ -290,6 +293,7 @@ function RoleEquipPanel:OnShow()
teamHero = FormationManager.GetAllMainFormationHeroId()
this.ShowHeroEquip(true)
this:OnClickTabBtn(indexBtnNum)
this.CheckRedTab()
this.UpView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main})
end
@ -304,6 +308,7 @@ function this:RightBtnOnClick()
curHeroData = heroListData[index]
this.ShowHeroEquip()
this:OnClickTabBtn(indexBtnNum)
this.CheckRedTab()
-- if indexBtnNum == PosIdConst.All then
-- this:OnClickAllBtn()
-- else
@ -316,6 +321,7 @@ function this:LeftBtnOnClick()
curHeroData = heroListData[index]
this.ShowHeroEquip()
this:OnClickTabBtn(indexBtnNum)
this.CheckRedTab()
-- if indexBtnNum == PosIdConst.All then
-- this:OnClickAllBtn()
-- else
@ -676,6 +682,7 @@ function this:SetSelectBtn()
this.selectBtn:SetActive(true)
this.selectBtn.transform:SetParent(tabs[indexBtnNum].transform)
this.selectBtn:GetComponent("RectTransform").anchoredPosition3D = Vector3(-12.28, 1.08, 0)
this.selectBtn.transform:SetSiblingIndex(1)
--this.selectBtn.transform.localScale = Vector3.one
--this.selectBtn:GetComponent("Image"):SetNativeSize()
Util.GetGameObject(this.selectBtn.transform, "Text"):GetComponent("Text").text = GetCurLanguage() == 0 and typeTab[indexBtnNum] or "<size=40>"..typeTab[indexBtnNum].."</size>"--typeTab[indexBtnNum]
@ -754,30 +761,19 @@ function this:OnClickTabBtn(_index)
this:SetItemData(allEquip)
else
local allEquipTreasure
allEquipTreasure =
EquipTreasureManager.GetAllTreasuresByLocation(_index - 4, curHeroData.heroConfig.PropertyName)
table.sort(
allEquipTreasure,
function(a, b)
if a.refineLv == b.refineLv then
if a.lv == b.lv then
return a.id > b.id
else
return a.lv > b.lv
end
else
return a.refineLv > b.refineLv
end
end
)
allEquipTreasure = EquipTreasureManager.GetAllTreasuresByLocation(_index - 4, curHeroData.heroConfig.PropertyName)
this:SortEquipDatas1(allEquipTreasure)
--"装备数量:"
this.itemNumText.text = Language[12181] .. LengthOfTable(allEquipTreasure)
this:SetItemData(allEquipTreasure)
end
this.CheckRedTab()
end
--设置背包列表数据
local curHeroCanUpEquipTabs = {}
local curHeroCanUpEquipTreasuresTabs = {}
function this:SetItemData(_itemDatas)
if LengthOfTable(_itemDatas) == 0 then
this.emptyObj.gameObject:SetActive(true)
@ -850,6 +846,23 @@ function this.SingleItemDataShow(_go, _itemData)
else
refineObj.gameObject:SetActive(false)
end
local redPoint = Util.GetGameObject(_go.transform, "redPoint")
if curHeroCanUpEquipTreasuresTabs and #curHeroCanUpEquipTreasuresTabs > 0 then
local isShow = false
for i = 1, #curHeroCanUpEquipTreasuresTabs do
if curHeroCanUpEquipTreasuresTabs[i] == _itemData.idDyn then
isShow = true
end
end
if isShow then
redPoint:SetActive(true)
else
redPoint:SetActive(false)
end
else
redPoint:SetActive(false)
end
-- 0.查看属性 1.穿戴 2.卸下 3.交换
--宝物界面
Util.AddOnceClick(
@ -874,7 +887,7 @@ function this.SingleItemDataShow(_go, _itemData)
if curHeroCanUpEquipTabs and #curHeroCanUpEquipTabs > 0 then
local isShow = false
for i = 1, #curHeroCanUpEquipTabs do
if curHeroCanUpEquipTabs[i] == _itemData.id then
if curHeroCanUpEquipTabs[i] == _itemData.idDyn then
isShow = true
end
end
@ -1079,10 +1092,8 @@ function this.UpdateEquipPosHeroData(_equipOrTreasure, _type, _selectEquipDataLi
this.ShowHeroEquip()
--上阵刷新红点
this.allEquipUpRedPoint:SetActive((#HeroManager.GetHeroIsUpEquip(curHeroData.dynamicId) > 0 or (isCanUpEquipTreasure and #HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,0) > 0)) and isUpZhen)
this.equipBTn5Add.gameObject:SetActive((isCanUpEquipTreasure and #HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,1) > 0) or (curEquipTreasureDatas[5] and curEquipTreasureDatas[5].idDyn and HeroManager.CheckIsUpTreasure(curEquipTreasureDatas[5].idDyn,0)) )
this.equipBtn6Add.gameObject:SetActive((isCanUpEquipTreasure and #HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,2) > 0) or (curEquipTreasureDatas[6] and curEquipTreasureDatas[6].idDyn and HeroManager.CheckIsUpTreasure(curEquipTreasureDatas[6].idDyn,0)) )
this:OnClickTabBtn(indexBtnNum)
this.CheckRedTab()
-- --刷新当前英雄可穿装备
-- if indexBtnNum == PosIdConst.All then
-- this:OnClickAllBtn()
@ -1091,6 +1102,35 @@ function this.UpdateEquipPosHeroData(_equipOrTreasure, _type, _selectEquipDataLi
-- end
--对比战力并更新战力值 播放战力变更动画
HeroManager.CompareWarPower(curHeroData.dynamicId)
this.CheckRedTab()
end
function this.CheckRedTab()
for i = 1,#redTabs do
if i < 5 then
local showRed = false
if curHeroCanUpEquipTabs and #curHeroCanUpEquipTabs > 0 then
for j = 1,#curHeroCanUpEquipTabs do
if equipConfig[curHeroCanUpEquipTabs[j]].Position == i then
showRed = true
break
end
end
else
showRed = false
end
redTabs[i].gameObject:SetActive(showRed)
else
local canEquips = HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,(i-4))
local canUpEquip
if curEquipTreasureDatas[i] and curEquipTreasureDatas[i].idDyn then
canUpEquip = HeroManager.CheckIsUpTreasure(curEquipTreasureDatas[i].idDyn,0)
end
redTabs[i].gameObject:SetActive(isCanUpEquipTreasure and
(#canEquips > 0 or
(curEquipTreasureDatas[i] and curEquipTreasureDatas[i].idDyn and canUpEquip)))
end
end
end
--选择图片设置父级
@ -1118,16 +1158,44 @@ function this:AddRedPointVale(_equipDatas)
end
end
function this:SortEquipDatas1(_equipDatas)
if teamHero[curHeroData.dynamicId] then
curHeroCanUpEquipTreasuresTabs = HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,0)
else
curHeroCanUpEquipTreasuresTabs = {}
end
for j = 1, #_equipDatas do
_equipDatas[j].isRedPointShow = 1
for i = 1, #curHeroCanUpEquipTabs do
if curHeroCanUpEquipTabs[i] == _equipDatas[j].idDyn then
_equipDatas[j].isRedPointShow = 2
end
end
end
table.sort(_equipDatas,function(a, b)
if a.isRedPointShow == b.isRedPointShow then
if a.refineLv == b.refineLv then
if a.lv == b.lv then
return a.id > b.id
else
return a.lv > b.lv
end
else
return a.refineLv > b.refineLv
end
else
return a.isRedPointShow > b.isRedPointShow
end
end
)
end
function this:SortEquipDatas(_equipDatas)
if teamHero[curHeroData.dynamicId] then
isUpZhen = true
this.equipBTn5Add.gameObject:SetActive((isCanUpEquipTreasure and #HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,1) > 0) or (curEquipTreasureDatas[5] and curEquipTreasureDatas[5].idDyn and HeroManager.CheckIsUpTreasure(curEquipTreasureDatas[5].idDyn,0)) )
this.equipBtn6Add.gameObject:SetActive((isCanUpEquipTreasure and #HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,2) > 0) or (curEquipTreasureDatas[6] and curEquipTreasureDatas[6].idDyn and HeroManager.CheckIsUpTreasure(curEquipTreasureDatas[6].idDyn,0)) )
this.allEquipUpRedPoint:SetActive((#HeroManager.GetHeroIsUpEquip(curHeroData.dynamicId) > 0 or (isCanUpEquipTreasure and #HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,0) > 0)) and isUpZhen)
curHeroCanUpEquipTabs = HeroManager.GetHeroIsUpEquip(curHeroData.dynamicId)
else
this.equipBTn5Add.gameObject:SetActive(false)
this.equipBtn6Add.gameObject:SetActive(false)
isUpZhen = false
this.allEquipUpRedPoint:SetActive(false)
curHeroCanUpEquipTabs = {}