aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoralondria2008-03-23 18:15:08 +0000
committeralondria2008-03-23 18:15:08 +0000
commit68d016517d929a7db156f845fd570cf89f76764f (patch)
tree1925f4e3ec1ca9fc5b4048a0f3dc0f9680b6f2f7
parent* Added a little more stability for getting the object list from the parcel b... (diff)
downloadopensim-SC_OLD-68d016517d929a7db156f845fd570cf89f76764f.zip
opensim-SC_OLD-68d016517d929a7db156f845fd570cf89f76764f.tar.gz
opensim-SC_OLD-68d016517d929a7db156f845fd570cf89f76764f.tar.bz2
opensim-SC_OLD-68d016517d929a7db156f845fd570cf89f76764f.tar.xz
Implements llGetParcelPrimOwners()
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs14
2 files changed, 26 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs b/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs
index 68e8fcf..46ddf38 100644
--- a/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs
+++ b/OpenSim/Region/Environment/Modules/LandManagement/LandObject.cs
@@ -809,6 +809,20 @@ namespace OpenSim.Region.Environment.Modules.LandManagement
809 remote_client.OutPacket(pack, ThrottleOutPacketType.Task); 809 remote_client.OutPacket(pack, ThrottleOutPacketType.Task);
810 } 810 }
811 811
812 public Dictionary<LLUUID, int> getLandObjectOwners()
813 {
814 Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID, int>();
815 foreach (SceneObjectGroup obj in primsOverMe)
816 {
817 if (!ownersAndCount.ContainsKey(obj.OwnerID))
818 {
819 ownersAndCount.Add(obj.OwnerID, 0);
820 }
821 ownersAndCount[obj.OwnerID] += obj.PrimCount;
822 }
823 return ownersAndCount;
824 }
825
812 #endregion 826 #endregion
813 827
814 #region Object Returning 828 #region Object Returning
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 9a1b652..029abf6 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -40,6 +40,7 @@ using OpenSim.Region.Environment.Scenes;
40using OpenSim.Region.ScriptEngine.Common; 40using OpenSim.Region.ScriptEngine.Common;
41using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; 41using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase;
42using OpenSim.Region.Environment; 42using OpenSim.Region.Environment;
43using OpenSim.Region.Environment.Modules.LandManagement;
43//using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; 44//using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL;
44 45
45namespace OpenSim.Region.ScriptEngine.Common 46namespace OpenSim.Region.ScriptEngine.Common
@@ -4517,8 +4518,17 @@ namespace OpenSim.Region.ScriptEngine.Common
4517 public LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos) 4518 public LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos)
4518 { 4519 {
4519 m_host.AddScriptLPS(1); 4520 m_host.AddScriptLPS(1);
4520 NotImplemented("llGetParcelPrimOwners"); 4521 LandObject land = (LandObject)World.LandChannel.getLandObject((float)pos.x, (float)pos.y);
4521 return new LSL_Types.list(); 4522 LSL_Types.list ret = new LSL_Types.list();
4523 if (land != null)
4524 {
4525 foreach (KeyValuePair<LLUUID, int> d in land.getLandObjectOwners())
4526 {
4527 ret.Add(d.Key.ToString());
4528 ret.Add(d.Value);
4529 }
4530 }
4531 return ret;
4522 } 4532 }
4523 4533
4524 public int llGetObjectPrimCount(string object_id) 4534 public int llGetObjectPrimCount(string object_id)