aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-12-03 10:36:32 +0000
committerMW2007-12-03 10:36:32 +0000
commit285fa3fe9e42fdc730173637f7397198891d31b3 (patch)
tree2cb5b3bea62c132cc72acf0e1324f97dffc1d5d0
parentAdded another .ini file error catch to the RemoteAdminPlugin Initialise method. (diff)
downloadopensim-SC-285fa3fe9e42fdc730173637f7397198891d31b3.zip
opensim-SC-285fa3fe9e42fdc730173637f7397198891d31b3.tar.gz
opensim-SC-285fa3fe9e42fdc730173637f7397198891d31b3.tar.bz2
opensim-SC-285fa3fe9e42fdc730173637f7397198891d31b3.tar.xz
Some refactoring
-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 }