aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
diff options
context:
space:
mode:
authorUbitUmarov2017-01-19 19:01:56 +0000
committerUbitUmarov2017-01-19 19:01:56 +0000
commit69bcbd856b8785b2912fa4ceac7411967756107c (patch)
tree81c322e6ea426580044ede6b05934fb660fdcf38 /OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
parentactually make use of it as viewers requested (diff)
downloadopensim-SC-69bcbd856b8785b2912fa4ceac7411967756107c.zip
opensim-SC-69bcbd856b8785b2912fa4ceac7411967756107c.tar.gz
opensim-SC-69bcbd856b8785b2912fa4ceac7411967756107c.tar.bz2
opensim-SC-69bcbd856b8785b2912fa4ceac7411967756107c.tar.xz
change CanDuplicateObject
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Permissions.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Permissions.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
index a7f3dd7..3e75c8a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Framework.Scenes
47 public delegate bool TakeObjectHandler(SceneObjectGroup sog, ScenePresence sp); 47 public delegate bool TakeObjectHandler(SceneObjectGroup sog, ScenePresence sp);
48 public delegate bool SellGroupObjectHandler(UUID userID, UUID groupID, Scene scene); 48 public delegate bool SellGroupObjectHandler(UUID userID, UUID groupID, Scene scene);
49 public delegate bool TakeCopyObjectHandler(SceneObjectGroup sog, ScenePresence sp); 49 public delegate bool TakeCopyObjectHandler(SceneObjectGroup sog, ScenePresence sp);
50 public delegate bool DuplicateObjectHandler(int objectCount, UUID objectID, UUID owner, Scene scene, Vector3 objectPosition); 50 public delegate bool DuplicateObjectHandler(SceneObjectGroup sog, ScenePresence sp, Scene scenen);
51 public delegate bool EditObjectByIDsHandler(UUID objectID, UUID editorID, Scene scene); 51 public delegate bool EditObjectByIDsHandler(UUID objectID, UUID editorID, Scene scene);
52 public delegate bool EditObjectHandler(SceneObjectGroup sog, ScenePresence sp); 52 public delegate bool EditObjectHandler(SceneObjectGroup sog, ScenePresence sp);
53 public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID, Scene scene); 53 public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID, Scene scene);
@@ -392,15 +392,20 @@ namespace OpenSim.Region.Framework.Scenes
392 #endregion 392 #endregion
393 393
394 #region DUPLICATE OBJECT 394 #region DUPLICATE OBJECT
395 public bool CanDuplicateObject(int objectCount, UUID objectID, UUID owner, Vector3 objectPosition) 395 public bool CanDuplicateObject(SceneObjectGroup sog, UUID agentID)
396 { 396 {
397 DuplicateObjectHandler handler = OnDuplicateObject; 397 DuplicateObjectHandler handler = OnDuplicateObject;
398 if (handler != null) 398 if (handler != null)
399 { 399 {
400 if(sog == null || sog.IsDeleted)
401 return false;
402 ScenePresence sp = m_scene.GetScenePresence(agentID);
403 if(sp == null || sp.IsDeleted)
404 return false;
400 Delegate[] list = handler.GetInvocationList(); 405 Delegate[] list = handler.GetInvocationList();
401 foreach (DuplicateObjectHandler h in list) 406 foreach (DuplicateObjectHandler h in list)
402 { 407 {
403 if (h(objectCount, objectID, owner, m_scene, objectPosition) == false) 408 if (h(sog, sp, m_scene) == false)
404 return false; 409 return false;
405 } 410 }
406 } 411 }