예제 #1
0
            protected override void OnTarget(Mobile from, object targeted)
            {
                if (m_Potion.Deleted || m_Potion.Map == Map.Internal)
                {
                    return;
                }

                IPoint3D p = targeted as IPoint3D;

                if (p == null || from.Map == null)
                {
                    return;
                }

                // Add delay
                BaseFrostbitePotion.AddDelay(from);

                SpellHelper.GetSurfaceTop(ref p);

                from.RevealingAction();

                IEntity to;

                if (p is Mobile)
                {
                    to = (Mobile)p;
                }
                else
                {
                    to = new Entity(Serial.Zero, new Point3D(p), from.Map);
                }

                Effects.SendMovingEffect(from, to, 0xF0D, 7, 0, false, false, m_Potion.Hue, 0);
                Timer.DelayCall(TimeSpan.FromSeconds(1.5), new TimerStateCallback(m_Potion.Explode_Callback), new object[] { from, new Point3D(p), from.Map });
            }
예제 #2
0
 public ThrowTarget(BaseFrostbitePotion potion) : base(12, true, TargetFlags.None)
 {
     m_Potion = potion;
 }