aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Interfaces/IGridService.cs29
1 files changed, 28 insertions, 1 deletions
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs
index 77230a3..ee06225 100644
--- a/OpenSim/Services/Interfaces/IGridService.cs
+++ b/OpenSim/Services/Interfaces/IGridService.cs
@@ -97,7 +97,7 @@ namespace OpenSim.Services.Interfaces
97 int GetRegionFlags(UUID scopeID, UUID regionID); 97 int GetRegionFlags(UUID scopeID, UUID regionID);
98 } 98 }
99 99
100 public class GridRegion 100 public class GridRegion : Object
101 { 101 {
102 102
103 /// <summary> 103 /// <summary>
@@ -225,6 +225,33 @@ namespace OpenSim.Services.Interfaces
225 EstateOwner = ConvertFrom.EstateOwner; 225 EstateOwner = ConvertFrom.EstateOwner;
226 } 226 }
227 227
228 # region Definition of equality
229
230 /// <summary>
231 /// Define equality as two regions having the same, non-zero UUID.
232 /// </summary>
233 public bool Equals(GridRegion region)
234 {
235 if ((object)region == null)
236 return false;
237 // Return true if the non-zero UUIDs are equal:
238 return (RegionID != UUID.Zero) && RegionID.Equals(region.RegionID);
239 }
240
241 public override bool Equals(Object obj)
242 {
243 if (obj == null)
244 return false;
245 return Equals(obj as GridRegion);
246 }
247
248 public override int GetHashCode()
249 {
250 return RegionID.GetHashCode() ^ TerrainImage.GetHashCode();
251 }
252
253 #endregion
254
228 /// <value> 255 /// <value>
229 /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. 256 /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw.
230 /// 257 ///