diff --git a/LibreMetaverse/Avatar.cs b/LibreMetaverse/Avatar.cs index 9e821d0d..a7baf2a5 100644 --- a/LibreMetaverse/Avatar.cs +++ b/LibreMetaverse/Avatar.cs @@ -294,16 +294,26 @@ namespace OpenMetaverse /// /// See also: Primitive.ChildCount /// - public struct Attachment + public struct Attachment : IEquatable { /// /// The attachment point (see avatar_lad.xml for a list) /// - public byte AttachmentPoint; + public readonly byte AttachmentPoint; /// /// The UUID (global) of the attachment on this point. /// - public UUID AttachmentID; + public readonly UUID AttachmentID; + + /// + /// Determine if this is the same as another attachment object. + /// + /// Target for comparison + /// Are these attachments the same object? + public bool Equals(Attachment other) + { + return other.AttachmentPoint == AttachmentPoint && other.AttachmentID == AttachmentID; + } } #endregion Subclasses