mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
Merge branch 'master' into careminster-presence-refactor
This commit is contained in:
@@ -1590,12 +1590,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
{
|
||||
m_log.DebugFormat("[RADMIN] Initializing inventory for {0} from {1}", destination, source);
|
||||
Scene scene = m_application.SceneManager.CurrentOrFirstScene;
|
||||
AvatarAppearance avatarAppearance = null;
|
||||
AvatarData avatar = scene.AvatarService.GetAvatar(source);
|
||||
if (avatar != null)
|
||||
avatarAppearance = avatar.ToAvatarAppearance(source);
|
||||
|
||||
// If the model has no associated appearance we're done.
|
||||
AvatarAppearance avatarAppearance = scene.AvatarService.GetAppearance(source);
|
||||
if (avatarAppearance == null)
|
||||
return;
|
||||
|
||||
@@ -1609,8 +1606,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
{
|
||||
CopyWearablesAndAttachments(destination, source, avatarAppearance);
|
||||
|
||||
AvatarData avatarData = new AvatarData(avatarAppearance);
|
||||
scene.AvatarService.SetAvatar(destination, avatarData);
|
||||
scene.AvatarService.SetAppearance(destination, avatarAppearance);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -1641,8 +1637,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
}
|
||||
|
||||
AvatarData avatarData = new AvatarData(avatarAppearance);
|
||||
scene.AvatarService.SetAvatar(destination, avatarData);
|
||||
scene.AvatarService.SetAppearance(destination, avatarAppearance);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -1737,12 +1732,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
}
|
||||
|
||||
// Attachments
|
||||
Dictionary<int, UUID[]> attachments = avatarAppearance.GetAttachmentDictionary();
|
||||
Dictionary<int, AvatarAttachment> attachments = avatarAppearance.Attachments;
|
||||
|
||||
foreach (KeyValuePair<int, UUID[]> attachment in attachments)
|
||||
foreach (KeyValuePair<int, AvatarAttachment> attachment in attachments)
|
||||
{
|
||||
int attachpoint = attachment.Key;
|
||||
UUID itemID = attachment.Value[0];
|
||||
int attachpoint = attachment.Value.AttachPoint;
|
||||
UUID itemID = attachment.Value.ItemID;
|
||||
|
||||
if (itemID != UUID.Zero)
|
||||
{
|
||||
@@ -2026,10 +2021,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
if (include)
|
||||
{
|
||||
// Setup for appearance processing
|
||||
AvatarData avatarData = scene.AvatarService.GetAvatar(ID);
|
||||
if (avatarData != null)
|
||||
avatarAppearance = avatarData.ToAvatarAppearance(ID);
|
||||
else
|
||||
avatarAppearance = scene.AvatarService.GetAppearance(ID);
|
||||
if (avatarAppearance == null)
|
||||
avatarAppearance = new AvatarAppearance();
|
||||
|
||||
AvatarWearable[] wearables = avatarAppearance.Wearables;
|
||||
@@ -2194,8 +2187,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController
|
||||
m_log.DebugFormat("[RADMIN] Outfit {0} load completed", outfitName);
|
||||
} // foreach outfit
|
||||
m_log.DebugFormat("[RADMIN] Inventory update complete for {0}", name);
|
||||
AvatarData avatarData2 = new AvatarData(avatarAppearance);
|
||||
scene.AvatarService.SetAvatar(ID, avatarData2);
|
||||
scene.AvatarService.SetAppearance(ID, avatarAppearance);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user