Scripts/Commands: Improve ".debug objectcount"
Port From (https://github.com/TrinityCore/TrinityCore/commit/4e3d23188e02d2c79f09460590d0f43a5f81a982)
This commit is contained in:
@@ -733,7 +733,7 @@ namespace Game.Chat
|
|||||||
{
|
{
|
||||||
void HandleDebugObjectCountMap(Map map)
|
void HandleDebugObjectCountMap(Map map)
|
||||||
{
|
{
|
||||||
handler.SendSysMessage($"Map Id: {map.GetId()} Name: '{map.GetMapName()}' Instance Id: {map.GetInstanceId()} Creatures: {map.GetObjectsStore().OfType<Creature>().Count()} GameObjects: {map.GetObjectsStore().OfType<GameObject>().Count()}");
|
handler.SendSysMessage($"Map Id: {map.GetId()} Name: '{map.GetMapName()}' Instance Id: {map.GetInstanceId()} Creatures: {map.GetObjectsStore().OfType<Creature>().Count()} GameObjects: {map.GetObjectsStore().OfType<GameObject>().Count()} SetActive Objects: {map.GetActiveNonPlayersCount()}");
|
||||||
|
|
||||||
Dictionary<uint, uint> creatureIds = new();
|
Dictionary<uint, uint> creatureIds = new();
|
||||||
foreach (var p in map.GetObjectsStore())
|
foreach (var p in map.GetObjectsStore())
|
||||||
|
|||||||
@@ -3865,6 +3865,11 @@ namespace Game.Maps
|
|||||||
return m_activePlayers;
|
return m_activePlayers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int GetActiveNonPlayersCount()
|
||||||
|
{
|
||||||
|
return m_activeNonPlayers.Count;
|
||||||
|
}
|
||||||
|
|
||||||
public Dictionary<ObjectGuid, WorldObject> GetObjectsStore() { return _objectsStore; }
|
public Dictionary<ObjectGuid, WorldObject> GetObjectsStore() { return _objectsStore; }
|
||||||
|
|
||||||
public MultiMap<ulong, Creature> GetCreatureBySpawnIdStore() { return _creatureBySpawnIdStore; }
|
public MultiMap<ulong, Creature> GetCreatureBySpawnIdStore() { return _creatureBySpawnIdStore; }
|
||||||
|
|||||||
Reference in New Issue
Block a user