Beispiel #1
0
        public override void Drink(Mobile from)
        {
            if (from.BeginAction(typeof(LightCycle)))
            {
                m_Time = IntensifiedTime ? 45 : 20;
                //Plume : Addiction
                if (from is PlayerMobile)
                {
                    PlayerMobile drinker = from as PlayerMobile;

                    double Addiction = drinker.CalculateHealAddiction(this);

                    if (Addiction > 100)
                    {
                        drinker.SendMessage("Votre corps ne supporte plus ce traitement");
                        drinker.Poison = Poison.Lesser;
                        drinker.Hunger = 0;
                    }

                    m_Time -= drinker.CalculateNightSightAddiction(this);
                }
                new LightCycle.PotionNightSightTimer(from, this).Start();
                from.LightLevel = LightCycle.DungeonLevel / 2;

                from.FixedParticles(0x376A, 9, 32, 5007, EffectLayer.Waist);
                from.PlaySound(0x1E3);

                BasePotion.PlayDrinkEffect(from);

                if (!Engines.ConPVP.DuelContext.IsFreeConsume(from))
                {
                    this.Consume();
                }
            }
            else
            {
                from.SendMessage("You already have nightsight.");
            }
        }