Exemplo n.º 1
0
        public StatPropertyParser(StatPropertyScanner scnr, StatDefinitionRepository definitions) : base(scnr)
        {
            StatScanner = scnr;

            if (definitions != null)
            {
                var surfaceTypeEnum = definitions.Enumerations["Surface Type"];
                SurfaceTypeParser = new EnumParser(surfaceTypeEnum);

                var conditionSurfaceTypeEnum = definitions.Enumerations["CUSTOM_ConditionSurfaceType"];
                ConditionSurfaceTypeParser = new EnumParser(conditionSurfaceTypeEnum);

                var surfaceStateEnum = definitions.Enumerations["CUSTOM_SurfaceState"];
                SurfaceStateParser = new EnumParser(surfaceStateEnum);

                var skillTargetConditionEnum = definitions.Enumerations["SkillTargetCondition"];
                SkillTargetConditionParser = new EnumParser(skillTargetConditionEnum);

                SkillConditionsWithArgument = definitions.Enumerations["CUSTOM_SkillCondition_1arg"];

                var requirementEnum = definitions.Enumerations["CUSTOM_Requirement"];
                RequirementParser = new EnumParser(requirementEnum);

                RequirementsWithArgument = definitions.Enumerations["CUSTOM_Requirement_1arg"];
            }
        }
Exemplo n.º 2
0
        private void LoadStatDefinitions()
        {
            Definitions = new StatDefinitionRepository();
            var enumerationsPath = Path.Combine(SODPath, "Enumerations.xml");

            Definitions.LoadEnumerations(enumerationsPath);
            var sodPath = Path.Combine(SODPath, "StatObjectDefinitions.sod");

            Definitions.LoadDefinitions(sodPath);
        }
        public StatPropertyParser(StatPropertyScanner scnr, StatDefinitionRepository definitions,
                                  StatValueParserFactory parserFactory) : base(scnr)
        {
            StatScanner = scnr;

            if (definitions != null)
            {
                var surfaceTypeEnum = definitions.Enumerations["Surface Type"];
                SurfaceTypeParser = new EnumParser(surfaceTypeEnum);

                var conditionSurfaceTypeEnum = definitions.Enumerations["CUSTOM_ConditionSurfaceType"];
                ConditionSurfaceTypeParser = new EnumParser(conditionSurfaceTypeEnum);

                var surfaceStateEnum = definitions.Enumerations["CUSTOM_SurfaceState"];
                SurfaceStateParser = new EnumParser(surfaceStateEnum);

                var skillTargetConditionEnum = definitions.Enumerations["SkillTargetCondition"];
                SkillTargetConditionParser = new EnumParser(skillTargetConditionEnum);

                SkillConditionsWithArgument = definitions.Enumerations["CUSTOM_SkillCondition_1arg"];

                var requirementEnum = definitions.Enumerations["CUSTOM_Requirement"];
                RequirementParser = new EnumParser(requirementEnum);

                RequirementsWithArgument = definitions.Enumerations["CUSTOM_Requirement_1arg"];
                EngineStatuses           = definitions.Enumerations["CUSTOM_EngineStatus"];

                StatusParser = parserFactory.CreateReferenceParser(new List <StatReferenceConstraint>
                {
                    new StatReferenceConstraint
                    {
                        StatType = "StatusData"
                    }
                });
            }
        }