aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Interfaces/IGridService.cs
diff options
context:
space:
mode:
authorJonathan Freedman2010-11-05 19:10:02 -0700
committerJonathan Freedman2010-11-05 19:10:02 -0700
commit4f40374464899dad82abdb9c36ea863ceac0d83f (patch)
treea9b116ccca55fb07b8c79ab7f6fdfafc8466d740 /OpenSim/Services/Interfaces/IGridService.cs
parentMerge branch 'master' into mantis5110 (diff)
parentMerge branch 'master' of /var/git/opensim/ (diff)
downloadopensim-SC-4f40374464899dad82abdb9c36ea863ceac0d83f.zip
opensim-SC-4f40374464899dad82abdb9c36ea863ceac0d83f.tar.gz
opensim-SC-4f40374464899dad82abdb9c36ea863ceac0d83f.tar.bz2
opensim-SC-4f40374464899dad82abdb9c36ea863ceac0d83f.tar.xz
Merge git://github.com/opensim/opensim into mantis5110
Diffstat (limited to 'OpenSim/Services/Interfaces/IGridService.cs')
-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 6d3bff7..a34f0be 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>
@@ -238,6 +238,33 @@ namespace OpenSim.Services.Interfaces
238 EstateOwner = ConvertFrom.EstateOwner; 238 EstateOwner = ConvertFrom.EstateOwner;
239 } 239 }
240 240
241 # region Definition of equality
242
243 /// <summary>
244 /// Define equality as two regions having the same, non-zero UUID.
245 /// </summary>
246 public bool Equals(GridRegion region)
247 {
248 if ((object)region == null)
249 return false;
250 // Return true if the non-zero UUIDs are equal:
251 return (RegionID != UUID.Zero) && RegionID.Equals(region.RegionID);
252 }
253
254 public override bool Equals(Object obj)
255 {
256 if (obj == null)
257 return false;
258 return Equals(obj as GridRegion);
259 }
260
261 public override int GetHashCode()
262 {
263 return RegionID.GetHashCode() ^ TerrainImage.GetHashCode();
264 }
265
266 #endregion
267
241 /// <value> 268 /// <value>
242 /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw. 269 /// This accessor can throw all the exceptions that Dns.GetHostAddresses can throw.
243 /// 270 ///