diff options
author | UbitUmarov | 2017-01-27 20:21:24 +0000 |
---|---|---|
committer | UbitUmarov | 2017-01-27 20:21:24 +0000 |
commit | 0091c37ed3fd3f9ed4edf079a61f986daadca16b (patch) | |
tree | 6e5ca5cb7fa6ae6325d5222b37f39a794a48d345 /OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |
parent | parcels must be loaded before objects, so they can be added to them (diff) | |
download | opensim-SC-0091c37ed3fd3f9ed4edf079a61f986daadca16b.zip opensim-SC-0091c37ed3fd3f9ed4edf079a61f986daadca16b.tar.gz opensim-SC-0091c37ed3fd3f9ed4edf079a61f986daadca16b.tar.bz2 opensim-SC-0091c37ed3fd3f9ed4edf079a61f986daadca16b.tar.xz |
several changes relative to objects return and parcel prim counts: avoid null refs, report correct count of returned objects, make obkects counts by ownership coerent with return rules, etc
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Permissions.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index 45d710a..6d3b82f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -54,7 +54,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
54 | public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID); | 54 | public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID); |
55 | public delegate bool MoveObjectHandler(SceneObjectGroup sog, ScenePresence sp); | 55 | public delegate bool MoveObjectHandler(SceneObjectGroup sog, ScenePresence sp); |
56 | public delegate bool ObjectEntryHandler(SceneObjectGroup sog, bool enteringRegion, Vector3 newPoint); | 56 | public delegate bool ObjectEntryHandler(SceneObjectGroup sog, bool enteringRegion, Vector3 newPoint); |
57 | public delegate bool ReturnObjectsHandler(ILandObject land, UUID user, List<SceneObjectGroup> objects); | 57 | public delegate bool ReturnObjectsHandler(ILandObject land, ScenePresence sp, List<SceneObjectGroup> objects); |
58 | public delegate bool InstantMessageHandler(UUID user, UUID target); | 58 | public delegate bool InstantMessageHandler(UUID user, UUID target); |
59 | public delegate bool InventoryTransferHandler(UUID user, UUID target); | 59 | public delegate bool InventoryTransferHandler(UUID user, UUID target); |
60 | public delegate bool ViewScriptHandler(UUID script, UUID objectID, UUID user); | 60 | public delegate bool ViewScriptHandler(UUID script, UUID objectID, UUID user); |
@@ -556,17 +556,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
556 | #endregion | 556 | #endregion |
557 | 557 | ||
558 | #region RETURN OBJECT | 558 | #region RETURN OBJECT |
559 | public bool CanReturnObjects(ILandObject land, UUID user, List<SceneObjectGroup> objects) | 559 | public bool CanReturnObjects(ILandObject land, IClientAPI client, List<SceneObjectGroup> objects) |
560 | { | 560 | { |
561 | bool result = true; | 561 | bool result = true; |
562 | 562 | ||
563 | ReturnObjectsHandler handler = OnReturnObjects; | 563 | ReturnObjectsHandler handler = OnReturnObjects; |
564 | if (handler != null) | 564 | if (handler != null) |
565 | { | 565 | { |
566 | if(objects == null) | ||
567 | return false; | ||
568 | |||
569 | ScenePresence sp = null; | ||
570 | if(client != null && client.SceneAgent != null) | ||
571 | sp = client.SceneAgent as ScenePresence; | ||
572 | |||
566 | Delegate[] list = handler.GetInvocationList(); | 573 | Delegate[] list = handler.GetInvocationList(); |
567 | foreach (ReturnObjectsHandler h in list) | 574 | foreach (ReturnObjectsHandler h in list) |
568 | { | 575 | { |
569 | if (h(land, user, objects) == false) | 576 | if (h(land, sp, objects) == false) |
570 | { | 577 | { |
571 | result = false; | 578 | result = false; |
572 | break; | 579 | break; |