sync remote responses for mapItens with the local ones, but sending all valid information, so later we can cache/throotle

avinationmerge
UbitUmarov 2015-09-17 21:51:51 +01:00
parent ab18c801a9
commit 4798cce390
1 changed files with 11 additions and 18 deletions

View File

@ -1430,28 +1430,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
responsemap["6"] = responsearr; responsemap["6"] = responsearr;
} }
// Service 7 (MAP_ITEM_LAND_FOR_SALE) // Service 7/10 (MAP_ITEM_LAND_FOR_SALE/ADULT)
ILandChannel landChannel = m_scene.LandChannel; ILandChannel landChannel = m_scene.LandChannel;
List<ILandObject> parcels = landChannel.AllParcels(); List<ILandObject> parcels = landChannel.AllParcels();
if ((parcels == null) || (parcels.Count == 0)) if ((parcels != null) && (parcels.Count >= 0))
{ {
OSDMap responsemapdata = new OSDMap(); OSDArray responsearr = new OSDArray(parcels.Count);
responsemapdata["X"] = OSD.FromInteger((int)(xstart + 1));
responsemapdata["Y"] = OSD.FromInteger((int)(ystart + 1));
responsemapdata["ID"] = OSD.FromUUID(UUID.Zero);
responsemapdata["Name"] = OSD.FromString("");
responsemapdata["Extra"] = OSD.FromInteger(0);
responsemapdata["Extra2"] = OSD.FromInteger(0);
OSDArray responsearr = new OSDArray();
responsearr.Add(responsemapdata);
responsemap["7"] = responsearr;
}
else
{
OSDArray responsearr = new OSDArray(m_scene.GetRootAgentCount());
foreach (ILandObject parcel_interface in parcels) foreach (ILandObject parcel_interface in parcels)
{ {
// Play it safe // Play it safe
@ -1480,8 +1466,15 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
responsearr.Add(responsemapdata); responsearr.Add(responsemapdata);
} }
} }
if(responsearr.Count > 0)
{
if(m_scene.RegionInfo.RegionSettings.Maturity == 2)
responsemap["10"] = responsearr;
else
responsemap["7"] = responsearr; responsemap["7"] = responsearr;
} }
}
if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero) if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero)
{ {