diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs index c50318d..67fc8e6 100644 --- a/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs +++ b/OpenSim/Region/CoreModules/Framework/EventQueue/EventQueueHelper.cs | |||
@@ -454,6 +454,48 @@ namespace OpenSim.Region.CoreModules.Framework.EventQueue | |||
454 | 454 | ||
455 | return groupUpdate; | 455 | return groupUpdate; |
456 | } | 456 | } |
457 | |||
458 | public static OSD PlacesQuery(PlacesReplyPacket PlacesReply) | ||
459 | { | ||
460 | OSDMap placesReply = new OSDMap(); | ||
461 | placesReply.Add("message", OSD.FromString("PlacesReplyMessage")); | ||
462 | |||
463 | OSDMap body = new OSDMap(); | ||
464 | OSDArray agentData = new OSDArray(); | ||
465 | OSDMap agentDataMap = new OSDMap(); | ||
466 | agentDataMap.Add("AgentID", OSD.FromUUID(PlacesReply.AgentData.AgentID)); | ||
467 | agentDataMap.Add("QueryID", OSD.FromUUID(PlacesReply.AgentData.QueryID)); | ||
468 | agentDataMap.Add("TransactionID", OSD.FromUUID(PlacesReply.TransactionData.TransactionID)); | ||
469 | agentData.Add(agentDataMap); | ||
470 | body.Add("AgentData", agentData); | ||
471 | |||
472 | OSDArray QueryData = new OSDArray(); | ||
473 | |||
474 | foreach (PlacesReplyPacket.QueryDataBlock groupDataBlock in PlacesReply.QueryData) | ||
475 | { | ||
476 | OSDMap QueryDataMap = new OSDMap(); | ||
477 | QueryDataMap.Add("ActualArea", OSD.FromInteger(groupDataBlock.ActualArea)); | ||
478 | QueryDataMap.Add("BillableArea", OSD.FromInteger(groupDataBlock.BillableArea)); | ||
479 | QueryDataMap.Add("Description", OSD.FromBinary(groupDataBlock.Desc)); | ||
480 | QueryDataMap.Add("Dwell", OSD.FromInteger((int)groupDataBlock.Dwell)); | ||
481 | QueryDataMap.Add("Flags", OSD.FromString(Convert.ToString(groupDataBlock.Flags))); | ||
482 | QueryDataMap.Add("GlobalX", OSD.FromInteger((int)groupDataBlock.GlobalX)); | ||
483 | QueryDataMap.Add("GlobalY", OSD.FromInteger((int)groupDataBlock.GlobalY)); | ||
484 | QueryDataMap.Add("GlobalZ", OSD.FromInteger((int)groupDataBlock.GlobalZ)); | ||
485 | QueryDataMap.Add("Name", OSD.FromBinary(groupDataBlock.Name)); | ||
486 | QueryDataMap.Add("OwnerID", OSD.FromUUID(groupDataBlock.OwnerID)); | ||
487 | QueryDataMap.Add("SimName", OSD.FromBinary(groupDataBlock.SimName)); | ||
488 | QueryDataMap.Add("SnapShotID", OSD.FromUUID(groupDataBlock.SnapshotID)); | ||
489 | QueryDataMap.Add("ProductSku", OSD.FromInteger(0)); | ||
490 | QueryDataMap.Add("Price", OSD.FromInteger(groupDataBlock.Price)); | ||
491 | |||
492 | QueryData.Add(QueryDataMap); | ||
493 | } | ||
494 | body.Add("QueryData", QueryData); | ||
495 | placesReply.Add("QueryData[]", body); | ||
496 | |||
497 | return placesReply; | ||
498 | } | ||
457 | 499 | ||
458 | } | 500 | } |
459 | } | 501 | } |