Core/Misc: improve error log messages by adding more info. Specially for Aokromes.

This commit is contained in:
Azazel
2011-02-17 19:47:08 +06:00
parent aaa9b069d9
commit 4dc1eaa47c
12 changed files with 82 additions and 74 deletions

View File

@@ -16565,9 +16565,10 @@ void Unit::BuildMovementPacket(ByteBuffer *data) const
break;
}
if (GetVehicle())
if (!this->HasUnitMovementFlag(MOVEMENTFLAG_ROOT))
sLog->outError("Unit does not have MOVEMENTFLAG_ROOT but is in vehicle!");
if (Vehicle* pVehicle = GetVehicle())
if (!HasUnitMovementFlag(MOVEMENTFLAG_ROOT))
sLog->outError("Unit (GUID: " UI64FMTD ", entry: %u) does not have MOVEMENTFLAG_ROOT but is in vehicle (ID: %u)!",
GetGUID(), GetEntry(), pVehicle->GetVehicleInfo()->m_ID);
*data << uint32(GetUnitMovementFlags()); // movement flags
*data << uint16(m_movementInfo.flags2); // 2.3.0