aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2015-09-17 21:51:51 +0100
committerUbitUmarov2015-09-17 21:51:51 +0100
commit4798cce3908d0279f8b266b6e7f3a7b83a3c140b (patch)
treec9c1e161ae148eb88dfe03f8b34516a40a55d27e
parentdont block a region just bc it doesnt have the requested map item (diff)
downloadopensim-SC-4798cce3908d0279f8b266b6e7f3a7b83a3c140b.zip
opensim-SC-4798cce3908d0279f8b266b6e7f3a7b83a3c140b.tar.gz
opensim-SC-4798cce3908d0279f8b266b6e7f3a7b83a3c140b.tar.bz2
opensim-SC-4798cce3908d0279f8b266b6e7f3a7b83a3c140b.tar.xz
sync remote responses for mapItens with the local ones, but sending all valid information, so later we can cache/throotle
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs29
1 files changed, 11 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index f28a105..59a3499 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -1430,28 +1430,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1430 responsemap["6"] = responsearr; 1430 responsemap["6"] = responsearr;
1431 } 1431 }
1432 1432
1433 // Service 7 (MAP_ITEM_LAND_FOR_SALE) 1433 // Service 7/10 (MAP_ITEM_LAND_FOR_SALE/ADULT)
1434 1434
1435 ILandChannel landChannel = m_scene.LandChannel; 1435 ILandChannel landChannel = m_scene.LandChannel;
1436 List<ILandObject> parcels = landChannel.AllParcels(); 1436 List<ILandObject> parcels = landChannel.AllParcels();
1437 1437
1438 if ((parcels == null) || (parcels.Count == 0)) 1438 if ((parcels != null) && (parcels.Count >= 0))
1439 { 1439 {
1440 OSDMap responsemapdata = new OSDMap(); 1440 OSDArray responsearr = new OSDArray(parcels.Count);
1441 responsemapdata["X"] = OSD.FromInteger((int)(xstart + 1));
1442 responsemapdata["Y"] = OSD.FromInteger((int)(ystart + 1));
1443 responsemapdata["ID"] = OSD.FromUUID(UUID.Zero);
1444 responsemapdata["Name"] = OSD.FromString("");
1445 responsemapdata["Extra"] = OSD.FromInteger(0);
1446 responsemapdata["Extra2"] = OSD.FromInteger(0);
1447 OSDArray responsearr = new OSDArray();
1448 responsearr.Add(responsemapdata);
1449
1450 responsemap["7"] = responsearr;
1451 }
1452 else
1453 {
1454 OSDArray responsearr = new OSDArray(m_scene.GetRootAgentCount());
1455 foreach (ILandObject parcel_interface in parcels) 1441 foreach (ILandObject parcel_interface in parcels)
1456 { 1442 {
1457 // Play it safe 1443 // Play it safe
@@ -1480,7 +1466,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
1480 responsearr.Add(responsemapdata); 1466 responsearr.Add(responsemapdata);
1481 } 1467 }
1482 } 1468 }
1483 responsemap["7"] = responsearr; 1469
1470 if(responsearr.Count > 0)
1471 {
1472 if(m_scene.RegionInfo.RegionSettings.Maturity == 2)
1473 responsemap["10"] = responsearr;
1474 else
1475 responsemap["7"] = responsearr;
1476 }
1484 } 1477 }
1485 1478
1486 if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero) 1479 if (m_scene.RegionInfo.RegionSettings.TelehubObject != UUID.Zero)