Esempio n. 1
0
        private bool IsPartOfAppearance(UUID principalID, UUID itemID)
        {
            AvatarAppearance a = GetAppearance(principalID);

            if (a == null)
            {
                return(false);
            }

            // Check wearables (body parts and clothes)
            for (int i = 0; i < a.Wearables.Length; i++)
            {
                for (int j = 0; j < a.Wearables[i].Count; j++)
                {
                    if (a.Wearables[i][j].ItemID == itemID)
                    {
                        //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is a wearable", itemID);
                        return(true);
                    }
                }
            }

            // Check attachments
            if (a.GetAttachmentForItem(itemID) != null)
            {
                //m_log.DebugFormat("[HG SUITCASE INVENTORY SERVICE]: item {0} is an attachment", itemID);
                return(true);
            }

            return(false);
        }