OpenMetaverse.ObjectManager.SetObjectsGroup C# (CSharp) 메소드

SetObjectsGroup() 공개 메소드

Set the ownership of a list of objects to the specified group
public SetObjectsGroup ( Simulator simulator, List localIds, UUID groupID ) : void
simulator Simulator A reference to the object where the objects reside
localIds List An array which contains the IDs of the objects to set the group id on
groupID UUID The Groups ID
리턴 void
        public void SetObjectsGroup(Simulator simulator, List<uint> localIds, UUID groupID)
        {
            ObjectGroupPacket packet = new ObjectGroupPacket();
            packet.AgentData.AgentID = Client.Self.AgentID;
            packet.AgentData.GroupID = groupID;
            packet.AgentData.SessionID = Client.Self.SessionID;

            packet.ObjectData = new ObjectGroupPacket.ObjectDataBlock[localIds.Count];
            for (int i = 0; i < localIds.Count; i++)
            {
                packet.ObjectData[i] = new ObjectGroupPacket.ObjectDataBlock();
                packet.ObjectData[i].ObjectLocalID = localIds[i];
            }

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