Ejemplo n.º 1
0
        public override void Drink(Mobile from)
        {
            if (TransformationSpellHelper.UnderTransformation(from, typeof(Spells.Necromancy.VampiricEmbraceSpell)))
            {
                from.SendLocalizedMessage(1061652);                   // The garlic in the potion would surely kill you.
            }
            else if (from.Poisoned)
            {
                //Plume : Addiction
                if (from is PlayerMobile)
                {
                    PlayerMobile drinker = from as PlayerMobile;

                    double Addiction = drinker.CalculateCureAddiction(this);

                    if (Addiction > 100)
                    {
                        drinker.SendMessage("Votre corps ne supporte plus ce traitement");
                        AOS.Damage(drinker, 15, true, 0, 0, 0, 100, 0);
                    }
                    else
                    {
                        double CureScalar = Addiction / 100 * 0.95;
                        DoCure(from, CureScalar);
                    }
                    drinker.IncAddiction(this);
                }
                else
                {
                    DoCure(from);
                }

                BasePotion.PlayDrinkEffect(from);

                from.FixedParticles(0x373A, 10, 15, 5012, EffectLayer.Waist);
                from.PlaySound(0x1E0);

                if (!Engines.ConPVP.DuelContext.IsFreeConsume(from))
                {
                    this.Consume();
                }
            }
            else
            {
                from.SendLocalizedMessage(1042000);                   // You are not poisoned.
            }
        }