In SetAttachment, if the existing attachment has no asset id then carry on rather than abort.

When a user logs in, the attachment item ids are pulled from persistence in the Avatars table.  However,
the asset ids are not saved.  When the avatar enters a simulator the attachments are set again.  If
we simply perform an item check then the asset ids (which are now present) are never set, and NPC attachments
later fail unless the attachment is detached and reattached.

Hopefully resolves part of http://opensimulator.org/mantis/view.php?id=5653
This commit is contained in:
Justin Clark-Casey (justincc)
2011-09-06 01:59:21 +01:00
parent c6ec573d10
commit b903d2ca96
4 changed files with 43 additions and 6 deletions

View File

@@ -628,6 +628,7 @@ namespace OpenSim.Framework
// We know all of these must end up as attachments so we
// append rather than replace to ensure multiple attachments
// per point continues to work
// m_log.DebugFormat("[CHILDAGENTDATAUPDATE]: Appending attachments for {0}", AgentID);
Appearance.AppendAttachment(new AvatarAttachment((OSDMap)o));
}
}