diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r-- | OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs index d8a90c5..820a26b 100644 --- a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs +++ b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs | |||
@@ -2,6 +2,7 @@ using System; | |||
2 | using libsecondlife; | 2 | using libsecondlife; |
3 | using Nini.Config; | 3 | using Nini.Config; |
4 | using OpenSim.Framework; | 4 | using OpenSim.Framework; |
5 | using OpenSim.Framework.Communications.Cache; | ||
5 | using OpenSim.Region.Environment.Interfaces; | 6 | using OpenSim.Region.Environment.Interfaces; |
6 | using OpenSim.Region.Environment.Scenes; | 7 | using OpenSim.Region.Environment.Scenes; |
7 | 8 | ||
@@ -64,7 +65,16 @@ namespace OpenSim.Region.Environment.Modules | |||
64 | // then store assetid and itemId and wearable type in a database | 65 | // then store assetid and itemId and wearable type in a database |
65 | foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) | 66 | foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) |
66 | { | 67 | { |
67 | LLUUID assetID = m_scene.CommsManager.UserProfileCache.GetUserDetails(clientView.AgentId).RootFolder.HasItem(wear.ItemID).assetID; | 68 | LLUUID assetId; |
69 | CachedUserInfo profile = m_scene.CommsManager.UserProfileCache.GetUserDetails(clientView.AgentId); | ||
70 | if (profile != null) | ||
71 | { | ||
72 | InventoryItemBase baseItem = profile.RootFolder.HasItem(wear.ItemID); | ||
73 | if (baseItem != null) | ||
74 | { | ||
75 | assetId = baseItem.assetID; | ||
76 | } | ||
77 | } | ||
68 | } | 78 | } |
69 | } | 79 | } |
70 | 80 | ||