Esempio n. 1
0
 protected override void OnTargetFinish(Mobile from)
 {
     m_Owner.FinishSequence();
 }
Esempio n. 2
0
        public static void MoonGate_Callback(object state)
        {
            object[]        states  = ((object[])state);
            GateTravelSpell m_Spell = (GateTravelSpell)states[0];
            int             m_Step  = (int)states[1];
            Point3D         m_Loc   = (Point3D)states[2];
            Map             m_Map   = Map.Felucca;

            if (m_Spell.Runes != 0 && m_Spell.Runes != null && m_Loc.X == 0)
            {
                switch (m_Spell.Runes)
                {
                case 152:
                    m_Loc = new Point3D(3145, 3107, -4);
                    break;

                case 324:
                    m_Loc = new Point3D(3619, 2224, 1);
                    break;

                case 545:
                    m_Loc = new Point3D(3159, 1498, 31);
                    break;

                case 135:
                    m_Loc = new Point3D(4097, 1979, 1);
                    break;

                case 412:
                    m_Loc = new Point3D(3149, 405, 1);
                    break;

                case 345:
                    m_Loc = new Point3D(1083, 2989, -4);
                    break;

                case 213:
                    m_Loc = new Point3D(4582, 282, 1);
                    break;
                }
            }

            if (!m_Spell.Caster.Mounted && m_Spell.Caster.Body.IsHuman)
            {
                m_Spell.Caster.Animate(263, 7, 1, true, false, 0);
            }
            if (m_Step < 3)
            {
                m_Step++;
                Timer.DelayCall(TimeSpan.FromSeconds(1.5), new TimerStateCallback(MoonGate_Callback), new object[] { m_Spell, m_Step, m_Loc });
                AbilityCollection.AreaEffect(TimeSpan.FromSeconds(0.1), TimeSpan.FromSeconds(0.1), 0.1, m_Spell.Caster.Map, (Point3D)m_Spell.Caster.Location, 0x377A, 15, 0, 2, 8, 10, true, false, false);
                if (m_Loc.X != 0)
                {
                    AbilityCollection.AreaEffect(TimeSpan.FromSeconds(0.1), TimeSpan.FromSeconds(0.1), 0.1, m_Map, new Point3D(m_Loc.X, m_Loc.Y, m_Loc.Z + 5), 0x377A, 4, 0, 2, 8, 10, true, false, false);
                }
            }
            else if (m_Loc.X != 0)
            {
                m_Spell.Effect(m_Loc, m_Map, false);
                m_Spell.FinishSequence();
            }
            else
            {
                m_Spell.Caster.SendMessage("You have failed to open a gate to anywhere");
                m_Spell.DoFizzle();
                m_Spell.FinishSequence();
            }
        }