Пример #1
0
        public BaseSkillActivation(BinaryReader BR)
        {
            ActivationPercentage = BR.ReadByte();

            //Requirements
            int ListRequirementCount = BR.ReadInt32();

            ListRequirement = new List <BaseSkillRequirement>(ListRequirementCount);
            for (int R = 0; R < ListRequirementCount; R++)
            {
                ListRequirement.Add(BaseSkillRequirement.LoadCopy(BR));
            }

            //Effects.
            int ListEffectCount = BR.ReadInt32();

            ListEffect       = new List <BaseEffect>(ListEffectCount);
            ListEffectTarget = new List <List <string> >(ListEffectCount);
            for (int E = 0; E < ListEffectCount; E++)
            {
                int ListActivationTypesCount = BR.ReadInt32();

                List <string> NewListActivationType = new List <string>(ListActivationTypesCount);
                for (int A = 0; A < ListActivationTypesCount; A++)
                {
                    NewListActivationType.Add(BR.ReadString());
                }

                ListEffectTarget.Add(NewListActivationType);

                ListEffect.Add(BaseEffect.FromFile(BR));
            }
        }
Пример #2
0
        public void QuickLoad(BinaryReader BR)
        {
            int DicActivePilotEffectCount = BR.ReadInt32();

            DicActiveEffect = new Dictionary <string, List <BaseEffect> >(DicActivePilotEffectCount);
            for (int i = 0; i < DicActivePilotEffectCount; ++i)
            {
                string Key = BR.ReadString();

                int ListEffectValueCount     = BR.ReadInt32();
                List <BaseEffect> ListEffect = new List <BaseEffect>(ListEffectValueCount);
                for (int E = 0; E < ListEffectValueCount; ++E)
                {
                    ListEffect.Add(BaseEffect.FromFile(BR));
                }

                DicActiveEffect.Add(Key, ListEffect);
            }
        }
Пример #3
0
        public BaseSkillActivation(BinaryReader BR, Dictionary <string, BaseSkillRequirement> DicRequirement, Dictionary <string, BaseEffect> DicEffect,
                                   Dictionary <string, AutomaticSkillTargetType> DicAutomaticSkillTarget)
        {
            ActivationPercentage = BR.ReadByte();
            _Weight = BR.ReadInt32();

            //Requirements
            int ListRequirementCount = BR.ReadInt32();

            ListRequirement = new List <BaseSkillRequirement>(ListRequirementCount);
            for (int R = 0; R < ListRequirementCount; R++)
            {
                ListRequirement.Add(BaseSkillRequirement.LoadCopy(BR, DicRequirement));
            }

            //Effects.
            int ListEffectCount = BR.ReadInt32();

            ListEffect           = new List <BaseEffect>(ListEffectCount);
            ListEffectTarget     = new List <List <string> >(ListEffectCount);
            ListEffectTargetReal = new List <List <AutomaticSkillTargetType> >(ListEffectCount);
            for (int E = 0; E < ListEffectCount; E++)
            {
                int ListActivationTypesCount = BR.ReadInt32();

                List <string> NewListActivationType = new List <string>(ListActivationTypesCount);
                List <AutomaticSkillTargetType> NewListEffectTargetReal = new List <AutomaticSkillTargetType>(ListActivationTypesCount);
                for (int A = 0; A < ListActivationTypesCount; A++)
                {
                    string ListActivationType = BR.ReadString();
                    NewListActivationType.Add(ListActivationType);
                    NewListEffectTargetReal.Add(DicAutomaticSkillTarget[ListActivationType].Copy());
                }

                ListEffectTarget.Add(NewListActivationType);
                ListEffectTargetReal.Add(NewListEffectTargetReal);

                ListEffect.Add(BaseEffect.FromFile(BR, DicRequirement, DicEffect, DicAutomaticSkillTarget));
            }
        }