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:
Maelthyr
2022-08-15 14:43:41 +02:00
committed by GitHub
parent 0fa783793e
commit d0d1671745
30 changed files with 218 additions and 20 deletions

View File

@@ -1010,6 +1010,13 @@ bool Object::PrintIndexError(uint32 index, bool set) const
return false;
}
std::string Object::GetDebugInfo() const
{
std::stringstream sstr;
sstr << GetGUID().ToString() + " Entry " << GetEntry();
return sstr.str();
}
void MovementInfo::OutDebug()
{
LOG_INFO("movement", "MOVEMENT INFO");
@@ -2419,6 +2426,15 @@ Player* WorldObject::SelectNearestPlayer(float distance) const
return target;
}
std::string WorldObject::GetDebugInfo() const
{
std::stringstream sstr;
sstr << WorldLocation::GetDebugInfo() << "\n"
<< Object::GetDebugInfo() << "\n"
<< "Name: " << GetName();
return sstr.str();
}
void WorldObject::GetGameObjectListWithEntryInGrid(std::list<GameObject*>& gameobjectList, uint32 entry, float maxSearchRange) const
{
Acore::AllGameObjectsWithEntryInRange check(this, entry, maxSearchRange);