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 52add23..bb9c6fe 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 | { |
@@ -181,10 +182,6 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
181 | 182 | ||
182 | // Try to retain the original creator/owner/lastowner if their uuid is present on this grid | 183 | // Try to retain the original creator/owner/lastowner if their uuid is present on this grid |
183 | // otherwise, use the master avatar uuid instead | 184 | // otherwise, use the master avatar uuid instead |
184 | UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID; | ||
185 | |||
186 | if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero) | ||
187 | masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
188 | 185 | ||
189 | // Reload serialized parcels | 186 | // Reload serialized parcels |
190 | m_log.InfoFormat("[ARCHIVER]: Loading {0} parcels. Please wait.", serialisedParcels.Count); | 187 | m_log.InfoFormat("[ARCHIVER]: Loading {0} parcels. Please wait.", serialisedParcels.Count); |
@@ -193,7 +190,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
193 | { | 190 | { |
194 | LandData parcel = LandDataSerializer.Deserialize(serialisedParcel); | 191 | LandData parcel = LandDataSerializer.Deserialize(serialisedParcel); |
195 | if (!ResolveUserUuid(parcel.OwnerID)) | 192 | if (!ResolveUserUuid(parcel.OwnerID)) |
196 | parcel.OwnerID = masterAvatarId; | 193 | parcel.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
197 | landData.Add(parcel); | 194 | landData.Add(parcel); |
198 | } | 195 | } |
199 | m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData); | 196 | m_scene.EventManager.TriggerIncomingLandDataFromStorage(landData); |
@@ -232,13 +229,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
232 | foreach (SceneObjectPart part in sceneObject.Children.Values) | 229 | foreach (SceneObjectPart part in sceneObject.Children.Values) |
233 | { | 230 | { |
234 | if (!ResolveUserUuid(part.CreatorID)) | 231 | if (!ResolveUserUuid(part.CreatorID)) |
235 | part.CreatorID = masterAvatarId; | 232 | part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
236 | 233 | ||
237 | if (!ResolveUserUuid(part.OwnerID)) | 234 | if (!ResolveUserUuid(part.OwnerID)) |
238 | part.OwnerID = masterAvatarId; | 235 | part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
239 | 236 | ||
240 | if (!ResolveUserUuid(part.LastOwnerID)) | 237 | if (!ResolveUserUuid(part.LastOwnerID)) |
241 | part.LastOwnerID = masterAvatarId; | 238 | part.LastOwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
242 | 239 | ||
243 | // And zap any troublesome sit target information | 240 | // And zap any troublesome sit target information |
244 | part.SitTargetOrientation = new Quaternion(0, 0, 0, 1); | 241 | part.SitTargetOrientation = new Quaternion(0, 0, 0, 1); |
@@ -254,11 +251,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
254 | { | 251 | { |
255 | if (!ResolveUserUuid(kvp.Value.OwnerID)) | 252 | if (!ResolveUserUuid(kvp.Value.OwnerID)) |
256 | { | 253 | { |
257 | kvp.Value.OwnerID = masterAvatarId; | 254 | kvp.Value.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
258 | } | 255 | } |
259 | if (!ResolveUserUuid(kvp.Value.CreatorID)) | 256 | if (!ResolveUserUuid(kvp.Value.CreatorID)) |
260 | { | 257 | { |
261 | kvp.Value.CreatorID = masterAvatarId; | 258 | kvp.Value.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
262 | } | 259 | } |
263 | } | 260 | } |
264 | } | 261 | } |
@@ -292,8 +289,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
292 | { | 289 | { |
293 | if (!m_validUserUuids.ContainsKey(uuid)) | 290 | if (!m_validUserUuids.ContainsKey(uuid)) |
294 | { | 291 | { |
295 | CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(uuid); | 292 | UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, uuid); |
296 | if (profile != null && profile.UserProfile != null) | 293 | if (account != null) |
297 | m_validUserUuids.Add(uuid, true); | 294 | m_validUserUuids.Add(uuid, true); |
298 | else | 295 | else |
299 | m_validUserUuids.Add(uuid, false); | 296 | m_validUserUuids.Add(uuid, false); |