修了很多bug和增加功能,优化不少问题
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class loadSettlementTeamPrefab : MonoBehaviour
|
||||
@@ -105,12 +105,23 @@ public class loadSettlementTeamPrefab : MonoBehaviour
|
||||
continue;
|
||||
}
|
||||
|
||||
// Attempt to resolve an AllyHero_SO for this slot (via teamUIController.allySlotIds) so we can prefer its squareProfile
|
||||
AllyHero_SO resolvedHeroSO = null;
|
||||
int allyId = -1;
|
||||
// Check if this slot is active and has an assigned hero
|
||||
var ui = tuic ?? teamUIController.Instance;
|
||||
bool isSlotActive = (ui != null) && ui.IsAllySlotActive(i);
|
||||
|
||||
int allyId = -1;
|
||||
if (ui != null && ui.allySlotIds != null && i < ui.allySlotIds.Count)
|
||||
allyId = ui.allySlotIds[i];
|
||||
|
||||
if (!isSlotActive || allyId <= 0)
|
||||
{
|
||||
card.SetEmptyState();
|
||||
if (GameConfig.verboseLogs) Debug.Log($"[loadSettlementTeamPrefab] Slot {i + 1} is inactive or has no character (id={allyId}). Applied empty state.");
|
||||
continue;
|
||||
}
|
||||
|
||||
// Attempt to resolve an AllyHero_SO for this slot (via teamUIController.allySlotIds) so we can prefer its squareProfile
|
||||
AllyHero_SO resolvedHeroSO = null;
|
||||
if (allyId > 0)
|
||||
{
|
||||
var arr = Resources.LoadAll<AllyHero_SO>("");
|
||||
|
||||
Reference in New Issue
Block a user