| | 1 | | using System; |
| | 2 | |
|
| | 3 | | namespace DCL.Emotes |
| | 4 | | { |
| | 5 | | public class EmoteBodyId |
| | 6 | | { |
| 748 | 7 | | public string BodyShapeId { get; } |
| 748 | 8 | | public string EmoteId { get; } |
| | 9 | |
|
| 749 | 10 | | public EmoteBodyId(string bodyShapeId, string emoteId) |
| | 11 | | { |
| 749 | 12 | | this.BodyShapeId = bodyShapeId; |
| 749 | 13 | | this.EmoteId = emoteId; |
| 749 | 14 | | } |
| | 15 | |
|
| | 16 | | public override string ToString() => |
| 0 | 17 | | $"{BodyShapeId}:{EmoteId}"; |
| | 18 | |
|
| | 19 | | private bool Equals(EmoteBodyId other) => |
| 0 | 20 | | BodyShapeId == other.BodyShapeId && EmoteId == other.EmoteId; |
| | 21 | |
|
| | 22 | | public override bool Equals(object obj) |
| | 23 | | { |
| 0 | 24 | | if (ReferenceEquals(null, obj)) return false; |
| 0 | 25 | | if (ReferenceEquals(this, obj)) return true; |
| 0 | 26 | | return obj.GetType() == this.GetType() && Equals((EmoteBodyId)obj); |
| | 27 | | } |
| | 28 | |
|
| | 29 | | public override int GetHashCode() => |
| 748 | 30 | | HashCode.Combine(BodyShapeId, EmoteId); |
| | 31 | | } |
| | 32 | | } |