Merge branch 'china/dev' of http://60.1.1.230/gaoxin/JL_Client into china/dev

dev_chengFeng
gaoxin 2021-07-28 17:43:04 +08:00
commit e552db5499
25 changed files with 2314 additions and 2805 deletions

View File

@ -47079,7 +47079,7 @@ ParticleSystemRenderer:
m_LightmapParameters: {fileID: 0} m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 11 m_SortingOrder: 16
m_RenderMode: 0 m_RenderMode: 0
m_SortMode: 0 m_SortMode: 0
m_MinParticleSize: 0 m_MinParticleSize: 0
@ -51898,7 +51898,7 @@ Canvas:
m_SortingBucketNormalizedSize: 0 m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0 m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0 m_SortingLayerID: 0
m_SortingOrder: 10 m_SortingOrder: 15
m_TargetDisplay: 0 m_TargetDisplay: 0
--- !u!1 &3996167517654444152 --- !u!1 &3996167517654444152
GameObject: GameObject:

View File

@ -4680,8 +4680,8 @@ RectTransform:
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.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0.000015258789, y: -89.600006} m_AnchoredPosition: {x: 0.000015258789, y: -91.24}
m_SizeDelta: {x: 64.4, y: 37.51} m_SizeDelta: {x: 64.4, y: 40.78}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &222600956484834218 --- !u!222 &222600956484834218
CanvasRenderer: CanvasRenderer:
@ -5104,6 +5104,8 @@ RectTransform:
- {fileID: 1298334587255639450} - {fileID: 1298334587255639450}
- {fileID: 1799237812738150230} - {fileID: 1799237812738150230}
- {fileID: 8592251680213530260} - {fileID: 8592251680213530260}
- {fileID: 6193489970714018668}
- {fileID: 1449685011234502786}
m_Father: {fileID: 224797861638971062} m_Father: {fileID: 224797861638971062}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -38611,6 +38613,85 @@ ParticleSystemRenderer:
m_Mesh2: {fileID: 0} m_Mesh2: {fileID: 0}
m_Mesh3: {fileID: 0} m_Mesh3: {fileID: 0}
m_MaskInteraction: 0 m_MaskInteraction: 0
--- !u!1 &1597479055163298302
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1449685011234502786}
- component: {fileID: 1091151930144477597}
- component: {fileID: 6827508354133794526}
m_Layer: 5
m_Name: middleDownLv
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1449685011234502786
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1597479055163298302}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9009009, y: 0.9009009, z: 1}
m_Children: []
m_Father: {fileID: 224550793111032812}
m_RootOrder: 12
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: -1.62, y: -46.553}
m_SizeDelta: {x: 127.2, y: 33.125}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1091151930144477597
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1597479055163298302}
m_CullTransparentMesh: 0
--- !u!114 &6827508354133794526
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1597479055163298302}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, 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_FontData:
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 3
m_MaxSize: 50
m_Alignment: 7
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: +88
--- !u!1 &2066763438172914823 --- !u!1 &2066763438172914823
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -39136,6 +39217,85 @@ MonoBehaviour:
m_FillClockwise: 1 m_FillClockwise: 1
m_FillOrigin: 0 m_FillOrigin: 0
m_UseSpriteMesh: 0 m_UseSpriteMesh: 0
--- !u!1 &3519125261167570629
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6193489970714018668}
- component: {fileID: 6593720557690555738}
- component: {fileID: 5584268453037143474}
m_Layer: 5
m_Name: rightUplv
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6193489970714018668
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3519125261167570629}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.9009009, y: 0.9009009, z: 1}
m_Children: []
m_Father: {fileID: 224550793111032812}
m_RootOrder: 11
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: 32.199997, y: 47.13}
m_SizeDelta: {x: 61.8, y: 34.29}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6593720557690555738
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3519125261167570629}
m_CullTransparentMesh: 0
--- !u!114 &5584268453037143474
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3519125261167570629}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, 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_FontData:
m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3}
m_FontSize: 30
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 3
m_MaxSize: 50
m_Alignment: 5
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: +88
--- !u!1 &3721601256782621991 --- !u!1 &3721601256782621991
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -140170,8 +140170,8 @@ RectTransform:
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.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 48, y: 44} m_AnchoredPosition: {x: 58, y: 49}
m_SizeDelta: {x: 40, y: 40} m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5191567546156269120 --- !u!222 &5191567546156269120
CanvasRenderer: CanvasRenderer:
@ -140201,7 +140201,7 @@ MonoBehaviour:
m_Calls: [] m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 4080a1963cb778b47b33972e55bd5d9d, type: 3} m_Sprite: {fileID: 21300000, guid: f9ea4c4aff328ff4abcc21aae0a4fa10, type: 3}
m_Type: 0 m_Type: 0
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
@ -144984,7 +144984,7 @@ GameObject:
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 0
--- !u!224 &268016902880247916 --- !u!224 &268016902880247916
RectTransform: RectTransform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -145000,10 +145000,10 @@ RectTransform:
m_Father: {fileID: 224358324289722092} m_Father: {fileID: 224358324289722092}
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: 0, y: 0} m_AnchoredPosition: {x: 97.10004, y: -82}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 155, y: 85}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1834664782885917125 --- !u!222 &1834664782885917125
CanvasRenderer: CanvasRenderer:
@ -179039,8 +179039,8 @@ RectTransform:
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.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 48, y: 44} m_AnchoredPosition: {x: 58, y: 49}
m_SizeDelta: {x: 40, y: 40} m_SizeDelta: {x: 20, y: 20}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6052895282540631022 --- !u!222 &6052895282540631022
CanvasRenderer: CanvasRenderer:
@ -179070,7 +179070,7 @@ MonoBehaviour:
m_Calls: [] m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 4080a1963cb778b47b33972e55bd5d9d, type: 3} m_Sprite: {fileID: 21300000, guid: f9ea4c4aff328ff4abcc21aae0a4fa10, type: 3}
m_Type: 0 m_Type: 0
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1

View File

@ -1082,7 +1082,7 @@ JumpType = {
NPCPosType={ NPCPosType={
maincity=1, maincity=1,
onHook = 2, onHook = 2,
smallMap = 3,
} }
YaoHunFrame = { YaoHunFrame = {

View File

@ -30,6 +30,7 @@ ARENARECORDINFORESPONSE_ARENARECORDINFO_FIELD = protobuf.FieldDescriptor();
PLAYWITHSBREQUEST = protobuf.Descriptor(); PLAYWITHSBREQUEST = protobuf.Descriptor();
PLAYWITHSBREQUEST_CHALLENGEUID_FIELD = protobuf.FieldDescriptor(); PLAYWITHSBREQUEST_CHALLENGEUID_FIELD = protobuf.FieldDescriptor();
PLAYWITHSBREQUEST_MYTEAMID_FIELD = protobuf.FieldDescriptor(); PLAYWITHSBREQUEST_MYTEAMID_FIELD = protobuf.FieldDescriptor();
PLAYWITHSBREQUEST_CROSS_FIELD = protobuf.FieldDescriptor();
PLAYWITHSBRESPONSE = protobuf.Descriptor(); PLAYWITHSBRESPONSE = protobuf.Descriptor();
PLAYWITHSBRESPONSE_FIGHTDATA_FIELD = protobuf.FieldDescriptor(); PLAYWITHSBRESPONSE_FIGHTDATA_FIELD = protobuf.FieldDescriptor();
CHAMPIONGETINFORESPONSE = protobuf.Descriptor(); CHAMPIONGETINFORESPONSE = protobuf.Descriptor();
@ -327,11 +328,21 @@ PLAYWITHSBREQUEST_MYTEAMID_FIELD.default_value = 0
PLAYWITHSBREQUEST_MYTEAMID_FIELD.type = 5 PLAYWITHSBREQUEST_MYTEAMID_FIELD.type = 5
PLAYWITHSBREQUEST_MYTEAMID_FIELD.cpp_type = 1 PLAYWITHSBREQUEST_MYTEAMID_FIELD.cpp_type = 1
PLAYWITHSBREQUEST_CROSS_FIELD.name = "cross"
PLAYWITHSBREQUEST_CROSS_FIELD.full_name = ".rpc.protocols.PlayWithSbRequest.cross"
PLAYWITHSBREQUEST_CROSS_FIELD.number = 3
PLAYWITHSBREQUEST_CROSS_FIELD.index = 2
PLAYWITHSBREQUEST_CROSS_FIELD.label = 1
PLAYWITHSBREQUEST_CROSS_FIELD.has_default_value = false
PLAYWITHSBREQUEST_CROSS_FIELD.default_value = 0
PLAYWITHSBREQUEST_CROSS_FIELD.type = 5
PLAYWITHSBREQUEST_CROSS_FIELD.cpp_type = 1
PLAYWITHSBREQUEST.name = "PlayWithSbRequest" PLAYWITHSBREQUEST.name = "PlayWithSbRequest"
PLAYWITHSBREQUEST.full_name = ".rpc.protocols.PlayWithSbRequest" PLAYWITHSBREQUEST.full_name = ".rpc.protocols.PlayWithSbRequest"
PLAYWITHSBREQUEST.nested_types = {} PLAYWITHSBREQUEST.nested_types = {}
PLAYWITHSBREQUEST.enum_types = {} PLAYWITHSBREQUEST.enum_types = {}
PLAYWITHSBREQUEST.fields = {PLAYWITHSBREQUEST_CHALLENGEUID_FIELD, PLAYWITHSBREQUEST_MYTEAMID_FIELD} PLAYWITHSBREQUEST.fields = {PLAYWITHSBREQUEST_CHALLENGEUID_FIELD, PLAYWITHSBREQUEST_MYTEAMID_FIELD, PLAYWITHSBREQUEST_CROSS_FIELD}
PLAYWITHSBREQUEST.is_extendable = false PLAYWITHSBREQUEST.is_extendable = false
PLAYWITHSBREQUEST.extensions = {} PLAYWITHSBREQUEST.extensions = {}
PLAYWITHSBRESPONSE_FIGHTDATA_FIELD.name = "fightData" PLAYWITHSBRESPONSE_FIGHTDATA_FIELD.name = "fightData"

View File

@ -163,7 +163,7 @@ function ExpeditionMainPanel:OnOpen()
if self.liveNode then if self.liveNode then
self.liveNode:OnClose() self.liveNode:OnClose()
end end
self.liveNode = PlayerLiveView:New(Util.GetTransform(self.parent, "playerLive"),1,nil,self.sortingOrder) self.liveNode = PlayerLiveView:New(Util.GetTransform(self.parent, "playerLive"),1,nil,self.sortingOrder,NPCPosType.smallMap)
self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale10,nil,WALK_DIR.IDLE_FRONT) self.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale10,nil,WALK_DIR.IDLE_FRONT)
if ExpeditionManager.ExpeditionState == 3 then if ExpeditionManager.ExpeditionState == 3 then
ExpeditionManager.SetExpeditionState(1) ExpeditionManager.SetExpeditionState(1)

View File

@ -847,7 +847,7 @@ function this.RefreshLittleMap()
if this.liveNode then if this.liveNode then
this.liveNode:OnClose() this.liveNode:OnClose()
end end
this.liveNode = PlayerLiveView:New(this.btnMap.transform,1,nil,orginLayer) this.liveNode = PlayerLiveView:New(this.btnMap.transform,1,nil,orginLayer,NPCPosType.smallMap)
this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale3,Vector3.New(0,-40,0)) this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale3,Vector3.New(0,-40,0))
if FightPointPassManager.GetRoleDirection()==1 then if FightPointPassManager.GetRoleDirection()==1 then
this.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT) this.liveNode:SetWalkDir(WALK_DIR.RUN_LEFT)

View File

@ -39,6 +39,7 @@ function this:Init(_curSmallFightId,_IsPlayAni,_openPanel)
end end
this.liveNode = PlayerLiveView:New(Util.GetGameObject(rootParent, "mapParent/selectMap/Image (1)/roleRoot"),1) this.liveNode = PlayerLiveView:New(Util.GetGameObject(rootParent, "mapParent/selectMap/Image (1)/roleRoot"),1)
this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale5,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT) this.liveNode:OnOpen(GetPlayerRoleSingleConFig().Scale5,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
this.liveNode:SetTitleHide()
this:LoadMapData() this:LoadMapData()
if IsPlayAni then if IsPlayAni then
isWalk = true isWalk = true

View File

@ -6,8 +6,12 @@ local this = JumpServerHightLadderFormation
this.IsNeedChangeFormation = false this.IsNeedChangeFormation = false
--- 初始化 --- 初始化
function this.Init(root) this.isDemonstrateTheir = false
this.pData = nil
function this.Init(root,_isDemonstrateTheir,_pData)--isDemonstrateTheir是否是切磋
this.root = root this.root = root
this.isDemonstrateTheir = _isDemonstrateTheir or false
this.pData = _pData or nil
this.InitView() this.InitView()
end end
--- 获取需要显示的编队id --- 获取需要显示的编队id
@ -29,19 +33,44 @@ function this.On_Btn2_Click()
PopupTipPanel.ShowTip(string.format(Language[10701], 1)) PopupTipPanel.ShowTip(string.format(Language[10701], 1))
return return
end end
this.root:ClosePanel() if this.isDemonstrateTheir then
-- 如果未打开则打开 -- 请求开始挑战
PlayerManager.RequestPlayWithSomeOne(this.pData.uid, FormationTypeDef.JUMPSERVER_HIGHTLADDER, this.pData.name, function(result)
this.root:ClosePanel()
local arg = {}
arg.result = result.result
arg.blue = {}
arg.blue.uid = PlayerManager.uid
arg.blue.name = PlayerManager.nickName
arg.blue.head = PlayerManager.head
arg.blue.frame = HeadManager.GetCurFrameId()
arg.red= {}
arg.red.uid = this.pData.uid
arg.red.name = this.pData.name
arg.red.head = this.pData.head
arg.red.frame = this.pData.headFrame
-- 不用回放直接显示结果
UIManager.OpenPanel(UIName.ArenaResultPopup, arg)
end,this.isDemonstrateTheir)
else
this.root:ClosePanel()
-- 如果未打开则打开
end
end end
-- --
function this.InitView() function this.InitView()
this.root.bg:SetActive(true) this.root.bg:SetActive(true)
this.root.btn_2:SetActive(true) this.root.btn_2:SetActive(true)
this.root.btn_2_lab.text = Language[10715] this.root.btn_2_lab.text = Language[10715]
if this.isDemonstrateTheir then
this.root.btn_2_lab.text = Language[10729]
end
this.root.btn_1:SetActive(true) this.root.btn_1:SetActive(true)
this.root.btn_1_lab.text = Language[10710] this.root.btn_1_lab.text = Language[10710]
this.root.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.JumpServerHightLadder }) this.root.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.JumpServerHightLadder })
end end
function this.On_Btn1_Click() function this.On_Btn1_Click()

View File

@ -2,6 +2,7 @@ GuideManager = {}
local this = GuideManager local this = GuideManager
local GuideConfig = ConfigManager.GetConfig(ConfigName.GuideConfig) local GuideConfig = ConfigManager.GetConfig(ConfigName.GuideConfig)
local GlobalSystemConfig = ConfigManager.GetConfig(ConfigName.GlobalSystemConfig) local GlobalSystemConfig = ConfigManager.GetConfig(ConfigName.GlobalSystemConfig)
local SpecialConfig = ConfigManager.GetConfig(ConfigName.SpecialConfig)
local openDic = {} local openDic = {}
local funcDic = {} local funcDic = {}
@ -59,6 +60,9 @@ function this.OnLevelChange()
this.CheckFuncGuide() this.CheckFuncGuide()
elseif PlayerManager.level == 22 then elseif PlayerManager.level == 22 then
StoryMapManager.isShowStory = 3 StoryMapManager.isShowStory = 3
elseif PlayerManager.level == tonumber(SpecialConfig[89].Value) then
table.insert(_FuncGuideList, 103000)
this.CheckFuncGuide()
end end
end end
-- --

View File

@ -2832,13 +2832,33 @@ function this.GetFormationHeroRedPoint()
local teamHero = FormationManager.GetWuJinFormationHeroIds(FormationTypeDef.FORMATION_NORMAL) local teamHero = FormationManager.GetWuJinFormationHeroIds(FormationTypeDef.FORMATION_NORMAL)
for i, v in pairs(teamHero) do for i, v in pairs(teamHero) do
local curHeroData = HeroManager.GetSingleHeroData(i) local curHeroData = HeroManager.GetSingleHeroData(i)
local isCanUpEquipTreasure
local config = ConfigManager.GetConfigData(ConfigName.SpecialConfig,40)
if config then
local limits = string.split(config.Value, "|")
if limits then
local heroConfig = curHeroData.heroConfig
local lvs = string.split(limits[1], "#")
local stars = string.split(limits[2], "#")
if PlayerManager.level >= tonumber(lvs[2]) and heroConfig ~= nil and heroConfig.MaxRank >= tonumber(stars[2]) then
isCanUpEquipTreasure = true
else
isCanUpEquipTreasure = false
end
else
isCanUpEquipTreasure = false
end
else
isCanUpEquipTreasure = false
end
if if
this.GetCurHeroUpLvOrUpStarSData(curHeroData) or this.LvUpBtnRedPoint(curHeroData) or this.GetCurHeroUpLvOrUpStarSData(curHeroData) or this.LvUpBtnRedPoint(curHeroData) or
this.IsShowUpStarRedPoint(curHeroData) or this.IsShowUpStarRedPoint(curHeroData) or
#this.GetHeroIsUpEquip(curHeroData.dynamicId) > 0 or #this.GetHeroIsUpEquip(curHeroData.dynamicId) > 0 or
this.GetIsShowSoulPrintRedPoint(curHeroData) or this.GetIsShowSoulPrintRedPoint(curHeroData) or
this.GetIsShowTalismanRedPoint(curHeroData) this.GetIsShowTalismanRedPoint(curHeroData) or
then (isCanUpEquipTreasure and #HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,0) > 0)
then
return true return true
end end
end end
@ -2859,11 +2879,32 @@ function this.GetAllHeroCompoundRedPoint()
end end
--单个英雄所有红点判断 --单个英雄所有红点判断
function this.GetCurHeroIsShowRedPoint(curHeroData) function this.GetCurHeroIsShowRedPoint(curHeroData)
local isCanUpEquipTreasure
local config = ConfigManager.GetConfigData(ConfigName.SpecialConfig,40)
if config then
local limits = string.split(config.Value, "|")
if limits then
local heroConfig = curHeroData.heroConfig
local lvs = string.split(limits[1], "#")
local stars = string.split(limits[2], "#")
if PlayerManager.level >= tonumber(lvs[2]) and heroConfig ~= nil and heroConfig.MaxRank >= tonumber(stars[2]) then
isCanUpEquipTreasure = true
else
isCanUpEquipTreasure = false
end
else
isCanUpEquipTreasure = false
end
else
isCanUpEquipTreasure = false
end
return this.GetCurHeroUpLvOrUpStarSData(curHeroData) or this.LvUpBtnRedPoint(curHeroData) or return this.GetCurHeroUpLvOrUpStarSData(curHeroData) or this.LvUpBtnRedPoint(curHeroData) or
this.IsShowUpStarRedPoint(curHeroData) or this.IsShowUpStarRedPoint(curHeroData) or
#this.GetHeroIsUpEquip(curHeroData.dynamicId) > 0 or #this.GetHeroIsUpEquip(curHeroData.dynamicId) > 0 or
this.GetIsShowSoulPrintRedPoint(curHeroData) or this.GetIsShowSoulPrintRedPoint(curHeroData) or
this.GetIsShowTalismanRedPoint(curHeroData) this.GetIsShowTalismanRedPoint(curHeroData) or
(#this.GetHeroIsUpTreasure(curHeroData.dynamicId,0) > 0 and isCanUpEquipTreasure)
end end
--获取当前英雄的下一突破 和 升星 静态数据 --获取当前英雄的下一突破 和 升星 静态数据
function this.GetCurHeroUpLvOrUpStarSData(curHeroData) function this.GetCurHeroUpLvOrUpStarSData(curHeroData)
@ -3047,6 +3088,7 @@ function this.GetHeroIsUpEquip(heroDid)
end end
end end
--有同系 且未在英雄身上的装备 --有同系 且未在英雄身上的装备
local equips = BagManager.GetEquipDataByEquipPosition(heroData.heroConfig.Profession) local equips = BagManager.GetEquipDataByEquipPosition(heroData.heroConfig.Profession)
@ -3094,6 +3136,77 @@ function this.GetHeroIsUpEquip(heroDid)
end end
return {} return {}
end end
--宝物
function this.GetHeroIsUpTreasure(heroDid,pos)
if heroDatas[heroDid] then
local heroData = heroDatas[heroDid]
local lackEquips = {}
for i = 1, 2 do
local equipIdAndWarPower = {}
equipIdAndWarPower.pos = i
equipIdAndWarPower.id = "0"
equipIdAndWarPower.warPower = 0
lackEquips[i] = equipIdAndWarPower
end
-- 有装备的位置赋值装备id及战力
if heroData.jewels and #heroData.jewels > 0 then
for i = 1, #heroData.jewels do
if not heroData.jewels[i] then
else
local curEquipConFigData =
EquipTreasureManager.GetSingleTreasureByIdDyn(heroData.jewels[i])
if not curEquipConFigData then
LogBlue("-------------------------"..heroData.jewels[i] .. " " .. heroDid)
else
lackEquips[curEquipConFigData.equipType].id = heroData.jewels[i]
lackEquips[curEquipConFigData.equipType].warPower =
EquipTreasureManager.CalculateWarForce(heroData.jewels[i])
end
end
end
end
local allEquipTreasures = EquipTreasureManager.GetAllTreasuresByLocation(pos, heroData.heroConfig.PropertyName)
for k, v in ipairs(allEquipTreasures) do
--比较战力 高战力的装备add
if lackEquips[v.equipType].id == "0" then
lackEquips[v.equipType].id = v.idDyn
lackEquips[v.equipType].warPower = EquipTreasureManager.CalculateWarForce(v.idDyn)
else
local nextEquipWarPower = EquipTreasureManager.CalculateWarForce(v.idDyn)
if nextEquipWarPower > lackEquips[v.equipType].warPower then
lackEquips[v.equipType].id = v.idDyn
lackEquips[v.equipType].warPower = EquipTreasureManager.CalculateWarForce(v.idDyn)
end
end
end
--去掉与自己本身自带的重合装备
local allUpEquipDidTabs = {}
for k,v in pairs(lackEquips) do
if v.id ~= "0" then
local isAdd = true
for j = 1, #heroData.jewels do
if heroData.jewels[j] == v.id then
isAdd = false
end
end
if isAdd then
table.insert(allUpEquipDidTabs, v.id)
end
end
end
if #allUpEquipDidTabs > 0 then
return allUpEquipDidTabs
end
return {}
end
return {}
end
--单个英雄魂印红点 --单个英雄魂印红点
--获取魂印环形布局数据 didMaxLen最大槽位数量 didLen可装备槽位数量 didLv最大动态等级 maxLv配置最大等级 --获取魂印环形布局数据 didMaxLen最大槽位数量 didLen可装备槽位数量 didLv最大动态等级 maxLv配置最大等级
function this.GetSoulPrintLoopUIMaxData() function this.GetSoulPrintLoopUIMaxData()
@ -3603,4 +3716,8 @@ function this.GetEquipedEquipList()
end end
return EquipedEquipList return EquipedEquipList
end end
function this.CheckIsUp()
end
return this return this

View File

@ -143,7 +143,7 @@ function this.InitRolePre(u, v)
this.NpcGO:OnClose() this.NpcGO:OnClose()
end end
Util.GetTransform(this.leader, "root/ui/nemeDi").gameObject:SetActive(false) Util.GetTransform(this.leader, "root/ui/nemeDi").gameObject:SetActive(false)
this.NpcGO = PlayerLiveView:New(Util.GetTransform(this.leader, "root/ui/roleRoot"),1) this.NpcGO = PlayerLiveView:New(Util.GetTransform(this.leader, "root/ui/roleRoot"),1,nil,MapPanel.sortingOrder)
this.NpcGO:OnOpen(GetPlayerRoleSingleConFig().Scale9,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT) this.NpcGO:OnOpen(GetPlayerRoleSingleConFig().Scale9,Vector3.New(0,40,0),WALK_DIR.IDLE_FRONT)
this.NpcGO:RemoveTitleCanvas() this.NpcGO:RemoveTitleCanvas()
end end

View File

@ -1781,10 +1781,11 @@ function this.RequestGetFriendInfo(type, func)
end end
-- 好友切磋 -- 好友切磋
function this.RequestPlayWithSomeOne(uid, teamId, func) function this.RequestPlayWithSomeOne(uid, teamId,isDemonstrateTheir, func)
local data = ArenaInfoProto_pb.PlayWithSbRequest() local data = ArenaInfoProto_pb.PlayWithSbRequest()
data.challengeUid = uid data.challengeUid = uid
data.myteamId = teamId data.myteamId = teamId
data.cross = isDemonstrateTheir and 1 or 0
local msg = data:SerializeToString() local msg = data:SerializeToString()
Network:SendMessageWithCallBack(MessageTypeProto_pb.PLAY_WITH_SB_REQUEST, MessageTypeProto_pb.PLAY_WITH_SB_RESPONSE, msg, function(buffer) Network:SendMessageWithCallBack(MessageTypeProto_pb.PLAY_WITH_SB_REQUEST, MessageTypeProto_pb.PLAY_WITH_SB_RESPONSE, msg, function(buffer)
local data = buffer:DataByte() local data = buffer:DataByte()

View File

@ -330,12 +330,13 @@ end
-------------------------------------------- --------------------------------------------
-- 切磋 -- 切磋
function this.RequestPlayWithSomeOne(uid, teamId, tname, func) function this.RequestPlayWithSomeOne(uid, teamId, tname, func,_isDemonstrateTheir)
if uid == PlayerManager.uid then if uid == PlayerManager.uid then
PopupTipPanel.ShowTip(Language[11398]) PopupTipPanel.ShowTip(Language[11398])
return return
end end
NetManager.RequestPlayWithSomeOne(uid, teamId, function(msg) local isDemonstrateTheir = _isDemonstrateTheir or false
NetManager.RequestPlayWithSomeOne(uid, teamId,isDemonstrateTheir, function(msg)
local fightData = BattleManager.GetBattleServerData({fightData = msg.fightData}, 1) local fightData = BattleManager.GetBattleServerData({fightData = msg.fightData}, 1)
if tname then if tname then
tname = PlayerManager.nickName .."|" .. tname tname = PlayerManager.nickName .."|" .. tname

View File

@ -3,7 +3,7 @@ local PlayerInfoPopup = Inherit(BasePanel)
local this = PlayerInfoPopup local this = PlayerInfoPopup
local netserverName = nil local netserverName = nil
local XiuXianSkillConfig = ConfigManager.GetConfig(ConfigName.XiuXianSkillConfig) local XiuXianSkillConfig = ConfigManager.GetConfig(ConfigName.XiuXianSkillConfig)
local isNpc = false--是否是机器人
local _ViewConfig = { local _ViewConfig = {
[PLAYER_INFO_VIEW_TYPE.NORMAL] = { [PLAYER_INFO_VIEW_TYPE.NORMAL] = {
formationType = FormationTypeDef.FORMATION_NORMAL, formationType = FormationTypeDef.FORMATION_NORMAL,
@ -50,7 +50,8 @@ local _ViewConfig = {
formationType = FormationTypeDef.JUMPSERVER_HIGHTLADDER, formationType = FormationTypeDef.JUMPSERVER_HIGHTLADDER,
tip = "罗浮争锋阵容:", tip = "罗浮争锋阵容:",
btnType = { btnType = {
{name = "挑战", func = 6}, -- {name = "挑战", func = 6},
{name = "切磋", func = 6},
} }
}, },
} }
@ -157,6 +158,7 @@ function PlayerInfoPopup:OnOpen(playerId, viewType,serverName)
this._PlayerId = playerId this._PlayerId = playerId
this._ViewType = viewType or PLAYER_INFO_VIEW_TYPE.NORMAL this._ViewType = viewType or PLAYER_INFO_VIEW_TYPE.NORMAL
this.serverName = serverName--跨服加的服务器数据 this.serverName = serverName--跨服加的服务器数据
isNpc = this._PlayerId <= 1000000
-- 界面类型修正 -- 界面类型修正
if this._ViewType == PLAYER_INFO_VIEW_TYPE.NORMAL and GoodFriendManager.IsInBlackList(this._PlayerId) then if this._ViewType == PLAYER_INFO_VIEW_TYPE.NORMAL and GoodFriendManager.IsInBlackList(this._PlayerId) then
this._ViewType = PLAYER_INFO_VIEW_TYPE.GO_TO_BLACK this._ViewType = PLAYER_INFO_VIEW_TYPE.GO_TO_BLACK
@ -415,7 +417,7 @@ function this.RefreshBtnShow()
end end
-- 判断该界面类型是否有按钮显示 -- 判断该界面类型是否有按钮显示
LogYellow("this._ViewType "..this._ViewType.." "..tostring(not JumpServerManager.GetCurPersonInfo())) LogYellow("this._ViewType "..this._ViewType.." "..tostring(not JumpServerManager.GetCurPersonInfo()))
if not this._Config or not this._Config.btnType or (this._ViewType == PLAYER_INFO_VIEW_TYPE.JUPMSERVER and not JumpServerManager.GetCurPersonInfo()) then if not this._Config or not this._Config.btnType or isNpc then--or (this._ViewType == PLAYER_INFO_VIEW_TYPE.JUPMSERVER and not JumpServerManager.GetCurPersonInfo())
this.boxLine:SetActive(false) this.boxLine:SetActive(false)
this.btnBox:SetActive(false) this.btnBox:SetActive(false)
this.addFriendBtn:SetActive(false) this.addFriendBtn:SetActive(false)
@ -492,26 +494,28 @@ function this.BeatHim()
end end
-- 跨服天梯 -- 跨服天梯
function this.JumpServerBattle() function this.JumpServerBattle()
local JoinRank = ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).JoinRank
if not JumpServerManager.GetHightLadderDataEnterable() then
PopupTipPanel.ShowTip("本服千战逐胜台前"..JoinRank.."名可以参加")
return
end
local JumpPanel = UIManager.GetOpenPanel(UIName.JumpServerHightLadderPanel)
if not JumpPanel then return end
local curData = JumpServerManager.GetCurPersonInfo()
if not curData then return end
this:ClosePanel() this:ClosePanel()
JumpPanel.BuyVipFun(1,1,function() UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.JUMPSERVER_HIGHTLADDER,true, this._PlayerData)
--直接战斗 -- local JoinRank = ConfigManager.GetConfigData(ConfigName.MServerArenaSetting,1).JoinRank
JumpServerManager.StarFightHightLadder(curData,0,function(msg) -- if not JumpServerManager.GetHightLadderDataEnterable() then
PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.JUMPSERVER_GIGHTLADDER_MIANFEINUM, 1)--更新特权 -- PopupTipPanel.ShowTip("本服千战逐胜台前"..JoinRank.."名可以参加")
JumpPanel = UIManager.GetOpenPanel(UIName.JumpServerHightLadderPanel) -- return
JumpPanel.RefreshBuyNum() -- end
JumpPanel.OnShowPanel() -- local JumpPanel = UIManager.GetOpenPanel(UIName.JumpServerHightLadderPanel)
JumpServerManager.SetCurPersonInfo(nil) -- if not JumpPanel then return end
end) -- local curData = JumpServerManager.GetCurPersonInfo()
end) -- if not curData then return end
-- this:ClosePanel()
-- JumpPanel.BuyVipFun(1,1,function()
-- --直接战斗
-- JumpServerManager.StarFightHightLadder(curData,0,function(msg)
-- PrivilegeManager.RefreshPrivilegeUsedTimes(PRIVILEGE_TYPE.JUMPSERVER_GIGHTLADDER_MIANFEINUM, 1)--更新特权
-- JumpPanel = UIManager.GetOpenPanel(UIName.JumpServerHightLadderPanel)
-- JumpPanel.RefreshBuyNum()
-- JumpPanel.OnShowPanel()
-- JumpServerManager.SetCurPersonInfo(nil)
-- end)
-- end)
end end
--界面关闭时调用(用于子类重写) --界面关闭时调用(用于子类重写)
function PlayerInfoPopup:OnClose() function PlayerInfoPopup:OnClose()

View File

@ -72,6 +72,18 @@ function this.GetTreasureDataByPos(_pos, _idDyn, PropertyName)
return equips return equips
end end
--获取玩家穿戴的宝物
function this.GetAllHeroEquipedTreasureData()
local equips = {}
for i, v in pairs(allTreasures) do
if (v.upHeroDid == "" or v.upHeroDid == 0) then
else
table.insert(equips, v)
end
end
return equips
end
function this.OpenTreasure(star) function this.OpenTreasure(star)
local config = ConfigManager.GetConfigData(40) local config = ConfigManager.GetConfigData(40)
local configs = string.split(config.Value, "|") local configs = string.split(config.Value, "|")
@ -376,7 +388,7 @@ function this.GetAllTreasuresByLocation(Location, PropertyName)
local curAllEquipTreasure = {} local curAllEquipTreasure = {}
for key, value in pairs(allTreasures) do for key, value in pairs(allTreasures) do
if if
(value.upHeroDid == "" or value.upHeroDid == "0" ) and jewelConfig[value.id].Location == Location and (value.upHeroDid == "" or value.upHeroDid == "0" ) and (Location == 0 or jewelConfig[value.id].Location == Location) and
jewelConfig[value.id].Race == PropertyName jewelConfig[value.id].Race == PropertyName
then then
table.insert(curAllEquipTreasure, value) table.insert(curAllEquipTreasure, value)
@ -496,6 +508,7 @@ function this.CalculateWarForce(Did)
if curTreasure then if curTreasure then
return this.CalculateWarForceBase(curTreasure.id, curTreasure.lv, curTreasure.refineLv) return this.CalculateWarForceBase(curTreasure.id, curTreasure.lv, curTreasure.refineLv)
end end
return 0
end end
function this.CalculateWarForceBase(sId, lv, rlv) function this.CalculateWarForceBase(sId, lv, rlv)
local curEuipTreaSureConfig = ConfigManager.GetConfigData(ConfigName.JewelConfig, sId) local curEuipTreaSureConfig = ConfigManager.GetConfigData(ConfigName.JewelConfig, sId)

View File

@ -4,8 +4,6 @@ local itemConfig=ConfigManager.GetConfig(ConfigName.ItemConfig)
local jewelConfig=ConfigManager.GetConfig(ConfigName.JewelConfig) local jewelConfig=ConfigManager.GetConfig(ConfigName.JewelConfig)
local this=EquipTreasureStrongPopup local this=EquipTreasureStrongPopup
local curEquipData local curEquipData
local properList={}
local costItemPreList={}
local haveTreasures={} local haveTreasures={}
local type local type
local isMatEnough=true local isMatEnough=true
@ -13,37 +11,39 @@ local matId=0
local isCoinEnough=true local isCoinEnough=true
local isMax=false local isMax=false
local isEnough = false local isEnough = false
local curIndex = 0
--初始化组件(用于子类重写) --初始化组件(用于子类重写)
function EquipTreasureStrongPopup:InitComponent() function EquipTreasureStrongPopup:InitComponent()
this.spLoader = SpriteLoader.New() this.spLoader = SpriteLoader.New()
this.btnBack= Util.GetGameObject(self.transform, "bg/btnBack") this.content = Util.GetGameObject(self.transform, "bg/content")
this.titleTxt=Util.GetGameObject(self.transform, "bg/name"):GetComponent("Text") this.btnBack= Util.GetGameObject(this.content,"btnBack")
this.equipFrame=Util.GetGameObject(self.transform, "bg/armorInfo/frame"):GetComponent("Image") this.titleTxt=Util.GetGameObject(this.content,"name"):GetComponent("Text")
this.equipIcon=Util.GetGameObject(self.transform, "bg/armorInfo/icon"):GetComponent("Image") this.itemPre = Util.GetGameObject(this.content,"itemView")
this.equipName=Util.GetGameObject(self.transform, "bg/armorInfo/nameTxt"):GetComponent("Text") this.firstScroll=Util.GetGameObject(this.content,"firstScroll")
this.equipQuaTxt=Util.GetGameObject(self.transform, "bg/armorInfo/equipQuaText"):GetComponent("Text") this.properItemPre = Util.GetGameObject(this.content,"propertyPre")
this.btn_strong=Util.GetGameObject(self.transform, "bg/btnGrid/btnStrong") this.propertyGrid=Util.GetGameObject(this.content,"secondScroll/grid")
this.btn_refine=Util.GetGameObject(self.transform, "bg/btnGrid/btnRefine") this.costItemGrid=Util.GetGameObject(this.content,"costGrid")
this.btn_strongPage=Util.GetGameObject(self.transform, "bg/btnList/btnStrong") this.hintTxt=Util.GetGameObject(this.content,"hintTxt"):GetComponent("Text")
this.btn_refinePage=Util.GetGameObject(self.transform, "bg/btnList/btnRefine") this.btnRefine=Util.GetGameObject(this.content,"btnGrid/btnRefine")
this.coinImg=Util.GetGameObject(self.transform, "bg/coinImg"):GetComponent("Image") this.btnRefineText = Util.GetGameObject(this.btnRefine,"Text"):GetComponent("Text")
this.coinTxt=Util.GetGameObject(self.transform, "bg/coinNumTxt"):GetComponent("Text") this.btnStrong=Util.GetGameObject(this.content,"btnGrid/btnStrong")
this.coinBg=Util.GetGameObject(self.transform, "bg/coinBg") this.btnStrongText = Util.GetGameObject(this.btnStrong,"Text"):GetComponent("Text")
this.costItemPre=Util.GetGameObject(self.transform, "bg/costItemPre") this.btn_strongPage=Util.GetGameObject(this.content,"btnList/btnStrong")
this.costItemPre.gameObject:SetActive(false) this.btn_refinePage=Util.GetGameObject(this.content,"btnList/btnRefine")
this.properItemPre=Util.GetGameObject(self.transform, "bg/propertyPre") this.selectBtn=Util.GetGameObject(this.content,"btnList/selectBtn")
this.costItemGrid=Util.GetGameObject(self.transform, "bg/costGrid") this.treasureDatas = {}
this.propertyGrid=Util.GetGameObject(self.transform, "bg/scroll/grid") this.costTreasureDatas = {}
this.equipLvTxt=Util.GetGameObject(self.transform, "bg/armorInfo/lvTxt"):GetComponent("Text") this.properList = {}
this.equipRefineLvTxt=Util.GetGameObject(self.transform, "bg/armorInfo/refineLv"):GetComponent("Text") this.properList[0] = {}
this.selectBtn=Util.GetGameObject(self.transform,"bg/btnList/selectBtn") this.properList[0].go = this.properItemPre
this.lvTxt=Util.GetGameObject(self.transform,"bg/propertyPre/leftTxt"):GetComponent("Text") this.properList[0].leftTxt = Util.GetGameObject(this.properItemPre,"leftTxt"):GetComponent("Text")
this.lvValueTxt=Util.GetGameObject(self.transform,"bg/propertyPre/rightTxt"):GetComponent("Text") this.properList[0].rightTxt = Util.GetGameObject(this.properItemPre,"rightTxt"):GetComponent("Text")
this.proImg=Util.GetGameObject(self.transform,"bg/armorInfo/proImg"):GetComponent("Image") local rootHight = this.firstScroll.transform.rect.height
this.hintTxt=Util.GetGameObject(self.transform,"bg/hintTxt"):GetComponent("Text") local rootWidth=this.firstScroll.transform.rect.width
this.firstScrollCycleView = SubUIManager.Open(SubUIConfig.ScrollCycleView,this.firstScroll.transform,this.itemPre,nil, Vector2.New(rootWidth,rootHight), 1, 5, Vector2.New(15,30))
this.gongming = Util.GetGameObject(this.content,"gongming")
this.gongming.gameObject:SetActive(false)
this.select = Util.GetGameObject(this.content,"select")
end end
--绑定事件(用于子类重写) --绑定事件(用于子类重写)
@ -55,20 +55,17 @@ function EquipTreasureStrongPopup:BindEvent()
end) end)
--强化页签 --强化页签
Util.AddClick(this.btn_strongPage, function() Util.AddClick(this.btn_strongPage, function()
if HarmonyManager.IsInfo(curEquipData.upHeroDid) then this:SetWindShow(1)
-- body
PopupTipPanel.ShowTip(Language[12184])
else
this.SetWindShow(1)
end
end) end)
--精炼页签 --精炼页签
Util.AddClick(this.btn_refinePage, function() Util.AddClick(this.btn_refinePage, function()
this.SetWindShow(2) this:SetWindShow(2)
end) end)
--强化按钮 --强化按钮
Util.AddClick(this.btn_strong, function() Util.AddClick(this.btnStrong, function()
if HarmonyManager.IsInfo(curEquipData.upHeroDid) then
return
end
--如果强化界面 强化到最高等级谈提示 精炼界面 就切界面 --如果强化界面 强化到最高等级谈提示 精炼界面 就切界面
if type==1 then if type==1 then
if isMax then if isMax then
@ -76,7 +73,7 @@ function EquipTreasureStrongPopup:BindEvent()
return return
end end
else else
this.SetWindShow(1) this:SetWindShow(1)
return return
end end
--材料是否足够 --材料是否足够
@ -91,7 +88,8 @@ function EquipTreasureStrongPopup:BindEvent()
end end
NetManager.EquipTreasureBuildRequest(curEquipData.idDyn,1,nil,function (msg) NetManager.EquipTreasureBuildRequest(curEquipData.idDyn,1,nil,function (msg)
EquipTreasureManager.ChangeTreasureLv(curEquipData.idDyn,type) EquipTreasureManager.ChangeTreasureLv(curEquipData.idDyn,type)
this.SetWindShow(type) this:SetWindShow(type)
this.treasureDatas[curIndex]:OnOpen(false, {curEquipData.id,0}, 1, true, false, false, 0,curEquipData.idDyn)
if isMax then if isMax then
PopupTipPanel.ShowTip(Language[11772]) PopupTipPanel.ShowTip(Language[11772])
else else
@ -107,7 +105,7 @@ function EquipTreasureStrongPopup:BindEvent()
end) end)
--精炼按钮 --精炼按钮
Util.AddClick(this.btn_refine, function() Util.AddClick(this.btnRefine, function()
--如果精炼界面 精炼到最高等级谈提示 否 强化界面 就切界面 --如果精炼界面 精炼到最高等级谈提示 否 强化界面 就切界面
if type==2 then if type==2 then
if isMax then if isMax then
@ -115,7 +113,7 @@ function EquipTreasureStrongPopup:BindEvent()
return return
end end
else else
this.SetWindShow(2) this:SetWindShow(2)
return return
end end
if isMatEnough==false then if isMatEnough==false then
@ -147,7 +145,8 @@ function EquipTreasureStrongPopup:BindEvent()
end end
end end
EquipTreasureManager.ChangeTreasureLv(curEquipData.idDyn,type) EquipTreasureManager.ChangeTreasureLv(curEquipData.idDyn,type)
this.SetWindShow(type) this:SetWindShow(type)
this.treasureDatas[curIndex]:OnOpen(false, {curEquipData.id,0}, 1, true, false, false, 0,curEquipData.idDyn)
if isMax then if isMax then
PopupTipPanel.ShowTip(Language[11774]) PopupTipPanel.ShowTip(Language[11774])
else else
@ -169,160 +168,186 @@ function EquipTreasureStrongPopup:OnOpen(...)
local datas={...} local datas={...}
curEquipData=datas[1] curEquipData=datas[1]
type=datas[2] type=datas[2]
end end
function EquipTreasureStrongPopup:OnShow() function EquipTreasureStrongPopup:OnShow()
this.SetWindShow(type) local datas = EquipTreasureManager.GetAllHeroEquipedTreasureData()
this.formationInfo = FormationManager.GetFormationByID(FormationTypeDef.FORMATION_NORMAL)
table.sort(datas,function(a,b)
local aIsMainFormation = this:GetHeroIsMainFormation(a.upHeroDid)
local bIsMainFormation = this:GetHeroIsMainFormation(b.upHeroDid)
if aIsMainFormation and bIsMainFormation then
if a.upHeroDid ~= b.upHeroDid then
return aIsMainFormation.position < bIsMainFormation.position
else
return a.equipType < b.equipType
end
elseif not aIsMainFormation and not bIsMainFormation then
if a.quantity == b.quantity then
return a.id < b.id
else
return a.quantity > b.quantity
end
else
return aIsMainFormation
end
end)
this:ShowTopDataList(datas)
this:SetWindShow(type)
end
function EquipTreasureStrongPopup:GetHeroIsMainFormation(HeroId)
for k,v in ipairs(this.formationInfo.teamHeroInfos) do
if HeroId == v.heroId then
return v
end
end
return nil
end
function EquipTreasureStrongPopup:ShowTopDataList(list)
if not this.treasureDatas then
this.treasureDatas = {}
end
this.firstScrollCycleView:ForeachItemGO(function(index, go)
go.gameObject:SetActive(false)
end)
this.firstScrollCycleView:SetData(list,function(index, go)
this:SetScrollPre(go,list[index],index)
end,false,false)
for i = 1,#list do
if list[i].idDyn == curEquipData.idDyn then
curIndex = i
this.firstScrollCycleView:SetIndex(i)
break
end
end
end
function EquipTreasureStrongPopup:SetScrollPre(go,data,_index)
if data.idDyn == curEquipData.idDyn then
this.select.transform:SetParent(go.transform)
this.select:GetComponent("RectTransform").anchoredPosition3D = Vector3.New(-8.5,6.8,0)
this.select.gameObject:SetActive(true)
end
go.gameObject:SetActive(true)
local btn = Util.GetGameObject(go,"btn")
local red = Util.GetGameObject(go,"red")
if not this.treasureDatas[_index] then
this.treasureDatas[_index] = SubUIManager.Open(SubUIConfig.ItemView,go.transform)
this.treasureDatas[_index].transform:SetAsFirstSibling()
end
this.treasureDatas[_index]:OnOpen(false, {data.id,0}, 1, true, false, false, 0,data.idDyn)
this.treasureDatas[_index].name:GetComponent("Text").text = HeroManager.GetSingleHeroData(data.upHeroDid).heroConfig.ReadingName
red.gameObject:SetActive(false)
Util.AddOnceClick(btn,function()
this.select.transform:SetParent(go.transform)
this.select:GetComponent("RectTransform").anchoredPosition3D = Vector3.New(-8.5,6.8,0)
this.select.gameObject:SetActive(true)
curEquipData = data
curIndex = _index
this:SetWindShow(type)
end)
end end
--设置界面显示 1.强化 2.精炼 --设置界面显示 1.强化 2.精炼
function this.SetWindShow(_index) function EquipTreasureStrongPopup:SetWindShow(_index)
haveTreasures = {} haveTreasures = {}
type=_index type = _index
LogBlue("curEquipData.idDyn:"..curEquipData.idDyn)
curEquipData = EquipTreasureManager.GetSingleEquipTreasreData(curEquipData.idDyn) curEquipData = EquipTreasureManager.GetSingleEquipTreasreData(curEquipData.idDyn)
isMatEnough=true isMatEnough=true
isCoinEnough=true isCoinEnough=true
this.equipFrame.sprite=this.spLoader:LoadSprite(curEquipData.frame) local items, propertyShow
this.equipIcon.sprite=this.spLoader:LoadSprite(curEquipData.icon) if _index == 1 then
this.equipName.text=curEquipData.name this.titleTxt.text = Language[11775]
this.proImg.sprite=this.spLoader:LoadSprite(curEquipData.proIcon) this.btnRefine:SetActive(false)
local items, coin this.btnStrong:SetActive(true)
if _index==1 then
this.titleTxt.text=Language[11775]
this.btn_refine:SetActive(false)
this.btn_strong:SetActive(true)
this.SetBtnSelect(this.btn_strongPage) this.SetBtnSelect(this.btn_strongPage)
--显示属性 isMax = curEquipData.lv == curEquipData.maxLv
this.lvTxt.text=string.format( Language[11776],curEquipData.lv,curEquipData.maxLv) this.properList[0].leftTxt.text = "强化等级"
isMax =curEquipData.lv==curEquipData.maxLv
if isMax then if isMax then
this.lvValueTxt.text = isMax and Language[11062] or string.format( "%d/%d",curEquipData.lv,curEquipData.maxLv) this.properList[0].rightTxt.text = Language[11062]
--Util.GetGameObject(this.btn_strong,"Text"):GetComponent("Text").text="已达上限" this.btnStrong.gameObject:SetActive(false)
--this.btn_refine.gameObject:SetActive(true)
this.btn_strong.gameObject:SetActive(false)
else else
Util.GetGameObject(this.btn_strong,"Text"):GetComponent("Text").text=Language[11777] this.btnStrongText.text = Language[11777]
this.lvValueTxt.text = isMax and Language[11062] or string.format( "%d/%d",curEquipData.lv+1,curEquipData.maxLv) this.properList[0].rightTxt.text = string.format( "%d/%d",curEquipData.lv+1,curEquipData.maxLv)
this.btn_refine.gameObject:SetActive(false)
end end
local info1=EquipTreasureManager.GetCurrLvAndNextLvPropertyValue(1,curEquipData.levelPool,curEquipData.lv) propertyShow = EquipTreasureManager.GetCurrLvAndNextLvPropertyValue(1,curEquipData.levelPool,curEquipData.lv)
this.SetPropertyShow(info1)
--显示消耗 --显示消耗
items,coin=this.GetCostItems(curEquipData.strongConfig) items = this:GetCostItems(curEquipData.strongConfig)
this.hintTxt.text=Language[11778] this.hintTxt.text=Language[11778]
else else
this.titleTxt.text=Language[11779] this.titleTxt.text=Language[11779]
this.btn_strong:SetActive(false) this.btnRefine:SetActive(true)
this.btn_refine:SetActive(true) this.btnStrong:SetActive(false)
this.SetBtnSelect(this.btn_refinePage) this.SetBtnSelect(this.btn_refinePage)
--显示属性
this.lvTxt.text=string.format( Language[11780],curEquipData.refineLv,curEquipData.maxRefineLv)
isMax=curEquipData.refineLv==curEquipData.maxRefineLv isMax=curEquipData.refineLv==curEquipData.maxRefineLv
if isMax then this.properList[0].leftTxt.text = "精炼等级"
this.lvValueTxt.text = isMax and Language[11062] or string.format( "%d/%s",curEquipData.refineLv,curEquipData.maxRefineLv) if isMax then
--Util.GetGameObject(this.btn_refine,"Text"):GetComponent("Text").text="已达上限" this.properList[0].rightTxt.text = Language[11062]
--this.btn_strong.gameObject:SetActive(true) this.btnRefine.gameObject:SetActive(false)
this.btn_refine.gameObject:SetActive(false)
else else
Util.GetGameObject(this.btn_refine,"Text"):GetComponent("Text").text=Language[11781] this.btnRefineText.text=Language[11781]
this.btn_strong.gameObject:SetActive(false) this.properList[0].rightTxt.text = string.format( "%d/%s",curEquipData.refineLv+1,curEquipData.maxRefineLv)
this.lvValueTxt.text = isMax and Language[11062] or string.format( "%d/%s",curEquipData.refineLv+1,curEquipData.maxRefineLv)
end end
local info2=EquipTreasureManager.GetCurrLvAndNextLvPropertyValue(2,curEquipData.refinePool,curEquipData.refineLv) propertyShow = EquipTreasureManager.GetCurrLvAndNextLvPropertyValue(2,curEquipData.refinePool,curEquipData.refineLv)
this.SetPropertyShow(info2) items = this:GetCostItems(curEquipData.refineConfig)
items,coin=this.GetCostItems(curEquipData.refineConfig)
this.hintTxt.text=Language[11782] this.hintTxt.text=Language[11782]
end end
this.hintTxt.gameObject:SetActive(isMax)
--显示消耗金币 if HarmonyManager.IsInfo(curEquipData.upHeroDid) and _index == 1 then
if coin and isMax==false then this.hintTxt.text = "共鸣中的宝物无法强化"
this.coinImg.gameObject:SetActive(true) this.hintTxt.gameObject:SetActive(true)
this.coinTxt.gameObject:SetActive(true)
this.coinBg.gameObject:SetActive(true)
this.coinImg.sprite=this.spLoader:LoadSprite(coin.icon)
if coin.isEnough then
this.coinTxt.text=string.format("<color=#816D4E>%s</color>",coin.needNum)
else
isCoinEnough=false
this.coinTxt.text=string.format("<color=#FF0000FF>%s</color>",coin.needNum)
end
else else
this.coinImg.gameObject:SetActive(false) this.hintTxt.gameObject:SetActive(isMax)
this.coinTxt.gameObject:SetActive(false) end
this.coinBg.gameObject:SetActive(false) this:SetPropertyShow(propertyShow)
this:CostShow(items)
end
function EquipTreasureStrongPopup:CostShow(items)
if not this.costItemPreList then
this.costItemPreList = {}
end end
--显示消耗物品 --显示消耗物品
if items and isMax==false then if items and isMax==false then
this.costItemGrid.gameObject:SetActive(true) this.costItemGrid.gameObject:SetActive(true)
local dataCount=table.getn(items) for i = 1,math.max(#items,#this.costItemPreList) do
local preCount=table.getn(costItemPreList) if not items[i] then
for i = 1, dataCount-preCount do this.costItemPreList[i].gameObject:SetActive(false)
local pre=newObjToParent(this.costItemPre,this.costItemGrid)
pre.transform.localScale = Vector3.one
pre.transform.localPosition = Vector3.zero
table.insert(costItemPreList,pre)
end
local index=1
for i, v in pairs(items) do
local obj=costItemPreList[index]
obj.gameObject:SetActive(true)
if v then
obj.gameObject:SetActive(true)
else else
obj.gameObject:SetActive(false) if not this.costItemPreList[i] then
end this.costItemPreList[i] = SubUIManager.Open(SubUIConfig.ItemView,this.costItemGrid.transform)
Util.GetGameObject(obj,"iconBg"):GetComponent("Image").sprite=this.spLoader:LoadSprite(v.frame)
Util.GetGameObject(obj,"icon"):GetComponent("Image").sprite=this.spLoader:LoadSprite(v.icon)
if jewelConfig[v.id] then
Util.GetGameObject(obj,"proImg"):SetActive(true)
Util.GetGameObject(obj,"proImg"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(itemConfig[v.id].PropertyName))
else
Util.GetGameObject(obj,"proImg"):SetActive(false)
end
if v.isEnough then
Util.GetGameObject(obj,"numTxt"):GetComponent("Text").text=string.format("<color=#816D4E>%s/%s</color>",v.haveNum,v.needNum)
else
--如果材料不足默认弹第一个不足的材料tip
if isMatEnough then
isMatEnough=false
matId=v.id
end end
Util.GetGameObject(obj,"numTxt"):GetComponent("Text").text=string.format("<color=#FF0000FF>%s/%s</color>",v.haveNum,v.needNum) this.costItemPreList[i].gameObject:SetActive(true)
end if items[i].id==curEquipData.id then
if v.id==curEquipData.id then this.costItemPreList[i]:OnOpen(false,{items[i].id,0}, 0.8, true, items[i].isEnough , false, 0)
if v.isEnough then
Util.GetGameObject(obj,"add").gameObject:SetActive(false)
else else
Util.GetGameObject(obj,"add").gameObject:SetActive(true) this.costItemPreList[i]:OnOpen(false,{items[i].id,0}, 0.8, true, false , false, 0)
end end
else if items[i].isEnough then
Util.GetGameObject(obj,"add").gameObject:SetActive(false) this.costItemPreList[i].name:GetComponent("Text").text = string.format("<color=#816D4E>%s/%s</color>",items[i].haveNum,items[i].needNum)
end
Util.AddClick(Util.GetGameObject(obj,"icon"),function ()
if jewelConfig[v.id] then
UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup,2,"",v.id,0,0)
else else
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,v.id) --如果材料不足默认弹第一个不足的材料tip
if isMatEnough then
isMatEnough=false
matId=items[i].id
end
this.costItemPreList[i].name:GetComponent("Text").text = string.format("<color=#FF0000FF>%s/%s</color>",items[i].haveNum,items[i].needNum)
end end
end)
index=index+1
end
for i = 1,#costItemPreList do
if i>=index then
costItemPreList[i]:SetActive(false)
end end
end end
else else
this.costItemGrid.gameObject:SetActive(false) this.costItemGrid.gameObject:SetActive(false)
end end
end end
--获取消耗物品数据 --获取消耗物品数据
function this.GetCostItems(_config) function EquipTreasureStrongPopup:GetCostItems(_config)
if _config==nil then if _config==nil then
return return
end end
@ -331,7 +356,6 @@ function this.GetCostItems(_config)
if exps==nil then if exps==nil then
return return
end end
local costCoin
local items={} local items={}
for i = 1,#exps do for i = 1,#exps do
local id=exps[i][1] local id=exps[i][1]
@ -343,12 +367,7 @@ function this.GetCostItems(_config)
item.haveNum=BagManager.GetItemCountById(id) item.haveNum=BagManager.GetItemCountById(id)
item.needNum=exps[i][2] item.needNum=exps[i][2]
item.isEnough=item.haveNum>=item.needNum item.isEnough=item.haveNum>=item.needNum
--消耗金币 items[i]=item
if id==14 then
costCoin=item
else
items[i]=item
end
end end
end end
if config.JewelExpend then if config.JewelExpend then
@ -416,37 +435,44 @@ end
--设置属性的显示 --设置属性的显示
function this.SetPropertyShow(_infos) function EquipTreasureStrongPopup:SetPropertyShow(_infos)
local dataCount=LengthOfTable(_infos) if this.hintTxt.gameObject.activeInHierarchy then
local preCount=#properList this.properList[0].go.gameObject:SetActive(false)
for i = 1, dataCount-preCount do this.propertyGrid.gameObject:SetActive(false)
local go = newObject(this.properItemPre) return
go.transform:SetParent(this.propertyGrid.transform)
go.transform.localScale = Vector3.one
go.transform.localPosition = Vector3.zero
go.gameObject:SetActive(false)
--properList[i] = go
table.insert(properList,go)
end end
local index=1 this.propertyGrid.gameObject:SetActive(true)
if type == 1 and HarmonyManager.IsInfo(curEquipData.upHeroDid) then
for i = 0, #this.properList do
this.properList[i].go.gameObject:SetActive(false)
end
--this.gongming.gameObject:SetActive(true)
return
end
--this.gongming.gameObject:SetActive(false)
this.properList[0].go.gameObject:SetActive(true)
for i = 1, #this.properList do
this.properList[i].go.gameObject:SetActive(false)
end
local index = 1
for key, value in pairs(_infos) do for key, value in pairs(_infos) do
local obj=properList[index] if not this.properList[index] then
this.properList[index] = {}
this.properList[index].go = newObjToParent(this.properItemPre,this.propertyGrid)
this.properList[index].leftTxt = Util.GetGameObject(this.properList[index].go,"leftTxt"):GetComponent("Text")
this.properList[index].rightTxt = Util.GetGameObject(this.properList[index].go,"rightTxt"):GetComponent("Text")
end
this.properList[index].go.gameObject:SetActive(true)
local proper=ConfigManager.GetConfigData(ConfigName.PropertyConfig,key) local proper=ConfigManager.GetConfigData(ConfigName.PropertyConfig,key)
if proper.Style==1 then if proper.Style==1 then
Util.GetGameObject(obj,"leftTxt"):GetComponent("Text").text=string.format("%s+%s",GetLanguageStrById(proper.Info),value.currValue) this.properList[index].leftTxt.text=string.format("%s+%s",GetLanguageStrById(proper.Info),value.currValue)
Util.GetGameObject(obj,"rightTxt"):GetComponent("Text").text= isMax and Language[11062] or value.nextValue this.properList[index].rightTxt.text= isMax and Language[11062] or value.nextValue
else else
Util.GetGameObject(obj,"leftTxt"):GetComponent("Text").text=GetLanguageStrById(proper.Info).."+"..value.currValue/100 .."%" this.properList[index].leftTxt.text=GetLanguageStrById(proper.Info).."+"..value.currValue/100 .."%"
Util.GetGameObject(obj,"rightTxt"):GetComponent("Text").text=isMax and Language[11062] or value.nextValue/100 .."%" this.properList[index].rightTxt.text = isMax and Language[11062] or value.nextValue/100 .."%"
end end
obj.gameObject:SetActive(true)
index=index+1 index=index+1
end end
for i = 1, #properList do
if i>=index then
properList[i]:SetActive(false)
end
end
end end
--设置物体选中 --设置物体选中
@ -459,22 +485,30 @@ end
--界面关闭时调用(用于子类重写) --界面关闭时调用(用于子类重写)
function EquipTreasureStrongPopup:OnClose() function EquipTreasureStrongPopup:OnClose()
curEquipData=nil
isEnough=true
type=0
isMax=false
isCoinEnough=false
isMatEnough=false
haveTreasures={}
matId = 0
end end
--界面销毁时调用(用于子类重写) --界面销毁时调用(用于子类重写)
function EquipTreasureStrongPopup:OnDestroy() function EquipTreasureStrongPopup:OnDestroy()
this.spLoader:Destroy() this.spLoader:Destroy()
curEquipData=nil Util.ClearChild(this.propertyGrid.transform)
properList={} this.properList = {}
costItemPreList={} for i = 1,#this.costItemPreList do
isEnough=true SubUIManager.Close(this.costItemPreList[i])
haveTreasures={} end
type=0 this.costItemPreList = {}
isMatEnough=false for i = 1,#this.costItemPreList do
matId=0 SubUIManager.Close(this.treasureDatas[i])
isCoinEnough=false end
isMax=false this.costItemPreList = {}
SubUIManager.Close(this.firstScrollCycleView)
end end
return EquipTreasureStrongPopup return EquipTreasureStrongPopup

View File

@ -32,7 +32,7 @@ local curHeroData
local heroListData local heroListData
local curSelectEquipData local curSelectEquipData
local index local index
local indexBtnNum = 0 local indexBtnNum = 1
local typeTab = { local typeTab = {
[0] = Language[10175], [0] = Language[10175],
[1] = Language[10391], [1] = Language[10391],
@ -86,7 +86,7 @@ function RoleEquipPanel:InitComponent()
end end
--装备list --装备list
this.effect = Util.GetGameObject(self.transform, "bg/effect") this.effect = Util.GetGameObject(self.transform, "bg/effect")
for i = 0, 6 do for i = 1, 6 do
tabs[i] = Util.GetGameObject(self.transform, "Tabs/Btn" .. i) tabs[i] = Util.GetGameObject(self.transform, "Tabs/Btn" .. i)
Util.GetGameObject(tabs[i], "Text"):GetComponent("Text").fontSize = GetCurLanguage() == 0 and 48 or 40 Util.GetGameObject(tabs[i], "Text"):GetComponent("Text").fontSize = GetCurLanguage() == 0 and 48 or 40
effectList[i] = Util.GetGameObject(self.transform, "bg/equipInfo/equip" .. i .. "/effect") effectList[i] = Util.GetGameObject(self.transform, "bg/equipInfo/equip" .. i .. "/effect")
@ -192,7 +192,7 @@ function RoleEquipPanel:BindEvent()
end end
) )
for i = 0, 6 do for i = 1, 6 do
Util.AddClick( Util.AddClick(
tabs[i], tabs[i],
function() function()
@ -201,11 +201,12 @@ function RoleEquipPanel:BindEvent()
return return
end end
indexBtnNum = i indexBtnNum = i
if indexBtnNum == PosIdConst.All then this:OnClickTabBtn(indexBtnNum)
this:OnClickAllBtn() -- if indexBtnNum == PosIdConst.All then
else -- this:OnClickAllBtn()
this:OnClickTabBtn(indexBtnNum) -- else
end -- this:OnClickTabBtn(indexBtnNum)
-- end
end end
) )
end end
@ -247,11 +248,12 @@ end
function this.CurrEquipDataChange() function this.CurrEquipDataChange()
this.ShowHeroEquip() this.ShowHeroEquip()
if indexBtnNum == PosIdConst.All then this:OnClickTabBtn(indexBtnNum)
this:OnClickAllBtn() -- if indexBtnNum == PosIdConst.All then
else -- this:OnClickAllBtn()
this:OnClickTabBtn(indexBtnNum) -- else
end -- this:OnClickTabBtn(indexBtnNum)
-- end
end end
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
@ -284,10 +286,10 @@ function RoleEquipPanel:OnShow()
effectList[i]:SetActive(false) effectList[i]:SetActive(false)
end end
end end
indexBtnNum = PosIdConst.All indexBtnNum = PosIdConst.WuQi
teamHero = FormationManager.GetAllMainFormationHeroId() teamHero = FormationManager.GetAllMainFormationHeroId()
this.ShowHeroEquip(true) this.ShowHeroEquip(true)
this:OnClickAllBtn() this:OnClickTabBtn(indexBtnNum)
this.UpView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main}) this.UpView:OnOpen({showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main})
end end
@ -301,22 +303,24 @@ function this:RightBtnOnClick()
index = (index + 1 <= #heroListData and index + 1 or 1) index = (index + 1 <= #heroListData and index + 1 or 1)
curHeroData = heroListData[index] curHeroData = heroListData[index]
this.ShowHeroEquip() this.ShowHeroEquip()
if indexBtnNum == PosIdConst.All then this:OnClickTabBtn(indexBtnNum)
this:OnClickAllBtn() -- if indexBtnNum == PosIdConst.All then
else -- this:OnClickAllBtn()
this:OnClickTabBtn(indexBtnNum) -- else
end -- this:OnClickTabBtn(indexBtnNum)
-- end
end end
--左切换按钮点击 --左切换按钮点击
function this:LeftBtnOnClick() function this:LeftBtnOnClick()
index = (index - 1 > 0 and index - 1 or #heroListData) index = (index - 1 > 0 and index - 1 or #heroListData)
curHeroData = heroListData[index] curHeroData = heroListData[index]
this.ShowHeroEquip() this.ShowHeroEquip()
if indexBtnNum == PosIdConst.All then this:OnClickTabBtn(indexBtnNum)
this:OnClickAllBtn() -- if indexBtnNum == PosIdConst.All then
else -- this:OnClickAllBtn()
this:OnClickTabBtn(indexBtnNum) -- else
end -- this:OnClickTabBtn(indexBtnNum)
-- end
end end
--一键装备 --一键装备
@ -716,25 +720,25 @@ function this:UpdateEquipItem(go,data,lvObj,refineObj)
end end
EquipManager.SetEquipStarShow(this.spLoader, Util.GetGameObject(go.transform, "frame/star"),data.itemConfig.Id) EquipManager.SetEquipStarShow(this.spLoader, Util.GetGameObject(go.transform, "frame/star"),data.itemConfig.Id)
end end
--点击全部按钮 -- --点击全部按钮
function this:OnClickAllBtn() -- function this:OnClickAllBtn()
this:SetSelectBtn() -- this:SetSelectBtn()
local itemData = BagManager.GetEquipDataByEquipPosition(curHeroData.heroConfig.Profession) -- local itemData = BagManager.GetEquipDataByEquipPosition(curHeroData.heroConfig.Profession)
this:SortEquipDatas(itemData) -- this:SortEquipDatas(itemData)
local count = 0 -- local count = 0
for i=1,#itemData do -- for i=1,#itemData do
count = count + 1--itemData[i].num -- count = count + 1--itemData[i].num
end -- end
--加上宝器数据 -- --加上宝器数据
local curAllEquipTreasure = EquipTreasureManager.GetAllTreasures(curHeroData.heroConfig.PropertyName) -- local curAllEquipTreasure = EquipTreasureManager.GetAllTreasures(curHeroData.heroConfig.PropertyName)
--宝器排序 -- --宝器排序
for i = 1, #curAllEquipTreasure do -- for i = 1, #curAllEquipTreasure do
table.insert(itemData, curAllEquipTreasure[i]) -- table.insert(itemData, curAllEquipTreasure[i])
end -- end
--"装备数量:" -- --"装备数量:"
this.itemNumText.text = Language[12181] .. count + LengthOfTable(curAllEquipTreasure) -- this.itemNumText.text = Language[12181] .. count + LengthOfTable(curAllEquipTreasure)
this:SetItemData(itemData) -- this:SetItemData(itemData)
end -- end
--点击装备按钮 --点击装备按钮
function this:OnClickTabBtn(_index) function this:OnClickTabBtn(_index)
@ -1075,13 +1079,17 @@ function this.UpdateEquipPosHeroData(_equipOrTreasure, _type, _selectEquipDataLi
--刷新界面 --刷新界面
this.ShowHeroEquip() this.ShowHeroEquip()
--上阵刷新红点 --上阵刷新红点
this.allEquipUpRedPoint:SetActive(#HeroManager.GetHeroIsUpEquip(curHeroData.dynamicId) > 0 and isUpZhen) 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)
if indexBtnNum == PosIdConst.All then this.equipBtn6Add.gameObject:SetActive(isCanUpEquipTreasure and #HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,2) > 0)
this:OnClickAllBtn()
else this:OnClickTabBtn(indexBtnNum)
this:OnClickTabBtn(indexBtnNum) -- --刷新当前英雄可穿装备
end -- if indexBtnNum == PosIdConst.All then
-- this:OnClickAllBtn()
-- else
-- this:OnClickTabBtn(indexBtnNum)
-- end
--对比战力并更新战力值 播放战力变更动画 --对比战力并更新战力值 播放战力变更动画
HeroManager.CompareWarPower(curHeroData.dynamicId) HeroManager.CompareWarPower(curHeroData.dynamicId)
end end
@ -1114,9 +1122,13 @@ end
function this:SortEquipDatas(_equipDatas) function this:SortEquipDatas(_equipDatas)
if teamHero[curHeroData.dynamicId] then if teamHero[curHeroData.dynamicId] then
isUpZhen = true isUpZhen = true
this.allEquipUpRedPoint:SetActive(#HeroManager.GetHeroIsUpEquip(curHeroData.dynamicId) > 0) this.equipBTn5Add.gameObject:SetActive(isCanUpEquipTreasure and #HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,1) > 0)
this.equipBtn6Add.gameObject:SetActive(isCanUpEquipTreasure and #HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,2) > 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) curHeroCanUpEquipTabs = HeroManager.GetHeroIsUpEquip(curHeroData.dynamicId)
else else
this.equipBTn5Add.gameObject:SetActive(false)
this.equipBtn6Add.gameObject:SetActive(false)
isUpZhen = false isUpZhen = false
this.allEquipUpRedPoint:SetActive(false) this.allEquipUpRedPoint:SetActive(false)
curHeroCanUpEquipTabs = {} curHeroCanUpEquipTabs = {}

View File

@ -359,7 +359,7 @@ end
function this.SetPropertyShow(_infos,_preList,_grid) function this.SetPropertyShow(_infos,_preList,_grid)
local dataCount=LengthOfTable(_infos) local dataCount=LengthOfTable(_infos)
local preCount=#_preList local preCount = #_preList
for i = 1, dataCount-preCount do for i = 1, dataCount-preCount do
local go = newObject(this.propertyPre) local go = newObject(this.propertyPre)
go.transform:SetParent(_grid.transform) go.transform:SetParent(_grid.transform)

View File

@ -554,7 +554,26 @@ function this:UpdateHeroInfoData()
local EquipSignUnlockTwo = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,87).OpenRules[2] local EquipSignUnlockTwo = ConfigManager.GetConfigData(ConfigName.GlobalSystemConfig,87).OpenRules[2]
if teamHero[curHeroData.dynamicId] then if teamHero[curHeroData.dynamicId] then
isUpZhen = true isUpZhen = true
this.equipBtnRedPoint:SetActive(#HeroManager.GetHeroIsUpEquip(curHeroData.dynamicId) > 0) local isCanUpEquipTreasure
local config = ConfigManager.GetConfigData(ConfigName.SpecialConfig,40)
if config then
local limits = string.split(config.Value, "|")
if limits then
local heroConfig = curHeroData.heroConfig
local lvs = string.split(limits[1], "#")
local stars = string.split(limits[2], "#")
if PlayerManager.level >= tonumber(lvs[2]) and heroConfig ~= nil and heroConfig.MaxRank >= tonumber(stars[2]) then
isCanUpEquipTreasure = true
else
isCanUpEquipTreasure = false
end
else
isCanUpEquipTreasure = false
end
else
isCanUpEquipTreasure = false
end
this.equipBtnRedPoint:SetActive((#HeroManager.GetHeroIsUpEquip(curHeroData.dynamicId) > 0 or (isCanUpEquipTreasure and #HeroManager.GetHeroIsUpTreasure(curHeroData.dynamicId,0) > 0)))
this.talismanBtnRedPoint:SetActive(HeroManager.GetIsShowTalismanRedPoint(curHeroData)) this.talismanBtnRedPoint:SetActive(HeroManager.GetIsShowTalismanRedPoint(curHeroData))
this.soulPrintBtnRedPoint:SetActive(HeroManager.GetIsShowSoulPrintRedPoint(curHeroData)) this.soulPrintBtnRedPoint:SetActive(HeroManager.GetIsShowSoulPrintRedPoint(curHeroData))
else else

View File

@ -28,6 +28,8 @@ function ItemView:InitComponent()
Util.GetGameObject(self.gameObject, "item/heroShow/posIcon"):SetActive(false) Util.GetGameObject(self.gameObject, "item/heroShow/posIcon"):SetActive(false)
self.name = Util.GetGameObject(self.gameObject, "name") self.name = Util.GetGameObject(self.gameObject, "name")
self.resetLv = Util.GetGameObject(self.gameObject, "item/resetLv") self.resetLv = Util.GetGameObject(self.gameObject, "item/resetLv")
self.rightUplv = Util.GetGameObject(self.gameObject, "item/rightUplv"):GetComponent("Text")
self.middleDownLv = Util.GetGameObject(self.gameObject, "item/middleDownLv"):GetComponent("Text")
self.item = Util.GetGameObject(self.gameObject, "item") self.item = Util.GetGameObject(self.gameObject, "item")
self.innateImage=Util.GetGameObject(self.gameObject, "item/innateImage") self.innateImage=Util.GetGameObject(self.gameObject, "item/innateImage")
self.innateText=Util.GetGameObject(self.gameObject, "item/innateImage/Text"):GetComponent("Text") self.innateText=Util.GetGameObject(self.gameObject, "item/innateImage/Text"):GetComponent("Text")
@ -82,7 +84,7 @@ end
--isPlayAnim 是否播放获得动画(默认不播) --isPlayAnim 是否播放获得动画(默认不播)
--effectLayer 当前界面层级(显示粒子特效用) --effectLayer 当前界面层级(显示粒子特效用)
--界面打开时调用(用于子类重写) --界面打开时调用(用于子类重写)
function ItemView:OnOpen(isGet, itemDatas, _scale, isShowName, isShowAddImage, isPlayAnim, effectLayer) function ItemView:OnOpen(isGet, itemDatas, _scale, isShowName, isShowAddImage, isPlayAnim, effectLayer,Did)
isShowName = isShowName or false isShowName = isShowName or false
isShowAddImage = isShowAddImage or false isShowAddImage = isShowAddImage or false
isPlayAnim = isPlayAnim or false isPlayAnim = isPlayAnim or false
@ -92,6 +94,7 @@ function ItemView:OnOpen(isGet, itemDatas, _scale, isShowName, isShowAddImage, i
self.addImage:SetActive(isShowAddImage) self.addImage:SetActive(isShowAddImage)
self.gameObject:GetComponent("PlayFlyAnim").enabled = isPlayAnim self.gameObject:GetComponent("PlayFlyAnim").enabled = isPlayAnim
self.scale = _scale or 1 self.scale = _scale or 1
self.Did = Did
--self.gameObject:GetComponent("RectTransform").localScale = Vector2.New(scale, scale) --self.gameObject:GetComponent("RectTransform").localScale = Vector2.New(scale, scale)
self.gameObject:GetComponent("RectTransform").sizeDelta = Vector2.New(135, 135) self.gameObject:GetComponent("RectTransform").sizeDelta = Vector2.New(135, 135)
if isGet and itemDatas then if isGet and itemDatas then
@ -101,6 +104,8 @@ function ItemView:OnOpen(isGet, itemDatas, _scale, isShowName, isShowAddImage, i
end end
end end
function ItemView:GetRewardShow(_itemData, effectLayer) function ItemView:GetRewardShow(_itemData, effectLayer)
self.rightUplv.gameObject:SetActive(false)
self.middleDownLv.gameObject:SetActive(false)
self.isRewardItemPop=true self.isRewardItemPop=true
self.fragmentIcon:SetActive(false) self.fragmentIcon:SetActive(false)
self.heroShowGo:SetActive(false) self.heroShowGo:SetActive(false)
@ -393,6 +398,8 @@ function ItemView:NoGetRewardShow(_reward, effectLayer, isShowAddImage)
self.UI_Effect_jinkuang_Yuan:SetActive(false) self.UI_Effect_jinkuang_Yuan:SetActive(false)
self.UI_effect_ItemView_saoguang:SetActive(false) self.UI_effect_ItemView_saoguang:SetActive(false)
self.UI_effect_WuCai_Kuang:SetActive(false) self.UI_effect_WuCai_Kuang:SetActive(false)
self.rightUplv.gameObject:SetActive(false)
self.middleDownLv.gameObject:SetActive(false)
self.iconGo:SetActive(true) self.iconGo:SetActive(true)
self.circleFrameBg:SetActive(false) self.circleFrameBg:SetActive(false)
Util.AddParticleSortLayer(self.UI_Effect_Kuang_JinSe, effectLayer - self.EffectOrginLayerQu) Util.AddParticleSortLayer(self.UI_Effect_Kuang_JinSe, effectLayer - self.EffectOrginLayerQu)
@ -565,6 +572,29 @@ function ItemView:NoGetRewardShow(_reward, effectLayer, isShowAddImage)
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfig[itemSId].ResourceID)) self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfig[itemSId].ResourceID))
self.fragmentIcon:SetActive(true) self.fragmentIcon:SetActive(true)
self.fragmentIcon:GetComponent("Image").sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(itemConfig[itemSId].PropertyName)) self.fragmentIcon:GetComponent("Image").sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(itemConfig[itemSId].PropertyName))
if not self.Did then
self.rightUplv.gameObject:SetActive(false)
self.middleDownLv.gameObject:SetActive(false)
else
local data = EquipTreasureManager.GetSingleTreasureByIdDyn(self.Did)
if not data then
self.rightUplv.gameObject:SetActive(false)
self.middleDownLv.gameObject:SetActive(false)
else
if data.lv > 0 then
self.rightUplv.gameObject:SetActive(true)
self.rightUplv.text = string.format("<color=#32F432>+%s</color>",data.lv)
else
self.rightUplv.gameObject:SetActive(false)
end
if data.refineLv > 0 then
self.middleDownLv.gameObject:SetActive(true)
self.middleDownLv.text =string.format("<color=#32CFF4>+%s</color>", data.refineLv)
else
self.middleDownLv.gameObject:SetActive(false)
end
end
end
Util.AddOnceClick(self.frameBtn, function() Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup,2,"",itemSId,0,0) UIManager.OpenPanel(UIName.RewardTalismanSingleShowPopup,2,"",itemSId,0,0)
end) end)
@ -715,6 +745,9 @@ function ItemView:OnClose()
-- 修复对象池回收层级没有重置,导致特效穿透的问题 -- 修复对象池回收层级没有重置,导致特效穿透的问题
self:SetEffectLayer(-self.EffectOrginLayerQu) self:SetEffectLayer(-self.EffectOrginLayerQu)
self.spLoader:Destroy() self.spLoader:Destroy()
self.rightUplv.gameObject:SetActive(false)
self.middleDownLv.gameObject:SetActive(false)
self.Did = nil
end end
function ItemView:OnDestroy() function ItemView:OnDestroy()

View File

@ -187,14 +187,16 @@ function PlayerLiveView:OnShowLive()
-- curArtResourcesConfig.Scale* self.transform.localScale.x -- curArtResourcesConfig.Scale* self.transform.localScale.x
local effect=0 local effect=0
if self.posType==NPCPosType.maincity then if self.posType==NPCPosType.maincity then
LogError("=================zhucheng".." "..self.transform.localScale.x)
effect=self.transform.localScale.x effect=self.transform.localScale.x
elseif self.posType==NPCPosType.onHook then elseif self.posType==NPCPosType.onHook then
effect=50 effect=50
else elseif self.posType==NPCPosType.smallMap then
effect=self.leader.transform.localScale.x effect=self.leader.transform.localScale.x
else
--effect=self.leader.transform.localScale.x
effect=45
end end
LogError("curArtResourcesConfig.Scale=="..curArtResourcesConfig.Scale.." effect=="..effect) LogError(" effect scale=="..effect)
self.titleLive:SetShow(self.PlayerLiveViewData.designation, curLocalPosition, curArtResourcesConfig.Scale, curArtResourcesConfig.Scale * effect,self.orginLayer) self.titleLive:SetShow(self.PlayerLiveViewData.designation, curLocalPosition, curArtResourcesConfig.Scale, curArtResourcesConfig.Scale * effect,self.orginLayer)
end end
end end
@ -202,6 +204,11 @@ function PlayerLiveView:SetNameHeight(hei)
self.nameHeight=hei self.nameHeight=hei
end end
function PlayerLiveView:SetTitleHide()
self.titleLiveGo:SetActive(false)
end
function PlayerLiveView:SetWalkDir(dir) function PlayerLiveView:SetWalkDir(dir)
-- LogBlue("PlayerLiveView dir : "..dir) -- LogBlue("PlayerLiveView dir : "..dir)
if dir == WALK_DIR.IDLE_FRONT then-- 站立_向前 if dir == WALK_DIR.IDLE_FRONT then-- 站立_向前

View File

@ -53,7 +53,6 @@ function PlayerTitle:SetShow(itemId, position, scale, effectScale, layer)
self.curTitleName = curArtResourcesConfig.Name self.curTitleName = curArtResourcesConfig.Name
self.titleLive = poolManager:LoadAsset(self.curTitleName, PoolManager.AssetType.GameObject) self.titleLive = poolManager:LoadAsset(self.curTitleName, PoolManager.AssetType.GameObject)
self.titleLive.transform:SetParent(self.transform) self.titleLive.transform:SetParent(self.transform)
self.titleLive.gameObject:SetActive(false)
if effectScale then if effectScale then
self:SetEffectScale(effectScale) self:SetEffectScale(effectScale)
end end
@ -68,7 +67,6 @@ function PlayerTitle:SetShow(itemId, position, scale, effectScale, layer)
if layer then if layer then
self:SetLayer(layer) self:SetLayer(layer)
end end
self.titleLive.gameObject:SetActive(true)
end end
function PlayerTitle:SetPostion(position) function PlayerTitle:SetPostion(position)
@ -87,6 +85,7 @@ end
function PlayerTitle:SetEffectScale(effectScale) function PlayerTitle:SetEffectScale(effectScale)
if self.titleLive then if self.titleLive then
self.titleLive.gameObject:SetActive(false)
Util.SetParticleScale(self.titleLive, effectScale) Util.SetParticleScale(self.titleLive, effectScale)
local isScaleActive = true local isScaleActive = true
-- 处理喜扑老包称号显示异常的问题,喜扑第一个版本的包在底层删除了缩放节点,这里要处理下针对此包不再进行缩放还原 -- 处理喜扑老包称号显示异常的问题,喜扑第一个版本的包在底层删除了缩放节点,这里要处理下针对此包不再进行缩放还原
@ -109,6 +108,7 @@ function PlayerTitle:SetEffectScale(effectScale)
self.titleLive.transform.localScale = Vector3.one * (self.scale or 1) self.titleLive.transform.localScale = Vector3.one * (self.scale or 1)
end end
end end
self.titleLive.gameObject:SetActive(true)
end end
end end

View File

@ -159,7 +159,7 @@ function SingleFightPlayerView:SetData(u,v,isSelf,data)
npc = NameManager.roleSex == ROLE_SEX.BOY and npc1 or npc2 npc = NameManager.roleSex == ROLE_SEX.BOY and npc1 or npc2
scale = NameManager.roleSex == ROLE_SEX.BOY and 1 or 0.5 scale = NameManager.roleSex == ROLE_SEX.BOY and 1 or 0.5
self.userId = PlayerManager.uid self.userId = PlayerManager.uid
self.playerLiveView = PlayerLiveView:New(self.roleRoot,1,nil,sortingorder,NPCPosType.onHook) self.playerLiveView = PlayerLiveView:New(self.roleRoot,1,nil,sortingorder)
self.playerLiveView:RemoveTitleCanvas() self.playerLiveView:RemoveTitleCanvas()
self.nameDi.gameObject:SetActive(false) self.nameDi.gameObject:SetActive(false)
--如果修行开启设置修行标识 --如果修行开启设置修行标识
@ -176,7 +176,7 @@ function SingleFightPlayerView:SetData(u,v,isSelf,data)
sex = data.sex, sex = data.sex,
ride = data.userMount, ride = data.userMount,
designation = data.userTitle, designation = data.userTitle,
},sortingorder,NPCPosType.onHook) },sortingorder)
self.playerLiveView:SetNameHeight(1.5) self.playerLiveView:SetNameHeight(1.5)
self.playerLiveView:RemoveTitleCanvas() self.playerLiveView:RemoveTitleCanvas()
if data.userMount == 0 then if data.userMount == 0 then