diff options
author | opensim mirror account | 2010-11-01 08:20:06 -0700 |
---|---|---|
committer | opensim mirror account | 2010-11-01 08:20:06 -0700 |
commit | 07817abc289af2779d0f99034f5c8c74e4ecb494 (patch) | |
tree | c830d6ba1cf83ec0ef003179e1dccc23ed5c6c5f /OpenSim | |
parent | Merge branch 'master' of /var/git/opensim/ (diff) | |
parent | Fix HypergridLinker.Check4096() (diff) | |
download | opensim-SC-07817abc289af2779d0f99034f5c8c74e4ecb494.zip opensim-SC-07817abc289af2779d0f99034f5c8c74e4ecb494.tar.gz opensim-SC-07817abc289af2779d0f99034f5c8c74e4ecb494.tar.bz2 opensim-SC-07817abc289af2779d0f99034f5c8c74e4ecb494.tar.xz |
Merge branch 'master' of /var/git/opensim/
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Services/Interfaces/IGridService.cs | 29 |
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 | /// |