Esempio n. 1
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            if (importObject.reserved[7] != null)
            {
                this.type = (TransformType)Enum.Parse(typeof(TransformType), importObject.reserved[7].Trim(), true);
            }

            this.model = Utility.ClientNpcIndex[importObject.reserved[8].Trim()];
        }
Esempio n. 2
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);
            base.Import(importObject, typeof(SnareEffect), 1, 0, 1, 0, 5, Stat.Speed);
            base.Import(importObject, typeof(SnareEffect), 1, 0, 1, 0, 5, Stat.FlySpeed);

            foreach (var change in this.change)
            {
                change.value = -change.value;
            }
        }
Esempio n. 3
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            this.count = Int32.Parse(importObject.reserved[1].Trim());

            if (importObject.reserved[15] != null)
            {
                this.level = Int32.Parse(importObject.reserved[15].Trim());
            }
        }
Esempio n. 4
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            ClientSkill skill = Utility.SkillIndex[importObject.reserved[5].Trim()];

            if (skill != null)
            {
                this.skill_id = skill.id;
            }
        }
Esempio n. 5
0
 public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
 {
     if (importObject.Skill.id == 19230)
     {
         this.value = Int32.Parse(importObject.reserved[10].Trim());
     }
     else
     {
         base.Import(importObject, getters);
     }
 }
Esempio n. 6
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            this.percent = importObject.reserved[5].Trim() == "1";
            this.value   = Int32.Parse(importObject.reserved[1].Trim());
            if (importObject.reserved[0] != null)
            {
                this.delta = Int32.Parse(importObject.reserved[0].Trim());
            }
        }
Esempio n. 7
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            //  E1 Reserved: CH_Chant_ImprovedMagic_G1_Effect null 20 10 Party Friend 1 0

            this.skill_id = Utility.SkillIndex[importObject.reserved[0].Trim()].id;
            // Party distance in %
            this.distance = Int32.Parse(importObject.reserved[2].Trim());
            // Friend distane in absolute values?
            // this.distance = Int32.Parse(importObject.reserved[3].Trim());
        }
Esempio n. 8
0
 public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
 {
     base.Import(importObject, getters);
     if (importObject.remain[0] != null)
     {
         this.delta = importObject.remain[0].Value;
     }
     else
     {
         this.delta = this.duration;
     }
 }
Esempio n. 9
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            this.change = new ChangeList();
            var change = new Change();

            change.stat  = modifiersenum.BLOCK;
            change.func  = StatFunc.PERCENT;
            change.value = Int32.Parse(importObject.reserved[1].Trim());
            this.change.Add(change);
        }
Esempio n. 10
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            this.armor  = Utility.GetArmorType(importObject.reserved[4]);
            this.change = new ChangeList();
            var change = new Change();

            change.stat  = modifiersenum.PHYSICAL_DEFENSE;
            change.value = Int32.Parse(importObject.reserved[1]);
            change.delta = Int32.Parse(importObject.reserved[0]);
            change.func  = StatFunc.PERCENT;
            this.change.Add(change);
        }
Esempio n. 11
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);
            this.radius = Int32.Parse(importObject.reserved[4].Trim());
            this.value  = 0; // drop it

            if (importObject.reserved[1] != null)
            {
                hitvalue = Int32.Parse(importObject.reserved[1].Trim());
            }
            if (importObject.reserved[0] != null)
            {
                hitdelta = Int32.Parse(importObject.reserved[0].Trim());
            }
        }
Esempio n. 12
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            if (importObject.reserved[0] != null)
            {
                int value = Int32.Parse(importObject.reserved[0].Trim());
                if (value == 99999)
                {
                    this.disable = true;                     // healing is disabled for 60 secs
                    percent      = value;
                    return;
                }
            }
            this.percent = Int32.Parse(importObject.reserved[1].Trim());
        }
Esempio n. 13
0
        //[XmlAttribute]
        //[DefaultValue(0)]
        //public int bufcount;

        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);
            base.change = new ChangeList();
            var change = new Change();

            change.func  = StatFunc.PERCENT;
            change.stat  = modifiersenum.SPEED;
            change.value = Int16.Parse(importObject.reserved[1]) - 100;
            base.change.Add(change);
            this.value = Int16.Parse(importObject.reserved[6]);

            //if (importObject.reserved[2] != null) {
            //    this.bufcount = Int32.Parse(importObject.reserved[2].Trim());
            //}
        }
Esempio n. 14
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);
            percent = importObject.reserved[5] != null && importObject.reserved[5].Trim() == "1";
            if (importObject.cond_race != null)
            {
                cond_race = (SkillTargetRace)Enum.Parse(typeof(SkillTargetRace), importObject.cond_race.Trim(),
                                                        true);
            }

            HitType hitType = (HitType)Enum.Parse(typeof(HitType), importObject.reserved_cond1.Trim(), true);

            if (Enum.IsDefined(typeof(HitType), hitType))
            {
                attacktype  = (AttackType)hitType;
                probability = importObject.reserved_cond1_prob[1].Value;
            }
            if (this.GetType().Equals(typeof(ProtectEffect)) ||
                this.GetType().Equals(typeof(ReflectorEffect)))
            {
                if (importObject.reserved[8] == null)
                {
                    if (importObject.reserved[7] != null)
                    {
                        value = Int32.Parse(importObject.reserved[7].Trim());
                    }
                    if (importObject.reserved[6] != null)
                    {
                        delta = Int32.Parse(importObject.reserved[6].Trim());
                    }
                }
                else
                {
                    value = Int32.Parse(importObject.reserved[8].Trim());
                    delta = Int32.Parse(importObject.reserved[7].Trim());
                }
            }
            else if (this.GetType() != typeof(ProvokerEffect))
            {
                value    = Int32.Parse(importObject.reserved[7].Trim());
                delta    = Int32.Parse(importObject.reserved[6].Trim());
                hitvalue = Int32.Parse(importObject.reserved[1].Trim());
                hitdelta = Int32.Parse(importObject.reserved[0].Trim());
            }
        }
Esempio n. 15
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            this.ultra_skill = Int32.Parse(importObject.reserved[0].Trim());
            if (importObject.reserved[1] != null)
            {
                int additional = Int32.Parse(importObject.reserved[1].Trim());
                if (additional == 1)
                {
                    disappear = true;
                }
                else
                {
                    Debug.Print("Unknown value for PetOrderUseUltraSkillEffect: {0}", additional);
                }
            }
        }
Esempio n. 16
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            Stat stat = Stat.None;

            base.Import(importObject, typeof(StatupEffect), 1, 0, 1, 0, 5, stat);

            if (importObject.reserved[13] != null)
            {
                stat = (Stat)Enum.Parse(typeof(Stat), importObject.reserved[13].Trim(), true);
                base.Import(importObject, typeof(StatupEffect), 3, 2, 3, 2, 6, stat);
            }
            if (importObject.reserved[17] != null)
            {
                stat = (Stat)Enum.Parse(typeof(Stat), importObject.reserved[17].Trim(), true);
                base.Import(importObject, typeof(StatupEffect), 15, 14, 15, 14, 16, stat);
            }
        }
Esempio n. 17
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            //this.percent = importObject.reserved[5].Trim() == "1";

            // zer0patches : Need to verify positions?
            if (importObject.reserved[1] != null)
            {
                this.value = Int32.Parse(importObject.reserved[1].Trim());
            }
            else
            {
                this.value = 1;
            }

            //if (importObject.reserved[0] != null)
            //    this.delta = Int32.Parse(importObject.reserved[0].Trim());
        }
Esempio n. 18
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            string provokerSkill = importObject.reserved[16].Trim();

            try {
                this.skill_id = Utility.SkillIndex[provokerSkill].id;
            }
            catch {
                // TODO: Add Error Handling for unmatched skill and log
                return;
            }

            provoke_target = (ProvokeTarget)Enum.Parse(typeof(ProvokeTarget), importObject.reserved[13], true);

            /*
             *          if (importObject.reserved_cond1 != null) {
             *                  string type = importObject.reserved_cond1.Trim().ToUpper();
             *                  if(type != "EVERYHIT") this.hittype = type;
             *
             *
             *                  HitType hitType = (HitType)Enum.Parse(typeof(HitType), importObject.reserved_cond1.Trim(), true);
             *                  if (Enum.IsDefined(typeof(HitType), hitType)) {
             *                          base.attacktype = (AttackType)hitType;
             *                          //base.probability = importObject.reserved_cond1_prob[1].Value;
             *                  }
             *
             *          }
             */
            /*
             *          if (importObject.reserved_cond1_prob[1] != null) {
             *                  this.hittypeprob2 = importObject.reserved_cond1_prob[1].Value;
             *          }
             * /
             *
             * /*
             *          if (importObject.reserved[4] != null) {
             *                  this.radius = Int32.Parse(importObject.reserved[4].Trim());
             *          }
             * */
        }
Esempio n. 19
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            if (importObject.reserved[0] != null)
            {
                int value = Int32.Parse(importObject.reserved[0].Trim());
                if (value == 99999)
                {
                    this.disable = true;                     // healing is disabled for 60 secs
                    //percent = value;
                    return;
                }
            }

            /*
             * if (importObject.reserved[1] != null) {
             *      this.percent = Int32.Parse(importObject.reserved[1].Trim());
             * }
             * else {
             *      this.percent = 1;
             * }
             */
            if (this.change == null)
            {
                this.change = new ChangeList();
            }
            Change change   = new Change();
            Stat   usedStat = Stat.HealSkillBoost;

            change.stat = new NamedEnum <modifiersenum>(usedStat.ToString());
            change.func = StatFunc.PERCENT;
            if (importObject.reserved[1] != null)
            {
                change.value = -Int32.Parse(importObject.reserved[1].Trim());
            }
            else
            {
                change.value = -Int32.Parse(importObject.reserved[0].Trim());
            }
            this.change.Add(change);
        }
Esempio n. 20
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            string provokerSkill = importObject.reserved[16].Trim();

            this.skill_id = Utility.SkillIndex[provokerSkill].id;

            provoke_target = (ProvokeTarget)Enum.Parse(typeof(ProvokeTarget), importObject.reserved[13], true);

            if (importObject.reserved_cond1 != null)
            {
                HitType hitType = (HitType)Enum.Parse(typeof(HitType), importObject.reserved_cond1.Trim(), true);
                if (Enum.IsDefined(typeof(HitType), hitType))
                {
                    base.attacktype  = (AttackType)hitType;
                    base.probability = importObject.reserved_cond1_prob[1].Value;
                }
            }
        }
Esempio n. 21
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            this.value = Int32.Parse(importObject.reserved[1].Trim());
            int dir = Int32.Parse(importObject.reserved[2].Trim());

            if (dir == 1)
            {
                direction = "FRONT";
            }
            else if (dir == 2)
            {
                direction = "BACK";
            }
            else
            {
                Debug.Print("Unknown direction for RandomMoveLocEffect: {0}", importObject.Skill.id);
            }
        }
Esempio n. 22
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            this.weapon = Utility.GetWeaponType(importObject.reserved[4]);
            this.change = new ChangeList();
            var change = new Change();

            if (this.weapon == weaponType.ORB_2H || this.weapon == weaponType.BOOK_2H)
            {
                change.stat = modifiersenum.MAGICAL_ATTACK;
            }
            else
            {
                change.stat = modifiersenum.PHYSICAL_ATTACK;
            }
            change.value = Int32.Parse(importObject.reserved[1]);
            change.delta = Int32.Parse(importObject.reserved[0]);
            change.func  = StatFunc.PERCENT;
            this.change.Add(change);
        }
Esempio n. 23
0
        /*
         * [XmlAttribute]
         * public float percent;
         */
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            // this.percent = Int32.Parse(importObject.reserved[1]);

            if (this.change == null)
            {
                this.change = new ChangeList();
            }
            Change change   = new Change();
            Stat   usedStat = Stat.HealSkillBoost;

            change.stat = new NamedEnum <modifiersenum>(usedStat.ToString());
            change.func = StatFunc.PERCENT;
            if (importObject.reserved[1] != null)
            {
                change.value = Int32.Parse(importObject.reserved[1].Trim());
            }
            this.change.Add(change);
        }
Esempio n. 24
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);
            if (importObject.reserved[1] != null)
            {
                this.value = Int32.Parse(importObject.reserved[1].Trim());
            }
            else
            {
                this.value = 1;
            }
            if (importObject.reserved[0] != null)
            {
                this.delta = Int32.Parse(importObject.reserved[0].Trim());
            }
            else
            {
                this.delta = 0;
            }

            this.type = (EnmityType)importObject.Skill.hostile_type;
        }
Esempio n. 25
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            this.percent = importObject.reserved[5].Trim() == "1";
            if (this.percent)
            {
                if (importObject.reserved[1] != null)
                {
                    this.value = Int32.Parse(importObject.reserved[1].Trim());
                }
                if (importObject.reserved[0] != null)
                {
                    this.delta = Int32.Parse(importObject.reserved[0].Trim());
                }
            }
            else
            {
                base.Import(importObject, typeof(CurseEffect), 1, 0, 1, 0, 5, Stat.MaxHP);
                base.Import(importObject, typeof(CurseEffect), 1, 0, 1, 0, 5, Stat.MaxMP);
            }
        }
Esempio n. 26
0
        public int signetlvl;         // %e1.SignetBurst.SignetGrade

        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            this.signet    = "SYSTEM_SKILL_SIGNET" + importObject.reserved[6].Trim();
            this.signetlvl = Int32.Parse(importObject.reserved[7]);

            this.value = Int32.Parse(importObject.reserved[1]);
            this.delta = Int32.Parse(importObject.reserved[0]);

            int[] exceptions  = { 823, 824, 853, 11573 };
            bool  isException = exceptions.Contains(importObject.Skill.id);

            if (isException)
            {
                this.subeffect = new SubEffect();
                string      skillName = importObject.reserved[12].Trim();
                ClientSkill skill     = Utility.SkillIndex[skillName];
                if (skill == null)
                {
                    skill = Utility.SkillIndex[String.Format("NormalAttack_{0}", skillName)];
                }
                this.subeffect.skill_id = skill.id;

                return;
            }

            if (importObject.reserved[14] != null)
            {
                this.subeffect          = new SubEffect();
                this.subeffect.skill_id = Utility.SkillIndex[importObject.reserved[14].Trim()].id;
            }

            if (importObject.reserved[12] != null)
            {
                base.AddModifiers(importObject.reserved[12].Trim().ToLower(), importObject, 5, 4);
            }
        }
Esempio n. 27
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            this.signet    = "SYSTEM_SKILL_SIGNET" + importObject.reserved[12].Trim();
            this.signetlvl = Int32.Parse(importObject.reserved[13]);
            string      signetName = String.Format("Signet1_{0}", this.signetlvl);
            ClientSkill skill      = Utility.SkillIndex[signetName];

            if (skill == null)
            {
                Debug.Print("Missing signet skill '{0}' for skillId {1}", signetName, importObject.Skill.id);
            }
            else
            {
                signetid = skill.id;
            }

            if (importObject.reserved[3] != null)
            {
                this.value = Int32.Parse(importObject.reserved[3]);
                this.delta = Int32.Parse(importObject.reserved[2]);
            }
            else if (importObject.reserved[1] != null)
            {
                this.value = Int32.Parse(importObject.reserved[1]);
                this.delta = Int32.Parse(importObject.reserved[0]);
            }

            if (importObject.reserved[6] != null)
            {
                string subName = "NormalAttack_" + importObject.reserved[6].Trim();
                this.subeffect          = new SubEffect();
                this.subeffect.skill_id = Utility.SkillIndex[subName].id;
            }

            this.probability = Int32.Parse(importObject.reserved[15]);
        }
Esempio n. 28
0
        public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
        {
            base.Import(importObject, getters);

            if (importObject.reserved[14] != null)
            {
                hp      = Int32.Parse(importObject.reserved[14].Trim());
                percent = true;
            }

            if (importObject.reserved[16] != null)
            {
                mp      = Int32.Parse(importObject.reserved[16].Trim());
                percent = true;
            }

            if (importObject.reserved[3] != null)
            {
                this.value = Int32.Parse(importObject.reserved[3].Trim());
            }
            if (importObject.reserved[2] != null)
            {
                this.delta = Int32.Parse(importObject.reserved[2].Trim());
            }

            if (this.value == 0 && this.delta == 0)
            {
                if (importObject.reserved[1] != null)
                {
                    this.value = Int32.Parse(importObject.reserved[1].Trim());
                }
                if (importObject.reserved[0] != null)
                {
                    this.delta = Int32.Parse(importObject.reserved[0].Trim());
                }
            }
        }
Esempio n. 29
0
 public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
 {
     base.Import(importObject, getters);
     base.Import(importObject, typeof(StatboostEffect), 1, 0, 3, 2, 5, Stat.None);
 }
Esempio n. 30
0
 public override void Import(ClientEffect importObject, IEnumerable <FieldInfo> getters)
 {
     base.Import(importObject, getters);
     this.range = Int32.Parse(importObject.reserved[4].Trim());
 }