RemoveItem() public method

public RemoveItem ( Server.Mobile from, int at ) : bool
from Server.Mobile
at int
return bool
Example #1
0
        public override void OnResponse(Server.Network.NetState sender, RelayInfo info)
        {
            if (m_Aquarium == null || m_Aquarium.Deleted)
            {
                return;
            }

            if (info.ButtonID > 0 && info.ButtonID <= m_Aquarium.Items.Count && m_Edit)
            {
                m_Aquarium.RemoveItem(sender.Mobile, info.ButtonID - 1);
            }

            if (info.ButtonID > 0)
            {
                sender.Mobile.SendGump(new AquariumGump(m_Aquarium, m_Edit));
            }
        }
Example #2
0
        public override void OnResponse(NetState sender, RelayInfo info)
        {
            if (m_Aquarium == null || m_Aquarium.Deleted)
            {
                return;
            }

            bool edit = m_Aquarium.HasAccess(sender.Mobile);

            if (info.ButtonID > 0 && info.ButtonID <= m_Aquarium.Items.Count && edit)
            {
                m_Aquarium.RemoveItem(sender.Mobile, info.ButtonID - 1);
            }

            if (info.ButtonID > 0)
            {
                sender.Mobile.SendGump(new AquariumGump(m_Aquarium, edit));
            }
        }