Ejemplo n.º 1
0
        public override void OnCast()
        {
            BaseWeapon weapon = GetWeapon();

            if (weapon == null || weapon is Fists)
            {
                Caster.SendLocalizedMessage(1060179); //You must be wielding a weapon to use this ability!
            }
            else if (CheckSequence())
            {
                var    level    = GetMasteryLevel();
                double skill    = Caster.Skills[CastSkill].Value * 1.5 + Caster.Skills[DamageSkill].Value;
                double duration = (skill + level * 50) * 2;

                Enhancement.SetValue(Caster, ExtendedWeaponAttribute.MysticWeapon, 10 + (5 * level), "MysticWeapon");
                BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.MysticWeapon, 1155899, 1156055, TimeSpan.FromSeconds(duration), Caster));

                Effects.SendPacket(Caster.Location, Caster.Map, new ParticleEffect(EffectType.FixedFrom, Caster.Serial, Serial.Zero, 0x3728, Caster.Location, Caster.Location, 1, 13, false, false, 1161, 0, 7, 5526, 1, Caster.Serial, 10, 0));
                Effects.SendPacket(Caster.Location, Caster.Map, new ParticleEffect(EffectType.FixedFrom, Caster.Serial, Serial.Zero, 0x3779, Caster.Location, Caster.Location, 1, 15, false, false, 63, 0, 7, 0, 1, Caster.Serial, 10, 0));

                weapon.AddMysticMod(Caster);
                weapon.InvalidateProperties();

                Expires = DateTime.UtcNow + TimeSpan.FromSeconds(duration);
                BeginTimer();

                _Weapon = weapon;
            }

            FinishSequence();
        }
Ejemplo n.º 2
0
        public override void OnCast()
        {
            BaseWeapon weapon = GetWeapon();

            if (weapon == null || weapon is Fists)
            {
                Caster.SendLocalizedMessage(1060179); //You must be wielding a weapon to use this ability!
            }
            else if (CheckSequence())
            {
                double skill    = ((Caster.Skills[CastSkill].Value * 1.5) + Caster.Skills[DamageSkill].Value);
                double duration = (skill + (GetMasteryLevel() * 50)) * 2;

                Enhancement.SetValue(Caster, ExtendedWeaponAttribute.MysticWeapon, 25, "MysticWeapon");
                BuffInfo.AddBuff(Caster, new BuffInfo(BuffIcon.MysticWeapon, 1155899, 1156055, TimeSpan.FromSeconds(duration), Caster));

                Effects.SendLocationParticles(EffectItem.Create(Caster.Location, Caster.Map, EffectItem.DefaultDuration), 0x36CB, 1, 14, 0x55C, 7, 9915, 0);
                Caster.PlaySound(0x64E);

                weapon.AddMysticMod(Caster);
                weapon.InvalidateProperties();

                Expires = DateTime.UtcNow + TimeSpan.FromSeconds(duration);
                BeginTimer();

                _Weapon = weapon;
            }

            FinishSequence();
        }