OpenMetaverse.ObjectManager.SetSaleInfo C# (CSharp) Method

SetSaleInfo() public method

Sets the sale properties of multiple objects
public SetSaleInfo ( Simulator simulator, List localIDs, SaleType saleType, int price ) : void
simulator Simulator The the objects are located
localIDs List An array containing the Local IDs of the objects
saleType SaleType One of the options from the enum
price int The price of the object
return void
        public void SetSaleInfo(Simulator simulator, List<uint> localIDs, SaleType saleType, int price)
        {
            ObjectSaleInfoPacket sale = new ObjectSaleInfoPacket();
            sale.AgentData.AgentID = Client.Self.AgentID;
            sale.AgentData.SessionID = Client.Self.SessionID;
            sale.ObjectData = new ObjectSaleInfoPacket.ObjectDataBlock[localIDs.Count];

            for (int i = 0; i < localIDs.Count; i++)
            {
                sale.ObjectData[i] = new ObjectSaleInfoPacket.ObjectDataBlock();
                sale.ObjectData[i].LocalID = localIDs[i];
                sale.ObjectData[i].SalePrice = price;
                sale.ObjectData[i].SaleType = (byte)saleType;
            }

            Client.Network.SendPacket(sale, simulator);
        }

Same methods

ObjectManager::SetSaleInfo ( Simulator simulator, uint localID, SaleType saleType, int price ) : void