fix(viewer): default ClassExp.Level to 1 for new viewers

Client RankMatchUI.onOpen indexes _classCharaExpList[level - 1]
unconditionally; level 0 (the prior default) throws IOOR.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-08 18:49:45 -04:00
parent 20ddba4c5f
commit d3488c3bc6

View File

@@ -272,7 +272,9 @@ public class ViewerRepository : IViewerRepository
{
Class = ce,
Exp = 0,
Level = 0,
// Client unconditionally indexes `_classCharaExpList[level - 1]` in
// RankMatchUI.onOpen → CharacterExps.GetClassCharacterExps; level 0 throws IOOR.
Level = 1,
LeaderSkin = skin ?? new LeaderSkinEntry { Id = 0, Name = "<missing>", ClassId = ce.Id }
};
}).ToList();