aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/Null
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/Null')
-rw-r--r--OpenSim/Data/Null/NullRegionData.cs61
1 files changed, 30 insertions, 31 deletions
diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs
index d596698..397b32d 100644
--- a/OpenSim/Data/Null/NullRegionData.cs
+++ b/OpenSim/Data/Null/NullRegionData.cs
@@ -49,8 +49,8 @@ namespace OpenSim.Data.Null
49 if (Instance == null) 49 if (Instance == null)
50 Instance = this; 50 Instance = this;
51 //Console.WriteLine("[XXX] NullRegionData constructor"); 51 //Console.WriteLine("[XXX] NullRegionData constructor");
52 } 52 }
53 53
54 public List<RegionData> Get(string regionName, UUID scopeID) 54 public List<RegionData> Get(string regionName, UUID scopeID)
55 { 55 {
56 if (Instance != this) 56 if (Instance != this)
@@ -160,38 +160,37 @@ namespace OpenSim.Data.Null
160 m_regionData.Remove(regionID); 160 m_regionData.Remove(regionID);
161 161
162 return true; 162 return true;
163 } 163 }
164 164
165 public List<RegionData> GetDefaultRegions(UUID scopeID) 165 public List<RegionData> GetDefaultRegions(UUID scopeID)
166 { 166 {
167 if (Instance != this) 167 return Get((int)RegionFlags.DefaultRegion, scopeID);
168 return Instance.GetDefaultRegions(scopeID);
169
170 List<RegionData> ret = new List<RegionData>();
171
172 foreach (RegionData r in m_regionData.Values)
173 {
174 if ((Convert.ToInt32(r.Data["flags"]) & 1) != 0)
175 ret.Add(r);
176 }
177
178 return ret;
179 } 168 }
180 169
181 public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y) 170 public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y)
182 { 171 {
183 if (Instance != this) 172 return Get((int)RegionFlags.FallbackRegion, scopeID);
184 return Instance.GetFallbackRegions(scopeID, x, y); 173 }
185 174
186 List<RegionData> ret = new List<RegionData>(); 175 public List<RegionData> GetHyperlinks(UUID scopeID)
187 176 {
188 foreach (RegionData r in m_regionData.Values) 177 return Get((int)RegionFlags.Hyperlink, scopeID);
189 { 178 }
190 if ((Convert.ToInt32(r.Data["flags"]) & 2) != 0) 179
191 ret.Add(r); 180 private List<RegionData> Get(int regionFlags, UUID scopeID)
192 } 181 {
193 182 if (Instance != this)
194 return ret; 183 return Instance.Get(regionFlags, scopeID);
195 } 184
185 List<RegionData> ret = new List<RegionData>();
186
187 foreach (RegionData r in m_regionData.Values)
188 {
189 if ((Convert.ToInt32(r.Data["flags"]) & regionFlags) != 0)
190 ret.Add(r);
191 }
192
193 return ret;
194 }
196 } 195 }
197} \ No newline at end of file 196} \ No newline at end of file