Fixed bug in Appearance update in AvatarFactoryModule.
parent
0ec208a200
commit
4eba3373dc
|
@ -77,27 +77,30 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
|
CachedUserInfo profile = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(clientView.AgentId);
|
||||||
if (profile != null)
|
if (profile != null)
|
||||||
{
|
{
|
||||||
//Todo look up the assetid from the inventory cache (or something) for each itemId that is in AvatarWearingArgs
|
if (profile.RootFolder != null)
|
||||||
// then store assetid and itemId and wearable type in a database
|
|
||||||
foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
|
|
||||||
{
|
{
|
||||||
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;
|
if (wear.Type < 13)
|
||||||
|
|
||||||
InventoryItemBase baseItem = profile.RootFolder.HasItem(wear.ItemID);
|
|
||||||
if (baseItem != null)
|
|
||||||
{
|
{
|
||||||
assetId = baseItem.assetID;
|
LLUUID assetId;
|
||||||
//temporary dictionary storage. This should be storing to a database
|
|
||||||
if (m_avatarsClothes.ContainsKey(clientView.AgentId))
|
|
||||||
{
|
|
||||||
AvatarAppearance avWearing = m_avatarsClothes[clientView.AgentId];
|
|
||||||
avWearing.IsWearing[wear.Type].AssetID = assetId;
|
|
||||||
avWearing.IsWearing[wear.Type].ItemID = wear.ItemID;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
InventoryItemBase baseItem = profile.RootFolder.HasItem(wear.ItemID);
|
||||||
|
if (baseItem != null)
|
||||||
|
{
|
||||||
|
assetId = baseItem.assetID;
|
||||||
|
//temporary dictionary storage. This should be storing to a database
|
||||||
|
if (m_avatarsClothes.ContainsKey(clientView.AgentId))
|
||||||
|
{
|
||||||
|
AvatarAppearance avWearing = m_avatarsClothes[clientView.AgentId];
|
||||||
|
avWearing.IsWearing[wear.Type].AssetID = assetId;
|
||||||
|
avWearing.IsWearing[wear.Type].ItemID = wear.ItemID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue