Fix limit break

addallcharacters adds 0 star characters as well
This commit is contained in:
SELEKCJONER
2024-09-22 11:30:11 +02:00
parent 7ac711b027
commit 70867cc95f
2 changed files with 3 additions and 2 deletions

View File

@@ -32,7 +32,8 @@ namespace EpinelPS.LobbyServer.Msgs.Character
}
// Find a new CSN based on the `name_code` of the current character and `grade_core_id + 1`
var newCharacter = fullchardata.FirstOrDefault(c => c.grade_core_id == currentCharacter.grade_core_id + 1);
var newCharacter = fullchardata.FirstOrDefault(c => c.name_code == currentCharacter.name_code && c.grade_core_id == currentCharacter.grade_core_id + 1);
if (newCharacter != null)
{

View File

@@ -273,7 +273,7 @@ namespace EpinelPS
// Group characters by name_code and always add those with grade_core_id == 11, 103, and include grade_core_id == 201
var allCharacters = GameData.Instance.characterTable.Values
.GroupBy(c => c.name_code) // Group by name_code to treat same name_code as one character 3999 = marian
.SelectMany(g => g.Where(c => c.grade_core_id == 11 || c.grade_core_id == 103 || c.grade_core_id == 201 || c.name_code == 3999)) // Always add characters with grade_core_id == 11 and 103
.SelectMany(g => g.Where(c => c.grade_core_id == 1 || c.grade_core_id == 101 || c.grade_core_id == 201 || c.name_code == 3999)) // Always add characters with grade_core_id == 11 and 103
.ToList();
foreach (var character in allCharacters)