mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
cosmetics
This commit is contained in:
@@ -201,7 +201,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||||||
private void PostInventoryAsset(InventoryItemBase item, int userlevel)
|
private void PostInventoryAsset(InventoryItemBase item, int userlevel)
|
||||||
{
|
{
|
||||||
InventoryFolderBase f = m_Scene.InventoryService.GetFolderForType(item.Owner, FolderType.Trash);
|
InventoryFolderBase f = m_Scene.InventoryService.GetFolderForType(item.Owner, FolderType.Trash);
|
||||||
if (f == null || (f != null && item.Folder != f.ID))
|
if (f is null || item.Folder.NotEqual(f.ID))
|
||||||
PostInventoryAsset(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
|
PostInventoryAsset(item.Owner, (AssetType)item.AssetType, item.AssetID, item.Name, userlevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -376,8 +376,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
|||||||
{
|
{
|
||||||
if (!UserManagementModule.IsLocalGridUser(userID))
|
if (!UserManagementModule.IsLocalGridUser(userID))
|
||||||
{ // foreign
|
{ // foreign
|
||||||
ScenePresence sp = null;
|
if (m_Scene.TryGetScenePresence(userID, out ScenePresence sp))
|
||||||
if (m_Scene.TryGetScenePresence(userID, out sp))
|
|
||||||
{
|
{
|
||||||
AgentCircuitData aCircuit = m_Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
|
AgentCircuitData aCircuit = m_Scene.AuthenticateHandler.GetAgentCircuitData(sp.ControllingClient.CircuitCode);
|
||||||
if (aCircuit != null && aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
|
if (aCircuit != null && aCircuit.ServiceURLs != null && aCircuit.ServiceURLs.ContainsKey("AssetServerURI"))
|
||||||
|
|||||||
@@ -812,15 +812,10 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||||||
|
|
||||||
if ((LandData.Flags & (uint) ParcelFlags.UseBanList) > 0)
|
if ((LandData.Flags & (uint) ParcelFlags.UseBanList) > 0)
|
||||||
{
|
{
|
||||||
if (LandData.ParcelAccessList.FindIndex(
|
foreach(LandAccessEntry e in LandData.ParcelAccessList)
|
||||||
delegate(LandAccessEntry e)
|
|
||||||
{
|
|
||||||
if (e.Flags == AccessList.Ban && e.AgentID.Equals(avatar))
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}) != -1)
|
|
||||||
{
|
{
|
||||||
return true;
|
if (e.Flags == AccessList.Ban && e.AgentID.Equals(avatar))
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@@ -898,17 +893,12 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||||||
{
|
{
|
||||||
ExpireAccessList();
|
ExpireAccessList();
|
||||||
|
|
||||||
if (LandData.ParcelAccessList.FindIndex(
|
foreach(LandAccessEntry e in LandData.ParcelAccessList)
|
||||||
delegate(LandAccessEntry e)
|
|
||||||
{
|
|
||||||
if (e.Flags == AccessList.Access && e.AgentID.Equals(avatar))
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}) == -1)
|
|
||||||
{
|
{
|
||||||
return false;
|
if (e.Flags == AccessList.Access && e.AgentID.Equals(avatar))
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
@@ -1710,9 +1700,9 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||||||
|
|
||||||
lock (primsOverMe)
|
lock (primsOverMe)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat(
|
//m_log.DebugFormat(
|
||||||
// "[LAND OBJECT]: Request for SendLandObjectOwners() from {0} with {1} known prims on region",
|
// "[LAND OBJECT]: Request for SendLandObjectOwners() from {0} with {1} known prims on region",
|
||||||
// remote_client.Name, primsOverMe.Count);
|
// remote_client.Name, primsOverMe.Count);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1820,15 +1810,13 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
public void ReturnObject(SceneObjectGroup obj)
|
public void ReturnObject(SceneObjectGroup obj)
|
||||||
{
|
{
|
||||||
SceneObjectGroup[] objs = new SceneObjectGroup[1];
|
m_scene.returnObjects(new SceneObjectGroup[] { obj }, null);
|
||||||
objs[0] = obj;
|
|
||||||
m_scene.returnObjects(objs, null);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client)
|
public void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat(
|
//m_log.DebugFormat(
|
||||||
// "[LAND OBJECT]: Request to return objects in {0} from {1}", LandData.Name, remote_client.Name);
|
// "[LAND OBJECT]: Request to return objects in {0} from {1}", LandData.Name, remote_client.Name);
|
||||||
|
|
||||||
Dictionary<UUID,List<SceneObjectGroup>> returns = new();
|
Dictionary<UUID,List<SceneObjectGroup>> returns = new();
|
||||||
|
|
||||||
@@ -1840,13 +1828,14 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||||||
{
|
{
|
||||||
if (obj.OwnerID.Equals(LandData.OwnerID))
|
if (obj.OwnerID.Equals(LandData.OwnerID))
|
||||||
{
|
{
|
||||||
if (!returns.ContainsKey(obj.OwnerID))
|
if (returns.TryGetValue(obj.OwnerID, out List<SceneObjectGroup> rol))
|
||||||
returns[obj.OwnerID] = new List<SceneObjectGroup>();
|
rol.Add(obj);
|
||||||
returns[obj.OwnerID].Add(obj);
|
else
|
||||||
|
returns[obj.OwnerID] = new List<SceneObjectGroup>() { obj };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (type == (uint)ObjectReturnType.Group && !LandData.GroupID.IsZero())
|
else if (type == (uint)ObjectReturnType.Group && LandData.GroupID.IsNotZero())
|
||||||
{
|
{
|
||||||
foreach (SceneObjectGroup obj in primsOverMe)
|
foreach (SceneObjectGroup obj in primsOverMe)
|
||||||
{
|
{
|
||||||
@@ -1854,9 +1843,10 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||||||
{
|
{
|
||||||
if (obj.OwnerID.Equals(LandData.OwnerID))
|
if (obj.OwnerID.Equals(LandData.OwnerID))
|
||||||
continue;
|
continue;
|
||||||
if (!returns.ContainsKey(obj.OwnerID))
|
if (returns.TryGetValue(obj.OwnerID, out List<SceneObjectGroup> rol))
|
||||||
returns[obj.OwnerID] = new List<SceneObjectGroup>();
|
rol.Add(obj);
|
||||||
returns[obj.OwnerID].Add(obj);
|
else
|
||||||
|
returns[obj.OwnerID] = new List<SceneObjectGroup>() { obj };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1868,9 +1858,10 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||||||
(obj.GroupID.NotEqual(LandData.GroupID) ||
|
(obj.GroupID.NotEqual(LandData.GroupID) ||
|
||||||
LandData.GroupID.IsZero()))
|
LandData.GroupID.IsZero()))
|
||||||
{
|
{
|
||||||
if (!returns.ContainsKey(obj.OwnerID))
|
if (returns.TryGetValue(obj.OwnerID, out List<SceneObjectGroup> rol))
|
||||||
returns[obj.OwnerID] = new List<SceneObjectGroup>();
|
rol.Add(obj);
|
||||||
returns[obj.OwnerID].Add(obj);
|
else
|
||||||
|
returns[obj.OwnerID] = new List<SceneObjectGroup>() { obj };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1881,9 +1872,10 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||||||
{
|
{
|
||||||
if (ownerlist.Contains(obj.OwnerID))
|
if (ownerlist.Contains(obj.OwnerID))
|
||||||
{
|
{
|
||||||
if (!returns.ContainsKey(obj.OwnerID))
|
if (returns.TryGetValue(obj.OwnerID, out List<SceneObjectGroup> rol))
|
||||||
returns[obj.OwnerID] = new List<SceneObjectGroup>();
|
rol.Add(obj);
|
||||||
returns[obj.OwnerID].Add(obj);
|
else
|
||||||
|
returns[obj.OwnerID] = new List<SceneObjectGroup>() { obj };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2033,16 +2025,17 @@ namespace OpenSim.Region.CoreModules.World.Land
|
|||||||
private void ExpireAccessList()
|
private void ExpireAccessList()
|
||||||
{
|
{
|
||||||
List<LandAccessEntry> delete = new();
|
List<LandAccessEntry> delete = new();
|
||||||
|
int now = Util.UnixTimeSinceEpoch();
|
||||||
foreach (LandAccessEntry entry in LandData.ParcelAccessList)
|
foreach (LandAccessEntry entry in LandData.ParcelAccessList)
|
||||||
{
|
{
|
||||||
if (entry.Expires != 0 && entry.Expires < Util.UnixTimeSinceEpoch())
|
if (entry.Expires != 0 && entry.Expires < now)
|
||||||
delete.Add(entry);
|
delete.Add(entry);
|
||||||
}
|
}
|
||||||
foreach (LandAccessEntry entry in delete)
|
foreach (LandAccessEntry entry in delete)
|
||||||
{
|
{
|
||||||
LandData.ParcelAccessList.Remove(entry);
|
LandData.ParcelAccessList.Remove(entry);
|
||||||
|
|
||||||
if (m_scene.TryGetScenePresence(entry.AgentID, out ScenePresence presence) && (!presence.IsChildAgent))
|
if ((entry.Flags & AccessList.Access) != 0 && m_scene.TryGetScenePresence(entry.AgentID, out ScenePresence presence) && (!presence.IsChildAgent))
|
||||||
{
|
{
|
||||||
ILandObject land = m_scene.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y);
|
ILandObject land = m_scene.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y);
|
||||||
if (land.LandData.LocalID == LandData.LocalID)
|
if (land.LandData.LocalID == LandData.LocalID)
|
||||||
|
|||||||
Reference in New Issue
Block a user