aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorTeravus Ovares2008-05-10 20:25:40 +0000
committerTeravus Ovares2008-05-10 20:25:40 +0000
commit05de723e51ba27e083e4d5c530bd96311e95c4d9 (patch)
treec59baaac5894041e589ef6342b991fb47c41ee6d
parent* More OutPacket refactors. (diff)
downloadopensim-SC_OLD-05de723e51ba27e083e4d5c530bd96311e95c4d9.zip
opensim-SC_OLD-05de723e51ba27e083e4d5c530bd96311e95c4d9.tar.gz
opensim-SC_OLD-05de723e51ba27e083e4d5c530bd96311e95c4d9.tar.bz2
opensim-SC_OLD-05de723e51ba27e083e4d5c530bd96311e95c4d9.tar.xz
* Refactored two more OutPackets. ObjectPropertiesFamily, and Object Properties.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/IClientAPI.cs11
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs73
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs69
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs15
4 files changed, 110 insertions, 58 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 09c6329..a01ee0b 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -941,6 +941,17 @@ namespace OpenSim.Framework
941 941
942 void SendShutdownConnectionNotice(); 942 void SendShutdownConnectionNotice();
943 void SendSimStats(Packet pack); 943 void SendSimStats(Packet pack);
944 void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID,
945 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
946 uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category,
947 LLUUID LastOwnerID, string ObjectName, string Description);
948
949 void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID,
950 LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID,
951 LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
952 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
953 uint BaseMask);
954
944 955
945 byte[] GetThrottlesPacked(float multiplier); 956 byte[] GetThrottlesPacked(float multiplier);
946 957
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index aff43d5..bf45006 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2257,6 +2257,79 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2257 OutPacket(pack, ThrottleOutPacketType.Task); 2257 OutPacket(pack, ThrottleOutPacketType.Task);
2258 } 2258 }
2259 2259
2260 public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID,
2261 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
2262 uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category,
2263 LLUUID LastOwnerID, string ObjectName, string Description)
2264 {
2265 ObjectPropertiesFamilyPacket objPropFamilyPack = (ObjectPropertiesFamilyPacket)PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily);
2266 // TODO: don't create new blocks if recycling an old packet
2267
2268 ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = new ObjectPropertiesFamilyPacket.ObjectDataBlock();
2269 objPropDB.RequestFlags = RequestFlags;
2270 objPropDB.ObjectID = ObjectUUID;
2271 objPropDB.OwnerID = OwnerID;
2272 objPropDB.GroupID = GroupID;
2273 objPropDB.BaseMask = BaseMask;
2274 objPropDB.OwnerMask = OwnerMask;
2275 objPropDB.GroupMask = GroupMask;
2276 objPropDB.EveryoneMask = EveryoneMask;
2277 objPropDB.NextOwnerMask = NextOwnerMask;
2278
2279 // TODO: More properties are needed in SceneObjectPart!
2280 objPropDB.OwnershipCost = OwnershipCost;
2281 objPropDB.SaleType = SaleType;
2282 objPropDB.SalePrice = SalePrice;
2283 objPropDB.Category = Category;
2284 objPropDB.LastOwnerID = LastOwnerID;
2285 objPropDB.Name = Helpers.StringToField(ObjectName);
2286 objPropDB.Description = Helpers.StringToField(Description);
2287 objPropFamilyPack.ObjectData = objPropDB;
2288 objPropFamilyPack.Header.Zerocoded = true;
2289 OutPacket(objPropFamilyPack, ThrottleOutPacketType.Task);
2290 }
2291
2292 public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID,
2293 LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID,
2294 LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
2295 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
2296 uint BaseMask)
2297 {
2298 ObjectPropertiesPacket proper = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
2299 // TODO: don't create new blocks if recycling an old packet
2300
2301 proper.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[1];
2302 proper.ObjectData[0] = new ObjectPropertiesPacket.ObjectDataBlock();
2303 proper.ObjectData[0].ItemID = ItemID;
2304 proper.ObjectData[0].CreationDate = CreationDate;
2305 proper.ObjectData[0].CreatorID = CreatorUUID;
2306 proper.ObjectData[0].FolderID = FolderUUID;
2307 proper.ObjectData[0].FromTaskID = FromTaskUUID;
2308 proper.ObjectData[0].GroupID = GroupUUID;
2309 proper.ObjectData[0].InventorySerial = InventorySerial;
2310
2311 proper.ObjectData[0].LastOwnerID = LastOwnerUUID;
2312 // proper.ObjectData[0].LastOwnerID = LLUUID.Zero;
2313
2314 proper.ObjectData[0].ObjectID = ObjectUUID;
2315 proper.ObjectData[0].OwnerID = OwnerUUID;
2316 proper.ObjectData[0].TouchName = Helpers.StringToField(TouchTitle);
2317 proper.ObjectData[0].TextureID = TextureID;
2318 proper.ObjectData[0].SitName = Helpers.StringToField(SitTitle);
2319 proper.ObjectData[0].Name = Helpers.StringToField(ItemName);
2320 proper.ObjectData[0].Description = Helpers.StringToField(ItemDescription);
2321 proper.ObjectData[0].OwnerMask = OwnerMask;
2322 proper.ObjectData[0].NextOwnerMask = NextOwnerMask;
2323 proper.ObjectData[0].GroupMask = GroupMask;
2324 proper.ObjectData[0].EveryoneMask = EveryoneMask;
2325 proper.ObjectData[0].BaseMask = BaseMask;
2326 // proper.ObjectData[0].AggregatePerms = 53;
2327 // proper.ObjectData[0].AggregatePermTextures = 0;
2328 // proper.ObjectData[0].AggregatePermTexturesOwner = 0;
2329 proper.Header.Zerocoded = true;
2330 OutPacket(proper, ThrottleOutPacketType.Task);
2331 }
2332
2260 #endregion 2333 #endregion
2261 2334
2262 #region Estate Data Sending Methods 2335 #region Estate Data Sending Methods
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>
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 05f963a..42912e7 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -543,6 +543,21 @@ namespace OpenSim.Region.Examples.SimpleModule
543 { 543 {
544 } 544 }
545 545
546 public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID,
547 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
548 uint NextOwnerMask, int OwnershipCost, byte SaleType,int SalePrice, uint Category,
549 LLUUID LastOwnerID, string ObjectName, string Description)
550 {
551 }
552
553 public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID,
554 LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID,
555 LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
556 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
557 uint BaseMask)
558 {
559 }
560
546 private void Update() 561 private void Update()
547 { 562 {
548 frame++; 563 frame++;