*A missing part of last rev.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-27 13:59:29 -05:00
parent d91903e5b1
commit 685dee5593
2 changed files with 20 additions and 3 deletions
+18 -1
View File
@@ -14885,6 +14885,7 @@ void Unit::BuildMovementPacket(ByteBuffer *data) const
else
{
sLog.outError("Unit %u does not have transport!", GetEntry());
OutDebugInfo();
*data << (uint8)0;
}
*data << float (GetTransOffsetX());
@@ -15069,22 +15070,38 @@ void Unit::RewardRage( uint32 damage, uint32 weaponSpeedHitFactor, bool attacker
ModifyPower(POWER_RAGE, uint32(addRage*10));
}
void Unit::OutDebugInfo()
void Unit::OutDebugInfo() const
{
sLog.outError("Unit::OutDebugInfo");
sLog.outString("GUID "UI64FMTD", entry %u, type %u, name %s", GetGUID(), GetEntry(), (uint32)GetTypeId(), GetName());
sLog.outString("OwnerGUID "UI64FMTD", MinionGUID "UI64FMTD", CharmerGUID "UI64FMTD", CharmedGUID "UI64FMTD, GetOwnerGUID(), GetMinionGUID(), GetCharmerGUID(), GetCharmGUID());
sLog.outString("In world %u, unit type mask %u", (uint32)(IsInWorld() ? 1 : 0), m_unitTypeMask);
sLog.outStringInLine("Summon Slot: ");
for(uint32 i = 0; i < MAX_SUMMON_SLOT; ++i)
sLog.outStringInLine(UI64FMTD", ", m_SummonSlot[i]);
sLog.outString();
sLog.outStringInLine("Controlled List: ");
for(ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr)
sLog.outStringInLine(UI64FMTD", ", (*itr)->GetGUID());
sLog.outString();
sLog.outStringInLine("Aura List: ");
for(AuraMap::const_iterator itr = m_Auras.begin(); itr != m_Auras.end(); ++itr)
sLog.outStringInLine("%u, ", itr->first);
sLog.outString();
if(IsVehicle())
{
sLog.outStringInLine("Passenger List: ");
for(SeatMap::iterator itr = GetVehicleKit()->m_Seats.begin(); itr != GetVehicleKit()->m_Seats.end(); ++itr)
if(Unit *passenger = itr->second.passenger)
sLog.outStringInLine(UI64FMTD", ", passenger->GetGUID());
sLog.outString();
}
if(GetVehicle())
sLog.outString("On vehicle %u.", GetVehicleBase()->GetEntry());
}
+2 -2
View File
@@ -1101,7 +1101,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
{
m_attackers.erase(pAttacker);
}
Unit * getAttackerForHelper() // If someone wants to help, who to give them
Unit * getAttackerForHelper() const // If someone wants to help, who to give them
{
if (getVictim() != NULL)
return getVictim();
@@ -1869,7 +1869,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
virtual float GetFollowAngle() const { return M_PI/2; }
void OutDebugInfo();
void OutDebugInfo() const;
virtual bool isBeingLoaded() const { return false;}
protected:
explicit Unit ();