Core/MovementGenerator: Add more details to asserts

Include movespline in Unit::GetDebugInfo() and the Player owner in FlightPathMovementGenerator::DoEventIfAny() assert

(cherry picked from commit 560b7e33974904938f3f85a2f78c0850df2f9333)
This commit is contained in:
jackpoz
2021-12-16 22:03:52 +01:00
committed by Shauren
parent a24a5e7778
commit f65edd1130
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -13178,6 +13178,7 @@ std::string Unit::GetDebugInfo() const
<< std::boolalpha
<< "IsAIEnabled: " << IsAIEnabled() << " DeathState: " << std::to_string(getDeathState())
<< " UnitMovementFlags: " << GetUnitMovementFlags() << " ExtraUnitMovementFlags: " << GetExtraUnitMovementFlags()
<< " Class: " << std::to_string(GetClass());
<< " Class: " << std::to_string(GetClass()) << "\n"
<< " " << (movespline ? movespline->ToString() : "Movespline: <none>");
return sstr.str();
}
@@ -244,7 +244,7 @@ void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport()
void FlightPathMovementGenerator::DoEventIfAny(Player* owner, TaxiPathNodeEntry const* node, bool departure)
{
ASSERT(node);
ASSERT(node, owner->GetDebugInfo().c_str());
if (uint32 eventid = departure ? node->DepartureEventID : node->ArrivalEventID)
{