Core/ScriptedAI: Reset VehicleKit in BossAI::_Reset()

Core/Vehicles: Minor log fix and comment a redundant assertion
This commit is contained in:
Machiavelli
2011-04-22 11:07:58 +02:00
parent de60e63862
commit d42ab6c8bd
2 changed files with 7 additions and 4 deletions

View File

@@ -516,6 +516,9 @@ void BossAI::_Reset()
if (!me->isAlive())
return;
if (me->GetVehicleKit())
me->GetVehicleKit()->Reset();
me->ResetLootMode();
events.Reset();
summons.DespawnAll();

View File

@@ -141,7 +141,7 @@ void Vehicle::Uninstall()
void Vehicle::Reset()
{
sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Reset");
sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Reset Entry: %u, GuidLow: %u", m_creatureEntry, me->GetGUIDLow());
if (me->GetTypeId() == TYPEID_PLAYER)
{
if (m_usableSeatNum)
@@ -169,9 +169,9 @@ void Vehicle::RemoveAllPassengers()
// Following the above logic, this assertion should NEVER fail.
// Even in 'hacky' cases, there should at least be VEHICLE_SPELL_RIDE_HARDCODED on us.
SeatMap::const_iterator itr;
for (itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
ASSERT(!itr->second.passenger);
// SeatMap::const_iterator itr;
// for (itr = m_Seats.begin(); itr != m_Seats.end(); ++itr)
// ASSERT(!itr->second.passenger);
}
bool Vehicle::HasEmptySeat(int8 seatId) const