From 285fa3fe9e42fdc730173637f7397198891d31b3 Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 3 Dec 2007 10:36:32 +0000 Subject: Some refactoring --- .../Region/Environment/Modules/AvatarFactoryModule.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'OpenSim') 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 public void AvatarIsWearing(Object sender, AvatarWearingArgs e) { IClientAPI clientView = (IClientAPI)sender; - //Todo look up the assetid from the inventory cache (or something) for each itemId that is in AvatarWearingArgs - // then store assetid and itemId and wearable type in a database - foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) + CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId); + if (profile != null) { - if (wear.Type < 13) + //Todo look up the assetid from the inventory cache (or something) for each itemId that is in AvatarWearingArgs + // then store assetid and itemId and wearable type in a database + foreach (AvatarWearingArgs.Wearable wear in e.NowWearing) { - LLUUID assetId; - CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId); - if (profile != null) + if (wear.Type < 13) { + LLUUID assetId; + InventoryItemBase baseItem = profile.RootFolder.HasItem(wear.ItemID); if (baseItem != null) { @@ -96,6 +97,7 @@ namespace OpenSim.Region.Environment.Modules avWearing.IsWearing[wear.Type].ItemID = wear.ItemID; } } + } } } -- cgit v1.1