Esempio n. 1
0
        public void DoHeal(Mobile from)
        {
            var toHeal = Utility.RandomMinMax(Scale(from, MinHeal), Scale(from, MaxHeal));

            from.Heal(toHeal);

            HealingStone.OnHealFromPotion(from, toHeal);
        }
Esempio n. 2
0
        public override void OnCast()
        {
            if ( CheckSequence() )
            {
                /* Conjures a Healing Stone that will instantly heal the
                 * Caster when used. The amount of damage healed by the
                 * Healing Stone is determined by the Caster's Imbuing
                 * and Mysticism skills.
                 */

                if ( m_CastCooldownList.Contains( Caster ) )
                {
                    Caster.SendLocalizedMessage( 1115268 ); // You must wait a few seconds before you can summon a new healing stone.
                }
                else
                {
                    HealingStone stone = FindHealingStone( Caster );

                    if ( stone != null )
                        stone.Delete();

                    int healingPoints = Math.Max( 1, (int) ( 1.25 * ( GetBaseSkill( Caster ) + GetBoostSkill( Caster ) ) ) );

                    stone = new HealingStone( healingPoints );

                    if ( Caster.PlaceInBackpack( stone ) )
                    {
                        Effects.SendPacket( Caster, Caster.Map, new GraphicalEffect( EffectType.FixedFrom, Caster.Serial, Serial.Zero, 0x3779, Caster.Location, Caster.Location, 10, 20, true, false ) );
                        Effects.SendPacket( Caster, Caster.Map, new TargetParticleEffect( Caster, 0, 1, 0, 0, 0, 0x1593, 3, 0 ) );

                        Caster.PlaySound( 0x650 );

                        Caster.SendLocalizedMessage( 1080115 ); // A Healing Stone appears in your backpack.

                        m_CastCooldownList.Add( Caster );
                        Timer.DelayCall( CastCooldown, new TimerCallback( delegate { m_CastCooldownList.Remove( Caster ); } ) );
                    }
                    else
                        stone.Delete();
                }
            }

            FinishSequence();
        }
Esempio n. 3
0
 public InternalTimer ( HealingStone stone ) : base(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1))
 {
     m_Stone = stone;
     m_Ticks = 0;
     this.Start();
 }
Esempio n. 4
0
 public InternalTimer(HealingStone stone) : base(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1))
 {
     m_Stone = stone;
     m_Ticks = 0;
     Start();
 }