public void objdesc(int locid, string desc) { ObjectDescriptionPacket packet = new ObjectDescriptionPacket(); packet.AgentData.AgentID = this.frame.AgentID; packet.AgentData.SessionID = this.frame.SessionID; ObjectDescriptionPacket.ObjectDataBlock[] temp = new ObjectDescriptionPacket.ObjectDataBlock[1]; temp[0] = new ObjectDescriptionPacket.ObjectDataBlock(); temp[0].LocalID = (uint)locid; temp[0].Description = Utils.StringToBytes(desc); packet.ObjectData = temp; this.proxy.InjectPacket(packet, Direction.Outgoing); }
/// <summary> /// Set the descriptions of multiple objects /// </summary> /// <param name="simulator">A reference to the <seealso cref="OpenMetaverse.Simulator"/> object where the objects reside</param> /// <param name="localIDs">An array which contains the IDs of the objects to change the description of</param> /// <param name="descriptions">An array which contains the new descriptions of the objects</param> 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); }
public void objdesc(int locid, string desc) { ObjectDescriptionPacket packet = new ObjectDescriptionPacket(); packet.AgentData.AgentID = this.frame.AgentID; packet.AgentData.SessionID = this.frame.SessionID; ObjectDescriptionPacket.ObjectDataBlock[] temp = new ObjectDescriptionPacket.ObjectDataBlock[1]; temp[0] = new ObjectDescriptionPacket.ObjectDataBlock(); temp[0].LocalID = (uint)locid; temp[0].Description = Utils.StringToBytes(desc); packet.ObjectData = temp; this.proxy.InjectPacket(packet, Direction.Outgoing); }