public void OnPlacesQueryRequest(UUID QueryID, UUID TransactionID, string QueryText, uint QueryFlags, byte Category, string SimName, IClientAPI client) { if (QueryFlags == 64) //Agent Owned { //Get all the parcels LandData[] LandData = directoryService.GetParcelByOwner(client.AgentId); List<ExtendedLandData> parcels = new List<ExtendedLandData>(); foreach (LandData land in LandData) { //Find the region so we can add the meters correctly OpenSim.Services.Interfaces.GridRegion region = m_Scenes[0].GridService.GetRegionByUUID(UUID.Zero, land.RegionID); if (region != null) { ExtendedLandData parcel = new ExtendedLandData(); parcel.LandData = land; parcel.RegionType = region.RegionType; parcel.RegionName = region.RegionName; parcel.GlobalPosX = region.RegionLocX + land.UserLocation.X; parcel.GlobalPosY = region.RegionLocY + land.UserLocation.Y; parcels.Add(parcel); } } client.SendPlacesQuery(parcels.ToArray(), QueryID, TransactionID); } if (QueryFlags == 256) //Group Owned { //Find all the group owned land LandData[] LandData = directoryService.GetParcelByOwner(QueryID); List<ExtendedLandData> parcels = new List<ExtendedLandData>(); foreach (LandData land in LandData) { //Find the region from the grid service so that we can add the meters correctly OpenSim.Services.Interfaces.GridRegion region = m_Scenes[0].GridService.GetRegionByUUID(UUID.Zero, land.RegionID); if (region != null) { ExtendedLandData parcel = new ExtendedLandData(); parcel.LandData = land; parcel.RegionType = region.RegionType; parcel.RegionName = region.RegionName; parcel.GlobalPosX = region.RegionLocX + land.UserLocation.X; parcel.GlobalPosY = region.RegionLocY + land.UserLocation.Y; parcels.Add(parcel); } } //Send if we have any parcels if(parcels.Count != 0) client.SendPlacesQuery(parcels.ToArray(), QueryID, TransactionID); } }
public void OnPlacesQueryRequest(UUID QueryID, UUID TransactionID, string QueryText, uint QueryFlags, byte Category, string SimName, IClientAPI client) { if (QueryFlags == 64) //Agent Owned { LandData[] LandData = DSC.GetParcelByOwner(client.AgentId); List<ExtendedLandData> parcels = new List<ExtendedLandData>(); foreach (LandData land in LandData) { OpenSim.Services.Interfaces.GridRegion region = m_scene.GridService.GetRegionByUUID(UUID.Zero, land.RegionID); if (region != null) { ExtendedLandData parcel = new ExtendedLandData(); parcel.LandData = land; parcel.RegionType = region.RegionType; parcel.RegionName = region.RegionName; parcel.GlobalPosX = region.RegionLocX + land.UserLocation.X; parcel.GlobalPosY = region.RegionLocY + land.UserLocation.Y; parcels.Add(parcel); } } client.SendPlacesQuery(parcels.ToArray(), QueryID, TransactionID); } if (QueryFlags == 256) //Group Owned { LandData[] LandData = DSC.GetParcelByOwner(QueryID); List<ExtendedLandData> parcels = new List<ExtendedLandData>(); foreach (LandData land in LandData) { OpenSim.Services.Interfaces.GridRegion region = m_scene.GridService.GetRegionByUUID(UUID.Zero, land.RegionID); if (region != null) { ExtendedLandData parcel = new ExtendedLandData(); parcel.LandData = land; parcel.RegionType = region.RegionType; parcel.RegionName = region.RegionName; parcel.GlobalPosX = region.RegionLocX + land.UserLocation.X; parcel.GlobalPosY = region.RegionLocY + land.UserLocation.Y; parcels.Add(parcel); } } client.SendPlacesQuery(parcels.ToArray(), QueryID, TransactionID); } }