mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
refactor: change AttachmentsModule.AttachObject to use sp.GetAttachments rather than filter sp.Attachments list directly
This commit is contained in:
@@ -173,16 +173,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
UUID itemID = UUID.Zero;
|
||||
if (sp != null)
|
||||
{
|
||||
foreach(SceneObjectGroup grp in sp.Attachments)
|
||||
foreach(SceneObjectGroup grp in sp.GetAttachments(AttachmentPt))
|
||||
{
|
||||
if (grp.GetAttachmentPoint() == (byte)AttachmentPt)
|
||||
{
|
||||
itemID = grp.GetFromItemID();
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (itemID != UUID.Zero)
|
||||
DetachSingleAttachmentToInv(itemID, remoteClient);
|
||||
itemID = grp.GetFromItemID();
|
||||
if (itemID != UUID.Zero)
|
||||
DetachSingleAttachmentToInv(itemID, remoteClient);
|
||||
}
|
||||
}
|
||||
|
||||
if (group.GetFromItemID() == UUID.Zero)
|
||||
|
||||
Reference in New Issue
Block a user