diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs index 72115a8..2de5c16 100644 --- a/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/PrimCountModule.cs | |||
@@ -324,6 +324,37 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
324 | 324 | ||
325 | return count; | 325 | return count; |
326 | } | 326 | } |
327 | |||
328 | /// <summary> | ||
329 | /// Get the total count of owner, group and others prims on the parcel. | ||
330 | /// FIXME: Need to do selected prims once this is reimplemented. | ||
331 | /// </summary> | ||
332 | /// <param name="parcelID"></param> | ||
333 | /// <returns></returns> | ||
334 | public int GetTotalCount(UUID parcelID) | ||
335 | { | ||
336 | int count = 0; | ||
337 | |||
338 | lock (m_TaintLock) | ||
339 | { | ||
340 | if (m_Tainted) | ||
341 | Recount(); | ||
342 | |||
343 | ParcelCounts counts; | ||
344 | if (m_ParcelCounts.TryGetValue(parcelID, out counts)) | ||
345 | { | ||
346 | count = counts.Owner; | ||
347 | count += counts.Group; | ||
348 | count += counts.Others; | ||
349 | } | ||
350 | } | ||
351 | |||
352 | m_log.DebugFormat( | ||
353 | "[PRIM COUNT MODULE]: GetTotalCount for parcel {0} in {1} returning {2}", | ||
354 | parcelID, m_Scene.RegionInfo.RegionName, count); | ||
355 | |||
356 | return count; | ||
357 | } | ||
327 | 358 | ||
328 | /// <summary> | 359 | /// <summary> |
329 | /// Get the number of prims that are in the entire simulator for the owner of this parcel. | 360 | /// Get the number of prims that are in the entire simulator for the owner of this parcel. |
@@ -457,6 +488,14 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
457 | return m_Parent.GetOthersCount(m_ParcelID); | 488 | return m_Parent.GetOthersCount(m_ParcelID); |
458 | } | 489 | } |
459 | } | 490 | } |
491 | |||
492 | public int Total | ||
493 | { | ||
494 | get | ||
495 | { | ||
496 | return m_Parent.GetTotalCount(m_ParcelID); | ||
497 | } | ||
498 | } | ||
460 | 499 | ||
461 | public int Simulator | 500 | public int Simulator |
462 | { | 501 | { |