xiyou_sanguo
parent
a5c74d4381
commit
dadfa88620
|
|
@ -272858,6 +272858,7 @@ RectTransform:
|
|||
- {fileID: 469502816301565012}
|
||||
- {fileID: 1349926418177715202}
|
||||
- {fileID: 2019904905217322421}
|
||||
- {fileID: 1464162705602064519}
|
||||
m_Father: {fileID: 9007592198577183178}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
|
|
@ -272901,6 +272902,83 @@ MonoBehaviour:
|
|||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!1 &4669587904737371622
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1678863482836160760}
|
||||
- component: {fileID: 9050090699473666058}
|
||||
- component: {fileID: 6639923851171536956}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1678863482836160760
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4669587904737371622}
|
||||
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: 1464162705602064519}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 5.810421}
|
||||
m_SizeDelta: {x: 0, y: -11.619158}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &9050090699473666058
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4669587904737371622}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &6639923851171536956
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4669587904737371622}
|
||||
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: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 0a607ef861fe8a24e9c6079e935099b8, type: 3}
|
||||
m_FontSize: 45
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 3
|
||||
m_MaxSize: 45
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u4E3B\u89D2\u795E\u5854"
|
||||
--- !u!1 &4674791914400934740
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -417433,6 +417511,140 @@ RectTransform:
|
|||
m_AnchoredPosition: {x: 897.1429, y: 1945.4434}
|
||||
m_SizeDelta: {x: 100, y: 100}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &7813089918722089496
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1464162705602064519}
|
||||
- component: {fileID: 3024937664616420994}
|
||||
- component: {fileID: 7918172941577050213}
|
||||
- component: {fileID: 8083910475723506814}
|
||||
- component: {fileID: 4078955219992524591}
|
||||
m_Layer: 5
|
||||
m_Name: GotoFight
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1464162705602064519
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7813089918722089496}
|
||||
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:
|
||||
- {fileID: 1678863482836160760}
|
||||
m_Father: {fileID: 1479412660855769799}
|
||||
m_RootOrder: 7
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: -176, y: 677}
|
||||
m_SizeDelta: {x: 280, y: 90}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3024937664616420994
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7813089918722089496}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &7918172941577050213
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7813089918722089496}
|
||||
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_Sprite: {fileID: 21300000, guid: bed0f3ecb49860b44b7fc53703900f59, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
--- !u!114 &8083910475723506814
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7813089918722089496}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 3
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 7918172941577050213}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!95 &4078955219992524591
|
||||
Animator:
|
||||
serializedVersion: 3
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7813089918722089496}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000, guid: 6ffe000b5a58aac48a9d130543849d76, type: 2}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorControllerStateOnDisable: 0
|
||||
--- !u!1 &7868256962966746633
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -1440,10 +1440,12 @@ FORMATION_TYPE = {
|
|||
ChallengeCopy_2 = 30,
|
||||
GodsWayTower_two = 31, --多队塔 两队
|
||||
GodsWayTower_three = 32, --多队塔 三队
|
||||
BecomeAGod = 33, --成神3队
|
||||
}
|
||||
GodsWayTeam = {
|
||||
[1] = { 3206, 3207 },
|
||||
[2] = { 3203, 3204, 3205 },
|
||||
[3] = { 3301, 3302, 3303 },
|
||||
}
|
||||
--活动Type定义
|
||||
ActivityTypeDef = {
|
||||
|
|
@ -2227,6 +2229,10 @@ FormationTypeDef = {
|
|||
LuoFuZhengFeng2 = 3209,
|
||||
LuoFuZhengFeng3 = 3210,
|
||||
LuoFuZhengFeng4 = 3211,
|
||||
|
||||
BecomeAGod_1 = 3301,
|
||||
BecomeAGod_2 = 3302,
|
||||
BecomeAGod_3 = 3303,
|
||||
}
|
||||
|
||||
--编队需要拉取主线
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ function BecomeAGodPanel:InitComponent()
|
|||
--this.titleTxt.text = Language[10985]
|
||||
this.titleTxt.text = "六道成神"
|
||||
this.btnLvup = Util.GetGameObject(this.bg2, "Lvup")
|
||||
this.btnGotoFight = Util.GetGameObject(this.bg2, "GotoFight")
|
||||
this.LevelUpDes = Util.GetGameObject(this.bg2, "LevelUpDes"):GetComponent("Text")
|
||||
this.force = Util.GetGameObject(self.transform, "powerBtn/value"):GetComponent("Text")
|
||||
this.btn_help = Util.GetGameObject(self.gameObject, "btn_help")
|
||||
|
|
@ -32,6 +33,15 @@ function BecomeAGodPanel:BindEvent()
|
|||
Util.AddClick(this.btn_help, function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup, HELP_TYPE.BecomeAGod, 0, 0)
|
||||
end)
|
||||
Util.AddClick(this.btnGotoFight, function()
|
||||
if CheckFunctionOpen(FUNCTION_OPEN_TYPE.GodsWayTower_3) then
|
||||
NetManager.RequestDuoduiInfoRequest(function()
|
||||
UIManager.OpenPanel(UIName.GodsWayTowerPanel, 3)
|
||||
end)
|
||||
else
|
||||
PopupTipPanel.ShowTip(ActTimeCtrlManager.SystemOpenTip(FUNCTION_OPEN_TYPE.GodsWayTower_3))
|
||||
end
|
||||
end)
|
||||
Util.AddClick(this.btnBack, function()
|
||||
PlaySoundWithoutClick(SoundConfig.Sound_UICancel)
|
||||
self:ClosePanel()
|
||||
|
|
|
|||
|
|
@ -474,7 +474,7 @@ function CarbonsPanel:BtnClick(id)
|
|||
elseif id == FUNCTION_OPEN_TYPE.GodsWayTower_3 then
|
||||
if CheckFunctionOpen(FUNCTION_OPEN_TYPE.GodsWayTower_3) then
|
||||
NetManager.RequestDuoduiInfoRequest(function()
|
||||
UIManager.OpenPanel(UIName.GodsWayTowerPanel, 2)
|
||||
UIManager.OpenPanel(UIName.GodsWayTowerPanel, 3)
|
||||
end)
|
||||
else
|
||||
PopupTipPanel.ShowTip(ActTimeCtrlManager.SystemOpenTip(id))
|
||||
|
|
|
|||
|
|
@ -1,12 +1,19 @@
|
|||
FormationManager = {}
|
||||
local this = FormationManager
|
||||
local ChallengeData = ConfigManager.GetConfig(ConfigName.ChallengeConfig)
|
||||
local specialConfig=ConfigManager.GetConfig(ConfigName.SpecialConfig)
|
||||
local specialConfig = ConfigManager.GetConfig(ConfigName.SpecialConfig)
|
||||
|
||||
this.AllFormationFunIds = {[1] = JumpType.Level,[601] = JumpType.BeastIncomingTide,[101] = JumpType.Arena,[201] = JumpType.Arena,
|
||||
[401] = JumpType.EndlessFight,[501] = JumpType.Guild,[502] = JumpType.Guild}
|
||||
this.AllFormationFunIds = {
|
||||
[1] = JumpType.Level,
|
||||
[601] = JumpType.BeastIncomingTide,
|
||||
[101] = JumpType.Arena,
|
||||
[201] = JumpType.Arena,
|
||||
[401] = JumpType.EndlessFight,
|
||||
[501] = JumpType.Guild,
|
||||
[502] = JumpType.Guild
|
||||
}
|
||||
function this.Initialize()
|
||||
this.currentFormationIndex=0
|
||||
this.currentFormationIndex = 0
|
||||
end
|
||||
|
||||
function this.MakeAEmptyTeam(teamId)
|
||||
|
|
@ -15,59 +22,69 @@ function this.MakeAEmptyTeam(teamId)
|
|||
--LogError("创造一个空编队====="..teamId)
|
||||
oTeam.teamId = teamId
|
||||
if teamId < FormationTypeDef.FORMATION_ARENA_DEFEND then
|
||||
oTeam.teamName = Language[10867]--Language[10712] .. tostring(teamId)
|
||||
oTeam.teamName = Language[10867] --Language[10712] .. tostring(teamId)
|
||||
elseif teamId == FormationTypeDef.FORMATION_ARENA_DEFEND then
|
||||
oTeam.teamName = Language[10868]-- 101
|
||||
oTeam.teamName = Language[10868] -- 101
|
||||
elseif teamId == FormationTypeDef.FORMATION_ARENA_ATTACK then
|
||||
oTeam.teamName = Language[10869]-- 201
|
||||
oTeam.teamName = Language[10869] -- 201
|
||||
elseif teamId == FormationTypeDef.FORMATION_DREAMLAND then
|
||||
oTeam.teamName = Language[10870]-- 301
|
||||
oTeam.teamName = Language[10870] -- 301
|
||||
elseif teamId == FormationTypeDef.FORMATION_ENDLESS_MAP then
|
||||
oTeam.teamName = Language[10871]-- 401
|
||||
oTeam.teamName = Language[10871] -- 401
|
||||
elseif teamId == FormationTypeDef.FORMATION_GUILD_FIGHT_DEFEND then
|
||||
oTeam.teamName = Language[10872]-- 501
|
||||
oTeam.teamName = Language[10872] -- 501
|
||||
elseif teamId == FormationTypeDef.FORMATION_GUILD_FIGHT_ATTACK then
|
||||
oTeam.teamName = Language[10873]-- 502
|
||||
oTeam.teamName = Language[10873] -- 502
|
||||
elseif teamId == FormationTypeDef.MONSTER_CAMP_ATTACK then
|
||||
oTeam.teamName = Language[10712]-- 601
|
||||
oTeam.teamName = Language[10712] -- 601
|
||||
elseif teamId == FormationTypeDef.BLOODY_BATTLE_ATTACK then
|
||||
oTeam.teamName = Language[10874]-- 701
|
||||
-- elseif teamId == FormationTypeDef.GUILD_BOSS then
|
||||
-- oTeam.teamName = " 公会Boss"-- 901
|
||||
oTeam.teamName = Language[10874] -- 701
|
||||
-- elseif teamId == FormationTypeDef.GUILD_BOSS then
|
||||
-- oTeam.teamName = " 公会Boss"-- 901
|
||||
elseif teamId == FormationTypeDef.EXPEDITION then
|
||||
oTeam.teamName = Language[10875]-- 1001
|
||||
oTeam.teamName = Language[10875] -- 1001
|
||||
elseif teamId == FormationTypeDef.ARENA_TOM_MATCH then
|
||||
oTeam.teamName = Language[10868]-- 1301
|
||||
oTeam.teamName = Language[10868] -- 1301
|
||||
elseif teamId == FormationTypeDef.JUMPSERVER_HIGHTLADDER or
|
||||
teamId==FormationTypeDef.LuoFuZhengFeng1 or
|
||||
teamId==FormationTypeDef.LuoFuZhengFeng2 or
|
||||
teamId==FormationTypeDef.LuoFuZhengFeng3 or
|
||||
teamId==FormationTypeDef.LuoFuZhengFeng4 then
|
||||
oTeam.teamName = Language[10088]-- 1601
|
||||
teamId == FormationTypeDef.LuoFuZhengFeng1 or
|
||||
teamId == FormationTypeDef.LuoFuZhengFeng2 or
|
||||
teamId == FormationTypeDef.LuoFuZhengFeng3 or
|
||||
teamId == FormationTypeDef.LuoFuZhengFeng4 then
|
||||
oTeam.teamName = Language[10088] -- 1601
|
||||
elseif teamId == FormationTypeDef.BecomeAGod_1 or
|
||||
teamId == FormationTypeDef.BecomeAGod_2 or
|
||||
teamId == FormationTypeDef.BecomeAGod_3 then
|
||||
oTeam.teamName = "主角神塔"
|
||||
elseif teamId == FormationTypeDef.FIGHT_LEVEL then
|
||||
oTeam.teamName = Language[10876]-- 1701
|
||||
oTeam.teamName = Language[10876] -- 1701
|
||||
elseif teamId == FormationTypeDef.FIGHT_ASSISTANTLEVEL then
|
||||
oTeam.teamName = Language[10876]-- 1801
|
||||
oTeam.teamName = Language[10876] -- 1801
|
||||
elseif teamId == FormationTypeDef.FORMATION_YUXUNLUNDAO1 then
|
||||
oTeam.teamName = Language[10877]-- 2001
|
||||
oTeam.teamName = Language[10877] -- 2001
|
||||
elseif teamId == FormationTypeDef.FORMATION_YUXUNLUNDAO2 then
|
||||
oTeam.teamName = Language[10878]-- 2002
|
||||
oTeam.teamName = Language[10878] -- 2002
|
||||
elseif teamId == FormationTypeDef.FORMATION_YUXUNLUNDAO3 then
|
||||
oTeam.teamName = Language[10879]-- 2003
|
||||
oTeam.teamName = Language[10879] -- 2003
|
||||
elseif teamId == FormationTypeDef.FourElement_PEOPLE then
|
||||
oTeam.teamName = Language[10880]-- 3001
|
||||
oTeam.teamName = Language[10880] -- 3001
|
||||
elseif teamId == FormationTypeDef.FourElement_BUDDHIST then
|
||||
oTeam.teamName = Language[10881]-- 3002
|
||||
oTeam.teamName = Language[10881] -- 3002
|
||||
elseif teamId == FormationTypeDef.FourElement_MAGIC then
|
||||
oTeam.teamName = Language[10882]-- 3003
|
||||
oTeam.teamName = Language[10882] -- 3003
|
||||
elseif teamId == FormationTypeDef.FourElement_TAOIST then
|
||||
oTeam.teamName = Language[10883]-- 3004
|
||||
oTeam.teamName = Language[10883] -- 3004
|
||||
elseif teamId == FormationTypeDef.FORMATION_QIJIESHILIAN then
|
||||
oTeam.teamName = Language[10884]-- 2101
|
||||
oTeam.teamName = Language[10884] -- 2101
|
||||
elseif teamId == FormationTypeDef.GodsWayTower_Two_1 then
|
||||
oTeam.teamName = Language[10885]-- 2101
|
||||
oTeam.teamName = Language[10885] -- 2101
|
||||
elseif teamId == FormationTypeDef.GodsWayTower_Two_2 then
|
||||
oTeam.teamName = Language[10886]-- 2101
|
||||
oTeam.teamName = Language[10886] -- 2101
|
||||
elseif teamId == FormationTypeDef.BecomeAGod_1 then
|
||||
oTeam.teamName = "三队1" -- 2101
|
||||
elseif teamId == FormationTypeDef.BecomeAGod_2 then
|
||||
oTeam.teamName = "三队2" -- 2101
|
||||
elseif teamId == FormationTypeDef.BecomeAGod_3 then
|
||||
oTeam.teamName = "三队3" -- 2101
|
||||
end
|
||||
oTeam.teamHeroInfos = {}
|
||||
oTeam.teamPokemonInfos = {}
|
||||
|
|
@ -89,38 +106,37 @@ function this.UpdateFormation(msg)
|
|||
local isRefresh = false
|
||||
local oTeam = this.MakeAEmptyTeam(team.teamId)
|
||||
--if team.teamId ~= 1601 then --老罗浮争锋特殊处理 不保存这个编队
|
||||
for j = 1, #team.teamHeroInfos do
|
||||
local teamHeroInfo = team.teamHeroInfos[j]
|
||||
-- TODO: 四灵试炼编队特殊处理
|
||||
if team.teamId == FormationTypeDef.FourElement_PEOPLE
|
||||
or team.teamId == FormationTypeDef.FourElement_MAGIC
|
||||
or team.teamId == FormationTypeDef.FourElement_BUDDHIST
|
||||
for j = 1, #team.teamHeroInfos do
|
||||
local teamHeroInfo = team.teamHeroInfos[j]
|
||||
-- TODO: 四灵试炼编队特殊处理
|
||||
if team.teamId == FormationTypeDef.FourElement_PEOPLE
|
||||
or team.teamId == FormationTypeDef.FourElement_MAGIC
|
||||
or team.teamId == FormationTypeDef.FourElement_BUDDHIST
|
||||
or team.teamId == FormationTypeDef.FourElement_TAOIST then
|
||||
if HeroManager.GetSingleHeroData(teamHeroInfo.heroId) then
|
||||
table.insert(oTeam.teamHeroInfos, teamHeroInfo)
|
||||
HeroManager.SetHeroFormationList(teamHeroInfo.heroId,team.teamId,1)
|
||||
HeroManager.SetHeroFormationList(teamHeroInfo.heroId, team.teamId, 1)
|
||||
else
|
||||
isRefresh = true
|
||||
end
|
||||
else
|
||||
table.insert(oTeam.teamHeroInfos, teamHeroInfo)
|
||||
HeroManager.SetHeroFormationList(teamHeroInfo.heroId,team.teamId,1)
|
||||
end
|
||||
else
|
||||
table.insert(oTeam.teamHeroInfos, teamHeroInfo)
|
||||
HeroManager.SetHeroFormationList(teamHeroInfo.heroId, team.teamId, 1)
|
||||
end
|
||||
oTeam.teamPokemonInfos = {}
|
||||
this.formationList[team.teamId] = oTeam
|
||||
if isRefresh then
|
||||
FormationManager.SaveFormation(team.teamId, this.formationList[team.teamId].teamHeroInfos, {})
|
||||
end
|
||||
-- end
|
||||
|
||||
end
|
||||
oTeam.teamPokemonInfos = {}
|
||||
this.formationList[team.teamId] = oTeam
|
||||
if isRefresh then
|
||||
FormationManager.SaveFormation(team.teamId, this.formationList[team.teamId].teamHeroInfos, {})
|
||||
end
|
||||
-- end
|
||||
end
|
||||
|
||||
if #msg.TeamPosInfo == 0 then
|
||||
for i = 1, 3 do
|
||||
local curFormation = {}
|
||||
curFormation.teamId = i
|
||||
curFormation.teamName = Language[10867]--Language[10712] .. i
|
||||
curFormation.teamName = Language[10867] --Language[10712] .. i
|
||||
curFormation.teamHeroInfos = {}
|
||||
curFormation.teamPokemonInfos = {}
|
||||
this.formationList[i] = curFormation
|
||||
|
|
@ -129,11 +145,12 @@ function this.UpdateFormation(msg)
|
|||
-- 获取数据时检测一下公会战防守数据
|
||||
-- this.CheckGuildFightDefendFormation()
|
||||
end
|
||||
|
||||
--刷新临时编队数据
|
||||
function this.UpdateTemporaryFormation(teamId, TeamPosInfo)
|
||||
if teamId < FormationTypeDef.FORMATION_TEMPORARY then
|
||||
LogError("临时编队ID错误")
|
||||
return
|
||||
return
|
||||
end
|
||||
local curFormation = {}
|
||||
curFormation.teamId = teamId
|
||||
|
|
@ -146,9 +163,10 @@ function this.UpdateTemporaryFormation(teamId, TeamPosInfo)
|
|||
end
|
||||
end
|
||||
this.formationList[teamId] = curFormation
|
||||
-- 设置临时编队为脏数据
|
||||
-- 设置临时编队为脏数据
|
||||
HeroPropManager.SetFormationPropDirty(teamId)
|
||||
end
|
||||
|
||||
-- function this.SetCurFormationIndex()
|
||||
-- local curIndex = 1
|
||||
-- local curMapId = PlayerManager.curMapId
|
||||
|
|
@ -160,7 +178,7 @@ end
|
|||
-- return curIndex
|
||||
-- end
|
||||
|
||||
function this.SaveFormation(index, roleList, pokemonList,isDiffmonster)
|
||||
function this.SaveFormation(index, roleList, pokemonList, isDiffmonster)
|
||||
local curFormation = this.formationList[index]
|
||||
if not curFormation or #this.formationList == 0 then
|
||||
return
|
||||
|
|
@ -174,7 +192,8 @@ function this.SaveFormation(index, roleList, pokemonList,isDiffmonster)
|
|||
if curFormation.teamHeroInfos[i] then
|
||||
oldTeamheroInfos[curFormation.teamHeroInfos[i].heroId] = curFormation.teamHeroInfos[i]
|
||||
if not newTeamheroInfos[curFormation.teamHeroInfos[i].heroId] then
|
||||
HeroManager.SetHeroFormationList(curFormation.teamHeroInfos[i].heroId,this.formationList[index].teamId,nil)
|
||||
HeroManager.SetHeroFormationList(curFormation.teamHeroInfos[i].heroId, this.formationList[index].teamId,
|
||||
nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -185,12 +204,12 @@ function this.SaveFormation(index, roleList, pokemonList,isDiffmonster)
|
|||
-- LogPink("#roleList"..#roleList)
|
||||
for i = 1, #roleList do
|
||||
local teamInfo = {}
|
||||
teamInfo.heroId = roleList[i].heroId--roleList[i]
|
||||
teamInfo.position = roleList[i].position--i
|
||||
teamInfo.heroId = roleList[i].heroId --roleList[i]
|
||||
teamInfo.position = roleList[i].position --i
|
||||
table.insert(curFormation.teamHeroInfos, teamInfo)
|
||||
if not oldTeamheroInfos[teamInfo.heroId] then
|
||||
--LogRed("roleList[i].heroId"..roleList[i].heroId.." this.formationList[index].teamId"..this.formationList[index].teamId)
|
||||
HeroManager.SetHeroFormationList(roleList[i].heroId,this.formationList[index].teamId,1)
|
||||
HeroManager.SetHeroFormationList(roleList[i].heroId, this.formationList[index].teamId, 1)
|
||||
end
|
||||
end
|
||||
curFormation.teamPokemonInfos = {}
|
||||
|
|
@ -202,8 +221,8 @@ function this.SaveFormation(index, roleList, pokemonList,isDiffmonster)
|
|||
table.insert(curFormation.teamPokemonInfos, teamPokemonInfo)
|
||||
end
|
||||
NetManager.TeamInfoSaveRequest(curFormation, function()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnFormationChange,isDiffmonster)
|
||||
LogGreen("发送保存编队请求 ,长度:"..#curFormation.teamHeroInfos)
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.Formation.OnFormationChange, isDiffmonster)
|
||||
LogGreen("发送保存编队请求 ,长度:" .. #curFormation.teamHeroInfos)
|
||||
end)
|
||||
|
||||
this.CheckHeroIdExist()
|
||||
|
|
@ -225,10 +244,11 @@ function this.GetAllFormationHeroId()
|
|||
index = index + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return list
|
||||
end
|
||||
|
||||
-- 获取主线所有正在编队的英雄id
|
||||
function this.GetAllMainFormationHeroId()
|
||||
local list = {}
|
||||
|
|
@ -246,9 +266,10 @@ function this.GetAllMainFormationHeroId()
|
|||
end
|
||||
return list
|
||||
end
|
||||
|
||||
--获取单个编队所有上阵英雄
|
||||
function this.GetWuJinFormationHeroIds(index)
|
||||
local forMationData = this.GetFormationByID(index).teamHeroInfos
|
||||
local forMationData = this.GetFormationByID(index).teamHeroInfos
|
||||
local index = 1
|
||||
local list = {}
|
||||
for j = 1, #forMationData do
|
||||
|
|
@ -259,22 +280,20 @@ function this.GetWuJinFormationHeroIds(index)
|
|||
end
|
||||
|
||||
function this.CopyStoryFormationToCurFormation(teamId)
|
||||
|
||||
if not this.formationList[teamId] then
|
||||
this.formationList[teamId] = this.MakeAEmptyTeam(teamId)
|
||||
end
|
||||
if #this.formationList[teamId].teamHeroInfos<=0 then
|
||||
if #this.formationList[teamId].teamHeroInfos <= 0 then
|
||||
for n = 1, #this.formationList[1].teamHeroInfos do
|
||||
table.insert(this.formationList[teamId].teamHeroInfos, this.formationList[1].teamHeroInfos[n])
|
||||
end
|
||||
--
|
||||
--
|
||||
FormationManager.SaveFormation(teamId, this.formationList[teamId].teamHeroInfos, {})
|
||||
end
|
||||
end
|
||||
|
||||
-- 获取编队信息
|
||||
function this.GetFormationByID(teamId)
|
||||
|
||||
if not teamId then
|
||||
return
|
||||
end
|
||||
|
|
@ -285,9 +304,9 @@ function this.GetFormationByID(teamId)
|
|||
end
|
||||
|
||||
--根据配置表 解锁功能时复制主线阵容 的配置
|
||||
for i, v in ipairs(string.split(specialConfig[47].Value,"#")) do
|
||||
local _v=tonumber(v)
|
||||
if teamId ==_v and #this.formationList[teamId].teamHeroInfos<=0 then
|
||||
for i, v in ipairs(string.split(specialConfig[47].Value, "#")) do
|
||||
local _v = tonumber(v)
|
||||
if teamId == _v and #this.formationList[teamId].teamHeroInfos <= 0 then
|
||||
this.CopyStoryFormationToCurFormation(teamId)
|
||||
return this.formationList[teamId]
|
||||
end
|
||||
|
|
@ -303,7 +322,7 @@ function this.GetFormationPower(formationId)
|
|||
end
|
||||
--获取当前编队数据
|
||||
if formationId == FormationTypeDef.EXPEDITION then
|
||||
ExpeditionManager.ExpeditionRrefreshFormation()--刷新编队
|
||||
ExpeditionManager.ExpeditionRrefreshFormation() --刷新编队
|
||||
end
|
||||
local formationList = this.GetFormationByID(formationId)
|
||||
--for i, v in pairs(allHeroTeamAddProVal) do
|
||||
|
|
@ -329,9 +348,9 @@ function this.GetFormationPower(formationId)
|
|||
power2 = power2 + HeroPowerManager.GetHeroPower(formationList.teamHeroInfos[i].heroId, formationId)
|
||||
end
|
||||
end
|
||||
power2=power2+PracticeManager.GetPracticeAddPower()
|
||||
power2 = power2 + PracticeManager.GetPracticeAddPower()
|
||||
-- LogGreen("新方式战斗力:"..power2)
|
||||
|
||||
|
||||
-- 主线编队战斗力
|
||||
-- ThinkingAnalyticsManager.SetSuperProperties({
|
||||
-- fighting_capacity = power2,
|
||||
|
|
@ -339,7 +358,7 @@ function this.GetFormationPower(formationId)
|
|||
|
||||
-- 刷新后端战斗力
|
||||
if power2 > PlayerManager.maxForce then
|
||||
NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)--targetTeamId
|
||||
NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL) --targetTeamId
|
||||
PlayerManager.maxForce = power2
|
||||
end
|
||||
-- 编队战斗力刷新
|
||||
|
|
@ -356,17 +375,18 @@ end
|
|||
function this.CheckHeroIdExist(heroId)
|
||||
if not heroId then
|
||||
NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
-- for _, formationData in pairs(this.formationList) do
|
||||
table.walk(this.formationList[FormationTypeDef.FORMATION_NORMAL].teamHeroInfos, function(teamInfo)
|
||||
if heroId == teamInfo.heroId then
|
||||
NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)
|
||||
end
|
||||
end)
|
||||
table.walk(this.formationList[FormationTypeDef.FORMATION_NORMAL].teamHeroInfos, function(teamInfo)
|
||||
if heroId == teamInfo.heroId then
|
||||
NetManager.RequestUserForceChange(FormationTypeDef.FORMATION_NORMAL)
|
||||
end
|
||||
end)
|
||||
-- end
|
||||
end
|
||||
|
||||
-- 判断编队中是否有这个人
|
||||
function this.CheckFormationHasId(formationId, heroId)
|
||||
local has = false
|
||||
|
|
@ -401,7 +421,6 @@ function this.GetFormationHeroHp(formationIndex, dhId)
|
|||
if not data then return end
|
||||
return data.remainHp
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- 检测编队正确性
|
||||
|
|
@ -430,11 +449,10 @@ function this.CheckFormationValid(teamId)
|
|||
return isValid
|
||||
end
|
||||
|
||||
|
||||
-- 检测公会战防守阶段玩家防守阵容正确性,防守阵容为空时将主线阵容复制到防守阵容
|
||||
function FormationManager.CheckGuildFightDefendFormation()
|
||||
if not ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.GUILD) then return end -- 公会未开启
|
||||
if PlayerManager.familyId == 0 then return end -- 没有公会
|
||||
if PlayerManager.familyId == 0 then return end -- 没有公会
|
||||
local isInFight = GuildFightManager.IsInGuildFight()
|
||||
local curStage = GuildFightManager.GetCurFightStage()
|
||||
if not isInFight or curStage == GUILD_FIGHT_STAGE.DEFEND then
|
||||
|
|
@ -461,20 +479,20 @@ function this.GetElementIndex(curFormation)
|
|||
local waterElementNum = 0
|
||||
local groundElementNum = 0
|
||||
|
||||
for _,go in pairs(curFormation) do--将所有元素信息存入列表
|
||||
for _, go in pairs(curFormation) do --将所有元素信息存入列表
|
||||
if go and go.heroId then
|
||||
local temp = HeroManager.GetSingleHeroData(go.heroId)
|
||||
if not temp then
|
||||
--LogGreen(go.heroId.."这个英雄不存在")
|
||||
else
|
||||
local heroPropertyType = temp.changeProId
|
||||
table.insert(elementPropertyList, heroPropertyType)
|
||||
local heroPropertyType = temp.changeProId
|
||||
table.insert(elementPropertyList, heroPropertyType)
|
||||
end
|
||||
else
|
||||
--LogGreen(_.."这个编队的这个英雄不存在")
|
||||
end
|
||||
end
|
||||
for i, v in pairs(elementPropertyList) do--遍历该列表拿筛选出各元素
|
||||
for i, v in pairs(elementPropertyList) do --遍历该列表拿筛选出各元素
|
||||
if (v == 1) then
|
||||
fireElementNum = fireElementNum + 1
|
||||
elseif (v == 2) then
|
||||
|
|
@ -494,72 +512,72 @@ function this.GetElementIndex(curFormation)
|
|||
|
||||
local indexChoose = 0
|
||||
for i = 1, #list do
|
||||
local v=list[i]
|
||||
if v==4 then
|
||||
indexChoose=4
|
||||
local v = list[i]
|
||||
if v == 4 then
|
||||
indexChoose = 4
|
||||
end
|
||||
if v==5 then
|
||||
indexChoose=5
|
||||
if v == 5 then
|
||||
indexChoose = 5
|
||||
end
|
||||
if v==6 then
|
||||
indexChoose=6
|
||||
if v == 6 then
|
||||
indexChoose = 6
|
||||
end
|
||||
end
|
||||
|
||||
local count=0
|
||||
local count = 0
|
||||
for i = 1, #list do
|
||||
local v=list[i]
|
||||
if v==3 then
|
||||
count=count+1
|
||||
local v = list[i]
|
||||
if v == 3 then
|
||||
count = count + 1
|
||||
end
|
||||
end
|
||||
if count==1 then
|
||||
indexChoose=2
|
||||
elseif count==2 then
|
||||
indexChoose=3
|
||||
if count == 1 then
|
||||
indexChoose = 2
|
||||
elseif count == 2 then
|
||||
indexChoose = 3
|
||||
end
|
||||
|
||||
local index=0
|
||||
local index = 0
|
||||
for i = 1, #list do
|
||||
local v=list[i]
|
||||
if v==2 then
|
||||
index=index+1
|
||||
local v = list[i]
|
||||
if v == 2 then
|
||||
index = index + 1
|
||||
end
|
||||
end
|
||||
if index==3 then
|
||||
indexChoose=1
|
||||
if index == 3 then
|
||||
indexChoose = 1
|
||||
end
|
||||
|
||||
return indexChoose
|
||||
end
|
||||
|
||||
|
||||
-- 获取所有正在编队的英雄id
|
||||
function this.AllFormationDeleCurHeroId(heroDid)
|
||||
for i, team in pairs(this.formationList) do
|
||||
local removeIndex
|
||||
for j = 1, #team.teamHeroInfos do
|
||||
if team.teamHeroInfos[j] and team.teamHeroInfos[j].heroId == heroDid then
|
||||
if team.teamHeroInfos[j] and team.teamHeroInfos[j].heroId == heroDid then
|
||||
removeIndex = j
|
||||
end
|
||||
end
|
||||
if removeIndex then
|
||||
table.remove( team.teamHeroInfos, removeIndex)
|
||||
table.remove(team.teamHeroInfos, removeIndex)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- 归元时检测无尽 和 大闹天宫阵容是否需要下阵
|
||||
function this.ResolvDownBattleCurHeroId(heroDid)
|
||||
for i, team in pairs(this.formationList) do
|
||||
local removeIndex
|
||||
if i == FormationTypeDef.EXPEDITION or i == FormationTypeDef.FORMATION_ENDLESS_MAP then
|
||||
for j = 1, #team.teamHeroInfos do
|
||||
if team.teamHeroInfos[j] and team.teamHeroInfos[j].heroId == heroDid then
|
||||
if team.teamHeroInfos[j] and team.teamHeroInfos[j].heroId == heroDid then
|
||||
removeIndex = j
|
||||
end
|
||||
end
|
||||
if removeIndex then
|
||||
table.remove( team.teamHeroInfos, removeIndex)
|
||||
table.remove(team.teamHeroInfos, removeIndex)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -567,19 +585,19 @@ end
|
|||
|
||||
-- 获取当前光环的加成数据 type 编队类型
|
||||
function this.GetCurFormationElementAdd(teamHeroInfos)
|
||||
local data={}
|
||||
local index= this.GetElementIndex(teamHeroInfos)
|
||||
if index==0 then return data end
|
||||
local config=ConfigManager.GetConfig(ConfigName.ElementalResonanceConfig)
|
||||
local data = {}
|
||||
local index = this.GetElementIndex(teamHeroInfos)
|
||||
if index == 0 then return data end
|
||||
local config = ConfigManager.GetConfig(ConfigName.ElementalResonanceConfig)
|
||||
for i = 1, #config[index].Content do
|
||||
table.insert(data,config[index].Content[i][1],config[index].Content[i][2])
|
||||
table.insert(data, config[index].Content[i][1], config[index].Content[i][2])
|
||||
end
|
||||
return data
|
||||
end
|
||||
|
||||
-- 获取当前光环的加成数据 type 编队类型
|
||||
function this.GetCurFormationElementAddByType(type,heroDid)
|
||||
local data={}
|
||||
function this.GetCurFormationElementAddByType(type, heroDid)
|
||||
local data = {}
|
||||
local curFormation = this.GetFormationByID(type)
|
||||
local isAdd = false
|
||||
if not curFormation then return {} end
|
||||
|
|
@ -589,23 +607,23 @@ function this.GetCurFormationElementAddByType(type,heroDid)
|
|||
end
|
||||
end
|
||||
if isAdd then
|
||||
local index= this.GetElementIndex(curFormation.teamHeroInfos)
|
||||
if index==0 then return data end
|
||||
local config=ConfigManager.GetConfig(ConfigName.ElementalResonanceConfig)
|
||||
local index = this.GetElementIndex(curFormation.teamHeroInfos)
|
||||
if index == 0 then return data end
|
||||
local config = ConfigManager.GetConfig(ConfigName.ElementalResonanceConfig)
|
||||
for i = 1, #config[index].Content do
|
||||
table.insert(data,config[index].Content[i][1],config[index].Content[i][2])
|
||||
table.insert(data, config[index].Content[i][1], config[index].Content[i][2])
|
||||
end
|
||||
end
|
||||
return data
|
||||
end
|
||||
|
||||
--自动一键上阵没有前端显示
|
||||
function this.SetOneKeyGoWithoutUI(formationType,limitLevel)
|
||||
function this.SetOneKeyGoWithoutUI(formationType, limitLevel)
|
||||
local heros = HeroManager.GetAllHeroDatas(limitLevel)
|
||||
--按战力从大到小排序
|
||||
table.sort(heros,function(a,b)
|
||||
table.sort(heros, function(a, b)
|
||||
if a.warPower == b.warPower then
|
||||
return a.id>b.id
|
||||
return a.id > b.id
|
||||
else
|
||||
return a.warPower > b.warPower
|
||||
end
|
||||
|
|
@ -618,23 +636,25 @@ function this.SetOneKeyGoWithoutUI(formationType,limitLevel)
|
|||
local curSingleherodata = HeroManager.GetSingleHeroData(heros[i].dynamicId)
|
||||
if not upHeroSidTable[curSingleherodata.id] then
|
||||
upHeroSidTable[curSingleherodata.id] = curSingleherodata.id
|
||||
table.insert(choosedList, {heroId = heros[i].dynamicId, position=i})
|
||||
table.insert(choosedList, { heroId = heros[i].dynamicId, position = i })
|
||||
end
|
||||
end
|
||||
end
|
||||
--保存编队
|
||||
FormationManager.SaveFormation(formationType, choosedList,FormationManager.formationList[formationType].teamPokemonInfos)
|
||||
FormationManager.SaveFormation(formationType, choosedList,
|
||||
FormationManager.formationList[formationType].teamPokemonInfos)
|
||||
end
|
||||
|
||||
-- 获取编队元素加成
|
||||
function this.GetFormationElementAdd(type)
|
||||
local propList = {}
|
||||
local curFormation = this.GetFormationByID(type)
|
||||
if not curFormation then return propList end
|
||||
|
||||
local index= this.GetElementIndex(curFormation.teamHeroInfos)
|
||||
if index==0 then return propList end
|
||||
local index = this.GetElementIndex(curFormation.teamHeroInfos)
|
||||
if index == 0 then return propList end
|
||||
|
||||
local config=ConfigManager.GetConfig(ConfigName.ElementalResonanceConfig)
|
||||
local config = ConfigManager.GetConfig(ConfigName.ElementalResonanceConfig)
|
||||
for i = 1, #config[index].Content do
|
||||
local propId = config[index].Content[i][1]
|
||||
local value = config[index].Content[i][2]
|
||||
|
|
@ -657,6 +677,7 @@ function this.GetCurIndexForMationNum(formationId)
|
|||
end
|
||||
end
|
||||
end
|
||||
return index
|
||||
return index
|
||||
end
|
||||
return this
|
||||
|
||||
return this
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ this.PanelOptionView = {
|
|||
[FORMATION_TYPE.ChallengeCopy_2] = "Modules/Formation/View/ChallengeCopyFormation",
|
||||
[FORMATION_TYPE.GodsWayTower_two] = "Modules/Formation/View/GodsWayTowerFormation",
|
||||
[FORMATION_TYPE.GodsWayTower_three] = "Modules/Formation/View/GodsWayTowerFormation",
|
||||
[FORMATION_TYPE.BecomeAGod] = "Modules/Formation/View/GodsWayTowerFormation",
|
||||
}
|
||||
function this:InitComponent()
|
||||
this.spLoader = SpriteLoader.New()
|
||||
|
|
@ -710,7 +711,7 @@ function this.SetRoleList(_roleDatas, isTop, isAni)
|
|||
this.opView.AddHeroToTeam(v.heroId, v.position, this.curFormationIndex)
|
||||
end
|
||||
end
|
||||
if panelType == FORMATION_TYPE.GodsWayTower_two or panelType == FORMATION_TYPE.GodsWayTower_three then
|
||||
if panelType == FORMATION_TYPE.GodsWayTower_two or panelType == FORMATION_TYPE.GodsWayTower_three or panelType == FORMATION_TYPE.BecomeAGod then
|
||||
LogError("this.curFormationIndex=" .. this.curFormationIndex)
|
||||
this.opView.RemoveTeamByIndex(this.curFormationIndex)
|
||||
for i, v in pairs(this.choosedList) do
|
||||
|
|
@ -929,7 +930,7 @@ function this.SingleHeroDataShow(_go, _heroData)
|
|||
--level=endLess[heroData.heroConfig.Id].Level
|
||||
end
|
||||
|
||||
if panelType == FORMATION_TYPE.GodsWayTower_two or panelType == FORMATION_TYPE.GodsWayTower_three then
|
||||
if panelType == FORMATION_TYPE.GodsWayTower_two or panelType == FORMATION_TYPE.GodsWayTower_three or FORMATION_TYPE.BecomeAGod then
|
||||
if this.opView.GetHeroTeam then
|
||||
local index = this.opView.GetHeroTeam(heroData.dynamicId)
|
||||
if index and index ~= this.curFormationIndex then
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ function this.Init(root, ...)
|
|||
local temp = { ... }
|
||||
this.curIndex = temp[1]
|
||||
this.curIds = temp[2]
|
||||
this.towerType = temp[3]
|
||||
teamLen = #this.curIds
|
||||
LogError("this.curIndex:" .. tostring(this.curIndex))
|
||||
this.root.switchBar:SetActive(true)
|
||||
|
|
@ -78,7 +79,7 @@ function this.Init(root, ...)
|
|||
this._RefreshTimeStemp = curTimeStemp
|
||||
|
||||
this.curIndex = (this.curIndex + teamLen - 1) % teamLen == 0 and teamLen or (this.curIndex + teamLen - 1) %
|
||||
teamLen
|
||||
teamLen
|
||||
isLeftOrRight = true
|
||||
checkFunc()
|
||||
end)
|
||||
|
|
@ -354,13 +355,14 @@ function this.On_Btn2_Click()
|
|||
LogError("++++++++++++++++++++++++++")
|
||||
newHero.heroId = value.Id
|
||||
newHero.position = value.pos
|
||||
if teamLen == 2 then
|
||||
|
||||
if this.towerType == 31 then
|
||||
if value.index == FormationTypeDef.GodsWayTower_Two_1 then
|
||||
table.insert(oneTeam, newHero)
|
||||
elseif value.index == FormationTypeDef.GodsWayTower_Two_2 then
|
||||
table.insert(twoTeam, newHero)
|
||||
end
|
||||
elseif teamLen == 3 then
|
||||
elseif this.towerType == 32 then
|
||||
if value.index == FormationTypeDef.GodsWayTower_Three_1 then
|
||||
table.insert(oneTeam, newHero)
|
||||
elseif value.index == FormationTypeDef.GodsWayTower_Three_2 then
|
||||
|
|
@ -368,6 +370,14 @@ function this.On_Btn2_Click()
|
|||
elseif value.index == FormationTypeDef.GodsWayTower_Three_3 then
|
||||
table.insert(threeTeam, newHero)
|
||||
end
|
||||
elseif this.towerType == 33 then
|
||||
if value.index == FormationTypeDef.BecomeAGod_1 then
|
||||
table.insert(oneTeam, newHero)
|
||||
elseif value.index == FormationTypeDef.BecomeAGod_2 then
|
||||
table.insert(twoTeam, newHero)
|
||||
elseif value.index == FormationTypeDef.BecomeAGod_3 then
|
||||
table.insert(threeTeam, newHero)
|
||||
end
|
||||
end
|
||||
|
||||
if BattleUtil.ChecklistIsContainValue(upHeros, value.Id) then
|
||||
|
|
|
|||
|
|
@ -785,6 +785,12 @@ function this.GetHeroFormationStr(teamId)
|
|||
return Language[11574]
|
||||
elseif teamId == FormationTypeDef.LuoFuZhengFeng4 then
|
||||
return Language[11574]
|
||||
elseif teamId == FormationTypeDef.BecomeAGod_1 then
|
||||
return "该神将已在主角神塔中上阵!"
|
||||
elseif teamId == FormationTypeDef.BecomeAGod_2 then
|
||||
return "该神将已在主角神塔中上阵!"
|
||||
elseif teamId == FormationTypeDef.BecomeAGod_3 then
|
||||
return "该神将已在主角神塔中上阵!"
|
||||
end
|
||||
end
|
||||
return ""
|
||||
|
|
@ -820,6 +826,12 @@ function this.GetHeroFormationStr2(teamId)
|
|||
return Language[10088], FormationTypeDef.LuoFuZhengFeng3
|
||||
elseif teamId == FormationTypeDef.LuoFuZhengFeng4 then
|
||||
return Language[10088], FormationTypeDef.LuoFuZhengFeng4
|
||||
elseif teamId == FormationTypeDef.BecomeAGod_1 then
|
||||
return "主角神塔", FormationTypeDef.BecomeAGod_1
|
||||
elseif teamId == FormationTypeDef.BecomeAGod_2 then
|
||||
return "主角神塔", FormationTypeDef.BecomeAGod_1
|
||||
elseif teamId == FormationTypeDef.BecomeAGod_3 then
|
||||
return "主角神塔", FormationTypeDef.BecomeAGod_3
|
||||
end
|
||||
end
|
||||
return ""
|
||||
|
|
|
|||
|
|
@ -1,48 +1,49 @@
|
|||
----- 献祭 -----
|
||||
local this = {}
|
||||
local sortingOrder=0
|
||||
local sortingOrder = 0
|
||||
local sort = 0
|
||||
local tabSortType = 0
|
||||
local tarHero
|
||||
local selectHeroData={}--选择的英雄list did = data
|
||||
local maxSelectNum = 30--最大选择数量
|
||||
local selectHeroData = {} --选择的英雄list did = data
|
||||
local maxSelectNum = 30 --最大选择数量
|
||||
function this:InitComponent(gameObject)
|
||||
this.spLoader = SpriteLoader.New()
|
||||
--上部内容
|
||||
this.helpBtn=Util.GetGameObject(gameObject,"Content/Resolve_Dismantle/HelpBtn")
|
||||
this.helpPos=this.helpBtn:GetComponent("RectTransform").localPosition
|
||||
this.helpBtn = Util.GetGameObject(gameObject, "Content/Resolve_Dismantle/HelpBtn")
|
||||
this.helpPos = this.helpBtn:GetComponent("RectTransform").localPosition
|
||||
--回溯按钮
|
||||
this.confirmBtn=Util.GetGameObject(gameObject,"Content/Resolve_Dismantle/ConfirmBtn")
|
||||
Util.GetGameObject(this.confirmBtn,"Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite("gongsonganniu_zh")
|
||||
this.shopBtn=Util.GetGameObject(gameObject,"Content/Resolve_Dismantle/shopBtn")
|
||||
this.confirmBtn = Util.GetGameObject(gameObject, "Content/Resolve_Dismantle/ConfirmBtn")
|
||||
Util.GetGameObject(this.confirmBtn, "Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
|
||||
"gongsonganniu_zh")
|
||||
this.shopBtn = Util.GetGameObject(gameObject, "Content/Resolve_Dismantle/shopBtn")
|
||||
this.shopBtn:GetComponent("Image").sprite = this.spLoader:LoadSprite("r_shangdian_zh")
|
||||
this.selectText = Util.GetGameObject(gameObject,"Content/Resolve_Dismantle/selectNumText"):GetComponent("Text")
|
||||
this.selectBtn = Util.GetGameObject(gameObject,"Content/Resolve_Dismantle/btns/selectBtn")
|
||||
this.noSelectBtn = Util.GetGameObject(gameObject,"Content/Resolve_Dismantle/btns/noSelectBtn")
|
||||
this.cardPre = Util.GetGameObject(gameObject,"item")
|
||||
this.scrollbar = Util.GetGameObject(gameObject,"Content/Resolve_Dismantle/Scrollbar"):GetComponent("Scrollbar")
|
||||
this.Empty = Util.GetGameObject(gameObject,"Content/Resolve_Dismantle/Empty")
|
||||
this.selectText = Util.GetGameObject(gameObject, "Content/Resolve_Dismantle/selectNumText"):GetComponent("Text")
|
||||
this.selectBtn = Util.GetGameObject(gameObject, "Content/Resolve_Dismantle/btns/selectBtn")
|
||||
this.noSelectBtn = Util.GetGameObject(gameObject, "Content/Resolve_Dismantle/btns/noSelectBtn")
|
||||
this.cardPre = Util.GetGameObject(gameObject, "item")
|
||||
this.scrollbar = Util.GetGameObject(gameObject, "Content/Resolve_Dismantle/Scrollbar"):GetComponent("Scrollbar")
|
||||
this.Empty = Util.GetGameObject(gameObject, "Content/Resolve_Dismantle/Empty")
|
||||
|
||||
local v21 = Util.GetGameObject(gameObject, "Content/Resolve_Dismantle/ItemListRoot"):GetComponent("RectTransform").rect
|
||||
this.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView, Util.GetGameObject(gameObject, "Content/Resolve_Dismantle/ItemListRoot").transform,
|
||||
this.cardPre, this.scrollbar, Vector2.New(v21.width, v21.height), 1, 5, Vector2.New(43,15))
|
||||
local v21 = Util.GetGameObject(gameObject, "Content/Resolve_Dismantle/ItemListRoot"):GetComponent("RectTransform")
|
||||
.rect
|
||||
this.ScrollView = SubUIManager.Open(SubUIConfig.ScrollCycleView,
|
||||
Util.GetGameObject(gameObject, "Content/Resolve_Dismantle/ItemListRoot").transform,
|
||||
this.cardPre, this.scrollbar, Vector2.New(v21.width, v21.height), 1, 5, Vector2.New(43, 15))
|
||||
this.ScrollView.moveTween.MomentumAmount = 1
|
||||
this.ScrollView.moveTween.Strength = 1
|
||||
maxSelectNum = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig,54).Value)
|
||||
maxSelectNum = tonumber(ConfigManager.GetConfigData(ConfigName.SpecialConfig, 54).Value)
|
||||
end
|
||||
|
||||
function this:BindEvent()
|
||||
Util.AddClick(this.helpBtn,function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup,HELP_TYPE.Resolve_Dismantle,this.helpPos.x,this.helpPos.y)
|
||||
Util.AddClick(this.helpBtn, function()
|
||||
UIManager.OpenPanel(UIName.HelpPopup, HELP_TYPE.Resolve_Dismantle, this.helpPos.x, this.helpPos.y)
|
||||
end)
|
||||
Util.AddClick(this.confirmBtn,function()
|
||||
if tonumber(LengthOfTable(selectHeroData))==0 then
|
||||
Util.AddClick(this.confirmBtn, function()
|
||||
if tonumber(LengthOfTable(selectHeroData)) == 0 then
|
||||
PopupTipPanel.ShowTip(Language[12617])
|
||||
|
||||
else
|
||||
|
||||
UIManager.OpenPanel(UIName.GeneralPopup,GENERAL_POPUP_TYPE.ResolveDismantle,
|
||||
HeroManager.GetHeroReturnItems(selectHeroData,GENERAL_POPUP_TYPE.ResolveDismantle),selectHeroData)
|
||||
UIManager.OpenPanel(UIName.GeneralPopup, GENERAL_POPUP_TYPE.ResolveDismantle,
|
||||
HeroManager.GetHeroReturnItems(selectHeroData, GENERAL_POPUP_TYPE.ResolveDismantle), selectHeroData)
|
||||
end
|
||||
end)
|
||||
Util.AddClick(this.selectBtn, function()
|
||||
|
|
@ -72,26 +73,25 @@ function this:RemoveListener()
|
|||
end
|
||||
|
||||
function this:OnShow(...)
|
||||
local args={...}
|
||||
local args = { ... }
|
||||
sort = args[1]
|
||||
sortingOrder = PlayerManager.now_index or 0
|
||||
this.SortTypeClick(sort,sortingOrder,args[3],args[4])
|
||||
|
||||
sortingOrder = PlayerManager.now_index or 0
|
||||
this.SortTypeClick(sort, sortingOrder, args[3], args[4])
|
||||
end
|
||||
|
||||
--展示数据
|
||||
function this.SortTypeClick(sortingOrder,_sortType,isTop,isAni)
|
||||
function this.SortTypeClick(sortingOrder, _sortType, isTop, isAni)
|
||||
sort = sortingOrder
|
||||
tabSortType=_sortType
|
||||
selectHeroData={}
|
||||
tarHero=HeroManager.GetAllHeroDataMsinusUpWar(_sortType,2)
|
||||
this.selectText.text = Language[11183].."0/"..maxSelectNum
|
||||
tabSortType = _sortType
|
||||
selectHeroData = {}
|
||||
tarHero = HeroManager.GetAllHeroDataMsinusUpWar(_sortType, 2)
|
||||
this.selectText.text = Language[11183] .. "0/" .. maxSelectNum
|
||||
this.noSelectBtn.gameObject:SetActive(false)
|
||||
this.SortHeroDatas(tarHero)
|
||||
this.Empty:SetActive(#tarHero <= 0)
|
||||
this.ScrollView:SetData(tarHero, function (index, go)
|
||||
this.ScrollView:SetData(tarHero, function(index, go)
|
||||
this.SingleHeroDataShow(go, tarHero[index])
|
||||
end,isTop,isAni)
|
||||
end, isTop, isAni)
|
||||
-- this.ScrollView:ForeachItemGO(function(index, go)
|
||||
-- Timer.New(function()
|
||||
-- go.gameObject:SetActive(true)
|
||||
|
|
@ -101,104 +101,109 @@ function this.SortTypeClick(sortingOrder,_sortType,isTop,isAni)
|
|||
end
|
||||
|
||||
--英雄单个数据展示
|
||||
function this.SingleHeroDataShow(go,_heroData)
|
||||
function this.SingleHeroDataShow(go, _heroData)
|
||||
local heroData = _heroData
|
||||
local _go = go
|
||||
Util.GetGameObject(_go.transform, "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetHeroQuantityImageByquality(heroData.heroConfig.Quality,heroData.star))
|
||||
Util.GetGameObject(_go.transform, "Text"):GetComponent("Text").text = SubString2(GetLanguageStrById(heroData.heroConfig.ReadingName),8)
|
||||
Util.GetGameObject(_go.transform, "frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
|
||||
GetHeroQuantityImageByquality(heroData.heroConfig.Quality, heroData.star))
|
||||
Util.GetGameObject(_go.transform, "Text"):GetComponent("Text").text = SubString2(
|
||||
GetLanguageStrById(heroData.heroConfig.ReadingName), 8)
|
||||
Util.GetGameObject(_go.transform, "icon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(heroData.icon)
|
||||
Util.GetGameObject(_go.transform, "posIcon"):SetActive(false)--:GetComponent("Image").sprite = this.spLoader:LoadSprite(heroData.professionIcon)
|
||||
Util.GetGameObject(_go.transform, "proIcon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(heroData.changeProId))
|
||||
Util.GetGameObject(_go.transform, "posIcon"):SetActive(false) --:GetComponent("Image").sprite = this.spLoader:LoadSprite(heroData.professionIcon)
|
||||
Util.GetGameObject(_go.transform, "proIcon"):GetComponent("Image").sprite = this.spLoader:LoadSprite(
|
||||
GetProStrImageByProNum(heroData.changeProId))
|
||||
--Util.GetGameObject(_go.transform, "heroStage"):GetComponent("Image").sprite = this.spLoader:LoadSprite(HeroStageSprite[heroData.heroConfig.HeroStage])
|
||||
local starGrid = Util.GetGameObject(_go.transform, "star")
|
||||
local star,starType = heroData.GetStar(1)
|
||||
local starSize = Vector2.New(32.5,32.5)
|
||||
local star, starType = heroData.GetStar(1)
|
||||
local starSize = Vector2.New(32.5, 32.5)
|
||||
local starScale = -15
|
||||
if starType == 3 then
|
||||
starSize = Vector2.New(1,-15.6)
|
||||
starSize = Vector2.New(1, -15.6)
|
||||
starScale = -13
|
||||
elseif starType == 2 then
|
||||
starSize = Vector2.New(60,57)
|
||||
starSize = Vector2.New(60, 57)
|
||||
end
|
||||
SetHeroStars(this.spLoader, starGrid, star,starType,starSize,starScale)
|
||||
SetHeroFlyEffect(Util.GetGameObject(_go.transform, "GameObject"),this.spLoader,heroData.star,sort,1,2,20)
|
||||
SetHeroStars(this.spLoader, starGrid, star, starType, starSize, starScale)
|
||||
SetHeroFlyEffect(Util.GetGameObject(_go.transform, "GameObject"), this.spLoader, heroData.star, sort, 1, 2, 20)
|
||||
Util.SetParticleSortLayer(starGrid, sort + 1)
|
||||
local choosed =Util.GetGameObject(_go.transform, "choosed")
|
||||
local formationMask =Util.GetGameObject(_go.transform, "formationMask")
|
||||
Util.GetGameObject(_go.transform, "formationMask/formationImage/upImage"):GetComponent("Image").sprite = this.spLoader:LoadSprite("t_tongyong-yishangzheng_zh")
|
||||
local choosed = Util.GetGameObject(_go.transform, "choosed")
|
||||
local formationMask = Util.GetGameObject(_go.transform, "formationMask")
|
||||
Util.GetGameObject(_go.transform, "formationMask/formationImage/upImage"):GetComponent("Image").sprite = this
|
||||
.spLoader:LoadSprite("t_tongyong-yishangzheng_zh")
|
||||
formationMask:SetActive(heroData.isFormation ~= "" and heroData.isFormations[1] ~= FormationTypeDef.EXPEDITION)
|
||||
local lockMask =Util.GetGameObject(_go.transform, "lockMask")
|
||||
local lockMask = Util.GetGameObject(_go.transform, "lockMask")
|
||||
lockMask:SetActive(heroData.lockState == 1)
|
||||
choosed:SetActive(selectHeroData[heroData.dynamicId] ~= nil)
|
||||
local cardclickBtn = Util.GetGameObject(_go.transform, "icon")
|
||||
this.selectText.text = Language[11183]..LengthOfTable(selectHeroData).."/"..maxSelectNum
|
||||
local GongMingMask = Util.GetGameObject(_go.transform, "GongMingMask")
|
||||
GongMingMask:SetActive(false)--最后检测是否共鸣
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#FFFFFF>"..heroData.lv.."</color>"
|
||||
|
||||
this.selectText.text = Language[11183] .. LengthOfTable(selectHeroData) .. "/" .. maxSelectNum
|
||||
local GongMingMask = Util.GetGameObject(_go.transform, "GongMingMask")
|
||||
GongMingMask:SetActive(false) --最后检测是否共鸣
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#FFFFFF>" .. heroData.lv ..
|
||||
"</color>"
|
||||
|
||||
if heroData.lockState == 1 or (heroData.isFormation ~= "" and heroData.isFormations[1] ~= FormationTypeDef.EXPEDITION) then
|
||||
else
|
||||
if HarmonyManager.IsChangeColor(_heroData.dynamicId) then
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#0f0>"..heroData.lv.."</color>"
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#0f0>" ..
|
||||
heroData.lv .. "</color>"
|
||||
GongMingMask:SetActive(true)
|
||||
|
||||
elseif HarmonyManager:IsEnvoy(_heroData.dynamicId) and HarmonyManager:HongMengTowerUpLimit() ~= 0 then
|
||||
elseif HarmonyManager:IsEnvoy(_heroData.dynamicId) and HarmonyManager:HongMengTowerUpLimit() ~= 0 then
|
||||
if HarmonyManager.GetSingleAdditionsData(HarmonyAddType.AddLv).heroTid == 0 then
|
||||
-- body
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#ffbe22>"..heroData.lv.."</color>"
|
||||
Util.GetGameObject(_go.transform, "lv/Text"):GetComponent("Text").text = "<color=#ffbe22>" ..
|
||||
heroData.lv .. "</color>"
|
||||
GongMingMask:SetActive(true)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
Util.AddOnceClick(GongMingMask, function()
|
||||
PopupTipPanel.ShowTip(Language[10477])
|
||||
end)
|
||||
Util.AddOnceClick(cardclickBtn, function()
|
||||
if heroData.isTrain==1 then
|
||||
if heroData.isTrain == 1 then
|
||||
PopupTipPanel.ShowTip(Language[12618])
|
||||
return
|
||||
end
|
||||
if selectHeroData[heroData.dynamicId] then
|
||||
choosed:SetActive(false)
|
||||
selectHeroData[heroData.dynamicId] = nil
|
||||
this.selectText.text = Language[11183]..LengthOfTable(selectHeroData).."/"..maxSelectNum
|
||||
this.noSelectBtn.gameObject:SetActive(LengthOfTable(selectHeroData)>0)
|
||||
this.selectText.text = Language[11183] .. LengthOfTable(selectHeroData) .. "/" .. maxSelectNum
|
||||
this.noSelectBtn.gameObject:SetActive(LengthOfTable(selectHeroData) > 0)
|
||||
return
|
||||
end
|
||||
if LengthOfTable(selectHeroData) >= maxSelectNum then
|
||||
PopupTipPanel.ShowTip(string.format(Language[12619],maxSelectNum))
|
||||
PopupTipPanel.ShowTip(string.format(Language[12619], maxSelectNum))
|
||||
return
|
||||
end
|
||||
LogGreen("heroData:"..heroData.dynamicId)
|
||||
selectHeroData[heroData.dynamicId]=heroData
|
||||
LogGreen("heroData:" .. heroData.dynamicId)
|
||||
selectHeroData[heroData.dynamicId] = heroData
|
||||
choosed:SetActive(true)
|
||||
this.selectText.text = Language[11183]..LengthOfTable(selectHeroData).."/"..maxSelectNum
|
||||
this.noSelectBtn.gameObject:SetActive(LengthOfTable(selectHeroData)>0)
|
||||
this.selectText.text = Language[11183] .. LengthOfTable(selectHeroData) .. "/" .. maxSelectNum
|
||||
this.noSelectBtn.gameObject:SetActive(LengthOfTable(selectHeroData) > 0)
|
||||
end)
|
||||
|
||||
Util.AddOnceClick(formationMask, function()
|
||||
if heroData.isFormation ~= "" then
|
||||
-- 复位角色的状态
|
||||
MsgPanel.ShowTwo(Language[12620]..heroData.isFormation..Language[12621], nil, function()
|
||||
if heroData.isFormations[1] then
|
||||
if heroData.isFormations[1] == FormationTypeDef.FORMATION_NORMAL then
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.SAVE_FORMATION)
|
||||
elseif heroData.isFormations[1] == FormationTypeDef.FORMATION_ARENA_DEFEND then
|
||||
JumpManager.GoJump(8001)
|
||||
MsgPanel.ShowTwo(Language[12620] .. heroData.isFormation .. Language[12621], nil, function()
|
||||
if heroData.isFormations[1] then
|
||||
if heroData.isFormations[1] == FormationTypeDef.FORMATION_NORMAL then
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.SAVE_FORMATION)
|
||||
elseif heroData.isFormations[1] == FormationTypeDef.FORMATION_ARENA_DEFEND then
|
||||
JumpManager.GoJump(8001)
|
||||
-- elseif heroData.isFormations[1] == FormationTypeDef.FORMATION_ENDLESS_MAP then
|
||||
-- JumpManager.GoJump(57001)
|
||||
elseif heroData.isFormations[1] == FormationTypeDef.ARENA_TOM_MATCH then
|
||||
-- JumpManager.GoJump(57001)
|
||||
UIManager.OpenPanel(UIName.ArenaTopMatchPanel)
|
||||
elseif heroData.isFormations[1] == FormationTypeDef.JUMPSERVER_HIGHTLADDER
|
||||
-- JumpManager.GoJump(57001)
|
||||
elseif heroData.isFormations[1] == FormationTypeDef.ARENA_TOM_MATCH then
|
||||
-- JumpManager.GoJump(57001)
|
||||
UIManager.OpenPanel(UIName.ArenaTopMatchPanel)
|
||||
elseif heroData.isFormations[1] == FormationTypeDef.JUMPSERVER_HIGHTLADDER
|
||||
or heroData.isFormations[1] == FormationTypeDef.LuoFuZhengFeng1
|
||||
or heroData.isFormations[1] == FormationTypeDef.LuoFuZhengFeng2
|
||||
or heroData.isFormations[1] == FormationTypeDef.LuoFuZhengFeng3
|
||||
or heroData.isFormations[1] == FormationTypeDef.LuoFuZhengFeng4 then
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.JUMPSERVER_HIGHTLADDER)
|
||||
end
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, FORMATION_TYPE.JUMPSERVER_HIGHTLADDER)
|
||||
end
|
||||
end
|
||||
end)
|
||||
return
|
||||
end
|
||||
|
|
@ -206,9 +211,9 @@ function this.SingleHeroDataShow(go,_heroData)
|
|||
Util.AddOnceClick(lockMask, function()
|
||||
if heroData.lockState == 1 then
|
||||
MsgPanel.ShowTwo(Language[12622], nil, function()
|
||||
NetManager.HeroLockEvent(heroData.dynamicId,0,function ()
|
||||
NetManager.HeroLockEvent(heroData.dynamicId, 0, function()
|
||||
PopupTipPanel.ShowTip(Language[12623])
|
||||
HeroManager.UpdateSingleHeroLockState(heroData.dynamicId,0)
|
||||
HeroManager.UpdateSingleHeroLockState(heroData.dynamicId, 0)
|
||||
lockMask:SetActive(false)
|
||||
end)
|
||||
end)
|
||||
|
|
@ -216,18 +221,19 @@ function this.SingleHeroDataShow(go,_heroData)
|
|||
end
|
||||
end)
|
||||
end
|
||||
|
||||
--英雄排序
|
||||
function this.SortHeroDatas(_heroDatas)
|
||||
--上阵最优先,星级优先,同星级等级优先,同星级同等级按sortId排序。排序时降序排序。
|
||||
table.sort(_heroDatas, function(a, b)
|
||||
if a ==nil or b == nil then
|
||||
if a == nil or b == nil then
|
||||
return
|
||||
end
|
||||
if (a.isFormation == "" or (a.isFormation ~= "" and a.isFormations[1] == FormationTypeDef.EXPEDITION)) and (b.isFormation == "" or (b.isFormation ~= "" and b.isFormations[1] == FormationTypeDef.EXPEDITION)) then
|
||||
if a.lockState == b.lockState then
|
||||
if a.isHarmonyGongMing == b.isHarmonyGongMing then
|
||||
if a.isTrain ==b.isTrain then
|
||||
if a.heroConfig.Natural ==b.heroConfig.Natural then
|
||||
if a.isTrain == b.isTrain then
|
||||
if a.heroConfig.Natural == b.heroConfig.Natural then
|
||||
if a.star == b.star then
|
||||
local aGodLv = GodSoulManager.GetGodSoulLv(a.dynamicId)
|
||||
local bGodLv = GodSoulManager.GetGodSoulLv(b.dynamicId)
|
||||
|
|
@ -242,7 +248,7 @@ function this.SortHeroDatas(_heroDatas)
|
|||
end
|
||||
else
|
||||
return a.star < b.star
|
||||
end
|
||||
end
|
||||
else
|
||||
return a.heroConfig.Natural < b.heroConfig.Natural
|
||||
end
|
||||
|
|
@ -256,31 +262,34 @@ function this.SortHeroDatas(_heroDatas)
|
|||
return a.lockState < b.lockState
|
||||
end
|
||||
else
|
||||
return (a.isFormation == "" or (a.isFormation ~= "" and a.isFormations[1] == FormationTypeDef.EXPEDITION)) and (not b.isFormation ~= "" and b.isFormations[1] ~= FormationTypeDef.EXPEDITION)
|
||||
return (a.isFormation == "" or (a.isFormation ~= "" and a.isFormations[1] == FormationTypeDef.EXPEDITION)) and
|
||||
(not b.isFormation ~= "" and b.isFormations[1] ~= FormationTypeDef.EXPEDITION)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
--快速选择英雄 或者 装备
|
||||
function this.QuickSelectListData(type)
|
||||
if type == 1 then
|
||||
selectHeroData={}
|
||||
selectHeroData = {}
|
||||
for k, v in pairs(tarHero) do
|
||||
if LengthOfTable(selectHeroData)<maxSelectNum and (v.isFormation == "" or (v.isFormation ~= "" and v.isFormations[1] == FormationTypeDef.EXPEDITION)) and v.lockState == 0 and v.star < 4 then
|
||||
selectHeroData[v.dynamicId]=v
|
||||
if LengthOfTable(selectHeroData) < maxSelectNum and (v.isFormation == "" or (v.isFormation ~= "" and v.isFormations[1] == FormationTypeDef.EXPEDITION)) and v.lockState == 0 and v.star < 4 then
|
||||
selectHeroData[v.dynamicId] = v
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
this.ScrollView:SetData(tarHero, function (index, go)
|
||||
this.ScrollView:SetData(tarHero, function(index, go)
|
||||
this.SingleHeroDataShow(go, tarHero[index])
|
||||
end,true,true)
|
||||
end, true, true)
|
||||
else
|
||||
selectHeroData={}
|
||||
this.ScrollView:SetData(tarHero, function (index, go)
|
||||
selectHeroData = {}
|
||||
this.ScrollView:SetData(tarHero, function(index, go)
|
||||
this.SingleHeroDataShow(go, tarHero[index])
|
||||
end,true,true)
|
||||
end, true, true)
|
||||
end
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
end
|
||||
|
||||
|
|
@ -288,4 +297,4 @@ function this:OnDestroy()
|
|||
this.spLoader:Destroy()
|
||||
end
|
||||
|
||||
return this
|
||||
return this
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ local endLessConfig = ConfigManager.GetConfig(ConfigName.EndlessHeroProp)
|
|||
local teamIds = {
|
||||
[1] = { 3206, 3207 },
|
||||
[2] = { 3203, 3204, 3205 },
|
||||
[3] = { 3301, 3302, 3303 },
|
||||
}
|
||||
local curIds = nil
|
||||
local function OnBeginDrag(self, Pointgo, data, index)
|
||||
|
|
@ -120,7 +121,12 @@ end
|
|||
|
||||
--界面打开时调用(用于子类重写)
|
||||
function GodsWayMyTeamPanel:OnOpen(_type)
|
||||
LogError("11111111111111111")
|
||||
LogError("11111111111111111" .. _type)
|
||||
if _type == 3 then
|
||||
Util.GetGameObject(self.gameObject, "Frame/title"):GetComponent("Text").text = "主角神塔"
|
||||
else
|
||||
Util.GetGameObject(self.gameObject, "Frame/title"):GetComponent("Text").text = Language[12996]
|
||||
end
|
||||
self.type = _type
|
||||
curIds = teamIds[_type]
|
||||
for i = 1, #curIds do
|
||||
|
|
@ -169,10 +175,12 @@ function GodsWayMyTeamPanel:SetSingleFormation(go, data, index)
|
|||
local formation = 0
|
||||
if self.type == 1 then
|
||||
formation = FORMATION_TYPE.GodsWayTower_two
|
||||
else
|
||||
elseif self.type == 2 then
|
||||
formation = FORMATION_TYPE.GodsWayTower_three
|
||||
else
|
||||
formation = FORMATION_TYPE.BecomeAGod
|
||||
end
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, formation, index, curIds)
|
||||
UIManager.OpenPanel(UIName.FormationPanelV2, formation, index, curIds, formation)
|
||||
end)
|
||||
|
||||
for i, demon in ipairs(self.Heros[index]) do
|
||||
|
|
|
|||
|
|
@ -167,7 +167,6 @@ function this.GetTimeTip(_type)
|
|||
--local config=ConfigManager.GetConfigData(ConfigName.DuoDuiTowerConfig,type)
|
||||
local buyTime = 0
|
||||
local freeTime = 0
|
||||
LogError("bbbbbbbbbbbbbbb".._type)
|
||||
if towerInfos[_type] then
|
||||
buyTime = PrivilegeManager.GetPrivilegeRemainValue(towerInfos[_type].buyId)
|
||||
freeTime = PrivilegeManager.GetPrivilegeRemainValue(towerInfos[_type].freeId)
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ end
|
|||
local teamIds = {
|
||||
[1] = { 3206, 3207 },
|
||||
[2] = { 3203, 3204, 3205 },
|
||||
[3] = { 3301, 3302, 3303 },
|
||||
}
|
||||
local curFloor = 0
|
||||
function GodsWaySingleSingleWave:OnOpen()
|
||||
|
|
|
|||
Loading…
Reference in New Issue