Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop

dev_chengFeng
gaoxin 2020-08-26 11:11:27 +08:00
commit fa787f83d5
9 changed files with 217 additions and 62 deletions

View File

@ -20585,10 +20585,10 @@ RectTransform:
m_Father: {fileID: 7578415708186738105} m_Father: {fileID: 7578415708186738105}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0} 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} m_Pivot: {x: 0.5, y: 0.5}
--- !u!1 &3914727527739913788 --- !u!1 &3914727527739913788
GameObject: GameObject:
@ -21214,7 +21214,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {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_SizeDelta: {x: 140, y: 121}
m_Pivot: {x: 0, y: 0.5} m_Pivot: {x: 0, y: 0.5}
--- !u!222 &2067592378856060532 --- !u!222 &2067592378856060532

View File

@ -10106,7 +10106,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {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_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0} m_Pivot: {x: 1, y: 0}
--- !u!222 &1416627182817362643 --- !u!222 &1416627182817362643
@ -10619,9 +10619,9 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 70}
m_SizeDelta: {x: 109.5, y: 94.6} m_SizeDelta: {x: 140, y: 121}
m_Pivot: {x: 0, y: 0} m_Pivot: {x: 0, y: 0.5}
--- !u!222 &4653905937005178428 --- !u!222 &4653905937005178428
CanvasRenderer: CanvasRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -15559,9 +15559,9 @@ RectTransform:
m_Father: {fileID: 5471298172113341867} m_Father: {fileID: 5471298172113341867}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 304, y: 0} m_AnchoredPosition: {x: 304, y: -19.5}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0} m_Pivot: {x: 1, y: 0}
--- !u!222 &1091447951875603705 --- !u!222 &1091447951875603705
@ -15729,7 +15729,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {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_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0} m_Pivot: {x: 1, y: 0}
--- !u!222 &6895863939021833412 --- !u!222 &6895863939021833412
@ -36759,7 +36759,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {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_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0} m_Pivot: {x: 1, y: 0}
--- !u!222 &7178296975279120347 --- !u!222 &7178296975279120347
@ -37007,7 +37007,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {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_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0} m_Pivot: {x: 1, y: 0}
--- !u!222 &2369694732637613435 --- !u!222 &2369694732637613435
@ -48536,9 +48536,9 @@ RectTransform:
m_Father: {fileID: 5471298172113341867} m_Father: {fileID: 5471298172113341867}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 32, y: 0} m_AnchoredPosition: {x: 32, y: -19.5}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0} m_Pivot: {x: 1, y: 0}
--- !u!222 &236031845605506401 --- !u!222 &236031845605506401
@ -48923,7 +48923,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {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_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0} m_Pivot: {x: 1, y: 0}
--- !u!222 &2502617200726059184 --- !u!222 &2502617200726059184
@ -54209,7 +54209,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {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_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 1, y: 0} m_Pivot: {x: 1, y: 0}
--- !u!222 &1936741229240484589 --- !u!222 &1936741229240484589

View File

@ -429,7 +429,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {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_SizeDelta: {x: 140, y: 121}
m_Pivot: {x: 0, y: 0.5} m_Pivot: {x: 0, y: 0.5}
--- !u!222 &1442028839347931044 --- !u!222 &1442028839347931044

View File

@ -8055,6 +8055,80 @@ RectTransform:
m_AnchoredPosition: {x: 238.85, y: -78.6375} m_AnchoredPosition: {x: 238.85, y: -78.6375}
m_SizeDelta: {x: 477.7, y: 44.5} m_SizeDelta: {x: 477.7, y: 44.5}
m_Pivot: {x: 0.5, y: 0.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 --- !u!1 &2306151611164505418
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -10029,9 +10103,9 @@ RectTransform:
m_Father: {fileID: 800725520187452421} m_Father: {fileID: 800725520187452421}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 80.95, y: -89.95} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 152, y: 152} m_SizeDelta: {x: 152, y: 152}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &7234040720317302532 --- !u!222 &7234040720317302532
@ -10397,9 +10471,9 @@ RectTransform:
m_Father: {fileID: 800725520187452421} m_Father: {fileID: 800725520187452421}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 262.75, y: -89.95} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 181.6, y: 181.6} m_SizeDelta: {x: 181.6, y: 181.6}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8672316360936894560 --- !u!222 &8672316360936894560
@ -11200,6 +11274,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 1074262243633909606} - {fileID: 1074262243633909606}
- {fileID: 956067214865132187}
m_Father: {fileID: 3893976424482190964} m_Father: {fileID: 3893976424482190964}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -12018,6 +12093,80 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 112, y: 29.089996} m_SizeDelta: {x: 112, y: 29.089996}
m_Pivot: {x: 0, y: 0} 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 --- !u!1 &5187149294521291017
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -19700,6 +19849,7 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 2834258544579593036} - {fileID: 2834258544579593036}
- {fileID: 5723156027066984007}
m_Father: {fileID: 4809597655882483266} m_Father: {fileID: 4809597655882483266}
m_RootOrder: 1 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View File

@ -61,7 +61,7 @@ function this:BindEvent()
UIManager.OpenPanel(UIName.XuanYuanMirrorRewardSortPopup) UIManager.OpenPanel(UIName.XuanYuanMirrorRewardSortPopup)
end) end)
Util.AddClick(this.btnClose, function() Util.AddClick(this.btnClose, function()
this:OnClose() this:ClosePanel()
end) end)
end end
@ -195,12 +195,11 @@ function this:OnClose()
this.isPlayDoorAudio = false this.isPlayDoorAudio = false
self.gameObject:SetActive(false) self.gameObject:SetActive(false)
PlayerManager.carbonType = 2 PlayerManager.carbonType = 2
UIManager.OpenPanel(UIName.CarbonTypePanelV2) SubUIManager.Close(this.UpView)
end end
--界面销毁时调用(用于子类重写) --界面销毁时调用(用于子类重写)
function this:OnDestroy() function this:OnDestroy()
SubUIManager.Close(this.UpView)
if self.timer then if self.timer then
self.timer:Stop() self.timer:Stop()
self.timer = nil self.timer = nil

View File

@ -95,8 +95,7 @@ function this:BindEvent()
Util.AddClick( Util.AddClick(
this.btnBack, this.btnBack,
function() function()
UIManager.OpenPanel(UIName.XuanYuanMirrorPanel) this:ClosePanel()
this:OnClose()
end end
) )
end end

View File

@ -136,7 +136,7 @@ function this.SetSelectHero()
poolManager:UnLoadLive(_LiveName, _LiveNode) poolManager:UnLoadLive(_LiveName, _LiveNode)
end end
local t= MonsterGroupConfig[monsterGroupId].Contents[1][1] local t= MonsterGroupConfig[monsterGroupId].Contents[1][2]
local monsterId = MonsterConfig[t].MonsterId local monsterId = MonsterConfig[t].MonsterId
local paintingId = heroConfig[monsterId].Live local paintingId = heroConfig[monsterId].Live
local pos = heroConfig[monsterId].Position local pos = heroConfig[monsterId].Position

View File

@ -375,9 +375,10 @@ function this.EquipInfo()
btn.gameObject:SetActive(true) btn.gameObject:SetActive(true)
local frame=Util.GetGameObject(o,"Frame"):GetComponent("Image") local frame=Util.GetGameObject(o,"Frame"):GetComponent("Image")
local icon=Util.GetGameObject(o,"Frame/Icon"):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) frame.sprite=Util.LoadSprite(data.frame)
icon.sprite=Util.LoadSprite(data.icon) icon.sprite=Util.LoadSprite(data.icon)
proIcon.sprite = Util.LoadSprite(data.proIcon)
Util.AddOnceClick(btn,function() Util.AddOnceClick(btn,function()
UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup,0, data.idDyn,data.id, 0, 0) UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup,0, data.idDyn,data.id, 0, 0)
end) end)

View File

@ -310,8 +310,8 @@ function this:AllEquipUpBtnOnClick()
--获取到所有未装备的装备 --获取到所有未装备的装备
curPosEquip = BagManager.GetEquipDataByEquipPosition(curHeroData.heroConfig.Profession, index) curPosEquip = BagManager.GetEquipDataByEquipPosition(curHeroData.heroConfig.Profession, index)
end end
LogBlue("i:"..index.." #curPosEquip:".. #curPosEquip) -- LogBlue("i:"..index.." #curPosEquip:".. #curPosEquip)
LogBlue("计算每个位置可装备的装备战力")-- 取战力最大的装备 -- LogBlue("计算每个位置可装备的装备战力")-- 取战力最大的装备
if curPosEquip and #curPosEquip > 0 then if curPosEquip and #curPosEquip > 0 then
local equiData = {} local equiData = {}
local indexMaxPower = 0 local indexMaxPower = 0
@ -320,24 +320,24 @@ function this:AllEquipUpBtnOnClick()
--获取到宝物战力 --获取到宝物战力
if index == 5 or index == 6 then if index == 5 or index == 6 then
indexMaxPower = EquipTreasureManager.CalculateWarForce(curHeroEquipDatas[index].idDyn) 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 else
--获取到装备战力 --获取到装备战力
indexMaxPower = EquipManager.CalculateWarForce(curHeroEquipDatas[index].id) indexMaxPower = EquipManager.CalculateWarForce(curHeroEquipDatas[index].id)
LogBlue("装备id"..curHeroEquipDatas[index].id.." indexMaxPower:"..indexMaxPower) --LogBlue("装备id"..curHeroEquipDatas[index].id.." indexMaxPower:"..indexMaxPower)
end end
end end
LogGreen("循环计算每个装备的战力") --LogGreen("循环计算每个装备的战力")
for i = 1, #curPosEquip do for i = 1, #curPosEquip do
local addPower = 0 local addPower = 0
local curEquip = curPosEquip[i] local curEquip = curPosEquip[i]
if curEquip then if curEquip then
if index == 5 or index == 6 then if index == 5 or index == 6 then
addPower = EquipTreasureManager.CalculateWarForce(curEquip.idDyn) addPower = EquipTreasureManager.CalculateWarForce(curEquip.idDyn)
LogGreen("宝物id"..curEquip.idDyn.." id:"..curEquip.id.." addPower:"..addPower) --LogGreen("宝物id"..curEquip.idDyn.." id:"..curEquip.id.." addPower:"..addPower)
else else
addPower = EquipManager.CalculateWarForce(curEquip.id) addPower = EquipManager.CalculateWarForce(curEquip.id)
LogGreen("装备id"..curEquip.id.." addPower:"..addPower) --LogGreen("装备id"..curEquip.id.." addPower:"..addPower)
end end
end end
if addPower > indexMaxPower then if addPower > indexMaxPower then
@ -345,11 +345,11 @@ function this:AllEquipUpBtnOnClick()
equiData = curEquip equiData = curEquip
end end
end end
if index == 5 or index == 6 then -- if index == 5 or index == 6 then
LogYellow("宝物id"..equiData.idDyn.." id:"..equiData.id) -- LogYellow("宝物id"..equiData.idDyn.." id:"..equiData.id)
else -- else
LogYellow("装备id"..equiData.id) -- LogYellow("装备id"..equiData.id)
end -- end
if (index == 5 or index == 6) then if (index == 5 or index == 6) then
if ((curHeroEquipDatas[index] and equiData.idDyn ~= curHeroEquipDatas[index].idDyn) if ((curHeroEquipDatas[index] and equiData.idDyn ~= curHeroEquipDatas[index].idDyn)
@ -378,15 +378,15 @@ function this:AllEquipUpBtnOnClick()
end end
end end
end end
LogYellow("装备:"..#allEquipIds) -- LogYellow("装备:"..#allEquipIds)
LogYellow("宝物:"..#allTreasureIds) -- LogYellow("宝物:"..#allTreasureIds)
LogYellow("isCanUpEquipTreasure:"..tostring(isCanUpEquipTreasure)) -- LogYellow("isCanUpEquipTreasure:"..tostring(isCanUpEquipTreasure))
if (allEquipIds and #allEquipIds > 0) or (isCanUpEquipTreasure and allTreasureIds and #allTreasureIds > 0) then if (allEquipIds and #allEquipIds > 0) or (isCanUpEquipTreasure and allTreasureIds and #allTreasureIds > 0) then
--isCanUpEquipTreasure --isCanUpEquipTreasure
if allEquipIds and #allEquipIds > 0 then if allEquipIds and #allEquipIds > 0 then
for i = 1, #allEquipIds do -- for i = 1, #allEquipIds do
LogGreen("一键装备"..allEquipIds[i]) -- LogGreen("一键装备"..allEquipIds[i])
end -- end
--穿装备协议 --穿装备协议
NetManager.EquipWearRequest( NetManager.EquipWearRequest(
curHeroData.dynamicId, curHeroData.dynamicId,
@ -406,9 +406,9 @@ function this:AllEquipUpBtnOnClick()
end end
--穿戴宝物 --穿戴宝物
if isCanUpEquipTreasure and allTreasureIds and #allTreasureIds > 0 then if isCanUpEquipTreasure and allTreasureIds and #allTreasureIds > 0 then
for i = 1, #allTreasureIds do -- for i = 1, #allTreasureIds do
LogGreen("一键宝物"..allTreasureIds[i]) -- LogGreen("一键宝物"..allTreasureIds[i])
end -- end
--穿装备协议 --穿装备协议
NetManager.EquipWearRequest( NetManager.EquipWearRequest(
curHeroData.dynamicId, curHeroData.dynamicId,
@ -936,8 +936,9 @@ function this.UpdateEquipPosHeroData(_equipOrTreasure, _type, _selectEquipDataLi
elseif _type == 4 then elseif _type == 4 then
--一键穿 把身上装备解绑英雄id --一键穿 把身上装备解绑英雄id
if _equipOrTreasure == 1 then if _equipOrTreasure == 1 then
local isadd
for n, m in ipairs(_selectEquipDataList) do for n, m in ipairs(_selectEquipDataList) do
local isadd = true isadd = true
for i = 1, #curHeroData.equipIdList do for i = 1, #curHeroData.equipIdList do
if equipConfig[tonumber(curHeroData.equipIdList[i])].Position == equipConfig[tonumber(m)].Position then if equipConfig[tonumber(curHeroData.equipIdList[i])].Position == equipConfig[tonumber(m)].Position then
EquipManager.DeleteSingleEquip(curHeroData.equipIdList[i], curHeroData.dynamicId) EquipManager.DeleteSingleEquip(curHeroData.equipIdList[i], curHeroData.dynamicId)
@ -953,25 +954,30 @@ function this.UpdateEquipPosHeroData(_equipOrTreasure, _type, _selectEquipDataLi
end end
EquipManager.UpdateEquipData(_selectEquipDataList, curHeroData.dynamicId) EquipManager.UpdateEquipData(_selectEquipDataList, curHeroData.dynamicId)
else else
local isadd
for i = 1, #_selectEquipDataList do for i = 1, #_selectEquipDataList do
local isadd = true isadd = true
for i = 1, #curHeroData.jewels do 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.GetSingleTreasureByIdDyn(_selectEquipDataList[i]).equipType then
EquipTreasureManager.SetTreasureUpOrDown(curHeroData.jewels[i], "0") EquipTreasureManager.SetTreasureUpOrDown(curHeroData.jewels[j], "0")
EquipTreasureManager.SetTreasureUpOrDown(_selectEquipDataList[i], curHeroData.dynamicId) EquipTreasureManager.SetTreasureUpOrDown(_selectEquipDataList[i], curHeroData.dynamicId)
table.remove(curHeroData.jewels,i) curHeroData.jewels[j] = _selectEquipDataList[i]
table.insert(curHeroData.jewels, _selectEquipDataList[i])
isadd = false isadd = false
break break
end end
end end
-- LogGreen("_selectEquipDataList[i]:".._selectEquipDataList[i])
-- LogGreen("isadd:"..tostring(isadd))
if isadd then if isadd then
EquipTreasureManager.SetTreasureUpOrDown(_selectEquipDataList[i], curHeroData.dynamicId) EquipTreasureManager.SetTreasureUpOrDown(_selectEquipDataList[i], curHeroData.dynamicId)
table.insert(curHeroData.jewels, _selectEquipDataList[i]) table.insert(curHeroData.jewels, _selectEquipDataList[i])
end end
end end
-- for i = 1, #curHeroData.jewels do
-- LogYellow("curHeroData.jewels:"..i.. " id:"..curHeroData.jewels[i])
-- end
end end
elseif _type == 5 then elseif _type == 5 then
--一键脱 把身上装备英雄id置为“0” 再把英雄装备list清空 --一键脱 把身上装备英雄id置为“0” 再把英雄装备list清空