diff options
author | Teravus Ovares | 2008-05-10 20:25:40 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-10 20:25:40 +0000 |
commit | 05de723e51ba27e083e4d5c530bd96311e95c4d9 (patch) | |
tree | c59baaac5894041e589ef6342b991fb47c41ee6d /OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |
parent | * More OutPacket refactors. (diff) | |
download | opensim-SC-05de723e51ba27e083e4d5c530bd96311e95c4d9.zip opensim-SC-05de723e51ba27e083e4d5c530bd96311e95c4d9.tar.gz opensim-SC-05de723e51ba27e083e4d5c530bd96311e95c4d9.tar.bz2 opensim-SC-05de723e51ba27e083e4d5c530bd96311e95c4d9.tar.xz |
* Refactored two more OutPackets. ObjectPropertiesFamily, and Object Properties.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 69 |
1 files changed, 11 insertions, 58 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 1ba17dc..3844793 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1400,32 +1400,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
1400 | /// <param name="part"></param> | 1400 | /// <param name="part"></param> |
1401 | public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags) | 1401 | public void ServiceObjectPropertiesFamilyRequest(IClientAPI remoteClient, LLUUID AgentID, uint RequestFlags) |
1402 | { | 1402 | { |
1403 | //RootPart.ServiceObjectPropertiesFamilyRequest(remoteClient, AgentID, RequestFlags); | 1403 | |
1404 | ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket) PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily); | 1404 | remoteClient.SendObjectPropertiesFamilyData(RequestFlags, RootPart.UUID, RootPart.ObjectOwner, RootPart.GroupID, RootPart.BaseMask, |
1405 | // TODO: don't create new blocks if recycling an old packet | 1405 | RootPart.OwnerMask, RootPart.GroupMask, RootPart.EveryoneMask, RootPart.NextOwnerMask, |
1406 | 1406 | RootPart.OwnershipCost, RootPart.ObjectSaleType, RootPart.SalePrice, RootPart.Category, | |
1407 | ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock(); | 1407 | RootPart.CreatorID, RootPart.Name, RootPart.Description); |
1408 | objPropDB.RequestFlags = RequestFlags; | ||
1409 | objPropDB.ObjectID = RootPart.UUID; | ||
1410 | objPropDB.OwnerID = RootPart.ObjectOwner; | ||
1411 | objPropDB.GroupID = RootPart.GroupID; | ||
1412 | objPropDB.BaseMask = RootPart.BaseMask; | ||
1413 | objPropDB.OwnerMask = RootPart.OwnerMask; | ||
1414 | objPropDB.GroupMask = RootPart.GroupMask; | ||
1415 | objPropDB.EveryoneMask = RootPart.EveryoneMask; | ||
1416 | objPropDB.NextOwnerMask = RootPart.NextOwnerMask; | ||
1417 | |||
1418 | // TODO: More properties are needed in SceneObjectPart! | ||
1419 | objPropDB.OwnershipCost = RootPart.OwnershipCost; | ||
1420 | objPropDB.SaleType = RootPart.ObjectSaleType; | ||
1421 | objPropDB.SalePrice = RootPart.SalePrice; | ||
1422 | objPropDB.Category = RootPart.Category; | ||
1423 | objPropDB.LastOwnerID = RootPart.CreatorID; | ||
1424 | objPropDB.Name = Helpers.StringToField(RootPart.Name); | ||
1425 | objPropDB.Description = Helpers.StringToField(RootPart.Description); | ||
1426 | objPropFamilyPack.ObjectData = objPropDB; | ||
1427 | objPropFamilyPack.Header.Zerocoded = true; | ||
1428 | remoteClient.OutPacket(objPropFamilyPack, ThrottleOutPacketType.Task); | ||
1429 | } | 1408 | } |
1430 | 1409 | ||
1431 | public void SetPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) | 1410 | public void SetPartOwner(SceneObjectPart part, LLUUID cAgentID, LLUUID cGroupID) |
@@ -1945,39 +1924,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1945 | /// <param name="client"></param> | 1924 | /// <param name="client"></param> |
1946 | public void GetProperties(IClientAPI client) | 1925 | public void GetProperties(IClientAPI client) |
1947 | { | 1926 | { |
1948 | ObjectPropertiesPacket proper = (ObjectPropertiesPacket) PacketPool.Instance.GetPacket(PacketType.ObjectProperties); | 1927 | |
1949 | // TODO: don't create new blocks if recycling an old packet | 1928 | client.SendObjectPropertiesReply(LLUUID.Zero, (ulong)m_rootPart.CreationDate, m_rootPart.CreatorID, LLUUID.Zero, LLUUID.Zero, |
1950 | 1929 | LLUUID.Zero, (short)m_rootPart.InventorySerial, m_rootPart.LastOwnerID, UUID, m_rootPart.OwnerID, | |
1951 | proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1]; | 1930 | m_rootPart.TouchName, new byte[0], m_rootPart.SitName, m_rootPart.Name, m_rootPart.Description, |
1952 | proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock(); | 1931 | m_rootPart.OwnerMask, m_rootPart.NextOwnerMask, m_rootPart.GroupMask, m_rootPart.EveryoneMask, |
1953 | proper.ObjectData[0].ItemID = LLUUID.Zero; | 1932 | m_rootPart.BaseMask); |
1954 | proper.ObjectData[0].CreationDate = (ulong) m_rootPart.CreationDate; | ||
1955 | proper.ObjectData[0].CreatorID = m_rootPart.CreatorID; | ||
1956 | proper.ObjectData[0].FolderID = LLUUID.Zero; | ||
1957 | proper.ObjectData[0].FromTaskID = LLUUID.Zero; | ||
1958 | proper.ObjectData[0].GroupID = LLUUID.Zero; | ||
1959 | proper.ObjectData[0].InventorySerial = (short) m_rootPart.InventorySerial; | ||
1960 | |||
1961 | proper.ObjectData[0].LastOwnerID = m_rootPart.LastOwnerID; | ||
1962 | // proper.ObjectData[0].LastOwnerID = LLUUID.Zero; | ||
1963 | 1933 | ||
1964 | proper.ObjectData[0].ObjectID = UUID; | ||
1965 | proper.ObjectData[0].OwnerID = m_rootPart.OwnerID; | ||
1966 | proper.ObjectData[0].TouchName = Helpers.StringToField(m_rootPart.TouchName); | ||
1967 | proper.ObjectData[0].TextureID = new byte[0]; | ||
1968 | proper.ObjectData[0].SitName = Helpers.StringToField(m_rootPart.SitName); | ||
1969 | proper.ObjectData[0].Name = Helpers.StringToField(m_rootPart.Name); | ||
1970 | proper.ObjectData[0].Description = Helpers.StringToField(m_rootPart.Description); | ||
1971 | proper.ObjectData[0].OwnerMask = m_rootPart.OwnerMask; | ||
1972 | proper.ObjectData[0].NextOwnerMask = m_rootPart.NextOwnerMask; | ||
1973 | proper.ObjectData[0].GroupMask = m_rootPart.GroupMask; | ||
1974 | proper.ObjectData[0].EveryoneMask = m_rootPart.EveryoneMask; | ||
1975 | proper.ObjectData[0].BaseMask = m_rootPart.BaseMask; | ||
1976 | // proper.ObjectData[0].AggregatePerms = 53; | ||
1977 | // proper.ObjectData[0].AggregatePermTextures = 0; | ||
1978 | // proper.ObjectData[0].AggregatePermTexturesOwner = 0; | ||
1979 | proper.Header.Zerocoded = true; | ||
1980 | client.OutPacket(proper, ThrottleOutPacketType.Task); | ||
1981 | } | 1934 | } |
1982 | 1935 | ||
1983 | /// <summary> | 1936 | /// <summary> |