客户端rsa,冗余清理,bug修复,安卓build问题

This commit is contained in:
FloatGaming
2026-07-14 01:43:49 +08:00
parent fd22501f71
commit f8985d91d2
682 changed files with 4595 additions and 11216 deletions
+71 -4
View File
@@ -98,7 +98,9 @@ public class UI_Idols : MonoBehaviour
{
BindQuitButton();
btmandtopController.GlobalOverlayPanelVisibilityChanged += HandleOverlayPanelsVisibilityChanged;
AllyHeroDeployLedger.EnsureInstance().InitializeIfNeeded();
AllyHeroDeployLedger.EnsureInstance().OnHeroGrowthChanged += HandleHeroGrowthChanged;
StoreOwnershipLedger.EnsureInstance().OnOwnershipChanged += HandleOwnershipChanged;
InitializeSectionToggles();
RebuildCards();
HandleOverlayPanelsVisibilityChanged(btmandtopController.CurrentOverlayPanelsVisible);
@@ -112,6 +114,10 @@ public class UI_Idols : MonoBehaviour
{
AllyHeroDeployLedger.Instance.OnHeroGrowthChanged -= HandleHeroGrowthChanged;
}
if (StoreOwnershipLedger.Instance != null)
{
StoreOwnershipLedger.Instance.OnOwnershipChanged -= HandleOwnershipChanged;
}
if (idolExpBarTween != null && idolExpBarTween.IsActive())
{
idolExpBarTween.Kill();
@@ -485,7 +491,7 @@ public class UI_Idols : MonoBehaviour
SetText(finishGameTimes, FormatSevenDigitCount(hero.ally_finishCount));
SetText(mvpGetTimes, FormatSevenDigitCount(hero.ally_mvpCount));
SetText(joinTeamTimes, FormatJoinDate(hero.ally_joinDateUtcTicks));
ApplyLevelDetails(hero.GetEffectiveLevelInfoWithEquipment(hero.GetEffectiveLevelForCurrentEXP()));
ApplyLevelDetails(GetEffectiveLevelInfoFromLedger(hero));
ApplyBehaviourRadar(hero);
PopulateSpecialSkills(hero);
@@ -558,8 +564,9 @@ public class UI_Idols : MonoBehaviour
levels.Sort((left, right) => left.requiredEXP.CompareTo(right.requiredEXP));
int currentExp = Mathf.Max(0, hero.ally_currentEXP);
int displayIndex = Mathf.Clamp(hero.GetUnlockedLevelIndex(), 0, levels.Count - 1);
AllyHeroDeployLedger ledger = AllyHeroDeployLedger.EnsureInstance();
int currentExp = hero.ally_heroID > 0 ? ledger.GetCurrentExp(hero.ally_heroID) : Mathf.Max(0, hero.ally_currentEXP);
int displayIndex = ResolveUnlockedLevelIndexFromLedger(hero, levels, ledger);
AllyHero_SO.AllyLevelInfo currentLevel = levels[displayIndex];
int tierIndex = ResolveTierIndex(currentLevel, displayIndex, levels.Count);
snapshot.levelIcon = GetLevelIconByIndex(tierIndex);
@@ -874,7 +881,7 @@ public class UI_Idols : MonoBehaviour
return;
}
AllyHero_SO.AllyLevelInfo baseLevelInfo = currentSelectedHero != null ? currentSelectedHero.GetEffectiveLevelForCurrentEXP() : levelInfo;
AllyHero_SO.AllyLevelInfo baseLevelInfo = currentSelectedHero != null ? GetBaseLevelInfoFromLedger(currentSelectedHero) : levelInfo;
SetText(il.hp, FormatGrowthInt(baseLevelInfo != null ? baseLevelInfo.maxHP : levelInfo.maxHP, levelInfo.maxHP));
SetText(il.attack, FormatGrowthInt(baseLevelInfo != null ? baseLevelInfo.attack : levelInfo.attack, levelInfo.attack));
SetText(il.mana, FormatGrowthInt(baseLevelInfo != null ? baseLevelInfo.maxMana : levelInfo.maxMana, levelInfo.maxMana));
@@ -893,6 +900,61 @@ public class UI_Idols : MonoBehaviour
SetText(il.miss_hl, FormatNumber(levelInfo.missHpLossBase));
}
private AllyHero_SO.AllyLevelInfo GetEffectiveLevelInfoFromLedger(AllyHero_SO hero)
{
AllyHero_SO.AllyLevelInfo baseLevelInfo = GetBaseLevelInfoFromLedger(hero);
return hero != null ? hero.GetEffectiveLevelInfoWithEquipment(baseLevelInfo) : null;
}
private AllyHero_SO.AllyLevelInfo GetBaseLevelInfoFromLedger(AllyHero_SO hero)
{
if (hero == null || hero.levelStats == null || hero.levelStats.Count == 0)
{
return null;
}
List<AllyHero_SO.AllyLevelInfo> levels = new List<AllyHero_SO.AllyLevelInfo>();
for (int i = 0; i < hero.levelStats.Count; i++)
{
if (hero.levelStats[i] != null)
{
levels.Add(hero.levelStats[i]);
}
}
if (levels.Count == 0)
{
return null;
}
levels.Sort((left, right) => left.requiredEXP.CompareTo(right.requiredEXP));
int index = ResolveUnlockedLevelIndexFromLedger(hero, levels, AllyHeroDeployLedger.EnsureInstance());
if (index < 0 || index >= levels.Count)
{
return null;
}
return levels[index];
}
private int ResolveUnlockedLevelIndexFromLedger(AllyHero_SO hero, List<AllyHero_SO.AllyLevelInfo> levels, AllyHeroDeployLedger ledger)
{
if (levels == null || levels.Count == 0)
{
return 0;
}
if (hero == null)
{
return 0;
}
int unlockedIndex = hero.ally_heroID > 0
? ledger.GetUnlockedTierIndex(hero.ally_heroID)
: hero.ally_growthUnlockedTierIndex;
return Mathf.Clamp(unlockedIndex, 0, levels.Count - 1);
}
public void RefreshCurrentHeroDetails()
{
ApplyHeroDetails(currentSelectedHero, false);
@@ -945,6 +1007,11 @@ public class UI_Idols : MonoBehaviour
RebuildCards(false);
}
private void HandleOwnershipChanged(int _)
{
RebuildCards(false);
}
private static string FormatSevenDigitCount(int value)
{
if (value <= 0)