refactor: change AttachmentsModule.AttachObject to use sp.GetAttachments rather than filter sp.Attachments list directly
parent
9c1c378aa1
commit
01276ef433
|
@ -173,17 +173,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
UUID itemID = UUID.Zero;
|
UUID itemID = UUID.Zero;
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
{
|
{
|
||||||
foreach(SceneObjectGroup grp in sp.Attachments)
|
foreach(SceneObjectGroup grp in sp.GetAttachments(AttachmentPt))
|
||||||
{
|
|
||||||
if (grp.GetAttachmentPoint() == (byte)AttachmentPt)
|
|
||||||
{
|
{
|
||||||
itemID = grp.GetFromItemID();
|
itemID = grp.GetFromItemID();
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (itemID != UUID.Zero)
|
if (itemID != UUID.Zero)
|
||||||
DetachSingleAttachmentToInv(itemID, remoteClient);
|
DetachSingleAttachmentToInv(itemID, remoteClient);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (group.GetFromItemID() == UUID.Zero)
|
if (group.GetFromItemID() == UUID.Zero)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue