fix (Core/CodeReduction) TC_ removal (#10162)

TC_ remove from any commit out TC_LOG in the event when we do need to run debug logging, we can just remove the // instead of // TC_
This commit is contained in:
acidmanifesto
2022-01-13 14:39:54 -05:00
committed by GitHub
parent a9a3bc94f1
commit 4330e44ad0
18 changed files with 30 additions and 30 deletions

View File

@@ -322,7 +322,7 @@ namespace VMAP
// only non-tiled maps have them, and if so exactly one (so far at least...)
ModelSpawn spawn;
#ifdef VMAP_DEBUG
//TC_LOG_DEBUG(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : map isTiled: %u", static_cast<uint32>(iIsTiled));
//LOG_DEBUG(LOG_FILTER_MAPS, "StaticMapTree::InitMap() : map isTiled: %u", static_cast<uint32>(iIsTiled));
#endif
if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn))
{

View File

@@ -1809,7 +1809,7 @@ public:
if (WorldObject* obj = ObjectAccessor::GetWorldObject(*m_baseObject, *itr))
m_objectList->push_back(obj);
//else
// TC_LOG_DEBUG("scripts.ai", "SmartScript::mTargetStorage stores a guid to an invalid object: %s", (*itr).ToString().c_str());
// LOG_DEBUG("scripts.ai", "SmartScript::mTargetStorage stores a guid to an invalid object: %s", (*itr).ToString().c_str());
}
}

View File

@@ -10064,7 +10064,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uin
ConditionList conditions = sConditionMgr->GetConditionsForNpcVendorEvent(creature->GetEntry(), item);
if (!sConditionMgr->IsObjectMeetToConditions(this, creature, conditions))
{
//TC_LOG_DEBUG("condition", "BuyItemFromVendor: conditions not met for creature entry %u item %u", creature->GetEntry(), item);
//LOG_DEBUG("condition", "BuyItemFromVendor: conditions not met for creature entry %u item %u", creature->GetEntry(), item);
SendBuyError(BUY_ERR_CANT_FIND_ITEM, creature, item, 0);
return false;
}

View File

@@ -1590,7 +1590,7 @@ QuestGiverStatus Player::GetQuestDialogStatus(Object* questgiver)
}
default:
// it's impossible, but check
//TC_LOG_ERROR("entities.player.quest", "GetQuestDialogStatus called for unexpected type %u", questgiver->GetTypeId());
//LOG_ERROR("entities.player.quest", "GetQuestDialogStatus called for unexpected type %u", questgiver->GetTypeId());
return DIALOG_STATUS_NONE;
}

View File

@@ -198,7 +198,7 @@ void MotionTransport::Update(uint32 diff)
sScriptMgr->OnRelocate(this, _currentFrame->Node->index, _currentFrame->Node->mapid, _currentFrame->Node->x, _currentFrame->Node->y, _currentFrame->Node->z);
//TC_LOG_DEBUG("entities.transport", "Transport %u (%s) moved to node %u %u %f %f %f", GetEntry(), GetName().c_str(), _currentFrame->Node->index, _currentFrame->Node->mapid, _currentFrame->Node->x, _currentFrame->Node->y, _currentFrame->Node->z);
//LOG_DEBUG("entities.transport", "Transport %u (%s) moved to node %u %u %f %f %f", GetEntry(), GetName().c_str(), _currentFrame->Node->index, _currentFrame->Node->mapid, _currentFrame->Node->x, _currentFrame->Node->y, _currentFrame->Node->z);
// Departure event
if (_currentFrame->IsTeleportFrame())
@@ -655,7 +655,7 @@ void MotionTransport::DoEventIfAny(KeyFrame const& node, bool departure)
{
if (uint32 eventid = departure ? node.Node->departureEventID : node.Node->arrivalEventID)
{
//TC_LOG_DEBUG("maps.script", "Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.Node->index, GetName().c_str());
//LOG_DEBUG("maps.script", "Taxi %s event %u of node %u of %s path", departure ? "departure" : "arrival", eventid, node.Node->index, GetName().c_str());
GetMap()->ScriptsStart(sEventScripts, eventid, this, this);
EventInform(eventid);
}

View File

@@ -86,13 +86,13 @@ void WorldSession::HandleSwapInvItemOpcode(WorldPacket& recvData)
if (_player->IsBankPos(INVENTORY_SLOT_BAG_0, srcslot) && !CanUseBank())
{
//TC_LOG_DEBUG("network", "WORLD: HandleSwapInvItemOpcode - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str());
//LOG_DEBUG("network", "WORLD: HandleSwapInvItemOpcode - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str());
return;
}
if (_player->IsBankPos(INVENTORY_SLOT_BAG_0, dstslot) && !CanUseBank())
{
//TC_LOG_DEBUG("network", "WORLD: HandleSwapInvItemOpcode - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str());
//LOG_DEBUG("network", "WORLD: HandleSwapInvItemOpcode - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str());
return;
}
@@ -149,13 +149,13 @@ void WorldSession::HandleSwapItem(WorldPacket& recvData)
if (_player->IsBankPos(srcbag, srcslot) && !CanUseBank())
{
//TC_LOG_DEBUG("network", "WORLD: HandleSwapItem - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str());
//LOG_DEBUG("network", "WORLD: HandleSwapItem - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str());
return;
}
if (_player->IsBankPos(dstbag, dstslot) && !CanUseBank())
{
//TC_LOG_DEBUG("network", "WORLD: HandleSwapItem - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str());
//LOG_DEBUG("network", "WORLD: HandleSwapItem - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str());
return;
}

View File

@@ -122,7 +122,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recv_data)
item = _player->GetItemByGuid(guid);
if (!item || _player->IsBankPos(item->GetPos()))
{
//TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found.", guid.ToString().c_str());
//LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found.", guid.ToString().c_str());
return;
}
}
@@ -130,7 +130,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recv_data)
{
if (guid != _player->GetGUID() || menuId != _player->PlayerTalkClass->GetGossipMenu().GetMenuId())
{
//TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found.", guid.ToString().c_str());
//LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found.", guid.ToString().c_str());
return;
}
}

View File

@@ -403,7 +403,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
{
sScriptMgr->AnticheatSetSkipOnePacketForASH(plrMover, true);
sScriptMgr->AnticheatUpdateMovementInfo(plrMover, movementInfo);
//TC_LOG_INFO("anticheat", "MovementHandler:: 2 We were teleported, skip packets that were broadcast before teleport");
//LOG_INFO("anticheat", "MovementHandler:: 2 We were teleported, skip packets that were broadcast before teleport");
}
recvData.rfinish(); // prevent warnings spam
return;

View File

@@ -386,7 +386,7 @@ void Map::SwitchGridContainers(GameObject* obj, bool on)
if (!IsGridLoaded(GridCoord(cell.data.Part.grid_x, cell.data.Part.grid_y)))
return;
//TC_LOG_DEBUG(LOG_FILTER_MAPS, "Switch object %s from grid[%u, %u] %u", obj->GetGUID().ToString().c_str(), cell.data.Part.grid_x, cell.data.Part.grid_y, on);
//LOG_DEBUG(LOG_FILTER_MAPS, "Switch object %s from grid[%u, %u] %u", obj->GetGUID().ToString().c_str(), cell.data.Part.grid_x, cell.data.Part.grid_y, on);
NGridType* ngrid = getNGrid(cell.GridX(), cell.GridY());
ASSERT(ngrid != nullptr);

View File

@@ -84,7 +84,7 @@ void WaypointMgr::Load()
if (wp->move_type >= WAYPOINT_MOVE_TYPE_MAX)
{
//TC_LOG_ERROR("sql.sql", "Waypoint %u in waypoint_data has invalid move_type, ignoring", wp->id);
//LOG_ERROR("sql.sql", "Waypoint %u in waypoint_data has invalid move_type, ignoring", wp->id);
delete wp;
continue;
}
@@ -145,7 +145,7 @@ void WaypointMgr::ReloadPath(uint32 id)
if (wp->move_type >= WAYPOINT_MOVE_TYPE_MAX)
{
//TC_LOG_ERROR("sql.sql", "Waypoint %u in waypoint_data has invalid move_type, ignoring", wp->id);
//LOG_ERROR("sql.sql", "Waypoint %u in waypoint_data has invalid move_type, ignoring", wp->id);
delete wp;
continue;
}

View File

@@ -1160,7 +1160,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
CallScriptObjectTargetSelectHandlers(target, effIndex, targetType);
if (!target)
{
//TC_LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: OnObjectTargetSelect script hook for spell Id %u set nullptr target, effect %u", m_spellInfo->Id, effIndex);
//LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: OnObjectTargetSelect script hook for spell Id %u set nullptr target, effect %u", m_spellInfo->Id, effIndex);
return;
}
@@ -1181,7 +1181,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
}
else
{
//TC_LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: OnObjectTargetSelect script hook for spell Id %u set object of wrong type, expected unit, got %s, effect %u", m_spellInfo->Id, target->GetGUID().GetTypeName(), effMask);
//LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: OnObjectTargetSelect script hook for spell Id %u set object of wrong type, expected unit, got %s, effect %u", m_spellInfo->Id, target->GetGUID().GetTypeName(), effMask);
return;
}
break;
@@ -1191,7 +1191,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
AddGOTarget(gobjTarget, effMask);
else
{
//TC_LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: OnObjectTargetSelect script hook for spell Id %u set object of wrong type, expected gameobject, got %s, effect %u", m_spellInfo->Id, target->GetGUID().GetTypeName(), effMask);
//LOG_DEBUG("spells", "Spell::SelectImplicitNearbyTargets: OnObjectTargetSelect script hook for spell Id %u set object of wrong type, expected gameobject, got %s, effect %u", m_spellInfo->Id, target->GetGUID().GetTypeName(), effMask);
return;
}
break;

View File

@@ -1260,7 +1260,7 @@ public:
}
}
//TC_LOG_ERROR("scripts", "boss_romuloAI: DamageTaken reach end of code, that should not happen.");
//LOG_ERROR("scripts", "boss_romuloAI: DamageTaken reach end of code, that should not happen.");
}
void EnterCombat(Unit* /*who*/) override
@@ -1530,7 +1530,7 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32& dama
if (Phase == PHASE_ROMULO)
{
//TC_LOG_ERROR("scripts", "boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?");
//LOG_ERROR("scripts", "boss_julianneAI: cannot take damage in PHASE_ROMULO, why was i here?");
damage = 0;
return;
}
@@ -1564,7 +1564,7 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32& dama
return;
}
}
//TC_LOG_ERROR("scripts", "boss_julianneAI: DamageTaken reach end of code, that should not happen.");
//LOG_ERROR("scripts", "boss_julianneAI: DamageTaken reach end of code, that should not happen.");
}
void AddSC_bosses_opera()

View File

@@ -66,7 +66,7 @@ public:
}
}
//else
// TC_LOG_DEBUG("scripts", "Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");
// LOG_DEBUG("scripts", "Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");
return nullptr;
}

View File

@@ -237,7 +237,7 @@ public:
Acore::CreatureListSearcher<Acore::AllCreaturesOfEntryInRange> searcher(me, templist, check);
Cell::VisitGridObjects(me, searcher, me->GetGridActivationRange());
//TC_LOG_ERROR("scripts", "Eggs %d at middle", templist.size());
//LOG_ERROR("scripts", "Eggs %d at middle", templist.size());
if (templist.empty())
return false;
@@ -514,7 +514,7 @@ public:
Acore::CreatureListSearcher<Acore::AllCreaturesOfEntryInRange> searcher(me, templist, check);
Cell::VisitGridObjects(me, searcher, me->GetGridActivationRange());
//TC_LOG_ERROR("scripts", "Eggs %d at %d", templist.size(), side);
//LOG_ERROR("scripts", "Eggs %d at %d", templist.size(), side);
for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end() && num > 0; ++i)
if ((*i)->GetDisplayId() != 11686)

View File

@@ -256,7 +256,7 @@ public:
void UpdateAI(uint32 diff) override
{
//TC_LOG_INFO("scripts", "DEBUG: p(%i) k(%i) d(%u) W(%i)", Phase, KillCount, diff, WaitTimer);
//LOG_INFO("scripts", "DEBUG: p(%i) k(%i) d(%u) W(%i)", Phase, KillCount, diff, WaitTimer);
if (!QuestInProgress)
return;

View File

@@ -71,7 +71,7 @@ public:
break;
case GOSSIP_ACTION_INFO_DEF:
ai->Debug = !ai->Debug;
//TC_LOG_DEBUG("scripts", "HyjalAI - Debug mode has been toggled");
//LOG_DEBUG("scripts", "HyjalAI - Debug mode has been toggled");
break;
}
return true;
@@ -150,7 +150,7 @@ public:
break;
case GOSSIP_ACTION_INFO_DEF:
ai->Debug = !ai->Debug;
//TC_LOG_DEBUG("scripts", "HyjalAI - Debug mode has been toggled");
//LOG_DEBUG("scripts", "HyjalAI - Debug mode has been toggled");
break;
}
return true;

View File

@@ -556,7 +556,7 @@ void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3]
else
{
NextWaveTimer = 15000;
//TC_LOG_DEBUG("scripts", "HyjalAI: debug mode is enabled. Next Wave in 15 seconds");
//LOG_DEBUG("scripts", "HyjalAI: debug mode is enabled. Next Wave in 15 seconds");
}
}
else

View File

@@ -253,7 +253,7 @@ public:
break;
}
// TC_LOG_DEBUG("scripts", "Instance Hyjal: Instance data updated for event %u (Data=%u)", type, data);
// LOG_DEBUG("scripts", "Instance Hyjal: Instance data updated for event %u (Data=%u)", type, data);
if (data == DONE)
{