Example #1
0
        public PlayerCharacterDataModel(CharacterProgress progress, string guildCard, CharacterSpecialCustomInfo special,
                                        SectionId sectionId, CharacterClass classRace,
                                        CharacterVersionData versionData, CharacterCustomizationInfo customizationInfo,
                                        string characterName, uint playedTime)
        {
            if (!Enum.IsDefined(typeof(SectionId), sectionId))
            {
                throw new InvalidEnumArgumentException(nameof(sectionId), (int)sectionId, typeof(SectionId));
            }
            if (!Enum.IsDefined(typeof(CharacterClass), classRace))
            {
                throw new InvalidEnumArgumentException(nameof(classRace), (int)classRace, typeof(CharacterClass));
            }

            Progress  = new CharacterProgressReversed(progress.Experience, progress.RawLevel);
            GuildCard = guildCard ?? throw new ArgumentNullException(nameof(guildCard));

            //TODO: What is this?
            this.unk3 = 0;

            Special           = special;
            SectionId         = sectionId;
            ClassRace         = classRace;
            VersionData       = versionData ?? throw new ArgumentNullException(nameof(versionData));
            CustomizationInfo = customizationInfo ?? throw new ArgumentNullException(nameof(customizationInfo));
            CharacterName     = characterName ?? throw new ArgumentNullException(nameof(characterName));
            PlayedTime        = playedTime;
        }
Example #2
0
 public LobbyCharacterData(CharacterStats stats, ushort unk1, ulong unk2, CharacterProgress progress, uint money, string guildCard, ulong unk3, CharacterSpecialCustomInfo special, SectionId sectionId, CharacterClass classRace, CharacterVersionData versionData, CharacterCustomizationInfo customizationInfo, string characterName)
 {
     Stats             = stats ?? throw new ArgumentNullException(nameof(stats));
     this.unk1         = unk1;
     this.unk2         = unk2;
     Progress          = progress ?? throw new ArgumentNullException(nameof(progress));
     Money             = money;
     GuildCard         = guildCard ?? throw new ArgumentNullException(nameof(guildCard));
     this.unk3         = unk3;
     Special           = special ?? throw new ArgumentNullException(nameof(special));
     SectionId         = sectionId;
     ClassRace         = classRace;
     VersionData       = versionData ?? throw new ArgumentNullException(nameof(versionData));
     CustomizationInfo = customizationInfo ?? throw new ArgumentNullException(nameof(customizationInfo));
     CharacterName     = characterName ?? throw new ArgumentNullException(nameof(characterName));
 }