Some refactoring
parent
9f5e1efc2d
commit
285fa3fe9e
|
@ -74,6 +74,9 @@ namespace OpenSim.Region.Environment.Modules
|
|||
public void AvatarIsWearing(Object sender, AvatarWearingArgs e)
|
||||
{
|
||||
IClientAPI clientView = (IClientAPI)sender;
|
||||
CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
|
||||
if (profile != null)
|
||||
{
|
||||
//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)
|
||||
|
@ -81,9 +84,7 @@ namespace OpenSim.Region.Environment.Modules
|
|||
if (wear.Type < 13)
|
||||
{
|
||||
LLUUID assetId;
|
||||
CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
|
||||
if (profile != null)
|
||||
{
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue