diff options
author | Sean Dague | 2008-05-16 00:04:46 +0000 |
---|---|---|
committer | Sean Dague | 2008-05-16 00:04:46 +0000 |
commit | fc773649720c062a72d1b8a098eb54bda9a84ca9 (patch) | |
tree | 111e4fcfb6bd112d744876d258e487556746ee02 /OpenSim/Region/Modules/AvatarFactory | |
parent | * Adds various tweakable avatar control options to the OpenSim.ini.example. (diff) | |
download | opensim-SC_OLD-fc773649720c062a72d1b8a098eb54bda9a84ca9.zip opensim-SC_OLD-fc773649720c062a72d1b8a098eb54bda9a84ca9.tar.gz opensim-SC_OLD-fc773649720c062a72d1b8a098eb54bda9a84ca9.tar.bz2 opensim-SC_OLD-fc773649720c062a72d1b8a098eb54bda9a84ca9.tar.xz |
appearance now survives logout. Tommorrow will involve moving
the MSSQL and MYSQL mappers back in under datastores and looking at doing
gid bits for this
Diffstat (limited to 'OpenSim/Region/Modules/AvatarFactory')
-rw-r--r-- | OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs | 48 |
1 files changed, 19 insertions, 29 deletions
diff --git a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs index a1abe8b..4c933d6 100644 --- a/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Modules/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -274,47 +274,37 @@ namespace OpenSim.Region.Modules.AvatarFactory | |||
274 | { | 274 | { |
275 | IClientAPI clientView = (IClientAPI)sender; | 275 | IClientAPI clientView = (IClientAPI)sender; |
276 | CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId); | 276 | CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId); |
277 | AvatarAppearance avatAppearance = m_scene.CommsManager.UserService.GetUserAppearance(clientView.AgentId); | ||
277 | if (profile != null) | 278 | if (profile != null) |
278 | { | 279 | { |
279 | if (profile.RootFolder != null) | 280 | if (profile.RootFolder != null) |
280 | { | 281 | { |
281 | if (m_avatarsAppearance.ContainsKey(clientView.AgentId)) | 282 | |
283 | foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) | ||
282 | { | 284 | { |
283 | AvatarAppearance avatAppearance = null; | 285 | if (wear.Type < 13) |
284 | lock (m_avatarsAppearance) | ||
285 | { | 286 | { |
286 | avatAppearance = m_avatarsAppearance[clientView.AgentId]; | 287 | if (wear.ItemID == LLUUID.Zero) |
287 | } | ||
288 | |||
289 | foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) | ||
290 | { | ||
291 | if (wear.Type < 13) | ||
292 | { | 288 | { |
293 | if (wear.ItemID == LLUUID.Zero) | 289 | avatAppearance.Wearables[wear.Type].ItemID = LLUUID.Zero; |
294 | { | 290 | avatAppearance.Wearables[wear.Type].AssetID = LLUUID.Zero; |
295 | avatAppearance.Wearables[wear.Type].ItemID = LLUUID.Zero; | 291 | } |
296 | avatAppearance.Wearables[wear.Type].AssetID = LLUUID.Zero; | 292 | else |
297 | 293 | { | |
298 | UpdateDatabase(clientView.AgentId, avatAppearance); | 294 | LLUUID assetId; |
299 | } | 295 | |
300 | else | 296 | InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); |
297 | |||
298 | if (baseItem != null) | ||
301 | { | 299 | { |
302 | LLUUID assetId; | 300 | assetId = baseItem.AssetID; |
303 | 301 | avatAppearance.Wearables[wear.Type].AssetID = assetId; | |
304 | InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); | 302 | avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; |
305 | |||
306 | if (baseItem != null) | ||
307 | { | ||
308 | assetId = baseItem.AssetID; | ||
309 | avatAppearance.Wearables[wear.Type].AssetID = assetId; | ||
310 | avatAppearance.Wearables[wear.Type].ItemID = wear.ItemID; | ||
311 | |||
312 | UpdateDatabase(clientView.AgentId, avatAppearance); | ||
313 | } | ||
314 | } | 303 | } |
315 | } | 304 | } |
316 | } | 305 | } |
317 | } | 306 | } |
307 | m_scene.CommsManager.UserService.UpdateUserAppearance(clientView.AgentId, avatAppearance); | ||
318 | } | 308 | } |
319 | } | 309 | } |
320 | } | 310 | } |