mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +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:
@@ -1117,7 +1117,7 @@ uint32 Unit::DealDamage(Unit* attacker, Unit* victim, uint32 damage, CleanDamage
|
||||
{
|
||||
Player* he = duel_wasMounted ? victim->GetCharmer()->ToPlayer() : victim->ToPlayer();
|
||||
|
||||
ASSERT(he && he->duel);
|
||||
ASSERT_NODEBUGINFO(he && he->duel);
|
||||
|
||||
if (duel_wasMounted) // In this case victim==mount
|
||||
victim->SetHealth(1);
|
||||
@@ -20809,3 +20809,14 @@ bool Unit::IsInDisallowedMountForm() const
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string Unit::GetDebugInfo() const
|
||||
{
|
||||
std::stringstream sstr;
|
||||
sstr << WorldObject::GetDebugInfo() << "\n"
|
||||
<< std::boolalpha
|
||||
<< "AliveState: " << IsAlive()
|
||||
<< " UnitMovementFlags: " << GetUnitMovementFlags() << " ExtraUnitMovementFlags: " << GetExtraUnitMovementFlags()
|
||||
<< " Class: " << std::to_string(getClass());
|
||||
return sstr.str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user