useless cosmetics

master
UbitUmarov 2020-07-15 01:40:53 +01:00
parent f32c0ead05
commit 6c5bf4ed25
4 changed files with 149 additions and 166 deletions

View File

@ -108,10 +108,10 @@ namespace OpenSim.Region.CoreModules.Asset
private IAssetService m_AssetService;
private List<Scene> m_Scenes = new List<Scene>();
private object timerLock = new object();
private readonly object timerLock = new object();
private Dictionary<string,WeakReference> weakAssetReferences = new Dictionary<string, WeakReference>();
private object weakAssetReferencesLock = new object();
private readonly object weakAssetReferencesLock = new object();
private bool m_updateFileTimeOnCacheHit = false;
public FlotsamAssetCache()
@ -282,8 +282,10 @@ namespace OpenSim.Region.CoreModules.Asset
{
if (m_FileCacheEnabled && (m_FileExpiration > TimeSpan.Zero) && (m_FileExpirationCleanupTimer > TimeSpan.Zero))
{
m_CacheCleanTimer = new System.Timers.Timer(m_FileExpirationCleanupTimer.TotalMilliseconds);
m_CacheCleanTimer.AutoReset = false;
m_CacheCleanTimer = new System.Timers.Timer(m_FileExpirationCleanupTimer.TotalMilliseconds)
{
AutoReset = false
};
m_CacheCleanTimer.Elapsed += CleanupExpiredFiles;
m_CacheCleanTimer.Start();
m_timerRunning = true;
@ -294,13 +296,13 @@ namespace OpenSim.Region.CoreModules.Asset
{
m_assetFileWriteQueue = new BlockingCollection<WriteAssetInfo>();
m_cancelSource = new CancellationTokenSource();
WorkManager.RunInThreadPool(processWrites, null, "FloatsamCacheWriter", false);
WorkManager.RunInThreadPool(ProcessWrites, null, "FloatsamCacheWriter", false);
}
}
}
}
private void processWrites(object o)
private void ProcessWrites(object o)
{
try
{
@ -309,6 +311,7 @@ namespace OpenSim.Region.CoreModules.Asset
if(m_assetFileWriteQueue.TryTake(out WriteAssetInfo wai,-1, m_cancelSource.Token))
{
WriteFileCache(wai.filename,wai.asset,false);
wai.asset = null;
}
}
}
@ -320,10 +323,9 @@ namespace OpenSim.Region.CoreModules.Asset
//
private void UpdateWeakReference(string key, AssetBase asset)
{
WeakReference aref;
lock(weakAssetReferencesLock)
{
if(weakAssetReferences.TryGetValue(key , out aref))
if(weakAssetReferences.TryGetValue(key , out WeakReference aref))
aref.Target = asset;
else
weakAssetReferences[key] = new WeakReference(asset);
@ -362,9 +364,12 @@ namespace OpenSim.Region.CoreModules.Asset
m_CurrentlyWriting.Add(filename);
}
WriteAssetInfo wai = new WriteAssetInfo();
wai.filename = filename;
wai.asset = asset;
WriteAssetInfo wai = new WriteAssetInfo()
{
filename = filename,
asset = asset
};
if (m_assetFileWriteQueue != null)
m_assetFileWriteQueue.Add(wai);
}
@ -450,13 +455,13 @@ namespace OpenSim.Region.CoreModules.Asset
/// <returns></returns>
private AssetBase GetFromMemoryCache(string id)
{
AssetBase asset = null;
if (m_MemoryCache.TryGetValue(id, out asset))
if (m_MemoryCache.TryGetValue(id, out AssetBase asset))
{
m_MemoryHits++;
return asset;
}
return null;
}
private bool CheckFromMemoryCache(string id)
{
@ -550,8 +555,7 @@ namespace OpenSim.Region.CoreModules.Asset
// For IAssetService
public AssetBase Get(string id)
{
AssetBase asset;
Get(id, out asset);
Get(id, out AssetBase asset);
return asset;
}
@ -561,8 +565,7 @@ namespace OpenSim.Region.CoreModules.Asset
m_Requests++;
object dummy;
if (m_negativeCache.TryGetValue(id, out dummy))
if (m_negativeCache.TryGetValue(id, out object dummy))
{
return false;
}
@ -620,8 +623,7 @@ namespace OpenSim.Region.CoreModules.Asset
public AssetBase GetCached(string id)
{
AssetBase asset;
Get(id, out asset);
Get(id, out AssetBase asset);
return asset;
}
@ -1295,8 +1297,7 @@ namespace OpenSim.Region.CoreModules.Asset
public AssetMetadata GetMetadata(string id)
{
AssetBase asset;
Get(id, out asset);
Get(id, out AssetBase asset);
if (asset == null)
return null;
return asset.Metadata;
@ -1304,8 +1305,7 @@ namespace OpenSim.Region.CoreModules.Asset
public byte[] GetData(string id)
{
AssetBase asset;
Get(id, out asset);
Get(id, out AssetBase asset);
if (asset == null)
return null;
return asset.Data;
@ -1313,8 +1313,7 @@ namespace OpenSim.Region.CoreModules.Asset
public bool Get(string id, object sender, AssetRetrieved handler)
{
AssetBase asset;
if (!Get(id, out asset))
if (!Get(id, out AssetBase asset))
return false;
handler(id, sender, asset);
return true;
@ -1346,8 +1345,7 @@ namespace OpenSim.Region.CoreModules.Asset
public bool UpdateContent(string id, byte[] data)
{
AssetBase asset;
if (!Get(id, out asset))
if (!Get(id, out AssetBase asset))
return false;
asset.Data = data;
Cache(asset, true);

View File

@ -150,8 +150,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
if (options.ContainsKey("noassets") && (bool)options["noassets"])
SaveAssets = false;
Object temp;
if (options.TryGetValue("checkPermissions", out temp))
if (options.TryGetValue("checkPermissions", out Object temp))
FilterContent = (string)temp;
@ -243,7 +242,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
{
if (entity is SceneObjectGroup)
{
SceneObjectGroup sceneObject = (SceneObjectGroup)entity;
SceneObjectGroup sceneObject = entity as SceneObjectGroup;
if (!sceneObject.IsDeleted && !sceneObject.IsAttachment && !sceneObject.IsTemporary && !sceneObject.inTransit)
{
@ -528,15 +527,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver
for (uint y = (uint)scenesGroup.Rect.Top; y < scenesGroup.Rect.Bottom; ++y)
{
SortedDictionary<uint, Scene> row;
if (scenesGroup.Regions.TryGetValue(y, out row))
if (scenesGroup.Regions.TryGetValue(y, out SortedDictionary<uint, Scene> row))
{
xtw.WriteStartElement("row");
for (uint x = (uint)scenesGroup.Rect.Left; x < scenesGroup.Rect.Right; ++x)
{
Scene scene;
if (row.TryGetValue(x, out scene))
if (row.TryGetValue(x, out Scene scene))
{
xtw.WriteStartElement("region");
xtw.WriteElementString("id", scene.RegionInfo.RegionID.ToString());

View File

@ -103,7 +103,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
Scene = scene;
Scene.RegisterModuleInterface<IEstateModule>(this);
Scene.EventManager.OnNewClient += EventManager_OnNewClient;
Scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight;
Scene.EventManager.OnRequestChangeWaterHeight += ChangeWaterHeight;
m_Telehub = new TelehubManager(scene);
@ -206,23 +206,17 @@ namespace OpenSim.Region.CoreModules.World.Estate
public void sendRegionHandshakeToAll()
{
Scene.ForEachClient(sendRegionHandshake);
Scene.ForEachClient(SendRegionHandshake);
}
public void TriggerEstateInfoChange()
{
ChangeDelegate change = OnEstateInfoChange;
if (change != null)
change(Scene.RegionInfo.RegionID);
OnEstateInfoChange?.Invoke(Scene.RegionInfo.RegionID);
}
protected void RaiseRegionInfoChange(object sender, ElapsedEventArgs e)
{
ChangeDelegate change = OnRegionInfoChange;
if (change != null)
change(Scene.RegionInfo.RegionID);
OnRegionInfoChange?.Invoke(Scene.RegionInfo.RegionID);
}
public void TriggerRegionInfoChange()
@ -230,21 +224,18 @@ namespace OpenSim.Region.CoreModules.World.Estate
m_regionChangeTimer.Stop();
m_regionChangeTimer.Start();
ChangeDelegate change = OnRegionInfoChange;
if (change != null)
change(Scene.RegionInfo.RegionID);
OnRegionInfoChange?.Invoke(Scene.RegionInfo.RegionID);
}
public void setEstateTerrainBaseTexture(int level, UUID texture)
{
setEstateTerrainBaseTexture(null, level, texture);
SetEstateTerrainBaseTexture(null, level, texture);
sendRegionHandshakeToAll();
}
public void setEstateTerrainTextureHeights(int corner, float lowValue, float highValue)
{
setEstateTerrainTextureHeights(null, corner, lowValue, highValue);
SetEstateTerrainTextureHeights(null, corner, lowValue, highValue);
}
public bool IsTerrainXfer(ulong xferID)
@ -287,10 +278,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
UUID regionId = (regions.Count() > 0) ? regions.ElementAt(0) : UUID.Zero;
if (regionId != UUID.Zero)
{
ChangeDelegate change = OnEstateInfoChange;
if (change != null)
change(regionId);
OnEstateInfoChange?.Invoke(regionId);
}
}
@ -334,10 +322,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
UUID regionId = (regions.Count() > 0) ? regions.ElementAt(0) : UUID.Zero;
if (regionId != UUID.Zero)
{
ChangeDelegate change = OnEstateInfoChange;
if (change != null)
change(regionId);
OnEstateInfoChange?.Invoke(regionId);
}
}
}
@ -366,10 +351,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
m_log.InfoFormat("[ESTATE]: Region {0} ({1}) moved to Estate {2} ({3}).", regionInfo.RegionID, regionInfo.RegionName, estateID, dbSettings.EstateName);
// propagate the change
ChangeDelegate change = OnEstateInfoChange;
if (change != null)
change(regionInfo.RegionID);
OnEstateInfoChange?.Invoke(regionInfo.RegionID);
response = String.Empty;
}
@ -416,13 +398,13 @@ namespace OpenSim.Region.CoreModules.World.Estate
#region Packet Data Responders
private void clientSendDetailedEstateData(IClientAPI remote_client, UUID invoice)
private void ClientSendDetailedEstateData(IClientAPI remote_client, UUID invoice)
{
sendDetailedEstateData(remote_client, invoice);
sendEstateLists(remote_client, invoice);
SendDetailedEstateData(remote_client, invoice);
SendEstateLists(remote_client, invoice);
}
private void sendDetailedEstateData(IClientAPI remote_client, UUID invoice)
private void SendDetailedEstateData(IClientAPI remote_client, UUID invoice)
{
UUID estateOwner;
estateOwner = Scene.RegionInfo.EstateSettings.EstateOwner;
@ -442,7 +424,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
estateOwner);
}
private void sendEstateLists(IClientAPI remote_client, UUID invoice)
private void SendEstateLists(IClientAPI remote_client, UUID invoice)
{
remote_client.SendEstateList(invoice,
(int)Constants.EstateAccessCodex.EstateManagers,
@ -464,7 +446,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
Scene.RegionInfo.EstateSettings.EstateID);
}
private void estateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor,
private void EstateSetRegionInfoHandler(bool blockTerraform, bool noFly, bool allowDamage, bool blockLandResell, int maxAgents, float objectBonusFactor,
int matureLevel, bool restrictPushObject, bool allowParcelChanges)
{
if (blockTerraform)
@ -514,10 +496,10 @@ namespace OpenSim.Region.CoreModules.World.Estate
Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
sendRegionInfoPacketToAll();
SendRegionInfoPacketToAll();
}
public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int level, UUID texture)
public void SetEstateTerrainBaseTexture(IClientAPI remoteClient, int level, UUID texture)
{
if (texture == UUID.Zero)
return;
@ -540,10 +522,10 @@ namespace OpenSim.Region.CoreModules.World.Estate
Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
sendRegionInfoPacketToAll();
SendRegionInfoPacketToAll();
}
public void setEstateTerrainTextureHeights(IClientAPI client, int corner, float lowValue, float highValue)
public void SetEstateTerrainTextureHeights(IClientAPI client, int corner, float lowValue, float highValue)
{
switch (corner)
{
@ -571,12 +553,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
// sendRegionInfoPacketToAll();
}
private void handleCommitEstateTerrainTextureRequest(IClientAPI remoteClient)
private void HandleCommitEstateTerrainTextureRequest(IClientAPI remoteClient)
{
// sendRegionHandshakeToAll();
}
public void setRegionTerrainSettings(float WaterHeight,
public void SetRegionTerrainSettings(float WaterHeight,
float TerrainRaiseLimit, float TerrainLowerLimit,
bool UseEstateSun, bool UseFixedSun, float SunHour,
bool UseGlobal, bool EstateFixedSun, float EstateSunHour)
@ -600,12 +582,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
//m_log.Debug("[ESTATE]: UFS: " + UseFixedSun.ToString());
//m_log.Debug("[ESTATE]: SunHour: " + SunHour.ToString());
sendRegionInfoPacketToAll();
SendRegionInfoPacketToAll();
Scene.RegionInfo.RegionSettings.Save();
TriggerRegionInfoChange();
}
private void handleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds)
private void HandleEstateRestartSimRequest(IClientAPI remoteClient, int timeInSeconds)
{
if (!AllowRegionRestartFromClient)
{
@ -646,7 +628,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
}
private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID)
private void HandleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID)
{
// m_log.DebugFormat(
// "[ESTATE MANAGEMENT MODULE]: Handling request from {0} to change estate covenant to {1}",
@ -658,7 +640,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
TriggerRegionInfoChange();
}
private object deltareqLock = new object();
private readonly object deltareqLock = new object();
private bool runnigDeltaExec = false;
private class EstateAccessDeltaRequest
@ -671,18 +653,20 @@ namespace OpenSim.Region.CoreModules.World.Estate
private BlockingCollection<EstateAccessDeltaRequest> deltaRequests = new BlockingCollection<EstateAccessDeltaRequest>();
private void handleEstateAccessDeltaRequest(IClientAPI _remote_client, UUID _invoice, int _estateAccessType, UUID _user)
private void HandleEstateAccessDeltaRequest(IClientAPI _remote_client, UUID _invoice, int _estateAccessType, UUID _user)
{
// EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc.
if (_user == Scene.RegionInfo.EstateSettings.EstateOwner)
return; // never process EO
EstateAccessDeltaRequest newreq = new EstateAccessDeltaRequest();
newreq.remote_client = _remote_client;
newreq.invoice = _invoice;
newreq.estateAccessType = _estateAccessType;
newreq.user = _user;
EstateAccessDeltaRequest newreq = new EstateAccessDeltaRequest()
{
remote_client = _remote_client,
invoice = _invoice,
estateAccessType = _estateAccessType,
user = _user
};
deltaRequests.Add(newreq);
@ -691,12 +675,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
if(!runnigDeltaExec)
{
runnigDeltaExec = true;
WorkManager.RunInThreadPool(execDeltaRequests,null,"execDeltaRequests");
WorkManager.RunInThreadPool(ExecDeltaRequests,null,"execDeltaRequests");
}
}
}
private void execDeltaRequests(object o)
private void ExecDeltaRequests(object o)
{
IClientAPI remote_client;
UUID invoice;
@ -960,13 +944,15 @@ namespace OpenSim.Region.CoreModules.World.Estate
if(estateSettings.EstateBansCount() >= (int)Constants.EstateAccessLimits.EstateBans)
continue;
EstateBan bitem = new EstateBan();
bitem.BannedUserID = user;
bitem.EstateID = estateSettings.EstateID;
bitem.BannedHostAddress = "0.0.0.0";
bitem.BannedHostIPMask = "0.0.0.0";
bitem.BanningUserID = remote_client.AgentId;
bitem.BanTime = Util.UnixTimeSinceEpoch();
EstateBan bitem = new EstateBan()
{
BannedUserID = user,
EstateID = estateSettings.EstateID,
BannedHostAddress = "0.0.0.0",
BannedHostIPMask = "0.0.0.0",
BanningUserID = remote_client.AgentId,
BanTime = Util.UnixTimeSinceEpoch()
};
estateSettings.AddBan(bitem);
estateSettings.RemoveEstateUser(user);
@ -974,13 +960,15 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
}
EstateBan item = new EstateBan();
item.BannedUserID = user;
item.EstateID = Scene.RegionInfo.EstateSettings.EstateID;
item.BannedHostAddress = "0.0.0.0";
item.BannedHostIPMask = "0.0.0.0";
item.BanningUserID = remote_client.AgentId;
item.BanTime = Util.UnixTimeSinceEpoch();
EstateBan item = new EstateBan()
{
BannedUserID = user,
EstateID = Scene.RegionInfo.EstateSettings.EstateID,
BannedHostAddress = "0.0.0.0",
BannedHostIPMask = "0.0.0.0",
BanningUserID = remote_client.AgentId,
BanTime = Util.UnixTimeSinceEpoch()
};
thisSettings.AddBan(item);
thisSettings.RemoveEstateUser(user);
@ -1174,7 +1162,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
TriggerEstateMessage(senderID, senderName, message);
}
private void handleEstateDebugRegionRequest(
private void HandleEstateDebugRegionRequest(
IClientAPI remote_client, UUID invoice, UUID senderID,
bool disableScripts, bool disableCollisions, bool disablePhysics)
{
@ -1198,7 +1186,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
}
private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey, bool kick)
private void HandleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey, bool kick)
{
if (prey == UUID.Zero)
return;
@ -1229,7 +1217,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
}
private void handleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID)
private void HandleEstateTeleportAllUsersHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID)
{
EstateTeleportAllUsersHomeRequest evOverride = OnEstateTeleportAllUsersHomeRequest;
if(evOverride != null)
@ -1247,8 +1235,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
{
// make sure they are still there, we could be working down a long list
// Also make sure they are actually in the region
ScenePresence p;
if(Scene.TryGetScenePresence(client.AgentId, out p))
if(Scene.TryGetScenePresence(client.AgentId, out ScenePresence p))
{
if (!Scene.TeleportClientHome(p.UUID, p.ControllingClient))
{
@ -1335,7 +1322,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
}
private void handleUploadTerrain(IClientAPI remote_client, string clientFileName)
private void HandleUploadTerrain(IClientAPI remote_client, string clientFileName)
{
lock (this)
{
@ -1358,7 +1345,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
}
}
private void handleTerrainRequest(IClientAPI remote_client, string clientFileName)
private void HandleTerrainRequest(IClientAPI remote_client, string clientFileName)
{
// Save terrain here
ITerrainModule terr = Scene.RequestModuleInterface<ITerrainModule>();
@ -1395,26 +1382,28 @@ namespace OpenSim.Region.CoreModules.World.Estate
public void HandleRegionInfoRequest(IClientAPI remote_client)
{
RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs();
args.billableFactor = Scene.RegionInfo.EstateSettings.BillableFactor;
args.estateID = Scene.RegionInfo.EstateSettings.EstateID;
args.maxAgents = Scene.RegionInfo.RegionSettings.AgentLimit;
args.objectBonusFactor = (float)Scene.RegionInfo.RegionSettings.ObjectBonus;
args.parentEstateID = Scene.RegionInfo.EstateSettings.ParentEstateID;
args.pricePerMeter = Scene.RegionInfo.EstateSettings.PricePerMeter;
args.redirectGridX = Scene.RegionInfo.EstateSettings.RedirectGridX;
args.redirectGridY = Scene.RegionInfo.EstateSettings.RedirectGridY;
args.regionFlags = GetRegionFlags();
args.simAccess = Scene.RegionInfo.AccessLevel;
args.sunHour = 0;
args.terrainLowerLimit = (float)Scene.RegionInfo.RegionSettings.TerrainLowerLimit;
args.terrainRaiseLimit = (float)Scene.RegionInfo.RegionSettings.TerrainRaiseLimit;
args.useEstateSun = false;
args.waterHeight = (float)Scene.RegionInfo.RegionSettings.WaterHeight;
args.simName = Scene.RegionInfo.RegionName;
args.regionType = Scene.RegionInfo.RegionType;
args.AgentCapacity = Scene.RegionInfo.AgentCapacity;
args.ObjectsCapacity = Scene.RegionInfo.ObjectCapacity;
RegionInfoForEstateMenuArgs args = new RegionInfoForEstateMenuArgs()
{
billableFactor = Scene.RegionInfo.EstateSettings.BillableFactor,
estateID = Scene.RegionInfo.EstateSettings.EstateID,
maxAgents = Scene.RegionInfo.RegionSettings.AgentLimit,
objectBonusFactor = (float)Scene.RegionInfo.RegionSettings.ObjectBonus,
parentEstateID = Scene.RegionInfo.EstateSettings.ParentEstateID,
pricePerMeter = Scene.RegionInfo.EstateSettings.PricePerMeter,
redirectGridX = Scene.RegionInfo.EstateSettings.RedirectGridX,
redirectGridY = Scene.RegionInfo.EstateSettings.RedirectGridY,
regionFlags = GetRegionFlags(),
simAccess = Scene.RegionInfo.AccessLevel,
sunHour = 0,
terrainLowerLimit = (float)Scene.RegionInfo.RegionSettings.TerrainLowerLimit,
terrainRaiseLimit = (float)Scene.RegionInfo.RegionSettings.TerrainRaiseLimit,
useEstateSun = false,
waterHeight = (float)Scene.RegionInfo.RegionSettings.WaterHeight,
simName = Scene.RegionInfo.RegionName,
regionType = Scene.RegionInfo.RegionType,
AgentCapacity = Scene.RegionInfo.AgentCapacity,
ObjectsCapacity = Scene.RegionInfo.ObjectCapacity,
};
remote_client.SendRegionInfoToEstateMenu(args);
}
@ -1468,15 +1457,17 @@ namespace OpenSim.Region.CoreModules.World.Estate
items++;
SceneObjectGroup so = entry.Part.ParentGroup;
LandStatReportItem lsri = new LandStatReportItem();
lsri.LocationX = so.AbsolutePosition.X;
lsri.LocationY = so.AbsolutePosition.Y;
lsri.LocationZ = so.AbsolutePosition.Z;
lsri.Score = entry.Measurement;
lsri.TaskID = so.UUID;
lsri.TaskLocalID = so.LocalId;
lsri.TaskName = entry.Part.Name;
lsri.OwnerName = UserManager.GetUserName(so.OwnerID);
LandStatReportItem lsri = new LandStatReportItem()
{
LocationX = so.AbsolutePosition.X,
LocationY = so.AbsolutePosition.Y,
LocationZ = so.AbsolutePosition.Z,
Score = entry.Measurement,
TaskID = so.UUID,
TaskLocalID = so.LocalId,
TaskName = entry.Part.Name,
OwnerName = UserManager.GetUserName(so.OwnerID)
};
if (filter.Length != 0)
{
@ -1503,7 +1494,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
#region Outgoing Packets
public void sendRegionInfoPacketToAll()
public void SendRegionInfoPacketToAll()
{
// Scene.ForEachRootClient(delegate(IClientAPI client)
Scene.ForEachClient(delegate(IClientAPI client)
@ -1512,12 +1503,12 @@ namespace OpenSim.Region.CoreModules.World.Estate
});
}
public void sendRegionHandshake(IClientAPI remoteClient)
public void SendRegionHandshake(IClientAPI remoteClient)
{
remoteClient.SendRegionHandshake();
}
public void handleEstateChangeInfo(IClientAPI remoteClient, UUID invoice, UUID senderID, UInt32 parms1, UInt32 parms2)
public void HandleEstateChangeInfo(IClientAPI remoteClient, UUID invoice, UUID senderID, UInt32 parms1, UInt32 parms2)
{
bool lastallowEnvOvr = Scene.RegionInfo.EstateSettings.AllowEnvironmentOverride;
@ -1578,7 +1569,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
TriggerEstateInfoChange();
sendDetailedEstateData(remoteClient, invoice);
SendDetailedEstateData(remoteClient, invoice);
}
public bool handleEstateChangeInfoCap(string estateName, UUID invoice,
@ -1614,9 +1605,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
#region Other Functions
public void changeWaterHeight(float height)
public void ChangeWaterHeight(float height)
{
setRegionTerrainSettings(height,
SetRegionTerrainSettings(height,
(float)Scene.RegionInfo.RegionSettings.TerrainRaiseLimit,
(float)Scene.RegionInfo.RegionSettings.TerrainLowerLimit,
Scene.RegionInfo.RegionSettings.UseEstateSun,
@ -1636,25 +1627,25 @@ namespace OpenSim.Region.CoreModules.World.Estate
private void EventManager_OnNewClient(IClientAPI client)
{
client.OnDetailedEstateDataRequest += clientSendDetailedEstateData;
client.OnSetEstateFlagsRequest += estateSetRegionInfoHandler;
client.OnDetailedEstateDataRequest += ClientSendDetailedEstateData;
client.OnSetEstateFlagsRequest += EstateSetRegionInfoHandler;
// client.OnSetEstateTerrainBaseTexture += setEstateTerrainBaseTexture;
client.OnSetEstateTerrainDetailTexture += setEstateTerrainBaseTexture;
client.OnSetEstateTerrainTextureHeights += setEstateTerrainTextureHeights;
client.OnCommitEstateTerrainTextureRequest += handleCommitEstateTerrainTextureRequest;
client.OnSetRegionTerrainSettings += setRegionTerrainSettings;
client.OnEstateRestartSimRequest += handleEstateRestartSimRequest;
client.OnEstateChangeCovenantRequest += handleChangeEstateCovenantRequest;
client.OnEstateChangeInfo += handleEstateChangeInfo;
client.OnSetEstateTerrainDetailTexture += SetEstateTerrainBaseTexture;
client.OnSetEstateTerrainTextureHeights += SetEstateTerrainTextureHeights;
client.OnCommitEstateTerrainTextureRequest += HandleCommitEstateTerrainTextureRequest;
client.OnSetRegionTerrainSettings += SetRegionTerrainSettings;
client.OnEstateRestartSimRequest += HandleEstateRestartSimRequest;
client.OnEstateChangeCovenantRequest += HandleChangeEstateCovenantRequest;
client.OnEstateChangeInfo += HandleEstateChangeInfo;
client.OnEstateManageTelehub += HandleOnEstateManageTelehub;
client.OnUpdateEstateAccessDeltaRequest += handleEstateAccessDeltaRequest;
client.OnUpdateEstateAccessDeltaRequest += HandleEstateAccessDeltaRequest;
client.OnSimulatorBlueBoxMessageRequest += SendSimulatorBlueBoxMessage;
client.OnEstateBlueBoxMessageRequest += SendEstateBlueBoxMessage;
client.OnEstateDebugRegionRequest += handleEstateDebugRegionRequest;
client.OnEstateTeleportOneUserHomeRequest += handleEstateTeleportOneUserHomeRequest;
client.OnEstateTeleportAllUsersHomeRequest += handleEstateTeleportAllUsersHomeRequest;
client.OnRequestTerrain += handleTerrainRequest;
client.OnUploadTerrain += handleUploadTerrain;
client.OnEstateDebugRegionRequest += HandleEstateDebugRegionRequest;
client.OnEstateTeleportOneUserHomeRequest += HandleEstateTeleportOneUserHomeRequest;
client.OnEstateTeleportAllUsersHomeRequest += HandleEstateTeleportAllUsersHomeRequest;
client.OnRequestTerrain += HandleTerrainRequest;
client.OnUploadTerrain += HandleUploadTerrain;
client.OnRegionInfoRequest += HandleRegionInfoRequest;
client.OnEstateCovenantRequest += HandleEstateCovenantRequest;
@ -1710,10 +1701,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
public void TriggerEstateMessage(UUID fromID, string fromName, string message)
{
MessageDelegate onmessage = OnEstateMessage;
if (onmessage != null)
onmessage(Scene.RegionInfo.RegionID, fromID, fromName, message);
OnEstateMessage?.Invoke(Scene.RegionInfo.RegionID, fromID, fromName, message);
}

View File

@ -770,7 +770,7 @@
Cap_DispatchRegionInfo = ""
Cap_EstateAccess = "localhost"
//Cap_EstateChangeInfo = "localhost" broken on viewers
Cap_EnvironmentSettings = "localhost" // this also controls ExtEnviroment cap
Cap_EnvironmentSettings = "localhost" // this also controls ExtEnvironment cap
Cap_EventQueueGet = "localhost"
Cap_FetchInventory = ""
Cap_ObjectMedia = "localhost"