| | 1 | | using System; |
| | 2 | | using UnityEngine; |
| | 3 | |
|
| | 4 | | [Serializable] |
| | 5 | | public class UserStatus |
| | 6 | | { |
| | 7 | | [Serializable] |
| | 8 | | public class Realm |
| | 9 | | { |
| | 10 | | public string serverName; |
| | 11 | | public string layer; |
| | 12 | |
|
| | 13 | | public override bool Equals(object obj) |
| | 14 | | { |
| 0 | 15 | | if (this == obj) return true; |
| 0 | 16 | | if (!(obj is Realm other)) return false; |
| 0 | 17 | | if (serverName != other.serverName) return false; |
| 0 | 18 | | if (layer != other.layer) return false; |
| 0 | 19 | | return true; |
| | 20 | | } |
| | 21 | | } |
| | 22 | |
|
| | 23 | | public Realm realm; |
| | 24 | | public Vector2 position; |
| | 25 | | public string userId; |
| | 26 | | public FriendshipStatus friendshipStatus; |
| | 27 | | public PresenceStatus presence; |
| | 28 | | [NonSerialized] public DateTime friendshipStartedTime; |
| | 29 | |
|
| | 30 | | public override bool Equals(object obj) |
| | 31 | | { |
| 0 | 32 | | if (this == obj) return true; |
| 0 | 33 | | if (!(obj is UserStatus other)) return false; |
| 0 | 34 | | if (realm != null && other.realm == null) return false; |
| 0 | 35 | | if (realm == null && other.realm != null) return false; |
| 0 | 36 | | if (realm != null && !realm.Equals(other.realm)) return false; |
| 0 | 37 | | if (position != other.position) return false; |
| 0 | 38 | | if (userId != other.userId) return false; |
| 0 | 39 | | if (friendshipStatus != other.friendshipStatus) return false; |
| 0 | 40 | | if (friendshipStartedTime != other.friendshipStartedTime) return false; |
| 0 | 41 | | return true; |
| | 42 | | } |
| | 43 | | } |