changed DISABLED_ cmake variable to ENABLED_ and implemented for all disabled logs

This commit is contained in:
Yehonal
2017-08-19 19:42:48 +02:00
parent f888e8c86b
commit c1586e0d99
109 changed files with 3620 additions and 1228 deletions
+24 -8
View File
@@ -100,7 +100,9 @@ void Vehicle::Uninstall()
return;
}
_status = STATUS_UNINSTALLING;
;//sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Uninstall Entry: %u, GuidLow: %u", _creatureEntry, _me->GetGUIDLow());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Uninstall Entry: %u, GuidLow: %u", _creatureEntry, _me->GetGUIDLow());
#endif
RemoveAllPassengers();
if (GetBase()->GetTypeId() == TYPEID_UNIT)
@@ -109,7 +111,9 @@ void Vehicle::Uninstall()
void Vehicle::Reset(bool evading /*= false*/)
{
;//sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Reset Entry: %u, GuidLow: %u", _creatureEntry, _me->GetGUIDLow());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Reset Entry: %u, GuidLow: %u", _creatureEntry, _me->GetGUIDLow());
#endif
if (_me->GetTypeId() == TYPEID_PLAYER)
{
if (_usableSeatNum)
@@ -193,7 +197,9 @@ void Vehicle::ApplyAllImmunities()
void Vehicle::RemoveAllPassengers()
{
;//sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::RemoveAllPassengers. Entry: %u, GuidLow: %u", _creatureEntry, _me->GetGUIDLow());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::RemoveAllPassengers. Entry: %u, GuidLow: %u", _creatureEntry, _me->GetGUIDLow());
#endif
// Passengers always cast an aura with SPELL_AURA_CONTROL_VEHICLE on the vehicle
// We just remove the aura and the unapply handler will make the target leave the vehicle.
@@ -262,7 +268,9 @@ void Vehicle::InstallAccessory(uint32 entry, int8 seatId, bool minion, uint8 typ
return;
}
;//sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle: Installing accessory entry %u on vehicle entry %u (seat:%i)", entry, GetCreatureEntry(), seatId);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle: Installing accessory entry %u on vehicle entry %u (seat:%i)", entry, GetCreatureEntry(), seatId);
#endif
if (Unit* passenger = GetPassenger(seatId))
{
// already installed
@@ -301,7 +309,9 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
/// @Prevent adding passengers when vehicle is uninstalling. (Bad script in OnUninstall/OnRemovePassenger/PassengerBoarded hook.)
if (_status == STATUS_UNINSTALLING)
{
;//sLog->outError(LOG_FILTER_VEHICLES, "Passenger GuidLow: %u, Entry: %u, attempting to board vehicle GuidLow: %u, Entry: %u during uninstall! SeatId: %i",
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outError(LOG_FILTER_VEHICLES, "Passenger GuidLow: %u, Entry: %u, attempting to board vehicle GuidLow: %u, Entry: %u during uninstall! SeatId: %i",
#endif
// unit->GetGUIDLow(), unit->GetEntry(), _me->GetGUIDLow(), _me->GetEntry(), (int32)seatId);
return false;
}
@@ -336,7 +346,9 @@ bool Vehicle::AddPassenger(Unit* unit, int8 seatId)
ASSERT(seat->second.IsEmpty());
}
;//sLog->outDebug(LOG_FILTER_VEHICLES, "Unit %s enter vehicle entry %u id %u dbguid %u seat %d", unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUIDLow(), (int32)seat->first);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_VEHICLES, "Unit %s enter vehicle entry %u id %u dbguid %u seat %d", unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUIDLow(), (int32)seat->first);
#endif
seat->second.Passenger.Guid = unit->GetGUID();
seat->second.Passenger.IsUnselectable = unit->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -445,7 +457,9 @@ void Vehicle::RemovePassenger(Unit* unit)
if (seat == Seats.end())
return;
;//sLog->outDebug(LOG_FILTER_VEHICLES, "Unit %s exit vehicle entry %u id %u dbguid %u seat %d", unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUIDLow(), (int32)seat->first);
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_VEHICLES, "Unit %s exit vehicle entry %u id %u dbguid %u seat %d", unit->GetName().c_str(), _me->GetEntry(), _vehicleInfo->m_ID, _me->GetGUIDLow(), (int32)seat->first);
#endif
if (seat->second.SeatInfo->CanEnterOrExit() && ++_usableSeatNum)
_me->SetFlag(UNIT_NPC_FLAGS, (_me->GetTypeId() == TYPEID_PLAYER ? UNIT_NPC_FLAG_PLAYER_VEHICLE : UNIT_NPC_FLAG_SPELLCLICK));
@@ -505,7 +519,9 @@ void Vehicle::Dismiss()
if (GetBase()->GetTypeId() != TYPEID_UNIT)
return;
;//sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Dismiss Entry: %u, GuidLow %u", _creatureEntry, _me->GetGUIDLow());
#ifdef ENABLE_EXTRAS && ENABLE_EXTRA_LOGS
sLog->outDebug(LOG_FILTER_VEHICLES, "Vehicle::Dismiss Entry: %u, GuidLow %u", _creatureEntry, _me->GetGUIDLow());
#endif
Uninstall();
GetBase()->ToCreature()->DespawnOrUnsummon();
}