diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 5df3f52..9433cf6 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -29,7 +29,7 @@ | |||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Threading; | 31 | using System.Threading; |
32 | using libsecondlife; | 32 | using OpenMetaverse; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications.Cache; | 35 | using OpenSim.Framework.Communications.Cache; |
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules | |||
43 | public class AvatarFactoryModule : IAvatarFactory | 43 | public class AvatarFactoryModule : IAvatarFactory |
44 | { | 44 | { |
45 | private Scene m_scene = null; | 45 | private Scene m_scene = null; |
46 | private readonly Dictionary<LLUUID, AvatarAppearance> m_avatarsAppearance = new Dictionary<LLUUID, AvatarAppearance>(); | 46 | private readonly Dictionary<UUID, AvatarAppearance> m_avatarsAppearance = new Dictionary<UUID, AvatarAppearance>(); |
47 | 47 | ||
48 | private bool m_enablePersist = false; | 48 | private bool m_enablePersist = false; |
49 | private string m_connectionString; | 49 | private string m_connectionString; |
@@ -51,10 +51,10 @@ namespace OpenSim.Region.Environment.Modules | |||
51 | private BaseDatabaseConnector m_databaseMapper; | 51 | private BaseDatabaseConnector m_databaseMapper; |
52 | private AppearanceTableMapper m_appearanceMapper; | 52 | private AppearanceTableMapper m_appearanceMapper; |
53 | 53 | ||
54 | private Dictionary<LLUUID, EventWaitHandle> m_fetchesInProgress = new Dictionary<LLUUID, EventWaitHandle>(); | 54 | private Dictionary<UUID, EventWaitHandle> m_fetchesInProgress = new Dictionary<UUID, EventWaitHandle>(); |
55 | private object m_syncLock = new object(); | 55 | private object m_syncLock = new object(); |
56 | 56 | ||
57 | public bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance) | 57 | public bool TryGetAvatarAppearance(UUID avatarId, out AvatarAppearance appearance) |
58 | { | 58 | { |
59 | 59 | ||
60 | //should only let one thread at a time do this part | 60 | //should only let one thread at a time do this part |
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Environment.Modules | |||
163 | } | 163 | } |
164 | } | 164 | } |
165 | 165 | ||
166 | private AvatarAppearance CreateDefault(LLUUID avatarId) | 166 | private AvatarAppearance CreateDefault(UUID avatarId) |
167 | { | 167 | { |
168 | AvatarAppearance appearance = null; | 168 | AvatarAppearance appearance = null; |
169 | AvatarWearable[] wearables; | 169 | AvatarWearable[] wearables; |
@@ -174,7 +174,7 @@ namespace OpenSim.Region.Environment.Modules | |||
174 | return appearance; | 174 | return appearance; |
175 | } | 175 | } |
176 | 176 | ||
177 | private AvatarAppearance CheckDatabase(LLUUID avatarId) | 177 | private AvatarAppearance CheckDatabase(UUID avatarId) |
178 | { | 178 | { |
179 | AvatarAppearance appearance = null; | 179 | AvatarAppearance appearance = null; |
180 | if (m_enablePersist) | 180 | if (m_enablePersist) |
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules | |||
192 | return appearance; | 192 | return appearance; |
193 | } | 193 | } |
194 | 194 | ||
195 | private AvatarAppearance CheckCache(LLUUID avatarId) | 195 | private AvatarAppearance CheckCache(UUID avatarId) |
196 | { | 196 | { |
197 | AvatarAppearance appearance = null; | 197 | AvatarAppearance appearance = null; |
198 | lock (m_avatarsAppearance) | 198 | lock (m_avatarsAppearance) |
@@ -282,16 +282,16 @@ namespace OpenSim.Region.Environment.Modules | |||
282 | { | 282 | { |
283 | if (wear.Type < 13) | 283 | if (wear.Type < 13) |
284 | { | 284 | { |
285 | if (wear.ItemID == LLUUID.Zero) | 285 | if (wear.ItemID == UUID.Zero) |
286 | { | 286 | { |
287 | avatAppearance.Wearables[wear.Type].ItemID = LLUUID.Zero; | 287 | avatAppearance.Wearables[wear.Type].ItemID = UUID.Zero; |
288 | avatAppearance.Wearables[wear.Type].AssetID = LLUUID.Zero; | 288 | avatAppearance.Wearables[wear.Type].AssetID = UUID.Zero; |
289 | 289 | ||
290 | UpdateDatabase(clientView.AgentId, avatAppearance); | 290 | UpdateDatabase(clientView.AgentId, avatAppearance); |
291 | } | 291 | } |
292 | else | 292 | else |
293 | { | 293 | { |
294 | LLUUID assetId; | 294 | UUID assetId; |
295 | 295 | ||
296 | InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); | 296 | InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); |
297 | if (baseItem != null) | 297 | if (baseItem != null) |
@@ -310,11 +310,11 @@ namespace OpenSim.Region.Environment.Modules | |||
310 | } | 310 | } |
311 | } | 311 | } |
312 | 312 | ||
313 | public void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance) | 313 | public void UpdateDatabase(UUID userID, AvatarAppearance avatAppearance) |
314 | { | 314 | { |
315 | if (m_enablePersist) | 315 | if (m_enablePersist) |
316 | { | 316 | { |
317 | m_appearanceMapper.Update(userID.UUID, avatAppearance); | 317 | m_appearanceMapper.Update(userID.Guid, avatAppearance); |
318 | } | 318 | } |
319 | } | 319 | } |
320 | 320 | ||