Exemplo n.º 1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (m_Bomb.Deleted || m_Bomb.Map == Map.Internal)
                {
                    return;
                }

                IPoint3D p = targeted as IPoint3D;

                if (p == null)
                {
                    return;
                }

                Map map = from.Map;

                if (map == null)
                {
                    return;
                }

                SpellHelper.GetSurfaceTop(ref p);

                from.RevealingAction();

                IEntity to;

                if (p is Mobile)
                {
                    to = (Mobile)p;
                }
                else
                {
                    to = new DummyEntity(Serial.Zero, new Point3D(p), map);
                }

                Effects.SendMovingEffect(from, to, m_Bomb.ItemID, 7, 0, false, false, m_Bomb.Hue, 0);

                m_Bomb.Internalize();
                Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerStateCallback(m_Bomb.Reposition_OnTick), new object[] { from, p, map });
            }