* Move nested classes from the RegionCombinerModule into their own file.
* Rename the RegionCombinerModuleIndividualForwarder to RegionCombinerIndividualEventForwarder so there's no possibility that mono.addins sees any names similarremotes/origin/0.6.7-post-fixes
							parent
							
								
									fe4f312d55
								
							
						
					
					
						commit
						eadea36142
					
				| 
						 | 
				
			
			@ -0,0 +1,94 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright (c) Contributors, http://opensimulator.org/
 | 
			
		||||
 * See CONTRIBUTORS.TXT for a full list of copyright holders.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions are met:
 | 
			
		||||
 *     * Redistributions of source code must retain the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer.
 | 
			
		||||
 *     * Redistributions in binary form must reproduce the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer in the
 | 
			
		||||
 *       documentation and/or other materials provided with the distribution.
 | 
			
		||||
 *     * Neither the name of the OpenSimulator Project nor the
 | 
			
		||||
 *       names of its contributors may be used to endorse or promote products
 | 
			
		||||
 *       derived from this software without specific prior written permission.
 | 
			
		||||
 *
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
 | 
			
		||||
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 | 
			
		||||
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 | 
			
		||||
 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
 | 
			
		||||
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 | 
			
		||||
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 | 
			
		||||
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 | 
			
		||||
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 | 
			
		||||
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 | 
			
		||||
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using OpenMetaverse;
 | 
			
		||||
using OpenSim.Region.Framework.Scenes;
 | 
			
		||||
 | 
			
		||||
namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		||||
{
 | 
			
		||||
public class RegionCombinerClientEventForwarder
 | 
			
		||||
    {
 | 
			
		||||
        private Scene m_rootScene;
 | 
			
		||||
        private Dictionary<UUID, Scene> m_virtScene = new Dictionary<UUID, Scene>();
 | 
			
		||||
        private Dictionary<UUID,RegionCombinerIndividualEventForwarder> m_forwarders = new Dictionary<UUID,
 | 
			
		||||
            RegionCombinerIndividualEventForwarder>();
 | 
			
		||||
 | 
			
		||||
        public RegionCombinerClientEventForwarder(RegionConnections rootScene)
 | 
			
		||||
        {
 | 
			
		||||
            m_rootScene = rootScene.RegionScene;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void AddSceneToEventForwarding(Scene virtualScene)
 | 
			
		||||
        {
 | 
			
		||||
            lock (m_virtScene)
 | 
			
		||||
            {
 | 
			
		||||
                if (m_virtScene.ContainsKey(virtualScene.RegionInfo.originRegionID))
 | 
			
		||||
                {
 | 
			
		||||
                    m_virtScene[virtualScene.RegionInfo.originRegionID] = virtualScene;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    m_virtScene.Add(virtualScene.RegionInfo.originRegionID, virtualScene);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            lock (m_forwarders)
 | 
			
		||||
            {
 | 
			
		||||
                // TODO: Fix this to unregister if this happens
 | 
			
		||||
                if (m_forwarders.ContainsKey(virtualScene.RegionInfo.originRegionID))
 | 
			
		||||
                    m_forwarders.Remove(virtualScene.RegionInfo.originRegionID);
 | 
			
		||||
 | 
			
		||||
                RegionCombinerIndividualEventForwarder forwarder =
 | 
			
		||||
                    new RegionCombinerIndividualEventForwarder(m_rootScene, virtualScene);
 | 
			
		||||
                m_forwarders.Add(virtualScene.RegionInfo.originRegionID, forwarder);
 | 
			
		||||
 | 
			
		||||
                virtualScene.EventManager.OnNewClient += forwarder.ClientConnect;
 | 
			
		||||
                virtualScene.EventManager.OnClientClosed += forwarder.ClientClosed;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void RemoveSceneFromEventForwarding (Scene virtualScene)
 | 
			
		||||
        {
 | 
			
		||||
            lock (m_forwarders)
 | 
			
		||||
            {
 | 
			
		||||
                RegionCombinerIndividualEventForwarder forwarder = m_forwarders[virtualScene.RegionInfo.originRegionID];
 | 
			
		||||
                virtualScene.EventManager.OnNewClient -= forwarder.ClientConnect;
 | 
			
		||||
                virtualScene.EventManager.OnClientClosed -= forwarder.ClientClosed;
 | 
			
		||||
                m_forwarders.Remove(virtualScene.RegionInfo.originRegionID);
 | 
			
		||||
            }
 | 
			
		||||
            lock (m_virtScene)
 | 
			
		||||
            {
 | 
			
		||||
                if (m_virtScene.ContainsKey(virtualScene.RegionInfo.originRegionID))
 | 
			
		||||
                {
 | 
			
		||||
                    m_virtScene.Remove(virtualScene.RegionInfo.originRegionID);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,125 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright (c) Contributors, http://opensimulator.org/
 | 
			
		||||
 * See CONTRIBUTORS.TXT for a full list of copyright holders.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions are met:
 | 
			
		||||
 *     * Redistributions of source code must retain the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer.
 | 
			
		||||
 *     * Redistributions in binary form must reproduce the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer in the
 | 
			
		||||
 *       documentation and/or other materials provided with the distribution.
 | 
			
		||||
 *     * Neither the name of the OpenSimulator Project nor the
 | 
			
		||||
 *       names of its contributors may be used to endorse or promote products
 | 
			
		||||
 *       derived from this software without specific prior written permission.
 | 
			
		||||
 *
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
 | 
			
		||||
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 | 
			
		||||
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 | 
			
		||||
 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
 | 
			
		||||
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 | 
			
		||||
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 | 
			
		||||
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 | 
			
		||||
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 | 
			
		||||
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 | 
			
		||||
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System;
 | 
			
		||||
using OpenMetaverse;
 | 
			
		||||
using OpenSim.Framework;
 | 
			
		||||
using OpenSim.Region.Framework.Scenes;
 | 
			
		||||
 | 
			
		||||
namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		||||
{
 | 
			
		||||
 public class RegionCombinerIndividualEventForwarder
 | 
			
		||||
    {
 | 
			
		||||
        private Scene m_rootScene;
 | 
			
		||||
        private Scene m_virtScene;
 | 
			
		||||
 | 
			
		||||
        public RegionCombinerIndividualEventForwarder(Scene rootScene, Scene virtScene)
 | 
			
		||||
        {
 | 
			
		||||
            m_rootScene = rootScene;
 | 
			
		||||
            m_virtScene = virtScene;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void ClientConnect(IClientAPI client)
 | 
			
		||||
        {
 | 
			
		||||
            m_virtScene.UnSubscribeToClientPrimEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientPrimRezEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientInventoryEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientAttachmentEvents(client);
 | 
			
		||||
            //m_virtScene.UnSubscribeToClientTeleportEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientScriptEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientGodEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientNetworkEvents(client);
 | 
			
		||||
 | 
			
		||||
            m_rootScene.SubscribeToClientPrimEvents(client);
 | 
			
		||||
            client.OnAddPrim += LocalAddNewPrim;
 | 
			
		||||
            client.OnRezObject += LocalRezObject;
 | 
			
		||||
            m_rootScene.SubscribeToClientInventoryEvents(client);
 | 
			
		||||
            m_rootScene.SubscribeToClientAttachmentEvents(client);
 | 
			
		||||
            //m_rootScene.SubscribeToClientTeleportEvents(client);
 | 
			
		||||
            m_rootScene.SubscribeToClientScriptEvents(client);
 | 
			
		||||
            m_rootScene.SubscribeToClientGodEvents(client);
 | 
			
		||||
            m_rootScene.SubscribeToClientNetworkEvents(client);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void ClientClosed(UUID clientid, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Fixes position based on the region the Rez event came in on
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="remoteclient"></param>
 | 
			
		||||
        /// <param name="itemid"></param>
 | 
			
		||||
        /// <param name="rayend"></param>
 | 
			
		||||
        /// <param name="raystart"></param>
 | 
			
		||||
        /// <param name="raytargetid"></param>
 | 
			
		||||
        /// <param name="bypassraycast"></param>
 | 
			
		||||
        /// <param name="rayendisintersection"></param>
 | 
			
		||||
        /// <param name="rezselected"></param>
 | 
			
		||||
        /// <param name="removeitem"></param>
 | 
			
		||||
        /// <param name="fromtaskid"></param>
 | 
			
		||||
        private void LocalRezObject(IClientAPI remoteclient, UUID itemid, Vector3 rayend, Vector3 raystart, 
 | 
			
		||||
            UUID raytargetid, byte bypassraycast, bool rayendisintersection, bool rezselected, bool removeitem, 
 | 
			
		||||
            UUID fromtaskid)
 | 
			
		||||
        {     
 | 
			
		||||
            int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
 | 
			
		||||
            int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
 | 
			
		||||
            rayend.X += differenceX * (int)Constants.RegionSize;
 | 
			
		||||
            rayend.Y += differenceY * (int)Constants.RegionSize;
 | 
			
		||||
            raystart.X += differenceX * (int)Constants.RegionSize;
 | 
			
		||||
            raystart.Y += differenceY * (int)Constants.RegionSize;
 | 
			
		||||
 | 
			
		||||
            m_rootScene.RezObject(remoteclient, itemid, rayend, raystart, raytargetid, bypassraycast,
 | 
			
		||||
                                  rayendisintersection, rezselected, removeitem, fromtaskid);
 | 
			
		||||
        }
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Fixes position based on the region the AddPrimShape event came in on
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="ownerid"></param>
 | 
			
		||||
        /// <param name="groupid"></param>
 | 
			
		||||
        /// <param name="rayend"></param>
 | 
			
		||||
        /// <param name="rot"></param>
 | 
			
		||||
        /// <param name="shape"></param>
 | 
			
		||||
        /// <param name="bypassraycast"></param>
 | 
			
		||||
        /// <param name="raystart"></param>
 | 
			
		||||
        /// <param name="raytargetid"></param>
 | 
			
		||||
        /// <param name="rayendisintersection"></param>
 | 
			
		||||
        private void LocalAddNewPrim(UUID ownerid, UUID groupid, Vector3 rayend, Quaternion rot, 
 | 
			
		||||
            PrimitiveBaseShape shape, byte bypassraycast, Vector3 raystart, UUID raytargetid, 
 | 
			
		||||
            byte rayendisintersection)
 | 
			
		||||
        {
 | 
			
		||||
            int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
 | 
			
		||||
            int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
 | 
			
		||||
            rayend.X += differenceX * (int)Constants.RegionSize;
 | 
			
		||||
            rayend.Y += differenceY * (int)Constants.RegionSize;
 | 
			
		||||
            raystart.X += differenceX * (int)Constants.RegionSize;
 | 
			
		||||
            raystart.Y += differenceY * (int)Constants.RegionSize;
 | 
			
		||||
            m_rootScene.AddNewPrim(ownerid, groupid, rayend, rot, shape, bypassraycast, raystart, raytargetid,
 | 
			
		||||
                                   rayendisintersection);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,163 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright (c) Contributors, http://opensimulator.org/
 | 
			
		||||
 * See CONTRIBUTORS.TXT for a full list of copyright holders.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions are met:
 | 
			
		||||
 *     * Redistributions of source code must retain the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer.
 | 
			
		||||
 *     * Redistributions in binary form must reproduce the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer in the
 | 
			
		||||
 *       documentation and/or other materials provided with the distribution.
 | 
			
		||||
 *     * Neither the name of the OpenSimulator Project nor the
 | 
			
		||||
 *       names of its contributors may be used to endorse or promote products
 | 
			
		||||
 *       derived from this software without specific prior written permission.
 | 
			
		||||
 *
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
 | 
			
		||||
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 | 
			
		||||
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 | 
			
		||||
 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
 | 
			
		||||
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 | 
			
		||||
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 | 
			
		||||
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 | 
			
		||||
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 | 
			
		||||
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 | 
			
		||||
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using OpenMetaverse;
 | 
			
		||||
using OpenSim.Framework;
 | 
			
		||||
using OpenSim.Region.Framework.Interfaces;
 | 
			
		||||
 | 
			
		||||
namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		||||
{
 | 
			
		||||
public class RegionCombinerLargeLandChannel : ILandChannel
 | 
			
		||||
    {
 | 
			
		||||
        // private static readonly ILog m_log =
 | 
			
		||||
        //     LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
 | 
			
		||||
        private RegionData RegData;
 | 
			
		||||
        private ILandChannel RootRegionLandChannel;
 | 
			
		||||
        private readonly List<RegionData> RegionConnections;
 | 
			
		||||
        
 | 
			
		||||
        #region ILandChannel Members
 | 
			
		||||
 | 
			
		||||
        public RegionCombinerLargeLandChannel(RegionData regData, ILandChannel rootRegionLandChannel,
 | 
			
		||||
                                              List<RegionData> regionConnections)
 | 
			
		||||
        {
 | 
			
		||||
            RegData = regData;
 | 
			
		||||
            RootRegionLandChannel = rootRegionLandChannel;
 | 
			
		||||
            RegionConnections = regionConnections;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public List<ILandObject> ParcelsNearPoint(Vector3 position)
 | 
			
		||||
        {
 | 
			
		||||
            //m_log.DebugFormat("[LANDPARCELNEARPOINT]: {0}>", position);
 | 
			
		||||
            return RootRegionLandChannel.ParcelsNearPoint(position - RegData.Offset);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public List<ILandObject> AllParcels()
 | 
			
		||||
        {
 | 
			
		||||
            return RootRegionLandChannel.AllParcels();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public ILandObject GetLandObject(int x, int y)
 | 
			
		||||
        {
 | 
			
		||||
            //m_log.DebugFormat("[BIGLANDTESTINT]: <{0},{1}>", x, y);
 | 
			
		||||
 | 
			
		||||
            if (x > 0 && x <= (int)Constants.RegionSize && y > 0 && y <= (int)Constants.RegionSize)
 | 
			
		||||
            {
 | 
			
		||||
                return RootRegionLandChannel.GetLandObject(x, y);
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                int offsetX = (x / (int)Constants.RegionSize);
 | 
			
		||||
                int offsetY = (y / (int)Constants.RegionSize);
 | 
			
		||||
                offsetX *= (int)Constants.RegionSize;
 | 
			
		||||
                offsetY *= (int)Constants.RegionSize;
 | 
			
		||||
 | 
			
		||||
                foreach (RegionData regionData in RegionConnections)
 | 
			
		||||
                {
 | 
			
		||||
                    if (regionData.Offset.X == offsetX && regionData.Offset.Y == offsetY)
 | 
			
		||||
                    {
 | 
			
		||||
                        return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
 | 
			
		||||
                obj.landData.Name = "NO LAND";
 | 
			
		||||
                return obj;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public ILandObject GetLandObject(int localID)
 | 
			
		||||
        {
 | 
			
		||||
            return RootRegionLandChannel.GetLandObject(localID);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public ILandObject GetLandObject(float x, float y)
 | 
			
		||||
        {
 | 
			
		||||
            //m_log.DebugFormat("[BIGLANDTESTFLOAT]: <{0},{1}>", x, y);
 | 
			
		||||
            
 | 
			
		||||
            if (x > 0 && x <= (int)Constants.RegionSize && y > 0 && y <= (int)Constants.RegionSize)
 | 
			
		||||
            {
 | 
			
		||||
                return RootRegionLandChannel.GetLandObject(x, y);
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                int offsetX = (int)(x/(int) Constants.RegionSize);
 | 
			
		||||
                int offsetY = (int)(y/(int) Constants.RegionSize);
 | 
			
		||||
                offsetX *= (int) Constants.RegionSize;
 | 
			
		||||
                offsetY *= (int) Constants.RegionSize;
 | 
			
		||||
 | 
			
		||||
                foreach (RegionData regionData in RegionConnections)
 | 
			
		||||
                {
 | 
			
		||||
                    if (regionData.Offset.X == offsetX && regionData.Offset.Y == offsetY)
 | 
			
		||||
                    {
 | 
			
		||||
                        return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
 | 
			
		||||
                obj.landData.Name = "NO LAND";
 | 
			
		||||
                return obj;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool IsLandPrimCountTainted()
 | 
			
		||||
        {
 | 
			
		||||
            return RootRegionLandChannel.IsLandPrimCountTainted();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool IsForcefulBansAllowed()
 | 
			
		||||
        {
 | 
			
		||||
            return RootRegionLandChannel.IsForcefulBansAllowed();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void UpdateLandObject(int localID, LandData data)
 | 
			
		||||
        {
 | 
			
		||||
            RootRegionLandChannel.UpdateLandObject(localID, data);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
 | 
			
		||||
        {
 | 
			
		||||
            RootRegionLandChannel.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel)
 | 
			
		||||
        {
 | 
			
		||||
            RootRegionLandChannel.setParcelObjectMaxOverride(overrideDel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel)
 | 
			
		||||
        {
 | 
			
		||||
            RootRegionLandChannel.setSimulatorObjectMaxOverride(overrideDel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime)
 | 
			
		||||
        {
 | 
			
		||||
            RootRegionLandChannel.SetParcelOtherCleanTime(remoteClient, localID, otherCleanTime);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #endregion
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -911,567 +911,4 @@ namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		|||
            VirtualRegion.Permissions.OnUseObjectReturn += BigRegion.PermissionModule.CanUseObjectReturn; //NOT YET IMPLEMENTED
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class RegionConnections
 | 
			
		||||
    {
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Root Region ID
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public UUID RegionId;
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Root Region Scene
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public Scene RegionScene;
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// LargeLandChannel for combined region
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public ILandChannel RegionLandChannel;
 | 
			
		||||
        public uint X;
 | 
			
		||||
        public uint Y;
 | 
			
		||||
        public int XEnd;
 | 
			
		||||
        public int YEnd;
 | 
			
		||||
        public List<RegionData> ConnectedRegions;
 | 
			
		||||
        public RegionCombinerPermissionModule PermissionModule;
 | 
			
		||||
        public RegionCombinerClientEventForwarder ClientEventForwarder;
 | 
			
		||||
        public void UpdateExtents(Vector3 extents)
 | 
			
		||||
        {
 | 
			
		||||
            XEnd = (int)extents.X;
 | 
			
		||||
            YEnd = (int)extents.Y;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class RegionData
 | 
			
		||||
    {
 | 
			
		||||
        public UUID RegionId;
 | 
			
		||||
        public Scene RegionScene;
 | 
			
		||||
        public Vector3 Offset;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    struct RegionCourseLocationStruct
 | 
			
		||||
    {
 | 
			
		||||
        public List<Vector3> Locations;
 | 
			
		||||
        public List<UUID> Uuids;
 | 
			
		||||
        public IClientAPI UserAPI;
 | 
			
		||||
        public Vector2 Offset;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class RegionCombinerLargeLandChannel : ILandChannel
 | 
			
		||||
    {
 | 
			
		||||
        // private static readonly ILog m_log =
 | 
			
		||||
        //     LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
 | 
			
		||||
        private RegionData RegData;
 | 
			
		||||
        private ILandChannel RootRegionLandChannel;
 | 
			
		||||
        private readonly List<RegionData> RegionConnections;
 | 
			
		||||
        
 | 
			
		||||
        #region ILandChannel Members
 | 
			
		||||
 | 
			
		||||
        public RegionCombinerLargeLandChannel(RegionData regData, ILandChannel rootRegionLandChannel,
 | 
			
		||||
                                              List<RegionData> regionConnections)
 | 
			
		||||
        {
 | 
			
		||||
            RegData = regData;
 | 
			
		||||
            RootRegionLandChannel = rootRegionLandChannel;
 | 
			
		||||
            RegionConnections = regionConnections;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public List<ILandObject> ParcelsNearPoint(Vector3 position)
 | 
			
		||||
        {
 | 
			
		||||
            //m_log.DebugFormat("[LANDPARCELNEARPOINT]: {0}>", position);
 | 
			
		||||
            return RootRegionLandChannel.ParcelsNearPoint(position - RegData.Offset);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public List<ILandObject> AllParcels()
 | 
			
		||||
        {
 | 
			
		||||
            return RootRegionLandChannel.AllParcels();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public ILandObject GetLandObject(int x, int y)
 | 
			
		||||
        {
 | 
			
		||||
            //m_log.DebugFormat("[BIGLANDTESTINT]: <{0},{1}>", x, y);
 | 
			
		||||
 | 
			
		||||
            if (x > 0 && x <= (int)Constants.RegionSize && y > 0 && y <= (int)Constants.RegionSize)
 | 
			
		||||
            {
 | 
			
		||||
                return RootRegionLandChannel.GetLandObject(x, y);
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                int offsetX = (x / (int)Constants.RegionSize);
 | 
			
		||||
                int offsetY = (y / (int)Constants.RegionSize);
 | 
			
		||||
                offsetX *= (int)Constants.RegionSize;
 | 
			
		||||
                offsetY *= (int)Constants.RegionSize;
 | 
			
		||||
 | 
			
		||||
                foreach (RegionData regionData in RegionConnections)
 | 
			
		||||
                {
 | 
			
		||||
                    if (regionData.Offset.X == offsetX && regionData.Offset.Y == offsetY)
 | 
			
		||||
                    {
 | 
			
		||||
                        return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
 | 
			
		||||
                obj.landData.Name = "NO LAND";
 | 
			
		||||
                return obj;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public ILandObject GetLandObject(int localID)
 | 
			
		||||
        {
 | 
			
		||||
            return RootRegionLandChannel.GetLandObject(localID);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public ILandObject GetLandObject(float x, float y)
 | 
			
		||||
        {
 | 
			
		||||
            //m_log.DebugFormat("[BIGLANDTESTFLOAT]: <{0},{1}>", x, y);
 | 
			
		||||
            
 | 
			
		||||
            if (x > 0 && x <= (int)Constants.RegionSize && y > 0 && y <= (int)Constants.RegionSize)
 | 
			
		||||
            {
 | 
			
		||||
                return RootRegionLandChannel.GetLandObject(x, y);
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
            {
 | 
			
		||||
                int offsetX = (int)(x/(int) Constants.RegionSize);
 | 
			
		||||
                int offsetY = (int)(y/(int) Constants.RegionSize);
 | 
			
		||||
                offsetX *= (int) Constants.RegionSize;
 | 
			
		||||
                offsetY *= (int) Constants.RegionSize;
 | 
			
		||||
 | 
			
		||||
                foreach (RegionData regionData in RegionConnections)
 | 
			
		||||
                {
 | 
			
		||||
                    if (regionData.Offset.X == offsetX && regionData.Offset.Y == offsetY)
 | 
			
		||||
                    {
 | 
			
		||||
                        return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY);
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene);
 | 
			
		||||
                obj.landData.Name = "NO LAND";
 | 
			
		||||
                return obj;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool IsLandPrimCountTainted()
 | 
			
		||||
        {
 | 
			
		||||
            return RootRegionLandChannel.IsLandPrimCountTainted();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool IsForcefulBansAllowed()
 | 
			
		||||
        {
 | 
			
		||||
            return RootRegionLandChannel.IsForcefulBansAllowed();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void UpdateLandObject(int localID, LandData data)
 | 
			
		||||
        {
 | 
			
		||||
            RootRegionLandChannel.UpdateLandObject(localID, data);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
 | 
			
		||||
        {
 | 
			
		||||
            RootRegionLandChannel.ReturnObjectsInParcel(localID, returnType, agentIDs, taskIDs, remoteClient);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void setParcelObjectMaxOverride(overrideParcelMaxPrimCountDelegate overrideDel)
 | 
			
		||||
        {
 | 
			
		||||
            RootRegionLandChannel.setParcelObjectMaxOverride(overrideDel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void setSimulatorObjectMaxOverride(overrideSimulatorMaxPrimCountDelegate overrideDel)
 | 
			
		||||
        {
 | 
			
		||||
            RootRegionLandChannel.setSimulatorObjectMaxOverride(overrideDel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SetParcelOtherCleanTime(IClientAPI remoteClient, int localID, int otherCleanTime)
 | 
			
		||||
        {
 | 
			
		||||
            RootRegionLandChannel.SetParcelOtherCleanTime(remoteClient, localID, otherCleanTime);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #endregion
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class RegionCombinerPermissionModule
 | 
			
		||||
    {
 | 
			
		||||
        private Scene m_rootScene;
 | 
			
		||||
 | 
			
		||||
        public RegionCombinerPermissionModule(Scene RootScene)
 | 
			
		||||
        {
 | 
			
		||||
            m_rootScene = RootScene;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #region Permission Override
 | 
			
		||||
 | 
			
		||||
        public bool BypassPermissions()
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.BypassPermissions();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SetBypassPermissions(bool value)
 | 
			
		||||
        {
 | 
			
		||||
            m_rootScene.Permissions.SetBypassPermissions(value);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool PropagatePermissions()
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.PropagatePermissions();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public uint GenerateClientFlags(UUID userid, UUID objectidid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.GenerateClientFlags(userid,objectidid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanAbandonParcel(UUID user, ILandObject parcel, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanAbandonParcel(user,parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanReclaimParcel(user, parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDeedParcel(UUID user, ILandObject parcel, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDeedParcel(user, parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDeedObject(UUID user, UUID @group, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDeedObject(user,@group);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool IsGod(UUID user, Scene requestfromscene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.IsGod(user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDuplicateObject(int objectcount, UUID objectid, UUID owner, Scene scene, Vector3 objectposition)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDuplicateObject(objectcount, objectid, owner, objectposition);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDeleteObject(UUID objectid, UUID deleter, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDeleteObject(objectid, deleter);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanEditObject(UUID objectid, UUID editorid, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanEditObject(objectid, editorid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanEditParcel(UUID user, ILandObject parcel, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanEditParcel(user, parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanInstantMessage(UUID user, UUID target, Scene startscene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanInstantMessage(user, target);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanInventoryTransfer(UUID user, UUID target, Scene startscene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanInventoryTransfer(user, target);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanIssueEstateCommand(UUID user, Scene requestfromscene, bool ownercommand)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanIssueEstateCommand(user, ownercommand);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanMoveObject(UUID objectid, UUID moverid, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanMoveObject(objectid, moverid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanObjectEntry(UUID objectid, bool enteringregion, Vector3 newpoint, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanObjectEntry(objectid, enteringregion, newpoint);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanReturnObject(UUID objectid, UUID returnerid, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanReturnObject(objectid, returnerid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanRezObject(int objectcount, UUID owner, Vector3 objectposition, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanRezObject(objectcount, owner, objectposition);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanRunConsoleCommand(UUID user, Scene requestfromscene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanRunConsoleCommand(user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanRunScript(UUID script, UUID objectid, UUID user, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanRunScript(script, objectid, user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanCompileScript(UUID owneruuid, int scripttype, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanCompileScript(owneruuid, scripttype);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanSellParcel(UUID user, ILandObject parcel, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanSellParcel(user, parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanTakeObject(UUID objectid, UUID stealer, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanTakeObject(objectid, stealer);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanTakeCopyObject(UUID objectid, UUID userid, Scene inscene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanTakeObject(objectid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanTerraformLand(UUID user, Vector3 position, Scene requestfromscene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanTerraformLand(user, position);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanLinkObject(UUID user, UUID objectid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanLinkObject(user, objectid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDelinkObject(UUID user, UUID objectid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDelinkObject(user, objectid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanBuyLand(UUID user, ILandObject parcel, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanBuyLand(user, parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanViewNotecard(UUID script, UUID objectid, UUID user, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanViewNotecard(script, objectid, user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanViewScript(UUID script, UUID objectid, UUID user, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanViewScript(script, objectid, user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanEditNotecard(UUID notecard, UUID objectid, UUID user, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanEditNotecard(notecard, objectid, user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanEditScript(UUID script, UUID objectid, UUID user, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanEditScript(script, objectid, user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanCreateObjectInventory(int invtype, UUID objectid, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanCreateObjectInventory(invtype, objectid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanEditObjectInventory(UUID objectid, UUID editorid, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanEditObjectInventory(objectid, editorid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanCopyObjectInventory(UUID itemid, UUID objectid, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanCopyObjectInventory(itemid, objectid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDeleteObjectInventory(UUID itemid, UUID objectid, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDeleteObjectInventory(itemid, objectid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanResetScript(UUID prim, UUID script, UUID user, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanResetScript(prim, script, user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanCreateUserInventory(int invtype, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanCreateUserInventory(invtype, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanCopyUserInventory(UUID itemid, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanCopyUserInventory(itemid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanEditUserInventory(UUID itemid, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanEditUserInventory(itemid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDeleteUserInventory(UUID itemid, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDeleteUserInventory(itemid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanTeleport(UUID userid, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanTeleport(userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanUseObjectReturn(ILandObject landdata, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanUseObjectReturn(landdata, type, client, retlist);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #endregion
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class RegionCombinerClientEventForwarder
 | 
			
		||||
    {
 | 
			
		||||
        private Scene m_rootScene;
 | 
			
		||||
        private Dictionary<UUID, Scene> m_virtScene = new Dictionary<UUID, Scene>();
 | 
			
		||||
        private Dictionary<UUID,RegionCombinerModuleIndividualForwarder> m_forwarders = new Dictionary<UUID, 
 | 
			
		||||
            RegionCombinerModuleIndividualForwarder>();
 | 
			
		||||
 | 
			
		||||
        public RegionCombinerClientEventForwarder(RegionConnections rootScene)
 | 
			
		||||
        {
 | 
			
		||||
            m_rootScene = rootScene.RegionScene;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void AddSceneToEventForwarding(Scene virtualScene)
 | 
			
		||||
        {
 | 
			
		||||
            lock (m_virtScene)
 | 
			
		||||
            {
 | 
			
		||||
                if (m_virtScene.ContainsKey(virtualScene.RegionInfo.originRegionID))
 | 
			
		||||
                {
 | 
			
		||||
                    m_virtScene[virtualScene.RegionInfo.originRegionID] = virtualScene;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    m_virtScene.Add(virtualScene.RegionInfo.originRegionID, virtualScene);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            
 | 
			
		||||
            lock (m_forwarders)
 | 
			
		||||
            {
 | 
			
		||||
                // TODO: Fix this to unregister if this happens
 | 
			
		||||
                if (m_forwarders.ContainsKey(virtualScene.RegionInfo.originRegionID))
 | 
			
		||||
                    m_forwarders.Remove(virtualScene.RegionInfo.originRegionID);
 | 
			
		||||
 | 
			
		||||
                RegionCombinerModuleIndividualForwarder forwarder =
 | 
			
		||||
                    new RegionCombinerModuleIndividualForwarder(m_rootScene, virtualScene);
 | 
			
		||||
                m_forwarders.Add(virtualScene.RegionInfo.originRegionID, forwarder);
 | 
			
		||||
 | 
			
		||||
                virtualScene.EventManager.OnNewClient += forwarder.ClientConnect;
 | 
			
		||||
                virtualScene.EventManager.OnClientClosed += forwarder.ClientClosed;
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void RemoveSceneFromEventForwarding (Scene virtualScene)
 | 
			
		||||
        {
 | 
			
		||||
            lock (m_forwarders)
 | 
			
		||||
            {
 | 
			
		||||
                RegionCombinerModuleIndividualForwarder forwarder = m_forwarders[virtualScene.RegionInfo.originRegionID];
 | 
			
		||||
                virtualScene.EventManager.OnNewClient -= forwarder.ClientConnect;
 | 
			
		||||
                virtualScene.EventManager.OnClientClosed -= forwarder.ClientClosed;
 | 
			
		||||
                m_forwarders.Remove(virtualScene.RegionInfo.originRegionID);
 | 
			
		||||
            }
 | 
			
		||||
            lock (m_virtScene)
 | 
			
		||||
            {
 | 
			
		||||
                if (m_virtScene.ContainsKey(virtualScene.RegionInfo.originRegionID))
 | 
			
		||||
                {
 | 
			
		||||
                    m_virtScene.Remove(virtualScene.RegionInfo.originRegionID);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class RegionCombinerModuleIndividualForwarder
 | 
			
		||||
    {
 | 
			
		||||
        private Scene m_rootScene;
 | 
			
		||||
        private Scene m_virtScene;
 | 
			
		||||
 | 
			
		||||
        public RegionCombinerModuleIndividualForwarder(Scene rootScene, Scene virtScene)
 | 
			
		||||
        {
 | 
			
		||||
            m_rootScene = rootScene;
 | 
			
		||||
            m_virtScene = virtScene;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void ClientConnect(IClientAPI client)
 | 
			
		||||
        {
 | 
			
		||||
            m_virtScene.UnSubscribeToClientPrimEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientPrimRezEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientInventoryEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientAttachmentEvents(client);
 | 
			
		||||
            //m_virtScene.UnSubscribeToClientTeleportEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientScriptEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientGodEvents(client);
 | 
			
		||||
            m_virtScene.UnSubscribeToClientNetworkEvents(client);
 | 
			
		||||
 | 
			
		||||
            m_rootScene.SubscribeToClientPrimEvents(client);
 | 
			
		||||
            client.OnAddPrim += LocalAddNewPrim;
 | 
			
		||||
            client.OnRezObject += LocalRezObject;
 | 
			
		||||
            m_rootScene.SubscribeToClientInventoryEvents(client);
 | 
			
		||||
            m_rootScene.SubscribeToClientAttachmentEvents(client);
 | 
			
		||||
            //m_rootScene.SubscribeToClientTeleportEvents(client);
 | 
			
		||||
            m_rootScene.SubscribeToClientScriptEvents(client);
 | 
			
		||||
            m_rootScene.SubscribeToClientGodEvents(client);
 | 
			
		||||
            m_rootScene.SubscribeToClientNetworkEvents(client);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void ClientClosed(UUID clientid, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Fixes position based on the region the Rez event came in on
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="remoteclient"></param>
 | 
			
		||||
        /// <param name="itemid"></param>
 | 
			
		||||
        /// <param name="rayend"></param>
 | 
			
		||||
        /// <param name="raystart"></param>
 | 
			
		||||
        /// <param name="raytargetid"></param>
 | 
			
		||||
        /// <param name="bypassraycast"></param>
 | 
			
		||||
        /// <param name="rayendisintersection"></param>
 | 
			
		||||
        /// <param name="rezselected"></param>
 | 
			
		||||
        /// <param name="removeitem"></param>
 | 
			
		||||
        /// <param name="fromtaskid"></param>
 | 
			
		||||
        private void LocalRezObject(IClientAPI remoteclient, UUID itemid, Vector3 rayend, Vector3 raystart, 
 | 
			
		||||
            UUID raytargetid, byte bypassraycast, bool rayendisintersection, bool rezselected, bool removeitem, 
 | 
			
		||||
            UUID fromtaskid)
 | 
			
		||||
        {     
 | 
			
		||||
            int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
 | 
			
		||||
            int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
 | 
			
		||||
            rayend.X += differenceX * (int)Constants.RegionSize;
 | 
			
		||||
            rayend.Y += differenceY * (int)Constants.RegionSize;
 | 
			
		||||
            raystart.X += differenceX * (int)Constants.RegionSize;
 | 
			
		||||
            raystart.Y += differenceY * (int)Constants.RegionSize;
 | 
			
		||||
 | 
			
		||||
            m_rootScene.RezObject(remoteclient, itemid, rayend, raystart, raytargetid, bypassraycast,
 | 
			
		||||
                                  rayendisintersection, rezselected, removeitem, fromtaskid);
 | 
			
		||||
        }
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Fixes position based on the region the AddPrimShape event came in on
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="ownerid"></param>
 | 
			
		||||
        /// <param name="groupid"></param>
 | 
			
		||||
        /// <param name="rayend"></param>
 | 
			
		||||
        /// <param name="rot"></param>
 | 
			
		||||
        /// <param name="shape"></param>
 | 
			
		||||
        /// <param name="bypassraycast"></param>
 | 
			
		||||
        /// <param name="raystart"></param>
 | 
			
		||||
        /// <param name="raytargetid"></param>
 | 
			
		||||
        /// <param name="rayendisintersection"></param>
 | 
			
		||||
        private void LocalAddNewPrim(UUID ownerid, UUID groupid, Vector3 rayend, Quaternion rot, 
 | 
			
		||||
            PrimitiveBaseShape shape, byte bypassraycast, Vector3 raystart, UUID raytargetid, 
 | 
			
		||||
            byte rayendisintersection)
 | 
			
		||||
        {
 | 
			
		||||
            int differenceX = (int)m_virtScene.RegionInfo.RegionLocX - (int)m_rootScene.RegionInfo.RegionLocX;
 | 
			
		||||
            int differenceY = (int)m_virtScene.RegionInfo.RegionLocY - (int)m_rootScene.RegionInfo.RegionLocY;
 | 
			
		||||
            rayend.X += differenceX * (int)Constants.RegionSize;
 | 
			
		||||
            rayend.Y += differenceY * (int)Constants.RegionSize;
 | 
			
		||||
            raystart.X += differenceX * (int)Constants.RegionSize;
 | 
			
		||||
            raystart.Y += differenceY * (int)Constants.RegionSize;
 | 
			
		||||
            m_rootScene.AddNewPrim(ownerid, groupid, rayend, rot, shape, bypassraycast, raystart, raytargetid,
 | 
			
		||||
                                   rayendisintersection);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,275 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright (c) Contributors, http://opensimulator.org/
 | 
			
		||||
 * See CONTRIBUTORS.TXT for a full list of copyright holders.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions are met:
 | 
			
		||||
 *     * Redistributions of source code must retain the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer.
 | 
			
		||||
 *     * Redistributions in binary form must reproduce the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer in the
 | 
			
		||||
 *       documentation and/or other materials provided with the distribution.
 | 
			
		||||
 *     * Neither the name of the OpenSimulator Project nor the
 | 
			
		||||
 *       names of its contributors may be used to endorse or promote products
 | 
			
		||||
 *       derived from this software without specific prior written permission.
 | 
			
		||||
 *
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
 | 
			
		||||
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 | 
			
		||||
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 | 
			
		||||
 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
 | 
			
		||||
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 | 
			
		||||
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 | 
			
		||||
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 | 
			
		||||
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 | 
			
		||||
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 | 
			
		||||
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using OpenMetaverse;
 | 
			
		||||
using OpenSim.Framework;
 | 
			
		||||
using OpenSim.Region.Framework.Interfaces;
 | 
			
		||||
using OpenSim.Region.Framework.Scenes;
 | 
			
		||||
 | 
			
		||||
namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		||||
{
 | 
			
		||||
 public class RegionCombinerPermissionModule
 | 
			
		||||
    {
 | 
			
		||||
        private Scene m_rootScene;
 | 
			
		||||
 | 
			
		||||
        public RegionCombinerPermissionModule(Scene RootScene)
 | 
			
		||||
        {
 | 
			
		||||
            m_rootScene = RootScene;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #region Permission Override
 | 
			
		||||
 | 
			
		||||
        public bool BypassPermissions()
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.BypassPermissions();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public void SetBypassPermissions(bool value)
 | 
			
		||||
        {
 | 
			
		||||
            m_rootScene.Permissions.SetBypassPermissions(value);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool PropagatePermissions()
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.PropagatePermissions();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public uint GenerateClientFlags(UUID userid, UUID objectidid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.GenerateClientFlags(userid,objectidid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanAbandonParcel(UUID user, ILandObject parcel, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanAbandonParcel(user,parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanReclaimParcel(user, parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDeedParcel(UUID user, ILandObject parcel, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDeedParcel(user, parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDeedObject(UUID user, UUID @group, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDeedObject(user,@group);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool IsGod(UUID user, Scene requestfromscene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.IsGod(user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDuplicateObject(int objectcount, UUID objectid, UUID owner, Scene scene, Vector3 objectposition)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDuplicateObject(objectcount, objectid, owner, objectposition);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDeleteObject(UUID objectid, UUID deleter, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDeleteObject(objectid, deleter);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanEditObject(UUID objectid, UUID editorid, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanEditObject(objectid, editorid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanEditParcel(UUID user, ILandObject parcel, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanEditParcel(user, parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanInstantMessage(UUID user, UUID target, Scene startscene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanInstantMessage(user, target);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanInventoryTransfer(UUID user, UUID target, Scene startscene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanInventoryTransfer(user, target);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanIssueEstateCommand(UUID user, Scene requestfromscene, bool ownercommand)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanIssueEstateCommand(user, ownercommand);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanMoveObject(UUID objectid, UUID moverid, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanMoveObject(objectid, moverid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanObjectEntry(UUID objectid, bool enteringregion, Vector3 newpoint, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanObjectEntry(objectid, enteringregion, newpoint);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanReturnObject(UUID objectid, UUID returnerid, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanReturnObject(objectid, returnerid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanRezObject(int objectcount, UUID owner, Vector3 objectposition, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanRezObject(objectcount, owner, objectposition);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanRunConsoleCommand(UUID user, Scene requestfromscene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanRunConsoleCommand(user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanRunScript(UUID script, UUID objectid, UUID user, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanRunScript(script, objectid, user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanCompileScript(UUID owneruuid, int scripttype, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanCompileScript(owneruuid, scripttype);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanSellParcel(UUID user, ILandObject parcel, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanSellParcel(user, parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanTakeObject(UUID objectid, UUID stealer, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanTakeObject(objectid, stealer);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanTakeCopyObject(UUID objectid, UUID userid, Scene inscene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanTakeObject(objectid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanTerraformLand(UUID user, Vector3 position, Scene requestfromscene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanTerraformLand(user, position);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanLinkObject(UUID user, UUID objectid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanLinkObject(user, objectid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDelinkObject(UUID user, UUID objectid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDelinkObject(user, objectid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanBuyLand(UUID user, ILandObject parcel, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanBuyLand(user, parcel);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanViewNotecard(UUID script, UUID objectid, UUID user, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanViewNotecard(script, objectid, user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanViewScript(UUID script, UUID objectid, UUID user, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanViewScript(script, objectid, user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanEditNotecard(UUID notecard, UUID objectid, UUID user, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanEditNotecard(notecard, objectid, user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanEditScript(UUID script, UUID objectid, UUID user, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanEditScript(script, objectid, user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanCreateObjectInventory(int invtype, UUID objectid, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanCreateObjectInventory(invtype, objectid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanEditObjectInventory(UUID objectid, UUID editorid, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanEditObjectInventory(objectid, editorid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanCopyObjectInventory(UUID itemid, UUID objectid, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanCopyObjectInventory(itemid, objectid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDeleteObjectInventory(UUID itemid, UUID objectid, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDeleteObjectInventory(itemid, objectid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanResetScript(UUID prim, UUID script, UUID user, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanResetScript(prim, script, user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanCreateUserInventory(int invtype, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanCreateUserInventory(invtype, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanCopyUserInventory(UUID itemid, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanCopyUserInventory(itemid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanEditUserInventory(UUID itemid, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanEditUserInventory(itemid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanDeleteUserInventory(UUID itemid, UUID userid)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanDeleteUserInventory(itemid, userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanTeleport(UUID userid, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanTeleport(userid);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public bool CanUseObjectReturn(ILandObject landdata, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene)
 | 
			
		||||
        {
 | 
			
		||||
            return m_rootScene.Permissions.CanUseObjectReturn(landdata, type, client, retlist);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        #endregion
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,65 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright (c) Contributors, http://opensimulator.org/
 | 
			
		||||
 * See CONTRIBUTORS.TXT for a full list of copyright holders.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions are met:
 | 
			
		||||
 *     * Redistributions of source code must retain the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer.
 | 
			
		||||
 *     * Redistributions in binary form must reproduce the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer in the
 | 
			
		||||
 *       documentation and/or other materials provided with the distribution.
 | 
			
		||||
 *     * Neither the name of the OpenSimulator Project nor the
 | 
			
		||||
 *       names of its contributors may be used to endorse or promote products
 | 
			
		||||
 *       derived from this software without specific prior written permission.
 | 
			
		||||
 *
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
 | 
			
		||||
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 | 
			
		||||
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 | 
			
		||||
 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
 | 
			
		||||
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 | 
			
		||||
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 | 
			
		||||
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 | 
			
		||||
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 | 
			
		||||
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 | 
			
		||||
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using OpenMetaverse;
 | 
			
		||||
using OpenSim.Region.Framework.Interfaces;
 | 
			
		||||
using OpenSim.Region.Framework.Scenes;
 | 
			
		||||
 | 
			
		||||
namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		||||
{
 | 
			
		||||
    public class RegionConnections
 | 
			
		||||
    {
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Root Region ID
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public UUID RegionId;
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Root Region Scene
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public Scene RegionScene;
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// LargeLandChannel for combined region
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        public ILandChannel RegionLandChannel;
 | 
			
		||||
        public uint X;
 | 
			
		||||
        public uint Y;
 | 
			
		||||
        public int XEnd;
 | 
			
		||||
        public int YEnd;
 | 
			
		||||
        public List<RegionData> ConnectedRegions;
 | 
			
		||||
        public RegionCombinerPermissionModule PermissionModule;
 | 
			
		||||
        public RegionCombinerClientEventForwarder ClientEventForwarder;
 | 
			
		||||
        public void UpdateExtents(Vector3 extents)
 | 
			
		||||
        {
 | 
			
		||||
            XEnd = (int)extents.X;
 | 
			
		||||
            YEnd = (int)extents.Y;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,43 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright (c) Contributors, http://opensimulator.org/
 | 
			
		||||
 * See CONTRIBUTORS.TXT for a full list of copyright holders.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions are met:
 | 
			
		||||
 *     * Redistributions of source code must retain the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer.
 | 
			
		||||
 *     * Redistributions in binary form must reproduce the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer in the
 | 
			
		||||
 *       documentation and/or other materials provided with the distribution.
 | 
			
		||||
 *     * Neither the name of the OpenSimulator Project nor the
 | 
			
		||||
 *       names of its contributors may be used to endorse or promote products
 | 
			
		||||
 *       derived from this software without specific prior written permission.
 | 
			
		||||
 *
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
 | 
			
		||||
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 | 
			
		||||
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 | 
			
		||||
 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
 | 
			
		||||
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 | 
			
		||||
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 | 
			
		||||
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 | 
			
		||||
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 | 
			
		||||
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 | 
			
		||||
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using System;
 | 
			
		||||
using System.Collections.Generic;
 | 
			
		||||
using OpenMetaverse;
 | 
			
		||||
using OpenSim.Framework;
 | 
			
		||||
 | 
			
		||||
namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    struct RegionCourseLocationStruct
 | 
			
		||||
    {
 | 
			
		||||
        public List<Vector3> Locations;
 | 
			
		||||
        public List<UUID> Uuids;
 | 
			
		||||
        public IClientAPI UserAPI;
 | 
			
		||||
        public Vector2 Offset;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,39 @@
 | 
			
		|||
/*
 | 
			
		||||
 * Copyright (c) Contributors, http://opensimulator.org/
 | 
			
		||||
 * See CONTRIBUTORS.TXT for a full list of copyright holders.
 | 
			
		||||
 *
 | 
			
		||||
 * Redistribution and use in source and binary forms, with or without
 | 
			
		||||
 * modification, are permitted provided that the following conditions are met:
 | 
			
		||||
 *     * Redistributions of source code must retain the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer.
 | 
			
		||||
 *     * Redistributions in binary form must reproduce the above copyright
 | 
			
		||||
 *       notice, this list of conditions and the following disclaimer in the
 | 
			
		||||
 *       documentation and/or other materials provided with the distribution.
 | 
			
		||||
 *     * Neither the name of the OpenSimulator Project nor the
 | 
			
		||||
 *       names of its contributors may be used to endorse or promote products
 | 
			
		||||
 *       derived from this software without specific prior written permission.
 | 
			
		||||
 *
 | 
			
		||||
 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
 | 
			
		||||
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 | 
			
		||||
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 | 
			
		||||
 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
 | 
			
		||||
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 | 
			
		||||
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 | 
			
		||||
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 | 
			
		||||
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 | 
			
		||||
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 | 
			
		||||
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
using OpenMetaverse;
 | 
			
		||||
using OpenSim.Region.Framework.Scenes;
 | 
			
		||||
 | 
			
		||||
namespace OpenSim.Region.CoreModules.World.Land
 | 
			
		||||
{
 | 
			
		||||
    public class RegionData
 | 
			
		||||
    {
 | 
			
		||||
        public UUID RegionId;
 | 
			
		||||
        public Scene RegionScene;
 | 
			
		||||
        public Vector3 Offset;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue