mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-02 18:43:48 +00:00
feat(Core/Debug): GetDebugInfo implementation (#12705)
Cherry-pick: 9a924fb9d5
Co-authored-by: jackpoz <giacomopoz@gmail.com>
Co-authored-by: jackpoz <giacomopoz@gmail.com>
This commit is contained in:
@@ -4021,3 +4021,21 @@ void Map::DeleteCorpseData()
|
||||
stmt->SetData(1, GetInstanceId());
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
std::string Map::GetDebugInfo() const
|
||||
{
|
||||
std::stringstream sstr;
|
||||
sstr << std::boolalpha
|
||||
<< "Id: " << GetId() << " InstanceId: " << GetInstanceId() << " Difficulty: " << std::to_string(GetDifficulty())
|
||||
<< " HasPlayers: " << HavePlayers();
|
||||
return sstr.str();
|
||||
}
|
||||
|
||||
std::string InstanceMap::GetDebugInfo() const
|
||||
{
|
||||
std::stringstream sstr;
|
||||
sstr << Map::GetDebugInfo() << "\n"
|
||||
<< std::boolalpha
|
||||
<< "ScriptId: " << GetScriptId() << " ScriptName: " << GetScriptName();
|
||||
return sstr.str();
|
||||
}
|
||||
|
||||
@@ -649,6 +649,8 @@ public:
|
||||
return m_activeNonPlayers.size();
|
||||
}
|
||||
|
||||
virtual std::string GetDebugInfo() const;
|
||||
|
||||
private:
|
||||
void LoadMapAndVMap(int gx, int gy);
|
||||
void LoadVMap(int gx, int gy);
|
||||
@@ -830,6 +832,9 @@ public:
|
||||
[[nodiscard]] uint32 GetMaxResetDelay() const;
|
||||
|
||||
void InitVisibilityDistance() override;
|
||||
|
||||
std::string GetDebugInfo() const override;
|
||||
|
||||
private:
|
||||
bool m_resetAfterUnload;
|
||||
bool m_unloadWhenEmpty;
|
||||
|
||||
Reference in New Issue
Block a user