diff --git a/Assets/ManagedResources/Prefabs/UI/Carbon/CarbonTypePanel.prefab b/Assets/ManagedResources/Prefabs/UI/Carbon/CarbonTypePanel.prefab index 9a893cb218..d8373f8422 100644 --- a/Assets/ManagedResources/Prefabs/UI/Carbon/CarbonTypePanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Carbon/CarbonTypePanel.prefab @@ -20585,10 +20585,10 @@ RectTransform: m_Father: {fileID: 7578415708186738105} 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_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 100, y: 100} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &3914727527739913788 GameObject: @@ -21214,7 +21214,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: -490, y: -821} + m_AnchoredPosition: {x: 0, y: 70} m_SizeDelta: {x: 140, y: 121} m_Pivot: {x: 0, y: 0.5} --- !u!222 &2067592378856060532 diff --git a/Assets/ManagedResources/Prefabs/UI/Carbon/CarbonTypePanelV2.prefab b/Assets/ManagedResources/Prefabs/UI/Carbon/CarbonTypePanelV2.prefab index 73c8cab40c..abd3f6de92 100644 --- a/Assets/ManagedResources/Prefabs/UI/Carbon/CarbonTypePanelV2.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Carbon/CarbonTypePanelV2.prefab @@ -10106,7 +10106,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 32, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 1, y: 0} --- !u!222 &1416627182817362643 @@ -10619,9 +10619,9 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 109.5, y: 94.6} - m_Pivot: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 70} + m_SizeDelta: {x: 140, y: 121} + m_Pivot: {x: 0, y: 0.5} --- !u!222 &4653905937005178428 CanvasRenderer: m_ObjectHideFlags: 0 @@ -15559,9 +15559,9 @@ RectTransform: m_Father: {fileID: 5471298172113341867} 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: 304, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 304, y: -19.5} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 1, y: 0} --- !u!222 &1091447951875603705 @@ -15729,7 +15729,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 304, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 1, y: 0} --- !u!222 &6895863939021833412 @@ -36759,7 +36759,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 304, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 1, y: 0} --- !u!222 &7178296975279120347 @@ -37007,7 +37007,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 304, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 1, y: 0} --- !u!222 &2369694732637613435 @@ -48536,9 +48536,9 @@ RectTransform: m_Father: {fileID: 5471298172113341867} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 32, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 32, y: -19.5} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 1, y: 0} --- !u!222 &236031845605506401 @@ -48923,7 +48923,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 32, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 1, y: 0} --- !u!222 &2502617200726059184 @@ -54209,7 +54209,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 32, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 1, y: 0} --- !u!222 &1936741229240484589 diff --git a/Assets/ManagedResources/Prefabs/UI/Carbon/XuanYuanMirrorPanelList.prefab b/Assets/ManagedResources/Prefabs/UI/Carbon/XuanYuanMirrorPanelList.prefab index a03c33779e..a54325b281 100644 --- a/Assets/ManagedResources/Prefabs/UI/Carbon/XuanYuanMirrorPanelList.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Carbon/XuanYuanMirrorPanelList.prefab @@ -429,7 +429,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 99.1} + m_AnchoredPosition: {x: 0, y: 70} m_SizeDelta: {x: 140, y: 121} m_Pivot: {x: 0, y: 0.5} --- !u!222 &1442028839347931044 diff --git a/Assets/ManagedResources/Prefabs/UI/Popup/RoleInfoPopup.prefab b/Assets/ManagedResources/Prefabs/UI/Popup/RoleInfoPopup.prefab index f67a767c8e..e47bbd423e 100644 --- a/Assets/ManagedResources/Prefabs/UI/Popup/RoleInfoPopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Popup/RoleInfoPopup.prefab @@ -8055,6 +8055,80 @@ RectTransform: m_AnchoredPosition: {x: 238.85, y: -78.6375} m_SizeDelta: {x: 477.7, y: 44.5} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &2262839094375767816 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5723156027066984007} + - component: {fileID: 2735506226307312066} + - component: {fileID: 5317693150561500766} + m_Layer: 5 + m_Name: proIcon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5723156027066984007 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2262839094375767816} + 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_Children: [] + m_Father: {fileID: 3480734674570110925} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: -12.8, y: 11.8} + m_SizeDelta: {x: 74, y: 74} + m_Pivot: {x: 0, y: 1} +--- !u!222 &2735506226307312066 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2262839094375767816} + m_CullTransparentMesh: 0 +--- !u!114 &5317693150561500766 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2262839094375767816} + 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: 1 + 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: 0} + 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 &2306151611164505418 GameObject: m_ObjectHideFlags: 0 @@ -10029,9 +10103,9 @@ RectTransform: m_Father: {fileID: 800725520187452421} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 80.95, y: -89.95} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 152, y: 152} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7234040720317302532 @@ -10397,9 +10471,9 @@ RectTransform: m_Father: {fileID: 800725520187452421} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 262.75, y: -89.95} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 181.6, y: 181.6} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8672316360936894560 @@ -11200,6 +11274,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 1074262243633909606} + - {fileID: 956067214865132187} m_Father: {fileID: 3893976424482190964} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -12018,6 +12093,80 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 112, y: 29.089996} m_Pivot: {x: 0, y: 0} +--- !u!1 &5186815939525493760 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 956067214865132187} + - component: {fileID: 2172020101089339206} + - component: {fileID: 183623063068361931} + m_Layer: 5 + m_Name: proIcon + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &956067214865132187 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5186815939525493760} + 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_Children: [] + m_Father: {fileID: 2885743065443971280} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: -12.8, y: 11.8} + m_SizeDelta: {x: 74, y: 74} + m_Pivot: {x: 0, y: 1} +--- !u!222 &2172020101089339206 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5186815939525493760} + m_CullTransparentMesh: 0 +--- !u!114 &183623063068361931 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5186815939525493760} + 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: 1 + 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: 0} + 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 &5187149294521291017 GameObject: m_ObjectHideFlags: 0 @@ -19700,6 +19849,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 2834258544579593036} + - {fileID: 5723156027066984007} m_Father: {fileID: 4809597655882483266} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanel.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanel.lua index 9f4b8415cc..dbab7ecd06 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanel.lua @@ -61,7 +61,7 @@ function this:BindEvent() UIManager.OpenPanel(UIName.XuanYuanMirrorRewardSortPopup) end) Util.AddClick(this.btnClose, function() - this:OnClose() + this:ClosePanel() end) end @@ -195,12 +195,11 @@ function this:OnClose() this.isPlayDoorAudio = false self.gameObject:SetActive(false) PlayerManager.carbonType = 2 - UIManager.OpenPanel(UIName.CarbonTypePanelV2) + SubUIManager.Close(this.UpView) end --界面销毁时调用(用于子类重写) function this:OnDestroy() - SubUIManager.Close(this.UpView) if self.timer then self.timer:Stop() self.timer = nil diff --git a/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanelList.lua b/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanelList.lua index 76b34a2913..ee86dc3339 100644 --- a/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanelList.lua +++ b/Assets/ManagedResources/~Lua/Modules/Carbon/XuanYuanMirrorPanelList.lua @@ -95,8 +95,7 @@ function this:BindEvent() Util.AddClick( this.btnBack, function() - UIManager.OpenPanel(UIName.XuanYuanMirrorPanel) - this:OnClose() + this:ClosePanel() end ) end diff --git a/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua index 588c2c2528..e7eb90fadb 100644 --- a/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Map/ShowEnemyInfoPanel.lua @@ -136,7 +136,7 @@ function this.SetSelectHero() poolManager:UnLoadLive(_LiveName, _LiveNode) end - local t= MonsterGroupConfig[monsterGroupId].Contents[1][1] + local t= MonsterGroupConfig[monsterGroupId].Contents[1][2] local monsterId = MonsterConfig[t].MonsterId local paintingId = heroConfig[monsterId].Live local pos = heroConfig[monsterId].Position diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua index 6036e1848f..0d1cf19774 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RoleInfoPopup.lua @@ -375,9 +375,10 @@ function this.EquipInfo() btn.gameObject:SetActive(true) local frame=Util.GetGameObject(o,"Frame"):GetComponent("Image") local icon=Util.GetGameObject(o,"Frame/Icon"):GetComponent("Image") - + local proIcon=Util.GetGameObject(o,"Frame/proIcon"):GetComponent("Image") frame.sprite=Util.LoadSprite(data.frame) icon.sprite=Util.LoadSprite(data.icon) + proIcon.sprite = Util.LoadSprite(data.proIcon) Util.AddOnceClick(btn,function() UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup,0, data.idDyn,data.id, 0, 0) end) diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipPanel.lua index 4f57b976b4..636141f547 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipPanel.lua @@ -310,8 +310,8 @@ function this:AllEquipUpBtnOnClick() --获取到所有未装备的装备 curPosEquip = BagManager.GetEquipDataByEquipPosition(curHeroData.heroConfig.Profession, index) end - LogBlue("i:"..index.." #curPosEquip:".. #curPosEquip) - LogBlue("计算每个位置可装备的装备战力")-- 取战力最大的装备 + -- LogBlue("i:"..index.." #curPosEquip:".. #curPosEquip) + -- LogBlue("计算每个位置可装备的装备战力")-- 取战力最大的装备 if curPosEquip and #curPosEquip > 0 then local equiData = {} local indexMaxPower = 0 @@ -320,24 +320,24 @@ function this:AllEquipUpBtnOnClick() --获取到宝物战力 if index == 5 or index == 6 then indexMaxPower = EquipTreasureManager.CalculateWarForce(curHeroEquipDatas[index].idDyn) - LogBlue("宝物id:"..curHeroEquipDatas[index].idDyn.." id:"..curHeroEquipDatas[index].id.." indexMaxPower:"..indexMaxPower) + --LogBlue("宝物id:"..curHeroEquipDatas[index].idDyn.." id:"..curHeroEquipDatas[index].id.." indexMaxPower:"..indexMaxPower) else --获取到装备战力 indexMaxPower = EquipManager.CalculateWarForce(curHeroEquipDatas[index].id) - LogBlue("装备id:"..curHeroEquipDatas[index].id.." indexMaxPower:"..indexMaxPower) + --LogBlue("装备id:"..curHeroEquipDatas[index].id.." indexMaxPower:"..indexMaxPower) end end - LogGreen("循环计算每个装备的战力") + --LogGreen("循环计算每个装备的战力") for i = 1, #curPosEquip do local addPower = 0 local curEquip = curPosEquip[i] if curEquip then if index == 5 or index == 6 then addPower = EquipTreasureManager.CalculateWarForce(curEquip.idDyn) - LogGreen("宝物id:"..curEquip.idDyn.." id:"..curEquip.id.." addPower:"..addPower) + --LogGreen("宝物id:"..curEquip.idDyn.." id:"..curEquip.id.." addPower:"..addPower) else addPower = EquipManager.CalculateWarForce(curEquip.id) - LogGreen("装备id:"..curEquip.id.." addPower:"..addPower) + --LogGreen("装备id:"..curEquip.id.." addPower:"..addPower) end end if addPower > indexMaxPower then @@ -345,11 +345,11 @@ function this:AllEquipUpBtnOnClick() equiData = curEquip end end - if index == 5 or index == 6 then - LogYellow("宝物id:"..equiData.idDyn.." id:"..equiData.id) - else - LogYellow("装备id:"..equiData.id) - end + -- if index == 5 or index == 6 then + -- LogYellow("宝物id:"..equiData.idDyn.." id:"..equiData.id) + -- else + -- LogYellow("装备id:"..equiData.id) + -- end if (index == 5 or index == 6) then if ((curHeroEquipDatas[index] and equiData.idDyn ~= curHeroEquipDatas[index].idDyn) @@ -378,15 +378,15 @@ function this:AllEquipUpBtnOnClick() end end end - LogYellow("装备:"..#allEquipIds) - LogYellow("宝物:"..#allTreasureIds) - LogYellow("isCanUpEquipTreasure:"..tostring(isCanUpEquipTreasure)) + -- LogYellow("装备:"..#allEquipIds) + -- LogYellow("宝物:"..#allTreasureIds) + -- LogYellow("isCanUpEquipTreasure:"..tostring(isCanUpEquipTreasure)) if (allEquipIds and #allEquipIds > 0) or (isCanUpEquipTreasure and allTreasureIds and #allTreasureIds > 0) then --isCanUpEquipTreasure if allEquipIds and #allEquipIds > 0 then - for i = 1, #allEquipIds do - LogGreen("一键装备"..allEquipIds[i]) - end + -- for i = 1, #allEquipIds do + -- LogGreen("一键装备"..allEquipIds[i]) + -- end --穿装备协议 NetManager.EquipWearRequest( curHeroData.dynamicId, @@ -406,9 +406,9 @@ function this:AllEquipUpBtnOnClick() end --穿戴宝物 if isCanUpEquipTreasure and allTreasureIds and #allTreasureIds > 0 then - for i = 1, #allTreasureIds do - LogGreen("一键宝物"..allTreasureIds[i]) - end + -- for i = 1, #allTreasureIds do + -- LogGreen("一键宝物"..allTreasureIds[i]) + -- end --穿装备协议 NetManager.EquipWearRequest( curHeroData.dynamicId, @@ -936,8 +936,9 @@ function this.UpdateEquipPosHeroData(_equipOrTreasure, _type, _selectEquipDataLi elseif _type == 4 then --一键穿 把身上装备解绑英雄id if _equipOrTreasure == 1 then + local isadd for n, m in ipairs(_selectEquipDataList) do - local isadd = true + isadd = true for i = 1, #curHeroData.equipIdList do if equipConfig[tonumber(curHeroData.equipIdList[i])].Position == equipConfig[tonumber(m)].Position then EquipManager.DeleteSingleEquip(curHeroData.equipIdList[i], curHeroData.dynamicId) @@ -953,25 +954,30 @@ function this.UpdateEquipPosHeroData(_equipOrTreasure, _type, _selectEquipDataLi end EquipManager.UpdateEquipData(_selectEquipDataList, curHeroData.dynamicId) else + local isadd for i = 1, #_selectEquipDataList do - local isadd = true - for i = 1, #curHeroData.jewels do + isadd = true + for j = 1, #curHeroData.jewels do --如果英雄身上有和选中的宝物的位置相同的,就替换 - if EquipTreasureManager.GetSingleTreasureByIdDyn(curHeroData.jewels[i]).equipType == + if EquipTreasureManager.GetSingleTreasureByIdDyn(curHeroData.jewels[j]).equipType == EquipTreasureManager.GetSingleTreasureByIdDyn(_selectEquipDataList[i]).equipType then - EquipTreasureManager.SetTreasureUpOrDown(curHeroData.jewels[i], "0") + EquipTreasureManager.SetTreasureUpOrDown(curHeroData.jewels[j], "0") EquipTreasureManager.SetTreasureUpOrDown(_selectEquipDataList[i], curHeroData.dynamicId) - table.remove(curHeroData.jewels,i) - table.insert(curHeroData.jewels, _selectEquipDataList[i]) + curHeroData.jewels[j] = _selectEquipDataList[i] isadd = false break end end + -- LogGreen("_selectEquipDataList[i]:".._selectEquipDataList[i]) + -- LogGreen("isadd:"..tostring(isadd)) if isadd then EquipTreasureManager.SetTreasureUpOrDown(_selectEquipDataList[i], curHeroData.dynamicId) table.insert(curHeroData.jewels, _selectEquipDataList[i]) - end + end end + -- for i = 1, #curHeroData.jewels do + -- LogYellow("curHeroData.jewels:"..i.. " id:"..curHeroData.jewels[i]) + -- end end elseif _type == 5 then --一键脱 把身上装备英雄id置为“0” 再把英雄装备list清空