Core/MovementGenerator: Add more details to asserts

Include movespline in Unit::GetDebugInfo() and the Player owner in FlightPathMovementGenerator::DoEventIfAny() assert
This commit is contained in:
jackpoz
2019-07-18 20:09:00 +02:00
parent 3f7b2252a1
commit 560b7e3397
2 changed files with 3 additions and 2 deletions

View File

@@ -13526,6 +13526,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();
}

View File

@@ -238,7 +238,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)
{