Esempio n. 1
0
        private void AddPotion(Mobile from, params PotionEffect[] effects)
        {
            Item item = GetPotion(from, effects);

            if (item != null)
            {
                m_Plant.Pour(from, item);
            }
            else
            {
                int message;
                if (m_Plant.ApplyPotion(effects[0], true, out message))
                {
                    from.SendLocalizedMessage(1061884); // You don't have any strong potions of that type in your pack.

                    from.Target = new PlantPourTarget(m_Plant);
                    from.SendLocalizedMessage(1060808, "#" + m_Plant.GetLocalizedPlantStatus().ToString()); // Target the container you wish to use to water the ~1_val~.

                    return;
                }
                else
                {
                    m_Plant.LabelTo(from, message);
                }
            }

            from.SendGump(new MainPlantGump(m_Plant));
        }