public Dictionary <UUID, SceneOwnerCounts> GetCurrentSceneOwnerCounts() { Dictionary <UUID, SceneOwnerCounts> SOGTable = new Dictionary <UUID, SceneOwnerCounts>(); foreach (Scene scene in m_localScenes) { List <EntityBase> EntityList = scene.GetEntities(); foreach (EntityBase ent in EntityList) { if (ent is SceneObjectGroup) { SceneObjectGroup SOG = (SceneObjectGroup)ent; if (SOGTable.ContainsKey(SOG.OwnerID)) { SceneOwnerCounts counts = SOGTable[SOG.OwnerID]; counts.TotalObjects++; counts.TotalPrims += SOG.LandImpact; SOGTable[SOG.OwnerID] = counts; } else { SceneOwnerCounts counts = new SceneOwnerCounts(); UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(SOG.OwnerID); if (profile == null) { counts.OwnerName = "(Group-deeded, or unknown user)"; } else { counts.OwnerName = profile.Name; } counts.TotalObjects = 1; counts.TotalPrims = SOG.LandImpact; SOGTable[SOG.OwnerID] = counts; } } } } return(SOGTable); }
public Dictionary<UUID,SceneOwnerCounts> GetCurrentSceneOwnerCounts() { Dictionary<UUID,SceneOwnerCounts> SOGTable = new Dictionary<UUID,SceneOwnerCounts>(); foreach (Scene scene in m_localScenes) { List<EntityBase> EntityList = scene.GetEntities(); foreach (EntityBase ent in EntityList) { if (ent is SceneObjectGroup) { SceneObjectGroup SOG = (SceneObjectGroup)ent; if (SOGTable.ContainsKey(SOG.OwnerID)) { SceneOwnerCounts counts = SOGTable[SOG.OwnerID]; counts.TotalObjects++; counts.TotalPrims += SOG.LandImpact; SOGTable[SOG.OwnerID] = counts; } else { SceneOwnerCounts counts = new SceneOwnerCounts(); UserProfileData profile = scene.CommsManager.UserService.GetUserProfile(SOG.OwnerID); if (profile == null) counts.OwnerName = "(Group-deeded, or unknown user)"; else counts.OwnerName = profile.Name; counts.TotalObjects = 1; counts.TotalPrims = SOG.LandImpact; SOGTable[SOG.OwnerID] = counts; } } } } return SOGTable; }