一些修复和优化

This commit is contained in:
FloatGaming
2026-07-20 02:22:51 +08:00
parent 818fc9a02f
commit 0a0872c4f4
49 changed files with 2008 additions and 262 deletions
@@ -170,10 +170,22 @@ public class load_teammatesProfile : MonoBehaviour
return GetRatingKeyFromSO(hero);
}
// 等级评级改从持久化账本(AllyHeroDeployLedger)取真值,而非 SO 上被打包烘焙的镜像字段,
// 修复客户端更新后卡片显示过期等级、需重新给经验才同步的问题。
private string GetRatingKeyFromSO(AllyHero_SO so)
{
if (so == null || so.levelStats == null || so.levelStats.Count == 0) return "Fallback";
return so.GetDisplayLevelRatingKey();
if (so.ally_heroID <= 0)
{
return so.GetDisplayLevelRatingKey();
}
AllyHeroDeployLedger ledger = AllyHeroDeployLedger.EnsureInstance();
int currentExp = ledger.GetCurrentExp(so.ally_heroID);
int unlockedTier = ledger.GetUnlockedTierIndex(so.ally_heroID);
bool levelLocked = ledger.IsLevelLockEnabled(so.ally_heroID);
return so.GetDisplayLevelRatingKeyFromGrowth(currentExp, unlockedTier, levelLocked);
}
private void ApplyBorderSprite(Image targetImage, string level)