diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index ad58f40..08dfb75 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -38,10 +38,11 @@ using OpenMetaverse; | |||
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
39 | using OpenSim.Framework.Serialization; | 39 | using OpenSim.Framework.Serialization; |
40 | using OpenSim.Framework.Serialization.External; | 40 | using OpenSim.Framework.Serialization.External; |
41 | using OpenSim.Framework.Communications.Cache; | 41 | |
42 | using OpenSim.Region.CoreModules.World.Terrain; | 42 | using OpenSim.Region.CoreModules.World.Terrain; |
43 | using OpenSim.Region.Framework.Interfaces; | 43 | using OpenSim.Region.Framework.Interfaces; |
44 | using OpenSim.Region.Framework.Scenes; | 44 | using OpenSim.Region.Framework.Scenes; |
45 | using OpenSim.Services.Interfaces; | ||
45 | 46 | ||
46 | namespace OpenSim.Region.CoreModules.World.Archiver | 47 | namespace OpenSim.Region.CoreModules.World.Archiver |
47 | { | 48 | { |
@@ -193,10 +194,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
193 | 194 | ||
194 | // Try to retain the original creator/owner/lastowner if their uuid is present on this grid | 195 | // Try to retain the original creator/owner/lastowner if their uuid is present on this grid |
195 | // otherwise, use the master avatar uuid instead | 196 | // otherwise, use the master avatar uuid instead |
196 | UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID; | ||
197 | |||
198 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) | ||
199 | masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
200 | 197 | ||
201 | // Reload serialized parcels | 198 | // Reload serialized parcels |
202 | m_log.InfoFormat("[ARCHIVER]: Loading {0} parcels. Please wait.", serialisedParcels.Count); | 199 | m_log.InfoFormat("[ARCHIVER]: Loading {0} parcels. Please wait.", serialisedParcels.Count); |
@@ -205,7 +202,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
205 | { | 202 | { |
206 | LandData parcel = LandDataSerializer.Deserialize(serialisedParcel); | 203 | LandData parcel = LandDataSerializer.Deserialize(serialisedParcel); |
207 | if (!ResolveUserUuid(parcel.OwnerID)) | 204 | if (!ResolveUserUuid(parcel.OwnerID)) |
208 | parcel.OwnerID = masterAvatarId; | 205 | parcel.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
209 | landData.Add(parcel); | 206 | landData.Add(parcel); |
210 | } | 207 | } |
211 | m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData); | 208 | m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData); |
@@ -244,13 +241,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
244 | foreach (SceneObjectPart part in sceneObject.Children.Values) | 241 | foreach (SceneObjectPart part in sceneObject.Children.Values) |
245 | { | 242 | { |
246 | if (!ResolveUserUuid(part.CreatorID)) | 243 | if (!ResolveUserUuid(part.CreatorID)) |
247 | part.CreatorID = masterAvatarId; | 244 | part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
248 | 245 | ||
249 | if (!ResolveUserUuid(part.OwnerID)) | 246 | if (!ResolveUserUuid(part.OwnerID)) |
250 | part.OwnerID = masterAvatarId; | 247 | part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
251 | 248 | ||
252 | if (!ResolveUserUuid(part.LastOwnerID)) | 249 | if (!ResolveUserUuid(part.LastOwnerID)) |
253 | part.LastOwnerID = masterAvatarId; | 250 | part.LastOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
254 | 251 | ||
255 | // And zap any troublesome sit target information | 252 | // And zap any troublesome sit target information |
256 | part.SitTargetOrientation = new Quaternion(0, 0, 0, 1); | 253 | part.SitTargetOrientation = new Quaternion(0, 0, 0, 1); |
@@ -266,11 +263,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
266 | { | 263 | { |
267 | if (!ResolveUserUuid(kvp.Value.OwnerID)) | 264 | if (!ResolveUserUuid(kvp.Value.OwnerID)) |
268 | { | 265 | { |
269 | kvp.Value.OwnerID = masterAvatarId; | 266 | kvp.Value.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
270 | } | 267 | } |
271 | if (!ResolveUserUuid(kvp.Value.CreatorID)) | 268 | if (!ResolveUserUuid(kvp.Value.CreatorID)) |
272 | { | 269 | { |
273 | kvp.Value.CreatorID = masterAvatarId; | 270 | kvp.Value.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
274 | } | 271 | } |
275 | } | 272 | } |
276 | } | 273 | } |
@@ -304,8 +301,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
304 | { | 301 | { |
305 | if (!m_validUserUuids.ContainsKey(uuid)) | 302 | if (!m_validUserUuids.ContainsKey(uuid)) |
306 | { | 303 | { |
307 | CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(uuid); | 304 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, uuid); |
308 | if (profile != null && profile.UserProfile != null) | 305 | if (account != null) |
309 | m_validUserUuids.Add(uuid, true); | 306 | m_validUserUuids.Add(uuid, true); |
310 | else | 307 | else |
311 | m_validUserUuids.Add(uuid, false); | 308 | m_validUserUuids.Add(uuid, false); |