public static BaseEffect FromFile(BinaryReader BR)
        {
            string EffectName = BR.ReadString();

            string LifetimeType      = BR.ReadString();
            int    LifetimeTypeValue = BR.ReadInt32();

            bool IsStacking   = BR.ReadBoolean();
            int  MaximumStack = BR.ReadInt32();
            int  Range        = BR.ReadInt32();

            BaseEffect NewSkillEffect = DicEffects[EffectName].Copy();

            NewSkillEffect.LifetimeType      = LifetimeType;
            NewSkillEffect.LifetimeTypeValue = LifetimeTypeValue;

            NewSkillEffect.Load(BR);

            NewSkillEffect.Lifetime = 0;

            NewSkillEffect.IsStacking   = IsStacking;
            NewSkillEffect.MaximumStack = MaximumStack;
            NewSkillEffect.Range        = Range;

            return(NewSkillEffect);
        }
Beispiel #2
0
        public static BaseEffect FromFile(BinaryReader BR, Dictionary <string, BaseSkillRequirement> DicRequirement, Dictionary <string, BaseEffect> DicEffect,
                                          Dictionary <string, AutomaticSkillTargetType> DicAutomaticSkillTarget)
        {
            string EffectName = BR.ReadString();

            string LifetimeType      = BR.ReadString();
            int    LifetimeTypeValue = BR.ReadInt32();

            bool IsStacking   = BR.ReadBoolean();
            int  MaximumStack = BR.ReadInt32();
            int  Range        = BR.ReadInt32();

            BaseEffect NewSkillEffect = DicEffect[EffectName].Copy();

            NewSkillEffect.LifetimeType      = LifetimeType;
            NewSkillEffect.LifetimeTypeValue = LifetimeTypeValue;

            NewSkillEffect.Load(BR);

            NewSkillEffect.Lifetime = 0;

            NewSkillEffect.IsStacking   = IsStacking;
            NewSkillEffect.MaximumStack = MaximumStack;
            NewSkillEffect.Range        = Range;

            int ListFollowingSkillCount = BR.ReadInt32();

            for (int S = ListFollowingSkillCount - 1; S >= 0; --S)
            {
                NewSkillEffect.ListFollowingSkill.Add(new BaseAutomaticSkill(BR, DicRequirement, DicEffect, DicAutomaticSkillTarget));
            }

            return(NewSkillEffect);
        }