예제 #1
0
        private void ImportLocation(VacancyData locationData)
        {
            if (LocationsFromVacancies.ContainsKey(locationData.id))
            {
                return;
            }
            _operationLog.Info($"GROUP FROM VACANCY {locationData}");
            var characterGroup = new CharacterGroup()
            {
                AvaiableDirectSlots = locationData.kolvo,
                CharacterGroupName  = locationData.name.Trim(),
                ProjectId           = Project.ProjectId,
                Project             = Project,
                IsRoot = false,
                ParentCharacterGroupIds = new int[] { GetGroupByAllrpgId(locationData.locat).CharacterGroupId },
                IsActive            = true,
                HaveDirectSlots     = true,
                IsPublic            = true,
                Description         = new MarkdownString(locationData.content.Trim()),
                ChildGroupsOrdering = $"allrpg!{locationData.code:00000}"
            };

            LocationsFromVacancies.Add(locationData.id, characterGroup);

            _operationLog.Info($"GROUP.CREATE FROM VACANCY {characterGroup}");
        }
예제 #2
0
        private void ImportCharacter(VacancyData vacancy)
        {
            if (Characters.ContainsKey(vacancy.id))
            {
                return;
            }

            var character = new Character()
            {
                Project                 = Project,
                ProjectId               = Project.ProjectId,
                Description             = new MarkdownString(vacancy.content),
                IsPublic                = true,
                IsActive                = true,
                CharacterName           = vacancy.name,
                IsAcceptingClaims       = true,
                ParentCharacterGroupIds = new int[] { GetGroupByAllrpgId(vacancy.locat).CharacterGroupId },
                PlotElementOrderData    = $"allrpg{vacancy.code:00000}"
            };

            Characters.Add(vacancy.id, character);
        }