From 1c715438c84603e41252d18ec97bfe677d8aa522 Mon Sep 17 00:00:00 2001 From: wangzhenxing Date: Wed, 25 May 2022 13:58:31 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=8E=89=E8=99=9A=E8=AE=BA=E9=81=93]=3D=3D=3D?= =?UTF-8?q?=3D=3D=3D=3D=E5=BC=80=E6=88=98=E6=B7=BB=E5=8A=A0=E7=9B=B8?= =?UTF-8?q?=E5=90=8C=E7=A5=9E=E5=B0=86=E5=B1=8F=E8=94=BD=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WorldArena/WorldArenaBattleInfoPanel.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/WorldArena/WorldArenaBattleInfoPanel.lua b/Assets/ManagedResources/~Lua/Modules/WorldArena/WorldArenaBattleInfoPanel.lua index dac8b421b6..4547dac176 100644 --- a/Assets/ManagedResources/~Lua/Modules/WorldArena/WorldArenaBattleInfoPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/WorldArena/WorldArenaBattleInfoPanel.lua @@ -21,6 +21,8 @@ local leftAllTeam={} local rightAllTeam={} local myOldScore=0 local enOldScore=0 +local allMyHeros={} +local isSame=false local function OnBeginDrag(self, Pointgo, data) if state~=1 then return @@ -285,6 +287,10 @@ function WorldArenaBattleInfoPanel:BindEvent() return end end + if isSame then + PopupTipPanel.ShowTip("检测到多个阵容使用相同神将,无法开战") + return + end NetManager.CrossYuXuLunDaoChallengeRequest(list,enemyId,costType,function(msg) resultList=msg.fightResult fightDataList=msg.fightData @@ -571,6 +577,12 @@ function this.SetTeamInfo(_go,teamData,type) elseif starType == 2 then starSize = Vector2.New(48,48) end + if type==1 and isSame==false then + isSame=BattleUtil.ChecklistIsContainValue(allMyHeros,hero.heroid) + if isSame==false then + table.insert(allMyHeros,hero.heroid) + end + end SetHeroStars(this.spLoader, teamList[hero.position].starGrid, star,starType,starSize,starScale) Util.SetParticleSortLayer(teamList[hero.position].starGrid,this.sortingOrder + 1) local heroConfig = ConfigManager.GetConfigData(ConfigName.HeroConfig, heroTid) @@ -619,6 +631,8 @@ function this:OnClose() end _CloseFunc = nil end + allMyHeros={} + isSame=false -- 重置状态 --state = 1 isAnim = false @@ -629,6 +643,8 @@ function WorldArenaBattleInfoPanel:OnDestroy() this.spLoader:Destroy() leftAllTeam={} rightAllTeam={} + allMyHeros={} + isSame=false -- 头像 if myHeadObj then myHeadObj:Recycle()