Beispiel #1
0
        public void OnChop(Mobile from)
        {
            BaseHouse house = BaseHouse.FindHouseAt(from);

            if (house != null && house.IsCoOwner(from))
            {
                DaviesLockerDeed deed = new DaviesLockerDeed();


                for (int i = 0; i < m_Entries.Count; ++i)
                {
                    DaviesLockerEntry e = (DaviesLockerEntry)Entries[i];
                    deed.m_Entries.Add(new DaviesDeedEntry(e.type, e.Level, e.Decoder, e.Map, e.Location2d, e.Location3d,
                                                           e.Bounds, e.Mapnumber));
                }

                from.AddToBackpack(deed);


                Delete();

                BaseHouse house2 = BaseHouse.FindHouseAt(this);

                if (house2 != null && house2.Addons.Contains(this))
                {
                    house2.Addons.Remove(this);
                }
                from.SendMessage("Davies Locker Deed has been placed in your backpack");
            }
        }
Beispiel #2
0
        public void ViewMap(Mobile from, DaviesLockerEntry e, int index)
        {
            if (m_DefaultIndex == index)
            {
                m_DefaultIndex = -1;
            }

            from.CloseGump(typeof(DaviesMapGump));
            from.SendGump(new DaviesMapGump(e.Location2d.X, e.Location2d.Y));
        }
Beispiel #3
0
        public void DropTMap(Mobile from, DaviesLockerEntry e, int index)
        {
            if (m_DefaultIndex == index)
            {
                m_DefaultIndex = -1;
            }

            m_Entries.RemoveAt(index);

            if (e.type == 1)
            {
                TreasureMap tmap = new TreasureMap(e.Level, e.Map)
                {
                    Decoder       = e.Decoder,
                    ChestLocation = e.Location2d,
                    ChestMap      = e.Map,
                    Bounds        = e.Bounds
                };

                tmap.ClearPins();
                tmap.AddWorldPin(e.Location2d.X, e.Location2d.Y);

                from.AddToBackpack(tmap);

                from.SendMessage("You have removed the Treasure Map");
            }
            else if (e.type == 2)
            {
                SOS sos = new SOS(e.Map, e.Level)
                {
                    TargetLocation = e.Location3d
                };

                from.AddToBackpack(sos);
                from.SendMessage("You have removed the S.O.S.");
            }
            else
            {
                MessageInABottle mib = new MessageInABottle(e.Map, e.Level);

                from.AddToBackpack(mib);
                from.SendMessage("You have removed the message in a bottle");
            }
        }
        public void ViewMap(Mobile from, DaviesLockerEntry e, int index)
        {
            if (m_DefaultIndex == index)
                m_DefaultIndex = -1;

            from.CloseGump(typeof (DaviesMapGump));
            from.SendGump(new DaviesMapGump(e.Location2d.X, e.Location2d.Y));
        }
        public void DropTMap(Mobile from, DaviesLockerEntry e, int index)
        {
            if (m_DefaultIndex == index)
                m_DefaultIndex = -1;

            m_Entries.RemoveAt(index);

            if (e.type == 1)
            {
                TreasureMap tmap = new TreasureMap(e.Level, e.Map)
                {
                    Decoder = e.Decoder,
                    ChestLocation = e.Location2d,
                    ChestMap = e.Map,
                    Bounds = e.Bounds
                };

                tmap.ClearPins();
                tmap.AddWorldPin(e.Location2d.X, e.Location2d.Y);

                from.AddToBackpack(tmap);

                from.SendMessage("You have removed the Treasure Map");
            }
            else if (e.type == 2)
            {
                SOS sos = new SOS(e.Map, e.Level) {TargetLocation = e.Location3d};

                from.AddToBackpack(sos);
                from.SendMessage("You have removed the S.O.S.");
            }
            else
            {
                MessageInABottle mib = new MessageInABottle(e.Map, e.Level);

                from.AddToBackpack(mib);
                from.SendMessage("You have removed the message in a bottle");
            }
        }