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
+1 -1
View File
@@ -322,7 +322,7 @@ namespace VMAP
// only non-tiled maps have them, and if so exactly one (so far at least...) // only non-tiled maps have them, and if so exactly one (so far at least...)
ModelSpawn spawn; ModelSpawn spawn;
#ifdef VMAP_DEBUG #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 #endif
if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn)) if (!iIsTiled && ModelSpawn::readFromFile(rf, spawn))
{ {
@@ -1809,7 +1809,7 @@ public:
if (WorldObject* obj = ObjectAccessor::GetWorldObject(*m_baseObject, *itr)) if (WorldObject* obj = ObjectAccessor::GetWorldObject(*m_baseObject, *itr))
m_objectList->push_back(obj); m_objectList->push_back(obj);
//else //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());
} }
} }
+1 -1
View File
@@ -10064,7 +10064,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uin
ConditionList conditions = sConditionMgr->GetConditionsForNpcVendorEvent(creature->GetEntry(), item); ConditionList conditions = sConditionMgr->GetConditionsForNpcVendorEvent(creature->GetEntry(), item);
if (!sConditionMgr->IsObjectMeetToConditions(this, creature, conditions)) 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); SendBuyError(BUY_ERR_CANT_FIND_ITEM, creature, item, 0);
return false; return false;
} }
@@ -1590,7 +1590,7 @@ QuestGiverStatus Player::GetQuestDialogStatus(Object* questgiver)
} }
default: default:
// it's impossible, but check // 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; return DIALOG_STATUS_NONE;
} }
@@ -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); 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 // Departure event
if (_currentFrame->IsTeleportFrame()) 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) 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); GetMap()->ScriptsStart(sEventScripts, eventid, this, this);
EventInform(eventid); EventInform(eventid);
} }
+4 -4
View File
@@ -86,13 +86,13 @@ void WorldSession::HandleSwapInvItemOpcode(WorldPacket& recvData)
if (_player->IsBankPos(INVENTORY_SLOT_BAG_0, srcslot) && !CanUseBank()) 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; return;
} }
if (_player->IsBankPos(INVENTORY_SLOT_BAG_0, dstslot) && !CanUseBank()) 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; return;
} }
@@ -149,13 +149,13 @@ void WorldSession::HandleSwapItem(WorldPacket& recvData)
if (_player->IsBankPos(srcbag, srcslot) && !CanUseBank()) 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; return;
} }
if (_player->IsBankPos(dstbag, dstslot) && !CanUseBank()) 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; return;
} }
+2 -2
View File
@@ -122,7 +122,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recv_data)
item = _player->GetItemByGuid(guid); item = _player->GetItemByGuid(guid);
if (!item || _player->IsBankPos(item->GetPos())) 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; return;
} }
} }
@@ -130,7 +130,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket& recv_data)
{ {
if (guid != _player->GetGUID() || menuId != _player->PlayerTalkClass->GetGossipMenu().GetMenuId()) 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; return;
} }
} }
+1 -1
View File
@@ -403,7 +403,7 @@ void WorldSession::HandleMovementOpcodes(WorldPacket& recvData)
{ {
sScriptMgr->AnticheatSetSkipOnePacketForASH(plrMover, true); sScriptMgr->AnticheatSetSkipOnePacketForASH(plrMover, true);
sScriptMgr->AnticheatUpdateMovementInfo(plrMover, movementInfo); 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 recvData.rfinish(); // prevent warnings spam
return; return;
+1 -1
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))) if (!IsGridLoaded(GridCoord(cell.data.Part.grid_x, cell.data.Part.grid_y)))
return; 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()); NGridType* ngrid = getNGrid(cell.GridX(), cell.GridY());
ASSERT(ngrid != nullptr); ASSERT(ngrid != nullptr);
@@ -84,7 +84,7 @@ void WaypointMgr::Load()
if (wp->move_type >= WAYPOINT_MOVE_TYPE_MAX) 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; delete wp;
continue; continue;
} }
@@ -145,7 +145,7 @@ void WaypointMgr::ReloadPath(uint32 id)
if (wp->move_type >= WAYPOINT_MOVE_TYPE_MAX) 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; delete wp;
continue; continue;
} }
+3 -3
View File
@@ -1160,7 +1160,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
CallScriptObjectTargetSelectHandlers(target, effIndex, targetType); CallScriptObjectTargetSelectHandlers(target, effIndex, targetType);
if (!target) 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; return;
} }
@@ -1181,7 +1181,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
} }
else 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; return;
} }
break; break;
@@ -1191,7 +1191,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
AddGOTarget(gobjTarget, effMask); AddGOTarget(gobjTarget, effMask);
else 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; return;
} }
break; break;
@@ -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 void EnterCombat(Unit* /*who*/) override
@@ -1530,7 +1530,7 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32& dama
if (Phase == PHASE_ROMULO) 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; damage = 0;
return; return;
} }
@@ -1564,7 +1564,7 @@ void boss_julianne::boss_julianneAI::DamageTaken(Unit* /*done_by*/, uint32& dama
return; 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() void AddSC_bosses_opera()
@@ -66,7 +66,7 @@ public:
} }
} }
//else //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; return nullptr;
} }
@@ -237,7 +237,7 @@ public:
Acore::CreatureListSearcher<Acore::AllCreaturesOfEntryInRange> searcher(me, templist, check); Acore::CreatureListSearcher<Acore::AllCreaturesOfEntryInRange> searcher(me, templist, check);
Cell::VisitGridObjects(me, searcher, me->GetGridActivationRange()); 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()) if (templist.empty())
return false; return false;
@@ -514,7 +514,7 @@ public:
Acore::CreatureListSearcher<Acore::AllCreaturesOfEntryInRange> searcher(me, templist, check); Acore::CreatureListSearcher<Acore::AllCreaturesOfEntryInRange> searcher(me, templist, check);
Cell::VisitGridObjects(me, searcher, me->GetGridActivationRange()); 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) for (std::list<Creature*>::const_iterator i = templist.begin(); i != templist.end() && num > 0; ++i)
if ((*i)->GetDisplayId() != 11686) if ((*i)->GetDisplayId() != 11686)
@@ -256,7 +256,7 @@ public:
void UpdateAI(uint32 diff) override 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) if (!QuestInProgress)
return; return;
@@ -71,7 +71,7 @@ public:
break; break;
case GOSSIP_ACTION_INFO_DEF: case GOSSIP_ACTION_INFO_DEF:
ai->Debug = !ai->Debug; ai->Debug = !ai->Debug;
//TC_LOG_DEBUG("scripts", "HyjalAI - Debug mode has been toggled"); //LOG_DEBUG("scripts", "HyjalAI - Debug mode has been toggled");
break; break;
} }
return true; return true;
@@ -150,7 +150,7 @@ public:
break; break;
case GOSSIP_ACTION_INFO_DEF: case GOSSIP_ACTION_INFO_DEF:
ai->Debug = !ai->Debug; ai->Debug = !ai->Debug;
//TC_LOG_DEBUG("scripts", "HyjalAI - Debug mode has been toggled"); //LOG_DEBUG("scripts", "HyjalAI - Debug mode has been toggled");
break; break;
} }
return true; return true;
@@ -556,7 +556,7 @@ void hyjalAI::SummonNextWave(const Wave wave[18], uint32 Count, float Base[4][3]
else else
{ {
NextWaveTimer = 15000; 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 else
@@ -253,7 +253,7 @@ public:
break; 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) if (data == DONE)
{ {