示例#1
0
            private bool AddToPack(Mobile from, PlantType type, PlantHue hue, bool showtype)
            {
                if (from == null || from.Deleted || from.Backpack == null || from.Backpack.Deleted)
                {
                    return(false);
                }

                if (!from.InRange(m_Box.GetWorldLocation(), 3) || !from.InLOS(m_Box.GetWorldLocation()))
                {
                    from.SendLocalizedMessage(500446);                       // That is too far away.
                    return(false);
                }

                Seed seed = new Seed(type, hue, showtype);

                if (!from.Backpack.TryDropItem(from, seed, true))
                {
                    seed.MoveToWorld(from.Location, from.Map);
                }
                return(true);
            }
示例#2
0
            private bool AddToPack(Mobile from, PlantType type, PlantHue hue, bool showtype)
            {
                if (from == null || from.Deleted || from.Backpack == null || from.Backpack.Deleted)
                {
                    return(false);
                }

                if (!from.InRange(m_Box.GetWorldLocation(), 3) || !from.InLOS(m_Box))
                {
                    from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
                    return(false);
                }

                Seed seed = new Seed(type, hue, showtype);

                if (!from.Backpack.TryDropItem(from, seed, true))
                {
                    seed.MoveToWorld(from.Location, from.Map);
                }
                return(true);
            }