SupporterCard Affix can now be changed.

This commit is contained in:
Kei-Luna
2026-05-16 16:20:17 +09:00
parent e628a010be
commit f8f7311997
17 changed files with 549 additions and 30 deletions

View File

@@ -86,17 +86,15 @@ public class SupporterCard_Upgrade : ICallGSHandler
// Unlock next affix slot when reaching max level for the first time
if (supportCardExcel != null)
{
var currentSlots = supportCard.Affixs.Count / 2;
var currentSlots = Enumerable.Range(1, SupportAffixStateService.ActiveThirdAffixSlot)
.Count(slot => SupportAffixStateService.HasAffix(supportCard, slot));
var totalSlots = supportCardExcel.TotalAffixCount;
if (currentSlots < totalSlots && currentSlots < supportCardExcel.AffixPool.Count)
{
var poolId = supportCardExcel.AffixPool[currentSlots];
var (affixId, tier) = SupportAffixService.GenerateRandomAffix(poolId);
if (affixId > 0)
{
supportCard.Affixs.Add(affixId);
supportCard.Affixs.Add(tier);
}
SupportAffixStateService.SetAffix(supportCard, currentSlots + 1, affixId, tier);
}
}
}