Exemplo n.º 1
0
        public MaginciaBazaarPlot(GenericReader reader)
        {
            int version = reader.ReadInt();

            m_Definition = new PlotDef(reader);

            m_Owner     = reader.ReadMobile();
            m_ShopName  = reader.ReadString();
            m_Merchant  = reader.ReadMobile() as BaseBazaarBroker;
            m_Sign      = reader.ReadItem() as PlotSign;
            m_PlotMulti = reader.ReadItem() as BaseBazaarMulti;

            if (reader.ReadBool())
            {
                m_Auction = new MaginciaPlotAuction(reader, this);
            }

            if (m_Merchant != null)
            {
                m_Merchant.Plot = this;
            }

            if (m_Sign != null)
            {
                m_Sign.Plot = this;
            }
        }
Exemplo n.º 2
0
        public void AddInventory(Mobile m, BaseBazaarBroker broker)
        {
            m_Funds  += broker.BankBalance;
            m_Expires = DateTime.UtcNow + TimeSpan.FromDays(7);

            if (broker is CommodityBroker)
            {
                foreach (CommodityBrokerEntry entry in ((CommodityBroker)broker).CommodityEntries)
                {
                    if (entry.Stock > 0)
                    {
                        m_CommodityTypes[entry.CommodityType] = entry.Stock;
                    }
                }
            }
            else if (broker is PetBroker)
            {
                foreach (PetBrokerEntry entry in ((PetBroker)broker).BrokerEntries)
                {
                    if (entry.Pet.Map != Map.Internal || !entry.Pet.IsStabled)
                    {
                        entry.Internalize();
                    }

                    m_Creatures.Add(entry.Pet);
                }
            }
        }
Exemplo n.º 3
0
        public void AddInventoryToWarehouse(Mobile owner, BaseBazaarBroker broker)
        {
            StorageEntry newEntry = null;

            if (broker is CommodityBroker && ((CommodityBroker)broker).HasValidEntry())
            {
                newEntry = new StorageEntry(((CommodityBroker)broker).CommodityEntries, broker.BankBalance);
            }
            else if (broker is PetBroker && ((PetBroker)broker).HasValidEntry())
            {
                newEntry = new StorageEntry(((PetBroker)broker).BrokerEntries, broker.BankBalance);
            }

            if (newEntry != null)
            {
                m_WarehouseStorage[owner] = newEntry;

                /*Your hired broker has transferred any remaining inventory and funds from
                 * your stall at the New Magincia Bazaar into storage at the New Magincia
                 * Warehouse. You must reclaim these items or they will be destroyed! To reclaim
                 * these items, see the Warehouse Superintendent in New Magincia.<br><br>This
                 * service is provided free of charge. If you owed your broker any back fees,
                 * those fees must be paid before you can reclaim your belongings. The storage
                 * period lasts 7 days starting with the expiration of your lease at the New
                 * Magincia Bazaar, and this storage period cannot be extended. Claim your
                 * possessions and gold without delay!<br><br>The expiration time of this
                 * message coincides with the expiration time of your Warehouse storage.*/

                MaginciaLottoSystem.SendMessageTo(owner, new NewMaginciaMessage(1150676, new TextDefinition(1150674), null));
            }
        }
Exemplo n.º 4
0
 public MaginciaBazaarPlot(PlotDef definition)
 {
     m_Definition = definition;
     m_Owner      = null;
     m_PlotMulti  = null;
     m_Merchant   = null;
     m_ShopName   = null;
 }
Exemplo n.º 5
0
        public void FireBroker()
        {
            if (m_Merchant != null)
            {
                m_Merchant.Delete();
                m_Merchant = null;

                if (m_PlotMulti != null)
                {
                    m_PlotMulti.Delete();
                    m_PlotMulti = null;
                }
            }
        }
Exemplo n.º 6
0
        public void Reset()
        {
            if (m_PlotMulti != null)
            {
                Timer.DelayCall(TimeSpan.FromMinutes(2), DeleteMulti_Callback);
            }

            EndTempMultiTimer();

            if (m_Merchant != null)
            {
                m_Merchant.Dismiss();
            }

            m_Owner    = null;
            m_ShopName = null;
            m_Merchant = null;
            m_ShopName = null;
        }
Exemplo n.º 7
0
 public StorageEntry(Mobile m, BaseBazaarBroker broker)
 {
     AddInventory(m, broker);
 }