Improved the system so that affixes are correctly applied when obtaining support cards using the give command.

This commit is contained in:
Kei-Luna
2026-05-15 16:17:36 +09:00
parent 0058ba0db6
commit 738a7d4e14

View File

@@ -139,10 +139,11 @@ public class InventoryManager(PlayerInstance player) : BasePlayerManager(player)
AffixId = 1, AffixId = 1,
}; };
var initialCount = spCard.InitialAffixCount; var affixCount = cardLevel >= spCard.MaxLevel ? spCard.TotalAffixCount : spCard.InitialAffixCount;
for (int i = 0; i < initialCount && i < spCard.AffixPool.Count; i++) for (int i = 0; i < affixCount && i < spCard.AffixPool.Count; i++)
{ {
var (affixId, tier) = SupportAffixService.GenerateRandomAffix(spCard.AffixPool[i]); var (affixId, tier) = SupportAffixService.GenerateRandomAffix(spCard.AffixPool[i]);
if (affixId == 0) continue;
info.Affixs.Add(affixId); info.Affixs.Add(affixId);
info.Affixs.Add(tier); info.Affixs.Add(tier);
} }