コード例 #1
0
 protected override void OnTick()
 {
     if (DateTime.Now >= m_Expire)
     {
         ResearchRockFlesh.RemoveEffect(m_m);
         Stop();
     }
 }
コード例 #2
0
        public override void OnCast()
        {
            if (!Caster.CanBeginAction(typeof(ResearchRockFlesh)))
            {
                ResearchRockFlesh.RemoveEffect(Caster);
            }

            ResistanceMod[] mods = (ResistanceMod[])TableStoneFlesh[Caster];

            mods = new ResistanceMod[1]
            {
                new ResistanceMod(ResistanceType.Physical, 90)
            };

            TableStoneFlesh[Caster] = mods;

            for (int i = 0; i < mods.Length; ++i)
            {
                Caster.AddResistanceMod(mods[i]);
            }

            double TotalTime = DamagingSkill(Caster) * 4;

            new InternalTimer(Caster, TimeSpan.FromSeconds(TotalTime)).Start();

            Caster.BodyMod = 14;
            Caster.HueMod  = 0xB31;

            Mobiles.IMount mt = Caster.Mount;
            if (mt != null)
            {
                Server.Mobiles.EtherealMount.EthyDismount(Caster, true);
                mt.Rider = null;
            }

            Caster.SendMessage("Your flesh turns to stone.");

            Server.Misc.Research.ConsumeScroll(Caster, true, spellID, false);

            KarmaMod(Caster, ((int)RequiredSkill + RequiredMana));

            Point3D hands = new Point3D((Caster.X + 1), (Caster.Y + 1), (Caster.Z + 8));

            Effects.SendLocationParticles(EffectItem.Create(hands, Caster.Map, EffectItem.DefaultDuration), 0x3837, 9, 32, Server.Items.CharacterDatabase.GetMySpellHue(Caster, 0xB7F), 0, 5022, 0);
            Caster.PlaySound(0x65A);

            FinishSequence();
        }