OpenMetaverse.ObjectManager.SetDescriptions C# (CSharp) Method

SetDescriptions() public method

Set the descriptions of multiple objects
public SetDescriptions ( Simulator simulator, uint localIDs, string descriptions ) : void
simulator Simulator A reference to the object where the objects reside
localIDs uint An array which contains the IDs of the objects to change the description of
descriptions string An array which contains the new descriptions of the objects
return void
        public void SetDescriptions(Simulator simulator, uint[] localIDs, string[] descriptions)
        {
            ObjectDescriptionPacket descPacket = new ObjectDescriptionPacket();
            descPacket.AgentData.AgentID = Client.Self.AgentID;
            descPacket.AgentData.SessionID = Client.Self.SessionID;

            descPacket.ObjectData = new ObjectDescriptionPacket.ObjectDataBlock[localIDs.Length];

            for (int i = 0; i < localIDs.Length; ++i)
            {
                descPacket.ObjectData[i] = new ObjectDescriptionPacket.ObjectDataBlock();
                descPacket.ObjectData[i].LocalID = localIDs[i];
                descPacket.ObjectData[i].Description = Utils.StringToBytes(descriptions[i]);
            }

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