aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs16
1 files changed, 9 insertions, 7 deletions
diff --git a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
index c11e039..3e685a5 100644
--- a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs
@@ -74,16 +74,17 @@ namespace OpenSim.Region.Environment.Modules
74 public void AvatarIsWearing(Object sender, AvatarWearingArgs e) 74 public void AvatarIsWearing(Object sender, AvatarWearingArgs e)
75 { 75 {
76 IClientAPI clientView = (IClientAPI)sender; 76 IClientAPI clientView = (IClientAPI)sender;
77 //Todo look up the assetid from the inventory cache (or something) for each itemId that is in AvatarWearingArgs 77 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
78 // then store assetid and itemId and wearable type in a database 78 if (profile != null)
79 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
80 { 79 {
81 if (wear.Type < 13) 80 //Todo look up the assetid from the inventory cache (or something) for each itemId that is in AvatarWearingArgs
81 // then store assetid and itemId and wearable type in a database
82 foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
82 { 83 {
83 LLUUID assetId; 84 if (wear.Type < 13)
84 CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
85 if (profile != null)
86 { 85 {
86 LLUUID assetId;
87
87 InventoryItemBase baseItem = profile.RootFolder.HasItem(wear.ItemID); 88 InventoryItemBase baseItem = profile.RootFolder.HasItem(wear.ItemID);
88 if (baseItem != null) 89 if (baseItem != null)
89 { 90 {
@@ -96,6 +97,7 @@ namespace OpenSim.Region.Environment.Modules
96 avWearing.IsWearing[wear.Type].ItemID = wear.ItemID; 97 avWearing.IsWearing[wear.Type].ItemID = wear.ItemID;
97 } 98 }
98 } 99 }
100
99 } 101 }
100 } 102 }
101 } 103 }