public void llAttachToAvatar(int attachmentPoint)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) return;
if (m_host.ParentEntity.RootChild.AttachmentPoint != 0)
return;
TaskInventoryItem item;
lock (m_host.TaskInventory)
{
if (!m_host.TaskInventory.ContainsKey(InventorySelf()))
return;
item = m_host.TaskInventory[InventorySelf()];
}
if (item.PermsGranter != m_host.OwnerID)
return;
if ((item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0)
{
AttachToAvatar(attachmentPoint);
}
}