From 39001a600fcae2bcf27c225df8752d75fb92fef4 Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期五, 31 十月 2025 11:18:26 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/System/HeroUI/HeroPosWin.cs | 43 +++++++++++++++++++++++++++++++++++--------
1 files changed, 35 insertions(+), 8 deletions(-)
diff --git a/Main/System/HeroUI/HeroPosWin.cs b/Main/System/HeroUI/HeroPosWin.cs
index e7de3b3..00bdc64 100644
--- a/Main/System/HeroUI/HeroPosWin.cs
+++ b/Main/System/HeroUI/HeroPosWin.cs
@@ -100,6 +100,7 @@
countryOnBtn.AddListener(() =>
{
+ HeroUIManager.Instance.isCustonHeroFormation = false;
UIManager.Instance.OpenWindow<HeroFormationWin>();
});
@@ -115,8 +116,9 @@
heroListScroller.OnRefreshCell += OnRefreshCell;
HeroUIManager.Instance.OnTeamPosChangeEvent += TeamChangeEvent;
TeamManager.Instance.OnTeamChange += OnTeamChange;
+ SelectTiltleBtn();
CreateScroller();
- Refresh();
+ Display();
}
protected override void OnPreClose()
@@ -129,7 +131,20 @@
}
- public override void Refresh()
+ void SelectTiltleBtn()
+ {
+ if (functionOrder == 0)
+ {
+ mainFBBtn.SelectBtn();
+ }
+ else if (functionOrder == 1)
+ {
+ jjcBtn.SelectBtn();
+ }
+ }
+
+
+ public void Display()
{
OnBattleTeamAttrPer();
RefreshOnTeamCountry();
@@ -217,11 +232,11 @@
var team = TeamManager.Instance.GetTeam(HeroUIManager.Instance.selectTeamType);
if (team != null)
{
- for (int i = 0; i < team.serverHeroes.Length; i++)
+ for (int i = 0; i < team.tempHeroes.Length; i++)
{
- if (team.serverHeroes[i] == null)
+ if (team.tempHeroes[i] == null)
continue;
- var hero = HeroManager.Instance.GetHero(team.serverHeroes[i].guid);
+ var hero = HeroManager.Instance.GetHero(team.tempHeroes[i].guid);
if (hero != null)
{
valuePer += hero.GetOnBattleAddPer();
@@ -356,6 +371,7 @@
RefreshPosScale();
heroListScroller.m_Scorller.RefreshActiveCellViews();
RefreshOnTeamCountry(true);
+ OnBattleTeamAttrPer();
//琛ㄧ幇椋炲叆锛岃繛缁偣鍑讳笉鍚屽ご鍍忚Е鍙戠殑璇濆垯閲嶇疆
if (flyFrom > -1)
@@ -456,10 +472,21 @@
var guidList = HeroUIManager.Instance.SelectRecommend();
var team = TeamManager.Instance.GetTeam(HeroUIManager.Instance.selectTeamType);
team.RemoveAllHeroes();
- for (int i = 0; i < guidList.Count; i++)
+ if (NewBieCenter.Instance.inGuiding && NewBieCenter.Instance.currentGuide == HeroUIManager.Instance.onekeyGuideID)
{
- team.AddHero(HeroManager.Instance.GetHero(guidList[i]), i);
+ for (int i = 0; i < guidList.Count; i++)
+ {
+ team.AddHero(HeroManager.Instance.GetHero(guidList[i]), HeroUIManager.Instance.onekeyGuidePosList[i] - 1, true);
+ }
+
}
+ else
+ {
+ for (int i = 0; i < guidList.Count; i++)
+ {
+ team.AddHero(HeroManager.Instance.GetHero(guidList[i]), i, true);
+ }
+ }
TeamChangeEvent(new List<int>() { 0, 1, 2, 3, 4, 5 }, -1, Vector3.zero);
@@ -481,7 +508,7 @@
HeroUIManager.Instance.selectTeamPosCountry = 0;
HeroUIManager.Instance.selectTeamType = type;
HeroUIManager.Instance.SortHeroOnTeamList();
- Refresh();
+ Display();
heroListScroller.m_Scorller.RefreshActiveCellViews();
}
--
Gitblit v1.8.0