public void SendRezMultipleAttachmentsFromInv( ScriptInstance instance, ViewerAgentAccessor agent, LSLKey compoundMsgID, int totalObjects, int firstDetachAll, RezObjectDataList rezdatalist) { lock (instance) { ViewerConnection vc; ViewerCircuit viewerCircuit; if (m_Clients.TryGetValue(agent.AgentID, out vc) && vc.ViewerCircuits.TryGetValue((uint)agent.CircuitCode, out viewerCircuit)) { var list = new List <RezMultipleAttachmentsFromInv.ObjectDataS>(); foreach (RezObjectData rezdata in rezdatalist) { list.Add(new RezMultipleAttachmentsFromInv.ObjectDataS { ItemID = rezdata.ItemID, OwnerID = agent.AgentID, AttachmentPoint = (AttachmentPoint)rezdata.AttachmentPoint, ItemFlags = (uint)rezdata.ItemFlags, GroupMask = (InventoryPermissionsMask)rezdata.GroupMask, EveryoneMask = (InventoryPermissionsMask)rezdata.EveryoneMask, NextOwnerMask = (InventoryPermissionsMask)rezdata.NextOwnerMask, Name = rezdata.Name, Description = rezdata.Description }); } viewerCircuit.SendMessage(new RezMultipleAttachmentsFromInv { AgentID = agent.AgentID, SessionID = viewerCircuit.SessionID, CompoundMsgID = compoundMsgID, TotalObjects = (byte)totalObjects, FirstDetachAll = firstDetachAll != 0, ObjectData = list }); } } }
public void Add(RezObjectDataList list, RezObjectData data) => list.Add(new RezObjectData(data));