[9838] More log filters and macro uses.

* LogFilter_Weather
* LogFilter_PeriodicAffects
* LogFilter_PlayerMoves
* LogFilter_SQLText
* LogFilter_AIAndMovegens
* LogFilter_PlayerStats
This commit is contained in:
VladimirMangos 2010-05-05 01:21:55 +04:00
parent e83aa1ba9d
commit 722135b326
89 changed files with 996 additions and 997 deletions

View file

@ -406,8 +406,7 @@ void AchievementMgr::Reset()
void AchievementMgr::ResetAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1, uint32 miscvalue2)
{
if((sLog.getLogFilter() & LOG_FILTER_ACHIEVEMENT_UPDATES)==0)
sLog.outDetail("AchievementMgr::ResetAchievementCriteria(%u, %u, %u)", type, miscvalue1, miscvalue2);
DETAIL_FILTER_LOG(LOG_FILTER_ACHIEVEMENT_UPDATES, "AchievementMgr::ResetAchievementCriteria(%u, %u, %u)", type, miscvalue1, miscvalue2);
if (!sWorld.getConfig(CONFIG_BOOL_GM_ALLOW_ACHIEVEMENT_GAINS) && m_player->GetSession()->GetSecurity() > SEC_PLAYER)
return;
@ -696,8 +695,7 @@ static const uint32 achievIdForDangeon[][4] =
*/
void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscvalue1, uint32 miscvalue2, Unit *unit, uint32 time)
{
if((sLog.getLogFilter() & LOG_FILTER_ACHIEVEMENT_UPDATES)==0)
sLog.outDetail("AchievementMgr::UpdateAchievementCriteria(%u, %u, %u, %u)", type, miscvalue1, miscvalue2, time);
DETAIL_FILTER_LOG(LOG_FILTER_ACHIEVEMENT_UPDATES, "AchievementMgr::UpdateAchievementCriteria(%u, %u, %u, %u)", type, miscvalue1, miscvalue2, time);
if (!sWorld.getConfig(CONFIG_BOOL_GM_ALLOW_ACHIEVEMENT_GAINS) && m_player->GetSession()->GetSecurity() > SEC_PLAYER)
return;
@ -1708,8 +1706,7 @@ bool AchievementMgr::IsCompletedAchievement(AchievementEntry const* entry)
void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry, uint32 changeValue, ProgressType ptype)
{
if((sLog.getLogFilter() & LOG_FILTER_ACHIEVEMENT_UPDATES)==0)
sLog.outDetail("AchievementMgr::SetCriteriaProgress(%u, %u) for (GUID:%u)", entry->ID, changeValue, m_player->GetGUIDLow());
DETAIL_FILTER_LOG(LOG_FILTER_ACHIEVEMENT_UPDATES, "AchievementMgr::SetCriteriaProgress(%u, %u) for (GUID:%u)", entry->ID, changeValue, m_player->GetGUIDLow());
CriteriaProgress *progress = NULL;
@ -1770,7 +1767,7 @@ void AchievementMgr::SetCriteriaProgress(AchievementCriteriaEntry const* entry,
void AchievementMgr::CompletedAchievement(AchievementEntry const* achievement)
{
sLog.outDetail("AchievementMgr::CompletedAchievement(%u)", achievement->ID);
DETAIL_LOG("AchievementMgr::CompletedAchievement(%u)", achievement->ID);
if(achievement->flags & ACHIEVEMENT_FLAG_COUNTER || m_completedAchievements.find(achievement->ID)!=m_completedAchievements.end())
return;

View file

@ -71,7 +71,7 @@ void AggressorAI::EnterEvadeMode()
{
if (!m_creature->isAlive())
{
DEBUG_LOG("Creature stopped attacking, he is dead [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, he is dead [guid=%u]", m_creature->GetGUIDLow());
i_victimGuid = 0;
m_creature->CombatStop(true);
m_creature->DeleteThreatList();
@ -82,23 +82,23 @@ void AggressorAI::EnterEvadeMode()
if (!victim)
{
DEBUG_LOG("Creature stopped attacking, no victim [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, no victim [guid=%u]", m_creature->GetGUIDLow());
}
else if (!victim->isAlive())
{
DEBUG_LOG("Creature stopped attacking, victim is dead [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, victim is dead [guid=%u]", m_creature->GetGUIDLow());
}
else if (victim->HasStealthAura())
{
DEBUG_LOG("Creature stopped attacking, victim is in stealth [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, victim is in stealth [guid=%u]", m_creature->GetGUIDLow());
}
else if (victim->isInFlight())
{
DEBUG_LOG("Creature stopped attacking, victim is in flight [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, victim is in flight [guid=%u]", m_creature->GetGUIDLow());
}
else
{
DEBUG_LOG("Creature stopped attacking, victim out run him [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, victim out run him [guid=%u]", m_creature->GetGUIDLow());
//i_state = STATE_LOOK_AT_VICTIM;
//i_tracker.Reset(TIME_INTERVAL_LOOK);
}
@ -152,7 +152,6 @@ AggressorAI::AttackStart(Unit *u)
if(m_creature->Attack(u,true))
{
// DEBUG_LOG("Creature %s tagged a victim to kill [guid=%u]", m_creature->GetName(), u->GetGUIDLow());
i_victimGuid = u->GetGUID();
m_creature->AddThreat(u);

View file

@ -56,7 +56,7 @@ bool ArenaTeam::Create(uint64 captainGuid, uint32 type, std::string ArenaTeamNam
if(sObjectMgr.GetArenaTeamByName(ArenaTeamName)) // arena team with this name already exist
return false;
sLog.outDebug("GUILD: creating arena team %s to leader: %u", ArenaTeamName.c_str(), GUID_LOPART(captainGuid));
DEBUG_LOG("GUILD: creating arena team %s to leader: %u", ArenaTeamName.c_str(), GUID_LOPART(captainGuid));
m_CaptainGuid = captainGuid;
m_Name = ArenaTeamName;
@ -347,7 +347,7 @@ void ArenaTeam::Roster(WorldSession *session)
}
session->SendPacket(&data);
sLog.outDebug("WORLD: Sent SMSG_ARENA_TEAM_ROSTER");
DEBUG_LOG("WORLD: Sent SMSG_ARENA_TEAM_ROSTER");
}
void ArenaTeam::Query(WorldSession *session)
@ -362,7 +362,7 @@ void ArenaTeam::Query(WorldSession *session)
data << uint32(m_BorderStyle); // border style
data << uint32(m_BorderColor); // border color
session->SendPacket(&data);
sLog.outDebug("WORLD: Sent SMSG_ARENA_TEAM_QUERY_RESPONSE");
DEBUG_LOG("WORLD: Sent SMSG_ARENA_TEAM_QUERY_RESPONSE");
}
void ArenaTeam::Stats(WorldSession *session)
@ -448,7 +448,7 @@ void ArenaTeam::SetStats(uint32 stat_type, uint32 value)
CharacterDatabase.PExecute("UPDATE arena_team_stats SET rank = '%u' WHERE arenateamid = '%u'", value, GetId());
break;
default:
sLog.outDebug("unknown stat type in ArenaTeam::SetStats() %u", stat_type);
DEBUG_LOG("unknown stat type in ArenaTeam::SetStats() %u", stat_type);
break;
}
}
@ -491,7 +491,7 @@ void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, uint64 guid, uint8 strCoun
BroadcastPacket(&data);
sLog.outDebug("WORLD: Sent SMSG_ARENA_TEAM_EVENT");
DEBUG_LOG("WORLD: Sent SMSG_ARENA_TEAM_EVENT");
}
uint8 ArenaTeam::GetSlotByType( uint32 type )

View file

@ -28,11 +28,11 @@
void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recv_data)
{
sLog.outDebug("MSG_INSPECT_ARENA_TEAMS");
DEBUG_LOG("MSG_INSPECT_ARENA_TEAMS");
uint64 guid;
recv_data >> guid;
sLog.outDebug("Inspect Arena stats (GUID: %u TypeId: %u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
DEBUG_LOG("Inspect Arena stats (GUID: %u TypeId: %u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
if(Player *plr = sObjectMgr.GetPlayer(guid))
{
@ -49,7 +49,7 @@ void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recv_data)
void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket & recv_data)
{
sLog.outDebug( "WORLD: Received CMSG_ARENA_TEAM_QUERY" );
DEBUG_LOG( "WORLD: Received CMSG_ARENA_TEAM_QUERY" );
uint32 ArenaTeamId;
recv_data >> ArenaTeamId;
@ -63,7 +63,7 @@ void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket & recv_data)
void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket & recv_data)
{
sLog.outDebug( "WORLD: Received CMSG_ARENA_TEAM_ROSTER" );
DEBUG_LOG( "WORLD: Received CMSG_ARENA_TEAM_ROSTER" );
uint32 ArenaTeamId; // arena team id
recv_data >> ArenaTeamId;
@ -74,7 +74,7 @@ void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket & recv_data)
void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
{
sLog.outDebug("CMSG_ARENA_TEAM_INVITE");
DEBUG_LOG("CMSG_ARENA_TEAM_INVITE");
uint32 ArenaTeamId; // arena team id
std::string Invitedname;
@ -138,7 +138,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
return;
}
sLog.outDebug("Player %s Invited %s to Join his ArenaTeam", GetPlayer()->GetName(), Invitedname.c_str());
DEBUG_LOG("Player %s Invited %s to Join his ArenaTeam", GetPlayer()->GetName(), Invitedname.c_str());
player->SetArenaTeamIdInvited(arenateam->GetId());
@ -147,12 +147,12 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
data << arenateam->GetName();
player->GetSession()->SendPacket(&data);
sLog.outDebug("WORLD: Sent SMSG_ARENA_TEAM_INVITE");
DEBUG_LOG("WORLD: Sent SMSG_ARENA_TEAM_INVITE");
}
void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
{
sLog.outDebug("CMSG_ARENA_TEAM_ACCEPT"); // empty opcode
DEBUG_LOG("CMSG_ARENA_TEAM_ACCEPT"); // empty opcode
ArenaTeam *at = sObjectMgr.GetArenaTeamById(_player->GetArenaTeamIdInvited());
if(!at)
@ -185,14 +185,14 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
void WorldSession::HandleArenaTeamDeclineOpcode(WorldPacket & /*recv_data*/)
{
sLog.outDebug("CMSG_ARENA_TEAM_DECLINE"); // empty opcode
DEBUG_LOG("CMSG_ARENA_TEAM_DECLINE"); // empty opcode
_player->SetArenaTeamIdInvited(0); // no more invited
}
void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket & recv_data)
{
sLog.outDebug("CMSG_ARENA_TEAM_LEAVE");
DEBUG_LOG("CMSG_ARENA_TEAM_LEAVE");
uint32 ArenaTeamId; // arena team id
recv_data >> ArenaTeamId;
@ -227,7 +227,7 @@ void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket & recv_data)
void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recv_data)
{
sLog.outDebug("CMSG_ARENA_TEAM_DISBAND");
DEBUG_LOG("CMSG_ARENA_TEAM_DISBAND");
uint32 ArenaTeamId; // arena team id
recv_data >> ArenaTeamId;
@ -247,7 +247,7 @@ void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recv_data)
void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recv_data)
{
sLog.outDebug("CMSG_ARENA_TEAM_REMOVE");
DEBUG_LOG("CMSG_ARENA_TEAM_REMOVE");
uint32 ArenaTeamId;
std::string name;
@ -289,7 +289,7 @@ void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recv_data)
void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket & recv_data)
{
sLog.outDebug("CMSG_ARENA_TEAM_LEADER");
DEBUG_LOG("CMSG_ARENA_TEAM_LEADER");
uint32 ArenaTeamId;
std::string name;

View file

@ -41,7 +41,7 @@ void WorldSession::HandleAuctionHelloOpcode( WorldPacket & recv_data )
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_AUCTIONEER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleAuctionHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleAuctionHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
return;
}
@ -174,14 +174,14 @@ void WorldSession::HandleAuctionSellItem( WorldPacket & recv_data )
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!pCreature)
{
sLog.outDebug( "WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)) );
DEBUG_LOG( "WORLD: HandleAuctionSellItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)) );
return;
}
AuctionHouseEntry const* auctionHouseEntry = AuctionHouseMgr::GetAuctionHouseEntry(pCreature->getFaction());
if(!auctionHouseEntry)
{
sLog.outDebug( "WORLD: HandleAuctionSellItem - Unit (GUID: %u) has wrong faction.", uint32(GUID_LOPART(auctioneer)) );
DEBUG_LOG( "WORLD: HandleAuctionSellItem - Unit (GUID: %u) has wrong faction.", uint32(GUID_LOPART(auctioneer)) );
return;
}
@ -264,7 +264,7 @@ void WorldSession::HandleAuctionSellItem( WorldPacket & recv_data )
AH->deposit = deposit;
AH->auctionHouseEntry = auctionHouseEntry;
sLog.outDetail("selling item %u to auctioneer %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", GUID_LOPART(item), GUID_LOPART(auctioneer), bid, buyout, auction_time, AH->GetHouseId());
DETAIL_LOG("selling item %u to auctioneer %u with initial bid %u with buyout %u and with time %u (in sec) in auctionhouse %u", GUID_LOPART(item), GUID_LOPART(auctioneer), bid, buyout, auction_time, AH->GetHouseId());
auctionHouse->AddAuction(AH);
sAuctionMgr.AddAItem(it);
@ -297,7 +297,7 @@ void WorldSession::HandleAuctionPlaceBid( WorldPacket & recv_data )
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer,UNIT_NPC_FLAG_AUCTIONEER);
if (!pCreature)
{
sLog.outDebug( "WORLD: HandleAuctionPlaceBid - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)) );
DEBUG_LOG( "WORLD: HandleAuctionPlaceBid - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)) );
return;
}
@ -416,12 +416,12 @@ void WorldSession::HandleAuctionRemoveItem( WorldPacket & recv_data )
uint32 auctionId;
recv_data >> auctioneer;
recv_data >> auctionId;
//sLog.outDebug( "Cancel AUCTION AuctionID: %u", auctionId);
//DEBUG_LOG( "Cancel AUCTION AuctionID: %u", auctionId);
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(auctioneer, UNIT_NPC_FLAG_AUCTIONEER);
if (!pCreature)
{
sLog.outDebug( "WORLD: HandleAuctionRemoveItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)) );
DEBUG_LOG( "WORLD: HandleAuctionRemoveItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)) );
return;
}
@ -503,7 +503,7 @@ void WorldSession::HandleAuctionListBidderItems( WorldPacket & recv_data )
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_AUCTIONEER);
if (!pCreature)
{
sLog.outDebug( "WORLD: HandleAuctionListBidderItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleAuctionListBidderItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
return;
}
@ -550,7 +550,7 @@ void WorldSession::HandleAuctionListOwnerItems( WorldPacket & recv_data )
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
if (!pCreature)
{
sLog.outDebug( "WORLD: HandleAuctionListOwnerItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleAuctionListOwnerItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
return;
}
@ -594,7 +594,7 @@ void WorldSession::HandleAuctionListItems( WorldPacket & recv_data )
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_AUCTIONEER);
if (!pCreature)
{
sLog.outDebug( "WORLD: HandleAuctionListItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleAuctionListItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
return;
}
@ -604,7 +604,7 @@ void WorldSession::HandleAuctionListItems( WorldPacket & recv_data )
AuctionHouseObject* auctionHouse = sAuctionMgr.GetAuctionsMap( pCreature->getFaction() );
//sLog.outDebug("Auctionhouse search (GUID: %u TypeId: %u)", , list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u",
//DEBUG_LOG("Auctionhouse search (GUID: %u TypeId: %u)", , list from: %u, searchedname: %s, levelmin: %u, levelmax: %u, auctionSlotID: %u, auctionMainCategory: %u, auctionSubCategory: %u, quality: %u, usable: %u",
// GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)), listfrom, searchedname.c_str(), levelmin, levelmax, auctionSlotID, auctionMainCategory, auctionSubCategory, quality, usable);
WorldPacket data( SMSG_AUCTION_LIST_RESULT, (4+4+4) );
@ -632,7 +632,7 @@ void WorldSession::HandleAuctionListItems( WorldPacket & recv_data )
void WorldSession::HandleAuctionListPendingSales( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_AUCTION_LIST_PENDING_SALES");
DEBUG_LOG("CMSG_AUCTION_LIST_PENDING_SALES");
recv_data.read_skip<uint64>(); // auctioneer guid

View file

@ -133,7 +133,7 @@ void AuctionHouseMgr::SendAuctionWonMail( AuctionEntry *auction )
msgAuctionWonBody.width(16);
msgAuctionWonBody << std::right << std::hex << auction->owner;
msgAuctionWonBody << std::dec << ":" << auction->bid << ":" << auction->buyout;
sLog.outDebug( "AuctionWon body string : %s", msgAuctionWonBody.str().c_str() );
DEBUG_LOG( "AuctionWon body string : %s", msgAuctionWonBody.str().c_str() );
// set owner to bidder (to prevent delete item with sender char deleting)
// owner in `data` will set at mail receive and item extracting
@ -185,7 +185,7 @@ void AuctionHouseMgr::SendAuctionSalePendingMail( AuctionEntry * auction )
msgAuctionSalePendingBody << ":" << auction->deposit << ":" << auctionCut << ":0:";
msgAuctionSalePendingBody << secsToTimeBitFields(distrTime);
sLog.outDebug("AuctionSalePending body string : %s", msgAuctionSalePendingBody.str().c_str());
DEBUG_LOG("AuctionSalePending body string : %s", msgAuctionSalePendingBody.str().c_str());
MailDraft(msgAuctionSalePendingSubject.str(), msgAuctionSalePendingBody.str())
.SendMailTo(MailReceiver(owner,auction->owner), auction, MAIL_CHECK_MASK_COPIED);
@ -216,7 +216,7 @@ void AuctionHouseMgr::SendAuctionSuccessfulMail( AuctionEntry * auction )
auctionSuccessfulBody << std::dec << ":" << auction->bid << ":" << auction->buyout;
auctionSuccessfulBody << ":" << auction->deposit << ":" << auctionCut;
sLog.outDebug("AuctionSuccessful body string : %s", auctionSuccessfulBody.str().c_str());
DEBUG_LOG("AuctionSuccessful body string : %s", auctionSuccessfulBody.str().c_str());
uint32 profit = auction->bid + auction->deposit - auctionCut;

View file

@ -720,7 +720,7 @@ void BattleGround::EndBattleGround(uint32 winner)
winner_rating = winner_arena_team->GetStats().rating;
int32 winner_change = winner_arena_team->WonAgainst(loser_rating);
int32 loser_change = loser_arena_team->LostAgainst(winner_rating);
sLog.outDebug("--- Winner rating: %u, Loser rating: %u, Winner change: %u, Losser change: %u ---", winner_rating, loser_rating, winner_change, loser_change);
DEBUG_LOG("--- Winner rating: %u, Loser rating: %u, Winner change: %u, Losser change: %u ---", winner_rating, loser_rating, winner_change, loser_change);
SetArenaTeamRatingChangeForTeam(winner, winner_change);
SetArenaTeamRatingChangeForTeam(GetOtherTeam(winner), loser_change);
}
@ -1120,7 +1120,7 @@ void BattleGround::RemovePlayerAtLeave(uint64 guid, bool Transport, bool SendPac
if (Transport)
plr->TeleportToBGEntryPoint();
sLog.outDetail("BATTLEGROUND: Removed player %s from BattleGround.", plr->GetName());
DETAIL_LOG("BATTLEGROUND: Removed player %s from BattleGround.", plr->GetName());
}
//battleground object will be deleted next BattleGround::Update() call
@ -1243,7 +1243,7 @@ void BattleGround::AddPlayer(Player *plr)
AddOrSetPlayerToCorrectBgGroup(plr, guid, team);
// Log
sLog.outDetail("BATTLEGROUND: Player %s joined the battle.", plr->GetName());
DETAIL_LOG("BATTLEGROUND: Player %s joined the battle.", plr->GetName());
}
/* this method adds player to his team's bg group, or sets his correct group if player is already in bg group */

View file

@ -48,7 +48,7 @@ void BattleGroundAV::HandleKillPlayer(Player *player, Player *killer)
void BattleGroundAV::HandleKillUnit(Creature *creature, Player *killer)
{
sLog.outDebug("BattleGroundAV: HandleKillUnit %i", creature->GetEntry());
DEBUG_LOG("BattleGroundAV: HandleKillUnit %i", creature->GetEntry());
if (GetStatus() != STATUS_IN_PROGRESS)
return;
uint8 event1 = (sBattleGroundMgr.GetCreatureEventIndex(creature->GetDBTableGUIDLow())).event1;
@ -115,7 +115,7 @@ void BattleGroundAV::HandleQuestComplete(uint32 questid, Player *player)
reputation = 1;
if( m_Team_QuestStatus[team][0] == 500 || m_Team_QuestStatus[team][0] == 1000 || m_Team_QuestStatus[team][0] == 1500 ) //25,50,75 turn ins
{
sLog.outDebug("BattleGroundAV: Quest %i completed starting with unit upgrading..", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed starting with unit upgrading..", questid);
for (BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i <= BG_AV_NODES_FROSTWOLF_HUT; ++i)
if (m_Nodes[i].Owner == team && m_Nodes[i].State == POINT_CONTROLLED)
PopulateNode(i);
@ -126,14 +126,14 @@ void BattleGroundAV::HandleQuestComplete(uint32 questid, Player *player)
m_Team_QuestStatus[team][1]++;
reputation = 1;
if (m_Team_QuestStatus[team][1] == 120)
sLog.outDebug("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
break;
case BG_AV_QUEST_A_COMMANDER2:
case BG_AV_QUEST_H_COMMANDER2:
m_Team_QuestStatus[team][2]++;
reputation = 2;
if (m_Team_QuestStatus[team][2] == 60)
sLog.outDebug("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
break;
case BG_AV_QUEST_A_COMMANDER3:
case BG_AV_QUEST_H_COMMANDER3:
@ -141,7 +141,7 @@ void BattleGroundAV::HandleQuestComplete(uint32 questid, Player *player)
reputation = 5;
RewardReputationToTeam(team, 1, player->GetTeam());
if (m_Team_QuestStatus[team][1] == 30)
sLog.outDebug("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
break;
case BG_AV_QUEST_A_BOSS1:
case BG_AV_QUEST_H_BOSS1:
@ -152,7 +152,7 @@ void BattleGroundAV::HandleQuestComplete(uint32 questid, Player *player)
m_Team_QuestStatus[team][4]++;
reputation += 1;
if (m_Team_QuestStatus[team][4] >= 200)
sLog.outDebug("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
break;
case BG_AV_QUEST_A_NEAR_MINE:
case BG_AV_QUEST_H_NEAR_MINE:
@ -160,9 +160,9 @@ void BattleGroundAV::HandleQuestComplete(uint32 questid, Player *player)
reputation = 2;
if (m_Team_QuestStatus[team][5] == 28)
{
sLog.outDebug("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
if (m_Team_QuestStatus[team][6] == 7)
sLog.outDebug("BattleGroundAV: Quest %i completed (need to implement some events here - ground assault ready", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed (need to implement some events here - ground assault ready", questid);
}
break;
case BG_AV_QUEST_A_OTHER_MINE:
@ -171,9 +171,9 @@ void BattleGroundAV::HandleQuestComplete(uint32 questid, Player *player)
reputation = 3;
if (m_Team_QuestStatus[team][6] == 7)
{
sLog.outDebug("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
if (m_Team_QuestStatus[team][5] == 20)
sLog.outDebug("BattleGroundAV: Quest %i completed (need to implement some events here - ground assault ready", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed (need to implement some events here - ground assault ready", questid);
}
break;
case BG_AV_QUEST_A_RIDER_HIDE:
@ -182,9 +182,9 @@ void BattleGroundAV::HandleQuestComplete(uint32 questid, Player *player)
reputation = 1;
if (m_Team_QuestStatus[team][7] == 25)
{
sLog.outDebug("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
if (m_Team_QuestStatus[team][8] == 25)
sLog.outDebug("BattleGroundAV: Quest %i completed (need to implement some events here - rider assault ready", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed (need to implement some events here - rider assault ready", questid);
}
break;
case BG_AV_QUEST_A_RIDER_TAME:
@ -193,13 +193,13 @@ void BattleGroundAV::HandleQuestComplete(uint32 questid, Player *player)
reputation = 1;
if (m_Team_QuestStatus[team][8] == 25)
{
sLog.outDebug("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed (need to implement some events here", questid);
if (m_Team_QuestStatus[team][7] == 25)
sLog.outDebug("BattleGroundAV: Quest %i completed (need to implement some events here - rider assault ready", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed (need to implement some events here - rider assault ready", questid);
}
break;
default:
sLog.outDebug("BattleGroundAV: Quest %i completed but is not interesting for us", questid);
DEBUG_LOG("BattleGroundAV: Quest %i completed but is not interesting for us", questid);
return;
break;
}
@ -272,7 +272,7 @@ void BattleGroundAV::Update(uint32 diff)
void BattleGroundAV::StartingEventCloseDoors()
{
sLog.outDebug("BattleGroundAV: entering state STATUS_WAIT_JOIN ...");
DEBUG_LOG("BattleGroundAV: entering state STATUS_WAIT_JOIN ...");
}
void BattleGroundAV::StartingEventOpenDoors()
@ -326,7 +326,7 @@ void BattleGroundAV::EndBattleGround(uint32 winner)
RewardReputationToTeam(faction[i], tower_survived[i] * m_RepSurviveTower, team[i]);
RewardHonorToTeam(GetBonusHonorFromKill(tower_survived[i] * BG_AV_KILL_SURVIVING_TOWER), team[i]);
}
sLog.outDebug("BattleGroundAV: EndbattleGround: bgteam: %u towers:%u honor:%u rep:%u", i, tower_survived[i], GetBonusHonorFromKill(tower_survived[i] * BG_AV_KILL_SURVIVING_TOWER), tower_survived[i] * BG_AV_REP_SURVIVING_TOWER);
DEBUG_LOG("BattleGroundAV: EndbattleGround: bgteam: %u towers:%u honor:%u rep:%u", i, tower_survived[i], GetBonusHonorFromKill(tower_survived[i] * BG_AV_KILL_SURVIVING_TOWER), tower_survived[i] * BG_AV_REP_SURVIVING_TOWER);
if (graves_owned[i])
RewardReputationToTeam(faction[i], graves_owned[i] * m_RepOwnedGrave, team[i]);
if (mines_owned[i])
@ -379,7 +379,7 @@ void BattleGroundAV::HandleAreaTrigger(Player *Source, uint32 Trigger)
//Source->Unmount();
break;
default:
sLog.outDebug("BattleGroundAV: WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
DEBUG_LOG("BattleGroundAV: WARNING: Unhandled AreaTrigger in Battleground: %u", Trigger);
// Source->GetSession()->SendAreaTriggerMessage("Warning: Unhandled AreaTrigger in Battleground: %u", Trigger);
break;
}
@ -418,7 +418,7 @@ void BattleGroundAV::UpdatePlayerScore(Player* Source, uint32 type, uint32 value
void BattleGroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
{
sLog.outDebug("BattleGroundAV: player destroyed point node %i", node);
DEBUG_LOG("BattleGroundAV: player destroyed point node %i", node);
// despawn banner
DestroyNode(node);
@ -513,7 +513,7 @@ void BattleGroundAV::EventPlayerClickedOnFlag(Player *source, GameObject* target
{
if (GetStatus() != STATUS_IN_PROGRESS)
return;
sLog.outDebug("BattleGroundAV: using gameobject %i", target_obj->GetEntry());
DEBUG_LOG("BattleGroundAV: using gameobject %i", target_obj->GetEntry());
uint8 event = (sBattleGroundMgr.GetGameObjectEventIndex(target_obj->GetDBTableGUIDLow())).event1;
if (event >= BG_AV_NODES_MAX) // not a node
return;
@ -547,7 +547,7 @@ void BattleGroundAV::EventPlayerDefendsPoint(Player* player, BG_AV_Nodes node)
EventPlayerAssaultsPoint(player, node);
return;
}
sLog.outDebug("BattleGroundAV: player defends node: %i", node);
DEBUG_LOG("BattleGroundAV: player defends node: %i", node);
if (m_Nodes[node].PrevOwner != team)
{
sLog.outError("BattleGroundAV: player defends point which doesn't belong to his team %i", node);
@ -581,7 +581,7 @@ void BattleGroundAV::EventPlayerAssaultsPoint(Player* player, BG_AV_Nodes node)
{
// TODO implement quest 7101, 7081
uint32 team = GetTeamIndexByTeamId(player->GetTeam());
sLog.outDebug("BattleGroundAV: player assaults node %i", node);
DEBUG_LOG("BattleGroundAV: player assaults node %i", node);
if (m_Nodes[node].Owner == team || team == m_Nodes[node].TotalOwner)
return;

View file

@ -37,7 +37,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
sLog.outDebug("WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
DEBUG_LOG("WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
Creature *pCreature = GetPlayer()->GetMap()->GetCreature(guid);
@ -95,7 +95,7 @@ void WorldSession::HandleBattlemasterJoinOpcode( WorldPacket & recv_data )
BattleGroundTypeId bgTypeId = BattleGroundTypeId(bgTypeId_);
sLog.outDebug( "WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
DEBUG_LOG( "WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
// can do this, since it's battleground, not arena
BattleGroundQueueTypeId bgQueueTypeId = BattleGroundMgr::BGQueueTypeId(bgTypeId, 0);
@ -163,7 +163,7 @@ void WorldSession::HandleBattlemasterJoinOpcode( WorldPacket & recv_data )
if(err > 0)
{
sLog.outDebug("Battleground: the following players are joining as group:");
DEBUG_LOG("Battleground: the following players are joining as group:");
ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, 0, false, isPremade, 0);
avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
}
@ -191,9 +191,9 @@ void WorldSession::HandleBattlemasterJoinOpcode( WorldPacket & recv_data )
member->GetSession()->SendPacket(&data);
sBattleGroundMgr.BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
sLog.outDebug("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,member->GetGUIDLow(), member->GetName());
DEBUG_LOG("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,member->GetGUIDLow(), member->GetName());
}
sLog.outDebug("Battleground: group end");
DEBUG_LOG("Battleground: group end");
}
else
{
@ -206,7 +206,7 @@ void WorldSession::HandleBattlemasterJoinOpcode( WorldPacket & recv_data )
// send status packet (in queue)
sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, ginfo->ArenaType);
SendPacket(&data);
sLog.outDebug("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName());
DEBUG_LOG("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName());
}
sBattleGroundMgr.ScheduleQueueUpdate(0, 0, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
}
@ -214,7 +214,7 @@ void WorldSession::HandleBattlemasterJoinOpcode( WorldPacket & recv_data )
void WorldSession::HandleBattleGroundPlayerPositionsOpcode( WorldPacket & /*recv_data*/ )
{
// empty opcode
sLog.outDebug("WORLD: Recvd MSG_BATTLEGROUND_PLAYER_POSITIONS Message");
DEBUG_LOG("WORLD: Recvd MSG_BATTLEGROUND_PLAYER_POSITIONS Message");
BattleGround *bg = _player->GetBattleGround();
if(!bg) // can't be received if player not in battleground
@ -281,7 +281,7 @@ void WorldSession::HandleBattleGroundPlayerPositionsOpcode( WorldPacket & /*recv
void WorldSession::HandlePVPLogDataOpcode( WorldPacket & /*recv_data*/ )
{
sLog.outDebug( "WORLD: Recvd MSG_PVP_LOG_DATA Message");
DEBUG_LOG( "WORLD: Recvd MSG_PVP_LOG_DATA Message");
BattleGround *bg = _player->GetBattleGround();
if (!bg)
@ -291,12 +291,12 @@ void WorldSession::HandlePVPLogDataOpcode( WorldPacket & /*recv_data*/ )
sBattleGroundMgr.BuildPvpLogDataPacket(&data, bg);
SendPacket(&data);
sLog.outDebug( "WORLD: Sent MSG_PVP_LOG_DATA Message");
DEBUG_LOG( "WORLD: Sent MSG_PVP_LOG_DATA Message");
}
void WorldSession::HandleBattlefieldListOpcode( WorldPacket &recv_data )
{
sLog.outDebug( "WORLD: Recvd CMSG_BATTLEFIELD_LIST Message");
DEBUG_LOG( "WORLD: Recvd CMSG_BATTLEFIELD_LIST Message");
uint32 bgTypeId;
recv_data >> bgTypeId; // id from DBC
@ -321,7 +321,7 @@ void WorldSession::HandleBattlefieldListOpcode( WorldPacket &recv_data )
void WorldSession::HandleBattleFieldPortOpcode( WorldPacket &recv_data )
{
sLog.outDebug( "WORLD: Recvd CMSG_BATTLEFIELD_PORT Message");
DEBUG_LOG( "WORLD: Recvd CMSG_BATTLEFIELD_PORT Message");
uint8 type; // arenatype if arena
uint8 unk2; // unk, can be 0x0 (may be if was invited?) and 0x1
@ -387,7 +387,7 @@ void WorldSession::HandleBattleFieldPortOpcode( WorldPacket &recv_data )
sBattleGroundMgr.BuildGroupJoinedBattlegroundPacket(&data2, ERR_GROUP_JOIN_BATTLEGROUND_DESERTERS);
_player->GetSession()->SendPacket(&data2);
action = 0;
sLog.outDebug("Battleground: player %s (%u) has a deserter debuff, do not port him to battleground!", _player->GetName(), _player->GetGUIDLow());
DEBUG_LOG("Battleground: player %s (%u) has a deserter debuff, do not port him to battleground!", _player->GetName(), _player->GetGUIDLow());
}
//if player don't match battleground max level, then do not allow him to enter! (this might happen when player leveled up during his waiting in queue
if (_player->getLevel() > bg->GetMaxLevel())
@ -438,7 +438,7 @@ void WorldSession::HandleBattleFieldPortOpcode( WorldPacket &recv_data )
sBattleGroundMgr.SendToBattleGround(_player, ginfo.IsInvitedToBGInstanceGUID, bgTypeId);
// add only in HandleMoveWorldPortAck()
// bg->AddPlayer(_player,team);
sLog.outDebug("Battleground: player %s (%u) joined battle for bg %u, bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetInstanceID(), bg->GetTypeID(), bgQueueTypeId);
DEBUG_LOG("Battleground: player %s (%u) joined battle for bg %u, bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetInstanceID(), bg->GetTypeID(), bgQueueTypeId);
break;
case 0: // leave queue
// if player leaves rated arena match before match start, it is counted as he played but he lost
@ -447,7 +447,7 @@ void WorldSession::HandleBattleFieldPortOpcode( WorldPacket &recv_data )
ArenaTeam * at = sObjectMgr.GetArenaTeamById(ginfo.Team);
if (at)
{
sLog.outDebug("UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating);
DEBUG_LOG("UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating);
at->MemberLost(_player, ginfo.OpponentsTeamRating);
at->SaveToDB();
}
@ -459,7 +459,7 @@ void WorldSession::HandleBattleFieldPortOpcode( WorldPacket &recv_data )
if (!ginfo.ArenaType)
sBattleGroundMgr.ScheduleQueueUpdate(ginfo.ArenaTeamRating, ginfo.ArenaType, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
SendPacket(&data);
sLog.outDebug("Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId);
DEBUG_LOG("Battleground: player %s (%u) left queue for bgtype %u, queue type %u.", _player->GetName(), _player->GetGUIDLow(), bg->GetTypeID(), bgQueueTypeId);
break;
default:
sLog.outError("Battleground port: unknown action %u", action);
@ -469,7 +469,7 @@ void WorldSession::HandleBattleFieldPortOpcode( WorldPacket &recv_data )
void WorldSession::HandleLeaveBattlefieldOpcode( WorldPacket& recv_data )
{
sLog.outDebug( "WORLD: Recvd CMSG_LEAVE_BATTLEFIELD Message");
DEBUG_LOG( "WORLD: Recvd CMSG_LEAVE_BATTLEFIELD Message");
recv_data.read_skip<uint8>(); // unk1
recv_data.read_skip<uint8>(); // unk2
@ -491,7 +491,7 @@ void WorldSession::HandleLeaveBattlefieldOpcode( WorldPacket& recv_data )
void WorldSession::HandleBattlefieldStatusOpcode( WorldPacket & /*recv_data*/ )
{
// empty opcode
sLog.outDebug( "WORLD: Battleground status" );
DEBUG_LOG( "WORLD: Battleground status" );
WorldPacket data;
// we must update all queues here
@ -554,7 +554,7 @@ void WorldSession::HandleBattlefieldStatusOpcode( WorldPacket & /*recv_data*/ )
void WorldSession::HandleAreaSpiritHealerQueryOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY");
DEBUG_LOG("WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY");
BattleGround *bg = _player->GetBattleGround();
if (!bg)
@ -575,7 +575,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode( WorldPacket & recv_data )
void WorldSession::HandleAreaSpiritHealerQueueOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE");
DEBUG_LOG("WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE");
BattleGround *bg = _player->GetBattleGround();
if (!bg)
@ -596,7 +596,7 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode( WorldPacket & recv_data )
void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");
DEBUG_LOG("WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");
//recv_data.hexlike();
uint64 guid; // arena Battlemaster guid
@ -716,9 +716,9 @@ void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
if(err > 0)
{
sLog.outDebug("Battleground: arena join as group start");
DEBUG_LOG("Battleground: arena join as group start");
if (isRated)
sLog.outDebug("Battleground: arena team id %u, leader %s queued with rating %u for type %u",_player->GetArenaTeamId(arenaslot),_player->GetName(),arenaRating,arenatype);
DEBUG_LOG("Battleground: arena team id %u, leader %s queued with rating %u for type %u",_player->GetArenaTeamId(arenaslot),_player->GetName(),arenaRating,arenatype);
GroupQueueInfo * ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, arenatype, isRated, false, arenaRating, ateamId);
avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
@ -747,9 +747,9 @@ void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
member->GetSession()->SendPacket(&data);
sBattleGroundMgr.BuildGroupJoinedBattlegroundPacket(&data, err);
member->GetSession()->SendPacket(&data);
sLog.outDebug("Battleground: player joined queue for arena as group bg queue type %u bg type %u: GUID %u, NAME %s", bgQueueTypeId, bgTypeId, member->GetGUIDLow(), member->GetName());
DEBUG_LOG("Battleground: player joined queue for arena as group bg queue type %u bg type %u: GUID %u, NAME %s", bgQueueTypeId, bgTypeId, member->GetGUIDLow(), member->GetName());
}
sLog.outDebug("Battleground: arena join as group end");
DEBUG_LOG("Battleground: arena join as group end");
}
else
{
@ -761,7 +761,7 @@ void WorldSession::HandleBattlemasterJoinArena( WorldPacket & recv_data )
// send status packet (in queue)
sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_QUEUE, avgTime, 0, arenatype);
SendPacket(&data);
sLog.outDebug("Battleground: player joined queue for arena, skirmish, bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName());
DEBUG_LOG("Battleground: player joined queue for arena, skirmish, bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName());
}
sBattleGroundMgr.ScheduleQueueUpdate(arenaRating, arenatype, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
}
@ -774,11 +774,11 @@ void WorldSession::HandleReportPvPAFK( WorldPacket & recv_data )
if (!reportedPlayer)
{
sLog.outDebug("WorldSession::HandleReportPvPAFK: player not found");
DEBUG_LOG("WorldSession::HandleReportPvPAFK: player not found");
return;
}
sLog.outDebug("WorldSession::HandleReportPvPAFK: %s reported %s", _player->GetName(), reportedPlayer->GetName());
DEBUG_LOG("WorldSession::HandleReportPvPAFK: %s reported %s", _player->GetName(), reportedPlayer->GetName());
reportedPlayer->ReportedAfkBy(_player);
}

View file

@ -173,7 +173,7 @@ GroupQueueInfo * BattleGroundQueue::AddGroup(Player *leader, Group* grp, BattleG
index += BG_TEAMS_COUNT;
if (ginfo->Team == HORDE)
index++;
sLog.outDebug("Adding Group to BattleGroundQueue bgTypeId : %u, bracket_id : %u, index : %u", BgTypeId, bracketId, index);
DEBUG_LOG("Adding Group to BattleGroundQueue bgTypeId : %u, bracket_id : %u, index : %u", BgTypeId, bracketId, index);
uint32 lastOnlineTime = getMSTime();
@ -348,7 +348,7 @@ void BattleGroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou
sLog.outError("BattleGroundQueue: ERROR Cannot find groupinfo for player GUID: %u", GUID_LOPART(guid));
return;
}
sLog.outDebug("BattleGroundQueue: Removing player GUID %u, from bracket_id %u", GUID_LOPART(guid), (uint32)bracket_id);
DEBUG_LOG("BattleGroundQueue: Removing player GUID %u, from bracket_id %u", GUID_LOPART(guid), (uint32)bracket_id);
// ALL variables are correctly set
// We can ignore leveling up in queue - it should not cause crash
@ -381,7 +381,7 @@ void BattleGroundQueue::RemovePlayer(const uint64& guid, bool decreaseInvitedCou
ArenaTeam * at = sObjectMgr.GetArenaTeamById(group->ArenaTeamId);
if (at)
{
sLog.outDebug("UPDATING memberLost's personal arena rating for %u by opponents rating: %u", GUID_LOPART(guid), group->OpponentsTeamRating);
DEBUG_LOG("UPDATING memberLost's personal arena rating for %u by opponents rating: %u", GUID_LOPART(guid), group->OpponentsTeamRating);
Player *plr = sObjectMgr.GetPlayer(guid);
if (plr)
at->MemberLost(plr, group->OpponentsTeamRating);
@ -490,7 +490,7 @@ bool BattleGroundQueue::InviteGroupToBG(GroupQueueInfo * ginfo, BattleGround * b
uint32 queueSlot = plr->GetBattleGroundQueueIndex(bgQueueTypeId);
sLog.outDebug("Battleground: invited plr %s (%u) to BG instance %u queueindex %u bgtype %u, I can't help it if they don't press the enter battle button.",plr->GetName(),plr->GetGUIDLow(),bg->GetInstanceID(),queueSlot,bg->GetTypeID());
DEBUG_LOG("Battleground: invited plr %s (%u) to BG instance %u queueindex %u bgtype %u, I can't help it if they don't press the enter battle button.",plr->GetName(),plr->GetGUIDLow(),bg->GetInstanceID(),queueSlot,bg->GetTypeID());
// send status packet
sBattleGroundMgr.BuildBattleGroundStatusPacket(&data, bg, queueSlot, STATUS_WAIT_JOIN, INVITE_ACCEPT_WAIT_TIME, 0, ginfo->ArenaType);
@ -1002,9 +1002,9 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BattleGroundBracketI
}
(*(itr_team[BG_TEAM_ALLIANCE]))->OpponentsTeamRating = (*(itr_team[BG_TEAM_HORDE]))->ArenaTeamRating;
sLog.outDebug("setting oposite teamrating for team %u to %u", (*(itr_team[BG_TEAM_ALLIANCE]))->ArenaTeamId, (*(itr_team[BG_TEAM_ALLIANCE]))->OpponentsTeamRating);
DEBUG_LOG("setting oposite teamrating for team %u to %u", (*(itr_team[BG_TEAM_ALLIANCE]))->ArenaTeamId, (*(itr_team[BG_TEAM_ALLIANCE]))->OpponentsTeamRating);
(*(itr_team[BG_TEAM_HORDE]))->OpponentsTeamRating = (*(itr_team[BG_TEAM_ALLIANCE]))->ArenaTeamRating;
sLog.outDebug("setting oposite teamrating for team %u to %u", (*(itr_team[BG_TEAM_HORDE]))->ArenaTeamId, (*(itr_team[BG_TEAM_HORDE]))->OpponentsTeamRating);
DEBUG_LOG("setting oposite teamrating for team %u to %u", (*(itr_team[BG_TEAM_HORDE]))->ArenaTeamId, (*(itr_team[BG_TEAM_HORDE]))->OpponentsTeamRating);
// now we must move team if we changed its faction to another faction queue, because then we will spam log by errors in Queue::RemovePlayer
if ((*(itr_team[BG_TEAM_ALLIANCE]))->Team != ALLIANCE)
{
@ -1024,7 +1024,7 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, BattleGroundBracketI
InviteGroupToBG(*(itr_team[BG_TEAM_ALLIANCE]), arena, ALLIANCE);
InviteGroupToBG(*(itr_team[BG_TEAM_HORDE]), arena, HORDE);
sLog.outDebug("Starting rated arena match!");
DEBUG_LOG("Starting rated arena match!");
arena->StartBattleGround();
}
@ -1096,7 +1096,7 @@ bool BGQueueRemoveEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
BattleGroundQueue &bgQueue = sBattleGroundMgr.m_BattleGroundQueues[m_BgQueueTypeId];
if (bgQueue.IsPlayerInvited(m_PlayerGuid, m_BgInstanceGUID, m_RemoveTime))
{
sLog.outDebug("Battleground: removing player %u from bg queue for instance %u because of not pressing enter battle in time.",plr->GetGUIDLow(),m_BgInstanceGUID);
DEBUG_LOG("Battleground: removing player %u from bg queue for instance %u because of not pressing enter battle in time.",plr->GetGUIDLow(),m_BgInstanceGUID);
plr->RemoveBattleGroundQueueId(m_BgQueueTypeId);
bgQueue.RemovePlayer(m_PlayerGuid, true);
@ -1184,7 +1184,7 @@ void BattleGroundMgr::Update(uint32 diff)
if (m_NextRatingDiscardUpdate < diff)
{
// forced update for rated arenas (scan all, but skipped non rated)
sLog.outDebug("BattleGroundMgr: UPDATING ARENA QUEUES");
DEBUG_LOG("BattleGroundMgr: UPDATING ARENA QUEUES");
for(int qtype = BATTLEGROUND_QUEUE_2v2; qtype <= BATTLEGROUND_QUEUE_5v5; ++qtype)
for(int bracket = BG_BRACKET_ID_FIRST; bracket < MAX_BATTLEGROUND_BRACKETS; ++bracket)
m_BattleGroundQueues[qtype].Update(
@ -1273,7 +1273,7 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg)
*data << uint32(bg->m_ArenaTeamRatingChanges[i]);
*data << uint32(3999); // huge thanks for TOM_RUS for this!
*data << uint32(0); // added again in 3.1
sLog.outDebug("rating change: %d", bg->m_ArenaTeamRatingChanges[i]);
DEBUG_LOG("rating change: %d", bg->m_ArenaTeamRatingChanges[i]);
}
for(int i = 1; i >= 0; --i)
{
@ -1357,7 +1357,7 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg)
*data << (int32)0; // 0
break;
default:
sLog.outDebug("Unhandled MSG_PVP_LOG_DATA for BG id %u", bg->GetTypeID());
DEBUG_LOG("Unhandled MSG_PVP_LOG_DATA for BG id %u", bg->GetTypeID());
*data << (int32)0;
break;
}
@ -1711,11 +1711,11 @@ void BattleGroundMgr::InitAutomaticArenaPointDistribution()
{
if (sWorld.getConfig(CONFIG_BOOL_ARENA_AUTO_DISTRIBUTE_POINTS))
{
sLog.outDebug("Initializing Automatic Arena Point Distribution");
DEBUG_LOG("Initializing Automatic Arena Point Distribution");
QueryResult * result = CharacterDatabase.Query("SELECT NextArenaPointDistributionTime FROM saved_variables");
if (!result)
{
sLog.outDebug("Battleground: Next arena point distribution time not found in SavedVariables, reseting it now.");
DEBUG_LOG("Battleground: Next arena point distribution time not found in SavedVariables, reseting it now.");
m_NextAutoDistributionTime = time_t(sWorld.GetGameTime() + BATTLEGROUND_ARENA_POINT_DISTRIBUTION_DAY * sWorld.getConfig(CONFIG_UINT32_ARENA_AUTO_DISTRIBUTE_INTERVAL_DAYS));
CharacterDatabase.PExecute("INSERT INTO saved_variables (NextArenaPointDistributionTime) VALUES ('"UI64FMTD"')", uint64(m_NextAutoDistributionTime));
}
@ -1724,7 +1724,7 @@ void BattleGroundMgr::InitAutomaticArenaPointDistribution()
m_NextAutoDistributionTime = time_t((*result)[0].GetUInt64());
delete result;
}
sLog.outDebug("Automatic Arena Point Distribution initialized.");
DEBUG_LOG("Automatic Arena Point Distribution initialized.");
}
}
@ -1846,7 +1846,7 @@ void BattleGroundMgr::SendToBattleGround(Player *pl, uint32 instanceId, BattleGr
team = pl->GetTeam();
bg->GetTeamStartLoc(team, x, y, z, O);
sLog.outDetail("BATTLEGROUND: Sending %s to map %u, X %f, Y %f, Z %f, O %f", pl->GetName(), mapid, x, y, z, O);
DETAIL_LOG("BATTLEGROUND: Sending %s to map %u, X %f, Y %f, Z %f, O %f", pl->GetName(), mapid, x, y, z, O);
pl->TeleportTo(mapid, x, y, z, O);
}
else

View file

@ -117,13 +117,13 @@ void BattleGroundWS::RespawnFlag(uint32 Team, bool captured)
{
if (Team == ALLIANCE)
{
sLog.outDebug("Respawn Alliance flag");
DEBUG_LOG("Respawn Alliance flag");
m_FlagState[BG_TEAM_ALLIANCE] = BG_WS_FLAG_STATE_ON_BASE;
SpawnEvent(WS_EVENT_FLAG_A, 0, true);
}
else
{
sLog.outDebug("Respawn Horde flag");
DEBUG_LOG("Respawn Horde flag");
m_FlagState[BG_TEAM_HORDE] = BG_WS_FLAG_STATE_ON_BASE;
SpawnEvent(WS_EVENT_FLAG_H, 0, true);
}

View file

@ -26,7 +26,7 @@
void WorldSession::HandleCalendarGetCalendar(WorldPacket &/*recv_data*/)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_GET_CALENDAR"); // empty
DEBUG_LOG("WORLD: CMSG_CALENDAR_GET_CALENDAR"); // empty
time_t cur_time = time(NULL);
@ -64,21 +64,21 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket &/*recv_data*/)
data << (uint32) 1135753200; //wtf?? (28.12.2005 12:00)
data << (uint32) 0; // unk counter 4
data << (uint32) 0; // unk counter 5
//sLog.outDebug("Sending calendar");
//DEBUG_LOG("Sending calendar");
//data.hexlike();
SendPacket(&data);
}
void WorldSession::HandleCalendarGetEvent(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_GET_EVENT");
DEBUG_LOG("WORLD: CMSG_CALENDAR_GET_EVENT");
recv_data.hexlike();
recv_data.read_skip<uint64>(); // unk
}
void WorldSession::HandleCalendarGuildFilter(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_GUILD_FILTER");
DEBUG_LOG("WORLD: CMSG_CALENDAR_GUILD_FILTER");
recv_data.hexlike();
recv_data.read_skip<uint32>(); // unk1
recv_data.read_skip<uint32>(); // unk2
@ -87,14 +87,14 @@ void WorldSession::HandleCalendarGuildFilter(WorldPacket &recv_data)
void WorldSession::HandleCalendarArenaTeam(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_ARENA_TEAM");
DEBUG_LOG("WORLD: CMSG_CALENDAR_ARENA_TEAM");
recv_data.hexlike();
recv_data.read_skip<uint32>(); // unk
}
void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_ADD_EVENT");
DEBUG_LOG("WORLD: CMSG_CALENDAR_ADD_EVENT");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@ -130,7 +130,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data)
void WorldSession::HandleCalendarUpdateEvent(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_UPDATE_EVENT");
DEBUG_LOG("WORLD: CMSG_CALENDAR_UPDATE_EVENT");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@ -149,7 +149,7 @@ void WorldSession::HandleCalendarUpdateEvent(WorldPacket &recv_data)
void WorldSession::HandleCalendarRemoveEvent(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_REMOVE_EVENT");
DEBUG_LOG("WORLD: CMSG_CALENDAR_REMOVE_EVENT");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@ -161,7 +161,7 @@ void WorldSession::HandleCalendarRemoveEvent(WorldPacket &recv_data)
void WorldSession::HandleCalendarCopyEvent(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_COPY_EVENT");
DEBUG_LOG("WORLD: CMSG_CALENDAR_COPY_EVENT");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@ -173,7 +173,7 @@ void WorldSession::HandleCalendarCopyEvent(WorldPacket &recv_data)
void WorldSession::HandleCalendarEventInvite(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_INVITE");
DEBUG_LOG("WORLD: CMSG_CALENDAR_EVENT_INVITE");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@ -187,7 +187,7 @@ void WorldSession::HandleCalendarEventInvite(WorldPacket &recv_data)
void WorldSession::HandleCalendarEventRsvp(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_RSVP");
DEBUG_LOG("WORLD: CMSG_CALENDAR_EVENT_RSVP");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@ -199,7 +199,7 @@ void WorldSession::HandleCalendarEventRsvp(WorldPacket &recv_data)
void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_REMOVE_INVITE");
DEBUG_LOG("WORLD: CMSG_CALENDAR_EVENT_REMOVE_INVITE");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@ -211,7 +211,7 @@ void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket &recv_data)
void WorldSession::HandleCalendarEventStatus(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_STATUS");
DEBUG_LOG("WORLD: CMSG_CALENDAR_EVENT_STATUS");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@ -224,7 +224,7 @@ void WorldSession::HandleCalendarEventStatus(WorldPacket &recv_data)
void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_MODERATOR_STATUS");
DEBUG_LOG("WORLD: CMSG_CALENDAR_EVENT_MODERATOR_STATUS");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@ -237,7 +237,7 @@ void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket &recv_data)
void WorldSession::HandleCalendarComplain(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_COMPLAIN");
DEBUG_LOG("WORLD: CMSG_CALENDAR_COMPLAIN");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@ -248,7 +248,7 @@ void WorldSession::HandleCalendarComplain(WorldPacket &recv_data)
void WorldSession::HandleCalendarGetNumPending(WorldPacket & /*recv_data*/)
{
sLog.outDebug("WORLD: CMSG_CALENDAR_GET_NUM_PENDING"); // empty
DEBUG_LOG("WORLD: CMSG_CALENDAR_GET_NUM_PENDING"); // empty
WorldPacket data(SMSG_CALENDAR_SEND_NUM_PENDING, 4);
data << uint32(0); // 0 - no pending invites, 1 - some pending invites

View file

@ -21,7 +21,7 @@
void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
uint32 channel_id;
uint8 unknown1, unknown2;
@ -41,7 +41,7 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
void WorldSession::HandleLeaveChannel(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
uint32 unk;
@ -62,7 +62,7 @@ void WorldSession::HandleLeaveChannel(WorldPacket& recvPacket)
void WorldSession::HandleChannelList(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname;
recvPacket >> channelname;
@ -74,7 +74,7 @@ void WorldSession::HandleChannelList(WorldPacket& recvPacket)
void WorldSession::HandleChannelPassword(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, pass;
recvPacket >> channelname;
@ -88,7 +88,7 @@ void WorldSession::HandleChannelPassword(WorldPacket& recvPacket)
void WorldSession::HandleChannelSetOwner(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, newp;
recvPacket >> channelname;
@ -105,7 +105,7 @@ void WorldSession::HandleChannelSetOwner(WorldPacket& recvPacket)
void WorldSession::HandleChannelOwner(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname;
recvPacket >> channelname;
@ -116,7 +116,7 @@ void WorldSession::HandleChannelOwner(WorldPacket& recvPacket)
void WorldSession::HandleChannelModerator(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
recvPacket >> channelname;
@ -133,7 +133,7 @@ void WorldSession::HandleChannelModerator(WorldPacket& recvPacket)
void WorldSession::HandleChannelUnmoderator(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
recvPacket >> channelname;
@ -150,7 +150,7 @@ void WorldSession::HandleChannelUnmoderator(WorldPacket& recvPacket)
void WorldSession::HandleChannelMute(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
recvPacket >> channelname;
@ -167,7 +167,7 @@ void WorldSession::HandleChannelMute(WorldPacket& recvPacket)
void WorldSession::HandleChannelUnmute(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
@ -185,7 +185,7 @@ void WorldSession::HandleChannelUnmute(WorldPacket& recvPacket)
void WorldSession::HandleChannelInvite(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
recvPacket >> channelname;
@ -202,7 +202,7 @@ void WorldSession::HandleChannelInvite(WorldPacket& recvPacket)
void WorldSession::HandleChannelKick(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
recvPacket >> channelname;
@ -218,7 +218,7 @@ void WorldSession::HandleChannelKick(WorldPacket& recvPacket)
void WorldSession::HandleChannelBan(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
recvPacket >> channelname;
@ -235,7 +235,7 @@ void WorldSession::HandleChannelBan(WorldPacket& recvPacket)
void WorldSession::HandleChannelUnban(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
@ -253,7 +253,7 @@ void WorldSession::HandleChannelUnban(WorldPacket& recvPacket)
void WorldSession::HandleChannelAnnouncements(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname;
recvPacket >> channelname;
@ -264,7 +264,7 @@ void WorldSession::HandleChannelAnnouncements(WorldPacket& recvPacket)
void WorldSession::HandleChannelModerate(WorldPacket& recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname;
recvPacket >> channelname;
@ -275,7 +275,7 @@ void WorldSession::HandleChannelModerate(WorldPacket& recvPacket)
void WorldSession::HandleChannelDisplayListQuery(WorldPacket &recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname;
recvPacket >> channelname;
@ -286,7 +286,7 @@ void WorldSession::HandleChannelDisplayListQuery(WorldPacket &recvPacket)
void WorldSession::HandleGetChannelMemberCount(WorldPacket &recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname;
recvPacket >> channelname;
@ -305,7 +305,7 @@ void WorldSession::HandleGetChannelMemberCount(WorldPacket &recvPacket)
void WorldSession::HandleSetChannelWatch(WorldPacket &recvPacket)
{
sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
DEBUG_LOG("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname;
recvPacket >> channelname;

View file

@ -147,7 +147,7 @@ void WorldSession::HandleCharEnum(QueryResult * result)
do
{
uint32 guidlow = (*result)[0].GetUInt32();
sLog.outDetail("Build enum data for char guid %u from account %u.", guidlow, GetAccountId());
DETAIL_LOG("Build enum data for char guid %u from account %u.", guidlow, GetAccountId());
if(Player::BuildEnumData(result, &data))
++num;
}
@ -478,7 +478,7 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
SendPacket( &data );
std::string IP_str = GetRemoteAddress();
sLog.outBasic("Account: %d (IP: %s) Create Character:[%s] (guid: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow());
BASIC_LOG("Account: %d (IP: %s) Create Character:[%s] (guid: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow());
sLog.outChar("Account: %d (IP: %s) Create Character:[%s] (guid: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), pNewChar->GetGUIDLow());
delete pNewChar; // created only to call SaveToDB()
@ -528,7 +528,7 @@ void WorldSession::HandleCharDeleteOpcode( WorldPacket & recv_data )
return;
std::string IP_str = GetRemoteAddress();
sLog.outBasic("Account: %d (IP: %s) Delete Character:[%s] (guid: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
BASIC_LOG("Account: %d (IP: %s) Delete Character:[%s] (guid: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
sLog.outChar("Account: %d (IP: %s) Delete Character:[%s] (guid: %u)", GetAccountId(), IP_str.c_str(), name.c_str(), GUID_LOPART(guid));
if(sLog.IsOutCharDump()) // optimize GetPlayerDump call
@ -711,7 +711,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder *holder)
}
sObjectAccessor.AddObject(pCurrChar);
//sLog.outDebug("Player %s added to Map.",pCurrChar->GetName());
//DEBUG_LOG("Player %s added to Map.",pCurrChar->GetName());
pCurrChar->SendInitialPacketsAfterAddToMap();
@ -860,7 +860,7 @@ void WorldSession::HandleTutorialFlag( WorldPacket & recv_data )
tutflag |= (1 << rInt);
SetTutorialInt( wInt, tutflag );
//sLog.outDebug("Received Tutorial Flag Set {%u}.", iFlag);
//DEBUG_LOG("Received Tutorial Flag Set {%u}.", iFlag);
}
void WorldSession::HandleTutorialClear( WorldPacket & /*recv_data*/ )
@ -1076,7 +1076,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
void WorldSession::HandleAlterAppearance( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_ALTER_APPEARANCE");
DEBUG_LOG("CMSG_ALTER_APPEARANCE");
uint32 Hair, Color, FacialHair;
recv_data >> Hair >> Color >> FacialHair;
@ -1129,7 +1129,7 @@ void WorldSession::HandleRemoveGlyph( WorldPacket & recv_data )
if(slot >= MAX_GLYPH_SLOT_INDEX)
{
sLog.outDebug("Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
DEBUG_LOG("Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
return;
}
@ -1235,7 +1235,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data)
{
sLog.outDebug("CMSG_EQUIPMENT_SET_SAVE");
DEBUG_LOG("CMSG_EQUIPMENT_SET_SAVE");
ObjectGuid setGuid;
uint32 index;
@ -1279,7 +1279,7 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data)
void WorldSession::HandleEquipmentSetDelete(WorldPacket &recv_data)
{
sLog.outDebug("CMSG_EQUIPMENT_SET_DELETE");
DEBUG_LOG("CMSG_EQUIPMENT_SET_DELETE");
ObjectGuid setGuid;
@ -1290,7 +1290,7 @@ void WorldSession::HandleEquipmentSetDelete(WorldPacket &recv_data)
void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
{
sLog.outDebug("CMSG_EQUIPMENT_SET_USE");
DEBUG_LOG("CMSG_EQUIPMENT_SET_USE");
recv_data.hexlike();
for(uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
@ -1301,7 +1301,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
recv_data >> itemGuid.ReadAsPacked();
recv_data >> srcbag >> srcslot;
sLog.outDebug("Item (%s): srcbag %u, srcslot %u", itemGuid.GetString().c_str(), srcbag, srcslot);
DEBUG_LOG("Item (%s): srcbag %u, srcslot %u", itemGuid.GetString().c_str(), srcbag, srcslot);
Item *item = _player->GetItemByGuid(itemGuid);

View file

@ -976,7 +976,7 @@ bool ChatHandler::SetDataForCommandInTable(ChatCommand *table, const char* text,
}
if(table[i].SecurityLevel != security)
sLog.outDetail("Table `command` overwrite for command '%s' default security (%u) by %u",fullcommand.c_str(),table[i].SecurityLevel,security);
DETAIL_LOG("Table `command` overwrite for command '%s' default security (%u) by %u",fullcommand.c_str(),table[i].SecurityLevel,security);
table[i].SecurityLevel = security;
table[i].Help = help;
@ -1119,18 +1119,14 @@ valid examples:
}
else if(reader.get() != '|')
{
#ifdef MANGOS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage sequence aborted unexpectedly");
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage sequence aborted unexpectedly");
return false;
}
// pipe has always to be followed by at least one char
if ( reader.peek() == '\0')
{
#ifdef MANGOS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage pipe followed by \\0");
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage pipe followed by \\0");
return false;
}
@ -1153,18 +1149,14 @@ valid examples:
}
else
{
#ifdef MANGOS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage invalid sequence, expected %c but got %c", *validSequenceIterator, commandChar);
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage invalid sequence, expected %c but got %c", *validSequenceIterator, commandChar);
return false;
}
}
else if(validSequence != validSequenceIterator)
{
// no escaped pipes in sequences
#ifdef MANGOS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage got escaped pipe in sequence");
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage got escaped pipe in sequence");
return false;
}
@ -1179,9 +1171,7 @@ valid examples:
reader >> c;
if(!c)
{
#ifdef MANGOS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage got \\0 while reading color in |c command");
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage got \\0 while reading color in |c command");
return false;
}
@ -1197,9 +1187,7 @@ valid examples:
color |= 10+c-'a';
continue;
}
#ifdef MANGOS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage got non hex char '%c' while reading color", c);
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage got non hex char '%c' while reading color", c);
return false;
}
break;
@ -1215,18 +1203,14 @@ valid examples:
linkedItem = ObjectMgr::GetItemPrototype(atoi(buffer));
if(!linkedItem)
{
#ifdef MANGOS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage got invalid itemID %u in |item command", atoi(buffer));
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage got invalid itemID %u in |item command", atoi(buffer));
return false;
}
if (color != ItemQualityColors[linkedItem->Quality])
{
#ifdef MANGOS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage linked item has color %u, but user claims %u", ItemQualityColors[linkedItem->Quality],
DEBUG_LOG("ChatHandler::isValidChatMessage linked item has color %u, but user claims %u", ItemQualityColors[linkedItem->Quality],
color);
#endif
return false;
}
@ -1295,9 +1279,7 @@ valid examples:
if(!linkedQuest)
{
#ifdef MANOGS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage Questtemplate %u not found", questid);
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage Questtemplate %u not found", questid);
return false;
}
c = reader.peek();
@ -1435,9 +1417,7 @@ valid examples:
}
else
{
#ifdef MANGOS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage user sent unsupported link type '%s'", buffer);
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage user sent unsupported link type '%s'", buffer);
return false;
}
break;
@ -1448,9 +1428,7 @@ valid examples:
// links start with '['
if (reader.get() != '[')
{
#ifdef MANGOS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage link caption doesn't start with '['");
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage link caption doesn't start with '['");
return false;
}
reader.getline(buffer, 256, ']');
@ -1513,9 +1491,7 @@ valid examples:
if (!ql)
{
#ifdef MANOGS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage default questname didn't match and there is no locale");
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage default questname didn't match and there is no locale");
return false;
}
@ -1530,9 +1506,7 @@ valid examples:
}
if (!foundName)
{
#ifdef MANOGS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage no quest locale title matched")
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage no quest locale title matched");
return false;
}
}
@ -1574,9 +1548,7 @@ valid examples:
}
if (!foundName)
{
#ifdef MANGOS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage linked item name wasn't found in any localization");
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage linked item name wasn't found in any localization");
return false;
}
}
@ -1606,18 +1578,15 @@ valid examples:
// no further payload
break;
default:
#ifdef MANGOS_DEBUG
sLog.outBasic("ChatHandler::isValidChatMessage got invalid command |%c", commandChar);
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage got invalid command |%c", commandChar);
return false;
}
}
// check if every opened sequence was also closed properly
#ifdef MANGOS_DEBUG
if(validSequence != validSequenceIterator)
sLog.outBasic("ChatHandler::isValidChatMessage EOF in active sequence");
#endif
DEBUG_LOG("ChatHandler::isValidChatMessage EOF in active sequence");
return validSequence == validSequenceIterator;
}

View file

@ -73,7 +73,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
return;
}
sLog.outDebug("CHAT: packet received. type %u, lang %u", type, lang );
DEBUG_LOG("CHAT: packet received. type %u, lang %u", type, lang );
// prevent talking at unknown language (cheating)
LanguageDesc const* langDesc = GetLanguageDescByID(lang);
@ -588,7 +588,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recv_data )
{
uint64 iguid;
uint8 unk;
//sLog.outDebug("WORLD: Received CMSG_CHAT_IGNORED");
//DEBUG_LOG("WORLD: Received CMSG_CHAT_IGNORED");
recv_data >> iguid;
recv_data >> unk; // probably related to spam reporting

View file

@ -75,7 +75,7 @@ void WorldSession::HandleSetSheathedOpcode( WorldPacket & recv_data )
uint32 sheathed;
recv_data >> sheathed;
//sLog.outDebug( "WORLD: Recvd CMSG_SETSHEATHED Message guidlow:%u value1:%u", GetPlayer()->GetGUIDLow(), sheathed );
//DEBUG_LOG( "WORLD: Recvd CMSG_SETSHEATHED Message guidlow:%u value1:%u", GetPlayer()->GetGUIDLow(), sheathed );
if(sheathed >= MAX_SHEATH_STATE)
{

View file

@ -590,7 +590,7 @@ bool Creature::AIM_Initialize()
// make sure nothing can change the AI during AI update
if(m_AI_locked)
{
sLog.outDebug("AIM_Initialize: failed to init, locked.");
DEBUG_LOG("AIM_Initialize: failed to init, locked.");
return false;
}
@ -1183,7 +1183,7 @@ void Creature::DeleteFromDB()
{
if (!m_DBTableGuid)
{
sLog.outDebug("Trying to delete not saved creature!");
DEBUG_LOG("Trying to delete not saved creature!");
return;
}
@ -1526,7 +1526,7 @@ void Creature::SendAIReaction(AiReaction reactionType)
((WorldObject*)this)->SendMessageToSet(&data, true);
sLog.outDebug("WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType);
DEBUG_LOG("WORLD: Sent SMSG_AI_REACTION, type %u.", reactionType);
}
void Creature::CallAssistance()
@ -1740,7 +1740,7 @@ bool Creature::LoadCreaturesAddon(bool reload)
Aura* AdditionalAura = CreateAura(AdditionalSpellInfo, cAura->effect_idx, NULL, this, this, 0);
AddAura(AdditionalAura);
sLog.outDebug("Spell: %u with Aura %u added to creature (GUIDLow: %u Entry: %u )", cAura->spell_id, AdditionalSpellInfo->EffectApplyAuraName[EFFECT_INDEX_0],GetGUIDLow(),GetEntry());
DEBUG_LOG("Spell: %u with Aura %u added to creature (GUIDLow: %u Entry: %u )", cAura->spell_id, AdditionalSpellInfo->EffectApplyAuraName[EFFECT_INDEX_0],GetGUIDLow(),GetEntry());
}
}
return true;

View file

@ -82,7 +82,7 @@ namespace FactorySelector
// select NullCreatureAI if not another cases
ainame = (ai_factory == NULL) ? "NullCreatureAI" : ai_factory->key();
DEBUG_LOG("Creature %u used AI is %s.", creature->GetGUIDLow(), ainame.c_str() );
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature %u used AI is %s.", creature->GetGUIDLow(), ainame.c_str() );
return ( ai_factory == NULL ? new NullCreatureAI(creature) : ai_factory->Create(creature) );
}

View file

@ -1246,7 +1246,7 @@ void CreatureEventAI::DoScriptText(int32 textEntry, WorldObject* pSource, Unit*
return;
}
sLog.outDebug("CreatureEventAI: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u",textEntry,(*i).second.SoundId,(*i).second.Type,(*i).second.Language,(*i).second.Emote);
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "CreatureEventAI: DoScriptText: text entry=%i, Sound=%u, Type=%u, Language=%u, Emote=%u",textEntry,(*i).second.SoundId,(*i).second.Type,(*i).second.Language,(*i).second.Emote);
if((*i).second.SoundId)
{
@ -1357,7 +1357,7 @@ void CreatureEventAI::ReceiveEmote(Player* pPlayer, uint32 text_emote)
PlayerCondition pcon((*itr).Event.receive_emote.condition,(*itr).Event.receive_emote.conditionValue1,(*itr).Event.receive_emote.conditionValue2);
if (pcon.Meets(pPlayer))
{
sLog.outDebug("CreatureEventAI: ReceiveEmote CreatureEventAI: Condition ok, processing");
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "CreatureEventAI: ReceiveEmote CreatureEventAI: Condition ok, processing");
ProcessEvent(*itr, pPlayer);
}
}

View file

@ -590,7 +590,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts()
{
//output as debug for now, also because there's no general rule all spells have RecoveryTime
if (temp.event_param3 < spell->RecoveryTime)
sLog.outDebug("CreatureEventAI: Event %u Action %u uses SpellID %u but cooldown is longer(%u) than minumum defined in event param3(%u).", i, j+1,action.cast.spellId, spell->RecoveryTime, temp.event_param3);
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "CreatureEventAI: Event %u Action %u uses SpellID %u but cooldown is longer(%u) than minumum defined in event param3(%u).", i, j+1,action.cast.spellId, spell->RecoveryTime, temp.event_param3);
}
}
*/

View file

@ -41,7 +41,7 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
if(pl == pl->duel->initiator || !plTarget || pl == plTarget || pl->duel->startTime != 0 || plTarget->duel->startTime != 0)
return;
//sLog.outDebug( "WORLD: received CMSG_DUEL_ACCEPTED" );
//DEBUG_LOG( "WORLD: received CMSG_DUEL_ACCEPTED" );
DEBUG_LOG("Player 1 is: %u (%s)", pl->GetGUIDLow(), pl->GetName());
DEBUG_LOG("Player 2 is: %u (%s)", plTarget->GetGUIDLow(), plTarget->GetName());
@ -55,7 +55,7 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
void WorldSession::HandleDuelCancelledOpcode(WorldPacket& recvPacket)
{
//sLog.outDebug( "WORLD: received CMSG_DUEL_CANCELLED" );
//DEBUG_LOG( "WORLD: received CMSG_DUEL_CANCELLED" );
// no duel requested
if(!GetPlayer()->duel)

View file

@ -111,7 +111,7 @@ void WorldSession::HandleGMTicketCreateOpcode( WorldPacket & recv_data )
recv_data.read_skip<uint32>(); // unk3, 0
recv_data.read_skip<uint32>(); // unk4, 0
sLog.outDebug("TicketCreate: map %u, x %f, y %f, z %f, text %s", map, x, y, z, ticketText.c_str());
DEBUG_LOG("TicketCreate: map %u, x %f, y %f, z %f, text %s", map, x, y, z, ticketText.c_str());
if(sTicketMgr.GetGMTicket(GetPlayer()->GetGUIDLow()) && !isFollowup)
{
@ -154,7 +154,7 @@ void WorldSession::HandleGMSurveySubmit( WorldPacket & recv_data)
// GM survey is shown after SMSG_GM_TICKET_STATUS_UPDATE with status = 3
uint32 x;
recv_data >> x; // answer range? (6 = 0-5?)
sLog.outDebug("SURVEY: X = %u", x);
DEBUG_LOG("SURVEY: X = %u", x);
uint8 result[10];
memset(result, 0, sizeof(result));
@ -171,12 +171,12 @@ void WorldSession::HandleGMSurveySubmit( WorldPacket & recv_data)
recv_data >> unk_text; // always empty?
result[i] = value;
sLog.outDebug("SURVEY: ID %u, value %u, text %s", questionID, value, unk_text.c_str());
DEBUG_LOG("SURVEY: ID %u, value %u, text %s", questionID, value, unk_text.c_str());
}
std::string comment;
recv_data >> comment; // addional comment
sLog.outDebug("SURVEY: comment %s", comment.c_str());
DEBUG_LOG("SURVEY: comment %s", comment.c_str());
// TODO: chart this data in some way
}
@ -184,7 +184,7 @@ void WorldSession::HandleGMSurveySubmit( WorldPacket & recv_data)
void WorldSession::HandleGMResponseResolve(WorldPacket & recv_data)
{
// empty opcode
sLog.outDebug("WORLD: %s", LookupOpcodeName(recv_data.GetOpcode()));
DEBUG_LOG("WORLD: %s", LookupOpcodeName(recv_data.GetOpcode()));
sTicketMgr.Delete(GetPlayer()->GetGUIDLow());

View file

@ -421,7 +421,7 @@ uint32 GameEventMgr::Initialize() // return the next e
{
m_ActiveEvents.clear();
uint32 delay = Update();
sLog.outBasic("Game Event system initialized." );
BASIC_LOG("Game Event system initialized." );
m_IsGameEventsInit = true;
return delay;
}
@ -435,13 +435,13 @@ uint32 GameEventMgr::Update() // return the next e
//sLog.outErrorDb("Checking event %u",itr);
if (CheckOneGameEvent(itr))
{
//sLog.outDebug("GameEvent %u is active",itr->first);
//DEBUG_LOG("GameEvent %u is active",itr->first);
if (!IsActiveEvent(itr))
StartEvent(itr);
}
else
{
//sLog.outDebug("GameEvent %u is not active",itr->first);
//DEBUG_LOG("GameEvent %u is not active",itr->first);
if (IsActiveEvent(itr))
StopEvent(itr);
else
@ -461,7 +461,7 @@ uint32 GameEventMgr::Update() // return the next e
if (calcDelay < nextEventDelay)
nextEventDelay = calcDelay;
}
sLog.outBasic("Next game event check in %u seconds.", nextEventDelay + 1);
BASIC_LOG("Next game event check in %u seconds.", nextEventDelay + 1);
return (nextEventDelay + 1) * IN_MILLISECONDS; // Add 1 second to be sure event has started/stopped at next call
}
@ -520,7 +520,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if(!map->Instanceable() && map->IsLoaded(data->posX,data->posY))
{
Creature* pCreature = new Creature;
//sLog.outDebug("Spawning creature %u",*itr);
//DEBUG_LOG("Spawning creature %u",*itr);
if (!pCreature->LoadFromDB(*itr, map))
{
delete pCreature;
@ -553,7 +553,7 @@ void GameEventMgr::GameEventSpawn(int16 event_id)
if(!map->Instanceable() && map->IsLoaded(data->posX, data->posY))
{
GameObject* pGameobject = new GameObject;
//sLog.outDebug("Spawning gameobject %u", *itr);
//DEBUG_LOG("Spawning gameobject %u", *itr);
if (!pGameobject->LoadFromDB(*itr, map))
{
delete pGameobject;

View file

@ -918,7 +918,7 @@ void GameObject::Use(Unit* user)
// TODO: possible must be moved to loot release (in different from linked triggering)
if (GetGOInfo()->chest.eventId)
{
sLog.outDebug("Chest ScriptStart id %u for GO %u", GetGOInfo()->chest.eventId, GetDBTableGUIDLow());
DEBUG_LOG("Chest ScriptStart id %u for GO %u", GetGOInfo()->chest.eventId, GetDBTableGUIDLow());
GetMap()->ScriptsStart(sEventScripts, GetGOInfo()->chest.eventId, user, this);
}
@ -1022,7 +1022,7 @@ void GameObject::Use(Unit* user)
if (info->goober.eventId)
{
sLog.outDebug("Goober ScriptStart id %u for GO entry %u (GUID %u).", info->goober.eventId, GetEntry(), GetDBTableGUIDLow());
DEBUG_LOG("Goober ScriptStart id %u for GO entry %u (GUID %u).", info->goober.eventId, GetEntry(), GetDBTableGUIDLow());
GetMap()->ScriptsStart(sEventScripts, info->goober.eventId, player, this);
}

View file

@ -182,7 +182,7 @@ void PlayerMenu::SendGossipMenu(uint32 TitleTextId, uint64 objectGUID)
}
pSession->SendPacket( &data );
//sLog.outDebug( "WORLD: Sent SMSG_GOSSIP_MESSAGE NPCGuid=%u",GUID_LOPART(npcGUID) );
//DEBUG_LOG( "WORLD: Sent SMSG_GOSSIP_MESSAGE NPCGuid=%u",GUID_LOPART(npcGUID) );
}
void PlayerMenu::CloseGossip()
@ -190,7 +190,7 @@ void PlayerMenu::CloseGossip()
WorldPacket data( SMSG_GOSSIP_COMPLETE, 0 );
pSession->SendPacket( &data );
//sLog.outDebug( "WORLD: Sent SMSG_GOSSIP_COMPLETE" );
//DEBUG_LOG( "WORLD: Sent SMSG_GOSSIP_COMPLETE" );
}
// Outdated
@ -205,7 +205,7 @@ void PlayerMenu::SendPointOfInterest( float X, float Y, uint32 Icon, uint32 Flag
data << locName;
pSession->SendPacket( &data );
//sLog.outDebug("WORLD: Sent SMSG_GOSSIP_POI");
//DEBUG_LOG("WORLD: Sent SMSG_GOSSIP_POI");
}
void PlayerMenu::SendPointOfInterest( uint32 poi_id )
@ -234,7 +234,7 @@ void PlayerMenu::SendPointOfInterest( uint32 poi_id )
data << icon_name;
pSession->SendPacket( &data );
//sLog.outDebug("WORLD: Sent SMSG_GOSSIP_POI");
//DEBUG_LOG("WORLD: Sent SMSG_GOSSIP_POI");
}
void PlayerMenu::SendTalking( uint32 textID )
@ -307,7 +307,7 @@ void PlayerMenu::SendTalking( uint32 textID )
}
pSession->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_NPC_TEXT_UPDATE " );
DEBUG_LOG( "WORLD: Sent SMSG_NPC_TEXT_UPDATE " );
}
void PlayerMenu::SendTalking( char const * title, char const * text )
@ -330,7 +330,7 @@ void PlayerMenu::SendTalking( char const * title, char const * text )
pSession->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_NPC_TEXT_UPDATE " );
DEBUG_LOG( "WORLD: Sent SMSG_NPC_TEXT_UPDATE " );
}
/*********************************************************/
@ -417,7 +417,7 @@ void PlayerMenu::SendQuestGiverQuestList( QEmote eEmote, const std::string& Titl
}
data.put<uint8>(count_pos, count);
pSession->SendPacket( &data );
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid=%u", GUID_LOPART(npcGUID));
DEBUG_LOG("WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid=%u", GUID_LOPART(npcGUID));
}
void PlayerMenu::SendQuestGiverStatus( uint8 questStatus, uint64 npcGUID )
@ -427,7 +427,7 @@ void PlayerMenu::SendQuestGiverStatus( uint8 questStatus, uint64 npcGUID )
data << uint8(questStatus);
pSession->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u", GUID_LOPART(npcGUID), questStatus);
DEBUG_LOG( "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u", GUID_LOPART(npcGUID), questStatus);
}
void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID, bool ActivateAccept )
@ -549,7 +549,7 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
pSession->SendPacket( &data );
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
DEBUG_LOG("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
}
// send only static data in this packet!
@ -699,7 +699,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
data << ObjectiveText[iI];
pSession->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", pQuest->GetQuestId() );
DEBUG_LOG( "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u", pQuest->GetQuestId() );
}
void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID, bool EnableNext )
@ -805,7 +805,7 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID,
//data << int32(pQuest->RewRepValue[i]);
pSession->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId() );
DEBUG_LOG( "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId() );
}
void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID, bool Completable, bool CloseOnCancel )
@ -885,5 +885,5 @@ void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID
data << uint32(0x10); // flags4
pSession->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId() );
DEBUG_LOG( "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId() );
}

View file

@ -51,7 +51,7 @@ IdleState::Update(Map &m, NGridType &grid, GridInfo &, const uint32 &x, const ui
{
m.ResetGridExpiry(grid);
grid.SetGridState(GRID_STATE_REMOVAL);
sLog.outDebug("Grid[%u,%u] on map %u moved to IDLE state", x, y, m.GetId());
DEBUG_LOG("Grid[%u,%u] on map %u moved to IDLE state", x, y, m.GetId());
}
void
@ -64,7 +64,7 @@ RemovalState::Update(Map &m, NGridType &grid, GridInfo &info, const uint32 &x, c
{
if( !m.UnloadGrid(x, y, false) )
{
sLog.outDebug("Grid[%u,%u] for map %u differed unloading due to players or active objects nearby", x, y, m.GetId());
DEBUG_LOG("Grid[%u,%u] for map %u differed unloading due to players or active objects nearby", x, y, m.GetId());
m.ResetGridExpiry(grid);
}
}

View file

@ -46,7 +46,7 @@ Group::~Group()
{
if(m_bgGroup)
{
sLog.outDebug("Group::~Group: battleground group being deleted.");
DEBUG_LOG("Group::~Group: battleground group being deleted.");
if(m_bgGroup->GetBgRaid(ALLIANCE) == this)
m_bgGroup->SetBgRaid(ALLIANCE, NULL);
else if(m_bgGroup->GetBgRaid(HORDE) == this)
@ -550,7 +550,7 @@ void Group::GroupLoot(ObjectGuid const& playerGUID, Loot *loot, Creature *creatu
item = ObjectMgr::GetItemPrototype(i->itemid);
if (!item)
{
//sLog.outDebug("Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
//DEBUG_LOG("Group::GroupLoot: missing item prototype for item with id: %d", i->itemid);
continue;
}
@ -663,7 +663,7 @@ void Group::MasterLoot(ObjectGuid const& playerGUID, Loot* /*loot*/, Creature *c
if(!player)
return;
sLog.outDebug("Group::MasterLoot (SMSG_LOOT_MASTER_LIST, 330) player = [%s].", player->GetName());
DEBUG_LOG("Group::MasterLoot (SMSG_LOOT_MASTER_LIST, 330) player = [%s].", player->GetName());
uint32 real_count = 0;
@ -1692,7 +1692,7 @@ InstanceGroupBind* Group::BindToInstance(InstanceSave *save, bool permanent, boo
bind.save = save;
bind.perm = permanent;
if(!load)
sLog.outDebug("Group::BindToInstance: %d is now bound to map %d, instance %d, difficulty %d", GUID_LOPART(GetLeaderGUID()), save->GetMapId(), save->GetInstanceId(), save->GetDifficulty());
DEBUG_LOG("Group::BindToInstance: %d is now bound to map %d, instance %d, difficulty %d", GUID_LOPART(GetLeaderGUID()), save->GetMapId(), save->GetInstanceId(), save->GetDifficulty());
return &bind;
}
else

View file

@ -383,7 +383,7 @@ void WorldSession::HandleLootRoll( WorldPacket &recv_data )
recv_data >> itemSlot;
recv_data >> rollType;
//sLog.outDebug("WORLD RECIEVE CMSG_LOOT_ROLL, From:%u, Numberofplayers:%u, rollType:%u", (uint32)Guid, NumberOfPlayers, rollType);
//DEBUG_LOG("WORLD RECIEVE CMSG_LOOT_ROLL, From:%u, Numberofplayers:%u, rollType:%u", (uint32)Guid, NumberOfPlayers, rollType);
Group* group = GetPlayer()->GetGroup();
if(!group)
@ -412,7 +412,7 @@ void WorldSession::HandleMinimapPingOpcode(WorldPacket& recv_data)
if(!GetPlayer()->GetGroup())
return;
//sLog.outDebug("Received opcode MSG_MINIMAP_PING X: %f, Y: %f", x, y);
//DEBUG_LOG("Received opcode MSG_MINIMAP_PING X: %f, Y: %f", x, y);
/** error handling **/
/********************/
@ -439,7 +439,7 @@ void WorldSession::HandleRandomRollOpcode(WorldPacket& recv_data)
// everything is fine, do it
roll = urand(minimum, maximum);
//sLog.outDebug("ROLL: MIN: %u, MAX: %u, ROLL: %u", minimum, maximum, roll);
//DEBUG_LOG("ROLL: MIN: %u, MAX: %u, ROLL: %u", minimum, maximum, roll);
WorldPacket data(MSG_RANDOM_ROLL, 4+4+4+8);
data << uint32(minimum);
@ -551,7 +551,7 @@ void WorldSession::HandlePartyAssignmentOpcode( WorldPacket & recv_data )
recv_data >> flag1 >> flag2;
recv_data >> guid;
sLog.outDebug("MSG_PARTY_ASSIGNMENT");
DEBUG_LOG("MSG_PARTY_ASSIGNMENT");
Group *group = GetPlayer()->GetGroup();
if(!group)
@ -785,7 +785,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacke
/*this procedure handles clients CMSG_REQUEST_PARTY_MEMBER_STATS request*/
void WorldSession::HandleRequestPartyMemberStatsOpcode( WorldPacket &recv_data )
{
sLog.outDebug("WORLD: Received CMSG_REQUEST_PARTY_MEMBER_STATS");
DEBUG_LOG("WORLD: Received CMSG_REQUEST_PARTY_MEMBER_STATS");
uint64 Guid;
recv_data >> Guid;
@ -881,7 +881,7 @@ void WorldSession::HandleRequestRaidInfoOpcode( WorldPacket & /*recv_data*/ )
void WorldSession::HandleOptOutOfLootOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Received CMSG_OPT_OUT_OF_LOOT");
DEBUG_LOG("WORLD: Received CMSG_OPT_OUT_OF_LOOT");
uint32 unkn;
recv_data >> unkn;

View file

@ -59,7 +59,7 @@ void GuardAI::EnterEvadeMode()
{
if (!m_creature->isAlive())
{
DEBUG_LOG("Creature stopped attacking because he's dead [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking because he's dead [guid=%u]", m_creature->GetGUIDLow());
m_creature->StopMoving();
m_creature->GetMotionMaster()->MoveIdle();
@ -75,23 +75,23 @@ void GuardAI::EnterEvadeMode()
if (!victim)
{
DEBUG_LOG("Creature stopped attacking, no victim [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, no victim [guid=%u]", m_creature->GetGUIDLow());
}
else if (!victim->isAlive())
{
DEBUG_LOG("Creature stopped attacking, victim is dead [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, victim is dead [guid=%u]", m_creature->GetGUIDLow());
}
else if (victim->HasStealthAura())
{
DEBUG_LOG("Creature stopped attacking, victim is in stealth [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, victim is in stealth [guid=%u]", m_creature->GetGUIDLow());
}
else if (victim->isInFlight())
{
DEBUG_LOG("Creature stopped attacking, victim is in flight [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, victim is in flight [guid=%u]", m_creature->GetGUIDLow());
}
else
{
DEBUG_LOG("Creature stopped attacking, victim out run him [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, victim out run him [guid=%u]", m_creature->GetGUIDLow());
}
m_creature->RemoveAllAuras();
@ -134,7 +134,6 @@ void GuardAI::AttackStart(Unit *u)
if( !u )
return;
// DEBUG_LOG("Creature %s tagged a victim to kill [guid=%u]", i_creature.GetName(), u->GetGUIDLow());
if(m_creature->Attack(u,true))
{
i_victimGuid = u->GetGUID();

View file

@ -74,7 +74,7 @@ bool Guild::Create(Player* leader, std::string gname)
m_PurchasedTabs = 0;
m_Id = sObjectMgr.GenerateGuildId();
sLog.outDebug("GUILD: creating guild %s to leader: %u", gname.c_str(), GUID_LOPART(m_LeaderGuid));
DEBUG_LOG("GUILD: creating guild %s to leader: %u", gname.c_str(), GUID_LOPART(m_LeaderGuid));
// gname already assigned to Guild::name, use it to encode string for DB
CharacterDatabase.escape_string(gname);
@ -753,7 +753,7 @@ void Guild::Roster(WorldSession *session /*= NULL*/)
session->SendPacket(&data);
else
BroadcastPacket(&data);
sLog.outDebug( "WORLD: Sent (SMSG_GUILD_ROSTER)" );
DEBUG_LOG( "WORLD: Sent (SMSG_GUILD_ROSTER)" );
}
void Guild::Query(WorldSession *session)
@ -779,7 +779,7 @@ void Guild::Query(WorldSession *session)
data << uint32(0); // probably real ranks count
session->SendPacket( &data );
sLog.outDebug( "WORLD: Sent (SMSG_GUILD_QUERY_RESPONSE)" );
DEBUG_LOG( "WORLD: Sent (SMSG_GUILD_QUERY_RESPONSE)" );
}
void Guild::SetEmblem(uint32 emblemStyle, uint32 emblemColor, uint32 borderStyle, uint32 borderColor, uint32 backgroundColor)
@ -828,7 +828,7 @@ void Guild::DisplayGuildEventLog(WorldSession *session)
data << uint32(time(NULL)-itr->TimeStamp);
}
session->SendPacket(&data);
sLog.outDebug("WORLD: Sent (MSG_GUILD_EVENT_LOG_QUERY)");
DEBUG_LOG("WORLD: Sent (MSG_GUILD_EVENT_LOG_QUERY)");
}
// Load guild eventlog from DB
@ -917,7 +917,7 @@ void Guild::DisplayGuildBankContent(WorldSession *session, uint8 TabId)
session->SendPacket(&data);
sLog.outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
DEBUG_LOG("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
}
void Guild::DisplayGuildBankMoneyUpdate(WorldSession *session)
@ -931,7 +931,7 @@ void Guild::DisplayGuildBankMoneyUpdate(WorldSession *session)
data << uint8(0); // not send items
BroadcastPacket(&data);
sLog.outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
DEBUG_LOG("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
}
void Guild::DisplayGuildBankContentUpdate(uint8 TabId, int32 slot1, int32 slot2)
@ -978,7 +978,7 @@ void Guild::DisplayGuildBankContentUpdate(uint8 TabId, int32 slot1, int32 slot2)
player->GetSession()->SendPacket(&data);
}
sLog.outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
DEBUG_LOG("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
}
void Guild::DisplayGuildBankContentUpdate(uint8 TabId, GuildItemPosCountVec const& slots)
@ -1013,7 +1013,7 @@ void Guild::DisplayGuildBankContentUpdate(uint8 TabId, GuildItemPosCountVec cons
player->GetSession()->SendPacket(&data);
}
sLog.outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
DEBUG_LOG("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
}
Item* Guild::GetItem(uint8 TabId, uint8 SlotId)
@ -1045,7 +1045,7 @@ void Guild::DisplayGuildBankTabsInfo(WorldSession *session)
data << uint8(0); // Do not send tab content
session->SendPacket(&data);
sLog.outDebug("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
DEBUG_LOG("WORLD: Sent (SMSG_GUILD_BANK_LIST)");
}
void Guild::CreateNewBankTab()
@ -1177,7 +1177,7 @@ void Guild::SendMoneyInfo(WorldSession *session, uint32 LowGuid)
WorldPacket data(MSG_GUILD_BANK_MONEY_WITHDRAWN, 4);
data << uint32(GetMemberMoneyWithdrawRem(LowGuid));
session->SendPacket(&data);
sLog.outDebug("WORLD: Sent MSG_GUILD_BANK_MONEY_WITHDRAWN");
DEBUG_LOG("WORLD: Sent MSG_GUILD_BANK_MONEY_WITHDRAWN");
}
bool Guild::MemberMoneyWithdraw(uint32 amount, uint32 LowGuid)
@ -1551,7 +1551,7 @@ void Guild::DisplayGuildBankLogs(WorldSession *session, uint8 TabId)
}
session->SendPacket(&data);
}
sLog.outDebug("WORLD: Sent (MSG_GUILD_BANK_LOG_QUERY)");
DEBUG_LOG("WORLD: Sent (MSG_GUILD_BANK_LOG_QUERY)");
}
void Guild::LogBankEvent(uint8 EventType, uint8 TabId, uint32 PlayerGuidLow, uint32 ItemOrMoney, uint8 ItemStackCount, uint8 DestTabId)
@ -1671,7 +1671,7 @@ Item* Guild::_StoreItem( uint8 tab, uint8 slot, Item *pItem, uint32 count, bool
if (!pItem)
return NULL;
sLog.outDebug( "GUILD STORAGE: StoreItem tab = %u, slot = %u, item = %u, count = %u", tab, slot, pItem->GetEntry(), count);
DEBUG_LOG( "GUILD STORAGE: StoreItem tab = %u, slot = %u, item = %u, count = %u", tab, slot, pItem->GetEntry(), count);
Item* pItem2 = m_TabListMap[tab]->Slots[slot];
@ -1821,7 +1821,7 @@ uint8 Guild::_CanStoreItem_InTab( uint8 tab, GuildItemPosCountVec &dest, uint32&
uint8 Guild::CanStoreItem( uint8 tab, uint8 slot, GuildItemPosCountVec &dest, uint32 count, Item *pItem, bool swap ) const
{
sLog.outDebug( "GUILD STORAGE: CanStoreItem tab = %u, slot = %u, item = %u, count = %u", tab, slot, pItem->GetEntry(), count);
DEBUG_LOG( "GUILD STORAGE: CanStoreItem tab = %u, slot = %u, item = %u, count = %u", tab, slot, pItem->GetEntry(), count);
if (count > pItem->GetCount())
return EQUIP_ERR_COULDNT_SPLIT_ITEMS;
@ -2342,7 +2342,7 @@ void Guild::BroadcastEvent(GuildEvents event, uint64 guid, uint8 strCount, std::
BroadcastPacket(&data);
sLog.outDebug("WORLD: Sent SMSG_GUILD_EVENT");
DEBUG_LOG("WORLD: Sent SMSG_GUILD_EVENT");
}
bool GuildItemPosCount::isContainedIn(GuildItemPosCountVec const &vec) const

View file

@ -29,7 +29,7 @@
void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_QUERY");
DEBUG_LOG("WORLD: Received CMSG_GUILD_QUERY");
uint32 guildId;
recvPacket >> guildId;
@ -45,7 +45,7 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_CREATE");
DEBUG_LOG("WORLD: Received CMSG_GUILD_CREATE");
std::string gname;
recvPacket >> gname;
@ -65,7 +65,7 @@ void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_INVITE");
DEBUG_LOG("WORLD: Received CMSG_GUILD_INVITE");
std::string Invitedname, plname;
Player * player = NULL;
@ -119,7 +119,7 @@ void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
return;
}
sLog.outDebug("Player %s Invited %s to Join his Guild", GetPlayer()->GetName(), Invitedname.c_str());
DEBUG_LOG("Player %s Invited %s to Join his Guild", GetPlayer()->GetName(), Invitedname.c_str());
player->SetGuildIdInvited(GetPlayer()->GetGuildId());
// Put record into guildlog
@ -130,12 +130,12 @@ void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
data << guild->GetName();
player->GetSession()->SendPacket(&data);
sLog.outDebug("WORLD: Sent (SMSG_GUILD_INVITE)");
DEBUG_LOG("WORLD: Sent (SMSG_GUILD_INVITE)");
}
void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_REMOVE");
DEBUG_LOG("WORLD: Received CMSG_GUILD_REMOVE");
std::string plName;
recvPacket >> plName;
@ -189,7 +189,7 @@ void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
Guild *guild;
Player *player = GetPlayer();
sLog.outDebug("WORLD: Received CMSG_GUILD_ACCEPT");
DEBUG_LOG("WORLD: Received CMSG_GUILD_ACCEPT");
guild = sObjectMgr.GetGuildById(player->GetGuildIdInvited());
if(!guild || player->GetGuildId())
@ -209,7 +209,7 @@ void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_DECLINE");
DEBUG_LOG("WORLD: Received CMSG_GUILD_DECLINE");
GetPlayer()->SetGuildIdInvited(0);
GetPlayer()->SetInGuild(0);
@ -217,7 +217,7 @@ void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_INFO");
DEBUG_LOG("WORLD: Received CMSG_GUILD_INFO");
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if(!guild)
@ -237,7 +237,7 @@ void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildRosterOpcode(WorldPacket& /*recvPacket*/)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_ROSTER");
DEBUG_LOG("WORLD: Received CMSG_GUILD_ROSTER");
if(Guild* guild = sObjectMgr.GetGuildById(_player->GetGuildId()))
guild->Roster(this);
@ -245,7 +245,7 @@ void WorldSession::HandleGuildRosterOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_PROMOTE");
DEBUG_LOG("WORLD: Received CMSG_GUILD_PROMOTE");
std::string plName;
recvPacket >> plName;
@ -300,7 +300,7 @@ void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_DEMOTE");
DEBUG_LOG("WORLD: Received CMSG_GUILD_DEMOTE");
std::string plName;
recvPacket >> plName;
@ -362,7 +362,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_LEAVE");
DEBUG_LOG("WORLD: Received CMSG_GUILD_LEAVE");
Guild *guild = sObjectMgr.GetGuildById(_player->GetGuildId());
if(!guild)
@ -394,7 +394,7 @@ void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildDisbandOpcode(WorldPacket& /*recvPacket*/)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_DISBAND");
DEBUG_LOG("WORLD: Received CMSG_GUILD_DISBAND");
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if(!guild)
@ -411,12 +411,12 @@ void WorldSession::HandleGuildDisbandOpcode(WorldPacket& /*recvPacket*/)
guild->Disband();
sLog.outDebug("WORLD: Guild Successfully Disbanded");
DEBUG_LOG("WORLD: Guild Successfully Disbanded");
}
void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_LEADER");
DEBUG_LOG("WORLD: Received CMSG_GUILD_LEADER");
std::string name;
recvPacket >> name;
@ -457,7 +457,7 @@ void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_MOTD");
DEBUG_LOG("WORLD: Received CMSG_GUILD_MOTD");
std::string MOTD;
@ -485,7 +485,7 @@ void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_SET_PUBLIC_NOTE");
DEBUG_LOG("WORLD: Received CMSG_GUILD_SET_PUBLIC_NOTE");
std::string name,PNOTE;
recvPacket >> name;
@ -524,7 +524,7 @@ void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_SET_OFFICER_NOTE");
DEBUG_LOG("WORLD: Received CMSG_GUILD_SET_OFFICER_NOTE");
std::string plName, OFFNOTE;
recvPacket >> plName;
@ -566,7 +566,7 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
uint32 rankId;
uint32 rights, MoneyPerDay;
sLog.outDebug("WORLD: Received CMSG_GUILD_RANK");
DEBUG_LOG("WORLD: Received CMSG_GUILD_RANK");
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if(!guild)
@ -597,7 +597,7 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
guild->SetBankRightsAndSlots(rankId, uint8(i), uint16(BankRights & 0xFF), uint16(BankSlotPerDay), true);
}
sLog.outDebug("WORLD: Changed RankName to %s , Rights to 0x%.4X", rankname.c_str(), rights);
DEBUG_LOG("WORLD: Changed RankName to %s , Rights to 0x%.4X", rankname.c_str(), rights);
guild->SetBankMoneyPerDay(rankId, MoneyPerDay);
guild->SetRankName(rankId, rankname);
@ -613,7 +613,7 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_ADD_RANK");
DEBUG_LOG("WORLD: Received CMSG_GUILD_ADD_RANK");
std::string rankname;
recvPacket >> rankname;
@ -642,7 +642,7 @@ void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildDelRankOpcode(WorldPacket& /*recvPacket*/)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_DEL_RANK");
DEBUG_LOG("WORLD: Received CMSG_GUILD_DEL_RANK");
Guild *guild = sObjectMgr.GetGuildById(GetPlayer()->GetGuildId());
if(!guild)
@ -670,12 +670,12 @@ void WorldSession::SendGuildCommandResult(uint32 typecmd, const std::string& str
data << cmdresult;
SendPacket(&data);
sLog.outDebug("WORLD: Sent (SMSG_GUILD_COMMAND_RESULT)");
DEBUG_LOG("WORLD: Sent (SMSG_GUILD_COMMAND_RESULT)");
}
void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: Received CMSG_GUILD_INFO_TEXT");
DEBUG_LOG("WORLD: Received CMSG_GUILD_INFO_TEXT");
std::string GINFO;
recvPacket >> GINFO;
@ -698,7 +698,7 @@ void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket)
void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: Received MSG_SAVE_GUILD_EMBLEM");
DEBUG_LOG("WORLD: Received MSG_SAVE_GUILD_EMBLEM");
uint64 vendorGuid;
uint32 EmblemStyle, EmblemColor, BorderStyle, BorderColor, BackgroundColor;
@ -711,7 +711,7 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
{
//"That's not an emblem vendor!"
SendSaveGuildEmblem(ERR_GUILDEMBLEM_INVALIDVENDOR);
sLog.outDebug("WORLD: HandleSaveGuildEmblemOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(vendorGuid));
DEBUG_LOG("WORLD: HandleSaveGuildEmblemOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(vendorGuid));
return;
}
@ -753,7 +753,7 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
{
// empty
sLog.outDebug("WORLD: Received (MSG_GUILD_EVENT_LOG_QUERY)");
DEBUG_LOG("WORLD: Received (MSG_GUILD_EVENT_LOG_QUERY)");
if(uint32 GuildId = GetPlayer()->GetGuildId())
if(Guild *pGuild = sObjectMgr.GetGuildById(GuildId))
@ -764,7 +764,7 @@ void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
void WorldSession::HandleGuildBankMoneyWithdrawn( WorldPacket & /* recv_data */ )
{
sLog.outDebug("WORLD: Received (MSG_GUILD_BANK_MONEY_WITHDRAWN)");
DEBUG_LOG("WORLD: Received (MSG_GUILD_BANK_MONEY_WITHDRAWN)");
if(uint32 GuildId = GetPlayer()->GetGuildId())
if(Guild *pGuild = sObjectMgr.GetGuildById(GuildId))
@ -773,7 +773,7 @@ void WorldSession::HandleGuildBankMoneyWithdrawn( WorldPacket & /* recv_data */
void WorldSession::HandleGuildPermissions( WorldPacket& /* recv_data */ )
{
sLog.outDebug("WORLD: Received (MSG_GUILD_PERMISSIONS)");
DEBUG_LOG("WORLD: Received (MSG_GUILD_PERMISSIONS)");
if(uint32 GuildId = GetPlayer()->GetGuildId())
{
@ -794,7 +794,7 @@ void WorldSession::HandleGuildPermissions( WorldPacket& /* recv_data */ )
data << uint32(pGuild->GetMemberSlotWithdrawRem(GetPlayer()->GetGUIDLow(), uint8(i)));
}
SendPacket(&data);
sLog.outDebug("WORLD: Sent (MSG_GUILD_PERMISSIONS)");
DEBUG_LOG("WORLD: Sent (MSG_GUILD_PERMISSIONS)");
}
}
}
@ -802,7 +802,7 @@ void WorldSession::HandleGuildPermissions( WorldPacket& /* recv_data */ )
/* Called when clicking on Guild bank gameobject */
void WorldSession::HandleGuildBankerActivate( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Received (CMSG_GUILD_BANKER_ACTIVATE)");
DEBUG_LOG("WORLD: Received (CMSG_GUILD_BANKER_ACTIVATE)");
uint64 GoGuid;
uint8 unk;
@ -826,7 +826,7 @@ void WorldSession::HandleGuildBankerActivate( WorldPacket & recv_data )
/* Called when opening guild bank tab only (first one) */
void WorldSession::HandleGuildBankQueryTab( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_QUERY_TAB)");
DEBUG_LOG("WORLD: Received (CMSG_GUILD_BANK_QUERY_TAB)");
uint64 GoGuid;
uint8 TabId, unk1;
@ -854,7 +854,7 @@ void WorldSession::HandleGuildBankQueryTab( WorldPacket & recv_data )
void WorldSession::HandleGuildBankDepositMoney( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_DEPOSIT_MONEY)");
DEBUG_LOG("WORLD: Received (CMSG_GUILD_BANK_DEPOSIT_MONEY)");
uint64 GoGuid;
uint32 money;
@ -905,7 +905,7 @@ void WorldSession::HandleGuildBankDepositMoney( WorldPacket & recv_data )
void WorldSession::HandleGuildBankWithdrawMoney( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_WITHDRAW_MONEY)");
DEBUG_LOG("WORLD: Received (CMSG_GUILD_BANK_WITHDRAW_MONEY)");
uint64 GoGuid;
uint32 money;
@ -958,7 +958,7 @@ void WorldSession::HandleGuildBankWithdrawMoney( WorldPacket & recv_data )
void WorldSession::HandleGuildBankSwapItems( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_SWAP_ITEMS)");
DEBUG_LOG("WORLD: Received (CMSG_GUILD_BANK_SWAP_ITEMS)");
uint64 GoGuid;
uint8 BankToBank;
@ -1064,7 +1064,7 @@ void WorldSession::HandleGuildBankSwapItems( WorldPacket & recv_data )
void WorldSession::HandleGuildBankBuyTab( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_BUY_TAB)");
DEBUG_LOG("WORLD: Received (CMSG_GUILD_BANK_BUY_TAB)");
uint64 GoGuid;
uint8 TabId;
@ -1104,7 +1104,7 @@ void WorldSession::HandleGuildBankBuyTab( WorldPacket & recv_data )
void WorldSession::HandleGuildBankUpdateTab( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_UPDATE_TAB)");
DEBUG_LOG("WORLD: Received (CMSG_GUILD_BANK_UPDATE_TAB)");
uint64 GoGuid;
uint8 TabId;
@ -1143,7 +1143,7 @@ void WorldSession::HandleGuildBankUpdateTab( WorldPacket & recv_data )
void WorldSession::HandleGuildBankLogQuery( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Received (MSG_GUILD_BANK_LOG_QUERY)");
DEBUG_LOG("WORLD: Received (MSG_GUILD_BANK_LOG_QUERY)");
uint8 TabId;
recv_data >> TabId;
@ -1165,7 +1165,7 @@ void WorldSession::HandleGuildBankLogQuery( WorldPacket & recv_data )
void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: Received MSG_QUERY_GUILD_BANK_TEXT");
DEBUG_LOG("WORLD: Received MSG_QUERY_GUILD_BANK_TEXT");
uint8 TabId;
recv_data >> TabId;
@ -1186,7 +1186,7 @@ void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recv_data)
void WorldSession::HandleSetGuildBankTabText(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: Received CMSG_SET_GUILD_BANK_TEXT");
DEBUG_LOG("WORLD: Received CMSG_SET_GUILD_BANK_TEXT");
uint8 TabId;
std::string Text;

View file

@ -110,7 +110,7 @@ InstanceSave* InstanceSaveManager::AddInstanceSave(uint32 mapId, uint32 instance
}
}
sLog.outDebug("InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d", mapId, instanceId);
DEBUG_LOG("InstanceSaveManager::AddInstanceSave: mapid = %d, instanceid = %d", mapId, instanceId);
InstanceSave *save = new InstanceSave(mapId, instanceId, difficulty, resetTime, canReset);
if(!load) save->SaveToDB();
@ -588,7 +588,7 @@ void InstanceSaveManager::_ResetSave(InstanceSaveHashMap::iterator &itr)
void InstanceSaveManager::_ResetInstance(uint32 mapid, uint32 instanceId)
{
sLog.outDebug("InstanceSaveMgr::_ResetInstance %u, %u", mapid, instanceId);
DEBUG_LOG("InstanceSaveMgr::_ResetInstance %u, %u", mapid, instanceId);
Map *map = (MapInstanced*)sMapMgr.CreateBaseMap(mapid);
if(!map->Instanceable())
return;

View file

@ -278,7 +278,7 @@ void Item::UpdateDuration(Player* owner, uint32 diff)
if (!GetUInt32Value(ITEM_FIELD_DURATION))
return;
sLog.outDebug("Item::UpdateDuration Item (Entry: %u Duration %u Diff %u)",GetEntry(),GetUInt32Value(ITEM_FIELD_DURATION),diff);
DEBUG_LOG("Item::UpdateDuration Item (Entry: %u Duration %u Diff %u)",GetEntry(),GetUInt32Value(ITEM_FIELD_DURATION),diff);
if (GetUInt32Value(ITEM_FIELD_DURATION)<=diff)
{

View file

@ -28,12 +28,12 @@
void WorldSession::HandleSplitItemOpcode( WorldPacket & recv_data )
{
//sLog.outDebug("WORLD: CMSG_SPLIT_ITEM");
//DEBUG_LOG("WORLD: CMSG_SPLIT_ITEM");
uint8 srcbag, srcslot, dstbag, dstslot;
uint32 count;
recv_data >> srcbag >> srcslot >> dstbag >> dstslot >> count;
//sLog.outDebug("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u, dstslot = %u, count = %u", srcbag, srcslot, dstbag, dstslot, count);
//DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u, dstslot = %u, count = %u", srcbag, srcslot, dstbag, dstslot, count);
uint16 src = ( (srcbag << 8) | srcslot );
uint16 dst = ( (dstbag << 8) | dstslot );
@ -61,11 +61,11 @@ void WorldSession::HandleSplitItemOpcode( WorldPacket & recv_data )
void WorldSession::HandleSwapInvItemOpcode( WorldPacket & recv_data )
{
//sLog.outDebug("WORLD: CMSG_SWAP_INV_ITEM");
//DEBUG_LOG("WORLD: CMSG_SWAP_INV_ITEM");
uint8 srcslot, dstslot;
recv_data >> dstslot >> srcslot;
//sLog.outDebug("STORAGE: receive srcslot = %u, dstslot = %u", srcslot, dstslot);
//DEBUG_LOG("STORAGE: receive srcslot = %u, dstslot = %u", srcslot, dstslot);
// prevent attempt swap same item to current position generated by client at special cheating sequence
if(srcslot == dstslot)
@ -110,11 +110,11 @@ void WorldSession::HandleAutoEquipItemSlotOpcode( WorldPacket & recv_data )
void WorldSession::HandleSwapItem( WorldPacket & recv_data )
{
//sLog.outDebug("WORLD: CMSG_SWAP_ITEM");
//DEBUG_LOG("WORLD: CMSG_SWAP_ITEM");
uint8 dstbag, dstslot, srcbag, srcslot;
recv_data >> dstbag >> dstslot >> srcbag >> srcslot ;
//sLog.outDebug("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u, dstslot = %u", srcbag, srcslot, dstbag, dstslot);
//DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u, dstslot = %u", srcbag, srcslot, dstbag, dstslot);
uint16 src = ( (srcbag << 8) | srcslot );
uint16 dst = ( (dstbag << 8) | dstslot );
@ -140,11 +140,11 @@ void WorldSession::HandleSwapItem( WorldPacket & recv_data )
void WorldSession::HandleAutoEquipItemOpcode( WorldPacket & recv_data )
{
//sLog.outDebug("WORLD: CMSG_AUTOEQUIP_ITEM");
//DEBUG_LOG("WORLD: CMSG_AUTOEQUIP_ITEM");
uint8 srcbag, srcslot;
recv_data >> srcbag >> srcslot;
//sLog.outDebug("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
//DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
Item *pSrcItem = _player->GetItemByPos( srcbag, srcslot );
if( !pSrcItem )
@ -234,11 +234,11 @@ void WorldSession::HandleAutoEquipItemOpcode( WorldPacket & recv_data )
void WorldSession::HandleDestroyItemOpcode( WorldPacket & recv_data )
{
//sLog.outDebug("WORLD: CMSG_DESTROYITEM");
//DEBUG_LOG("WORLD: CMSG_DESTROYITEM");
uint8 bag, slot, count, data1, data2, data3;
recv_data >> bag >> slot >> count >> data1 >> data2 >> data3;
//sLog.outDebug("STORAGE: receive bag = %u, slot = %u, count = %u", bag, slot, count);
//DEBUG_LOG("STORAGE: receive bag = %u, slot = %u, count = %u", bag, slot, count);
uint16 pos = (bag << 8) | slot;
@ -272,11 +272,11 @@ void WorldSession::HandleDestroyItemOpcode( WorldPacket & recv_data )
// Only _static_ data send in this packet !!!
void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
{
//sLog.outDebug("WORLD: CMSG_ITEM_QUERY_SINGLE");
//DEBUG_LOG("WORLD: CMSG_ITEM_QUERY_SINGLE");
uint32 item;
recv_data >> item;
sLog.outDetail("STORAGE: Item Query = %u", item);
DETAIL_LOG("STORAGE: Item Query = %u", item);
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype( item );
if( pProto )
@ -425,7 +425,7 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
}
else
{
sLog.outDebug( "WORLD: CMSG_ITEM_QUERY_SINGLE - NO item INFO! (ENTRY: %u)", item );
DEBUG_LOG( "WORLD: CMSG_ITEM_QUERY_SINGLE - NO item INFO! (ENTRY: %u)", item );
WorldPacket data( SMSG_ITEM_QUERY_SINGLE_RESPONSE, 4);
data << uint32(item | 0x80000000);
SendPacket( &data );
@ -434,7 +434,7 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
void WorldSession::HandleReadItem( WorldPacket & recv_data )
{
//sLog.outDebug( "WORLD: CMSG_READ_ITEM");
//DEBUG_LOG( "WORLD: CMSG_READ_ITEM");
uint8 bag, slot;
recv_data >> bag >> slot;
@ -450,12 +450,12 @@ void WorldSession::HandleReadItem( WorldPacket & recv_data )
if( msg == EQUIP_ERR_OK )
{
data.Initialize (SMSG_READ_ITEM_OK, 8);
sLog.outDetail("STORAGE: Item page sent");
DETAIL_LOG("STORAGE: Item page sent");
}
else
{
data.Initialize( SMSG_READ_ITEM_FAILED, 8 );
sLog.outDetail("STORAGE: Unable to read item");
DETAIL_LOG("STORAGE: Unable to read item");
_player->SendEquipError( msg, pItem, NULL );
}
data << pItem->GetGUID();
@ -467,19 +467,19 @@ void WorldSession::HandleReadItem( WorldPacket & recv_data )
void WorldSession::HandlePageQuerySkippedOpcode( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Received CMSG_PAGE_TEXT_QUERY" );
DEBUG_LOG( "WORLD: Received CMSG_PAGE_TEXT_QUERY" );
uint32 itemid;
ObjectGuid guid;
recv_data >> itemid >> guid;
sLog.outDetail( "Packet Info: itemid: %u guid: %s", itemid, guid.GetString().c_str());
DETAIL_LOG( "Packet Info: itemid: %u guid: %s", itemid, guid.GetString().c_str());
}
void WorldSession::HandleSellItemOpcode( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Received CMSG_SELL_ITEM" );
DEBUG_LOG( "WORLD: Received CMSG_SELL_ITEM" );
uint64 vendorguid, itemguid;
uint32 count;
@ -491,7 +491,7 @@ void WorldSession::HandleSellItemOpcode( WorldPacket & recv_data )
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
if (!pCreature)
{
sLog.outDebug( "WORLD: HandleSellItemOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)) );
DEBUG_LOG( "WORLD: HandleSellItemOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)) );
_player->SendSellError( SELL_ERR_CANT_FIND_VENDOR, NULL, itemguid, 0);
return;
}
@ -588,7 +588,7 @@ void WorldSession::HandleSellItemOpcode( WorldPacket & recv_data )
void WorldSession::HandleBuybackItem(WorldPacket & recv_data)
{
sLog.outDebug( "WORLD: Received CMSG_BUYBACK_ITEM" );
DEBUG_LOG( "WORLD: Received CMSG_BUYBACK_ITEM" );
uint64 vendorguid;
uint32 slot;
@ -597,7 +597,7 @@ void WorldSession::HandleBuybackItem(WorldPacket & recv_data)
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
if (!pCreature)
{
sLog.outDebug( "WORLD: HandleBuybackItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)) );
DEBUG_LOG( "WORLD: HandleBuybackItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)) );
_player->SendSellError( SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
return;
}
@ -636,7 +636,7 @@ void WorldSession::HandleBuybackItem(WorldPacket & recv_data)
void WorldSession::HandleBuyItemInSlotOpcode( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Received CMSG_BUY_ITEM_IN_SLOT" );
DEBUG_LOG( "WORLD: Received CMSG_BUY_ITEM_IN_SLOT" );
uint64 vendorguid, bagguid;
uint32 item, slot, count;
uint8 bagslot;
@ -678,7 +678,7 @@ void WorldSession::HandleBuyItemInSlotOpcode( WorldPacket & recv_data )
void WorldSession::HandleBuyItemOpcode( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Received CMSG_BUY_ITEM" );
DEBUG_LOG( "WORLD: Received CMSG_BUY_ITEM" );
uint64 vendorguid;
uint32 item, slot, count;
uint8 unk1;
@ -703,20 +703,20 @@ void WorldSession::HandleListInventoryOpcode( WorldPacket & recv_data )
if(!GetPlayer()->isAlive())
return;
sLog.outDebug( "WORLD: Recvd CMSG_LIST_INVENTORY" );
DEBUG_LOG( "WORLD: Recvd CMSG_LIST_INVENTORY" );
SendListInventory( guid );
}
void WorldSession::SendListInventory(uint64 vendorguid)
{
sLog.outDebug("WORLD: Sent SMSG_LIST_INVENTORY");
DEBUG_LOG("WORLD: Sent SMSG_LIST_INVENTORY");
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(vendorguid, UNIT_NPC_FLAG_VENDOR);
if (!pCreature)
{
sLog.outDebug("WORLD: SendListInventory - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)));
DEBUG_LOG("WORLD: SendListInventory - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)));
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
return;
}
@ -783,11 +783,11 @@ void WorldSession::SendListInventory(uint64 vendorguid)
void WorldSession::HandleAutoStoreBagItemOpcode( WorldPacket & recv_data )
{
//sLog.outDebug("WORLD: CMSG_AUTOSTORE_BAG_ITEM");
//DEBUG_LOG("WORLD: CMSG_AUTOSTORE_BAG_ITEM");
uint8 srcbag, srcslot, dstbag;
recv_data >> srcbag >> srcslot >> dstbag;
//sLog.outDebug("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u", srcbag, srcslot, dstbag);
//DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u", srcbag, srcslot, dstbag);
Item *pItem = _player->GetItemByPos( srcbag, srcslot );
if( !pItem )
@ -834,7 +834,7 @@ void WorldSession::HandleAutoStoreBagItemOpcode( WorldPacket & recv_data )
void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: CMSG_BUY_BANK_SLOT");
DEBUG_LOG("WORLD: CMSG_BUY_BANK_SLOT");
uint64 guid;
recvPacket >> guid;
@ -844,7 +844,7 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_BANKER);
if(!pCreature)
{
sLog.outDebug( "WORLD: HandleBuyBankSlotOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleBuyBankSlotOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
return;
}
*/
@ -854,7 +854,7 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
// next slot
++slot;
sLog.outDetail("PLAYER: Buy bank bag slot, slot number = %u", slot);
DETAIL_LOG("PLAYER: Buy bank bag slot, slot number = %u", slot);
BankBagSlotPricesEntry const* slotEntry = sBankBagSlotPricesStore.LookupEntry(slot);
@ -887,11 +887,11 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
void WorldSession::HandleAutoBankItemOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: CMSG_AUTOBANK_ITEM");
DEBUG_LOG("WORLD: CMSG_AUTOBANK_ITEM");
uint8 srcbag, srcslot;
recvPacket >> srcbag >> srcslot;
sLog.outDebug("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
Item *pItem = _player->GetItemByPos( srcbag, srcslot );
if( !pItem )
@ -911,11 +911,11 @@ void WorldSession::HandleAutoBankItemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleAutoStoreBankItemOpcode(WorldPacket& recvPacket)
{
sLog.outDebug("WORLD: CMSG_AUTOSTORE_BANK_ITEM");
DEBUG_LOG("WORLD: CMSG_AUTOSTORE_BANK_ITEM");
uint8 srcbag, srcslot;
recvPacket >> srcbag >> srcslot;
sLog.outDebug("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
DEBUG_LOG("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
Item *pItem = _player->GetItemByPos( srcbag, srcslot );
if( !pItem )
@ -957,7 +957,7 @@ void WorldSession::HandleSetAmmoOpcode(WorldPacket & recv_data)
return;
}
sLog.outDebug("WORLD: CMSG_SET_AMMO");
DEBUG_LOG("WORLD: CMSG_SET_AMMO");
uint32 item;
recv_data >> item;
@ -996,7 +996,7 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data)
recv_data >> itemid;
recv_data.read_skip<uint64>(); // guid
sLog.outDebug("WORLD: CMSG_ITEM_NAME_QUERY %u", itemid);
DEBUG_LOG("WORLD: CMSG_ITEM_NAME_QUERY %u", itemid);
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype( itemid );
if( pProto )
{
@ -1033,7 +1033,7 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data)
void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data)
{
sLog.outDebug("Received opcode CMSG_WRAP_ITEM");
DEBUG_LOG("Received opcode CMSG_WRAP_ITEM");
uint8 gift_bag, gift_slot, item_bag, item_slot;
//recv_data.hexlike();
@ -1041,7 +1041,7 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data)
recv_data >> gift_bag >> gift_slot; // paper
recv_data >> item_bag >> item_slot; // item
sLog.outDebug("WRAP: receive gift_bag = %u, gift_slot = %u, item_bag = %u, item_slot = %u", gift_bag, gift_slot, item_bag, item_slot);
DEBUG_LOG("WRAP: receive gift_bag = %u, gift_slot = %u, item_bag = %u, item_slot = %u", gift_bag, gift_slot, item_bag, item_slot);
Item *gift = _player->GetItemByPos( gift_bag, gift_slot );
if(!gift)
@ -1138,7 +1138,7 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data)
void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
{
sLog.outDebug("WORLD: CMSG_SOCKET_GEMS");
DEBUG_LOG("WORLD: CMSG_SOCKET_GEMS");
uint64 item_guid;
uint64 gem_guids[MAX_GEM_SOCKETS];
@ -1340,7 +1340,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data)
{
sLog.outDebug("WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT");
DEBUG_LOG("WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT");
uint32 eslot;
@ -1364,7 +1364,7 @@ void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data)
void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data)
{
sLog.outDebug("WORLD: CMSG_ITEM_REFUND_INFO_REQUEST");
DEBUG_LOG("WORLD: CMSG_ITEM_REFUND_INFO_REQUEST");
uint64 guid;
recv_data >> guid; // item guid
@ -1373,13 +1373,13 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data)
if(!item)
{
sLog.outDebug("Item refund: item not found!");
DEBUG_LOG("Item refund: item not found!");
return;
}
if(!item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_REFUNDABLE))
{
sLog.outDebug("Item refund: item not refundable!");
DEBUG_LOG("Item refund: item not refundable!");
return;
}
@ -1396,7 +1396,7 @@ void WorldSession::HandleItemTextQuery(WorldPacket & recv_data )
uint64 itemGuid;
recv_data >> itemGuid;
sLog.outDebug("CMSG_ITEM_TEXT_QUERY item guid: %u", GUID_LOPART(itemGuid));
DEBUG_LOG("CMSG_ITEM_TEXT_QUERY item guid: %u", GUID_LOPART(itemGuid));
WorldPacket data(SMSG_ITEM_TEXT_QUERY_RESPONSE, (4+10)); // guess size

View file

@ -149,7 +149,7 @@ static void AttemptAddMore(Player* _player)
void WorldSession::HandleLfgJoinOpcode( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_LFG_JOIN");
DEBUG_LOG("CMSG_LFG_JOIN");
LookingForGroup_auto_join = true;
uint8 counter1, counter2;
@ -177,13 +177,13 @@ void WorldSession::HandleLfgJoinOpcode( WorldPacket & recv_data )
void WorldSession::HandleLfgLeaveOpcode( WorldPacket & /*recv_data*/ )
{
sLog.outDebug("CMSG_LFG_LEAVE");
DEBUG_LOG("CMSG_LFG_LEAVE");
LookingForGroup_auto_join = false;
}
void WorldSession::HandleSearchLfgJoinOpcode( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_SEARCH_LFG_JOIN");
DEBUG_LOG("CMSG_SEARCH_LFG_JOIN");
LookingForGroup_auto_add = true;
recv_data >> Unused<uint32>(); // join id?
@ -196,7 +196,7 @@ void WorldSession::HandleSearchLfgJoinOpcode( WorldPacket & recv_data )
void WorldSession::HandleSearchLfgLeaveOpcode( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_SEARCH_LFG_LEAVE");
DEBUG_LOG("CMSG_SEARCH_LFG_LEAVE");
LookingForGroup_auto_add = false;
recv_data >> Unused<uint32>(); // join id?
@ -205,7 +205,7 @@ void WorldSession::HandleSearchLfgLeaveOpcode( WorldPacket & recv_data )
void WorldSession::HandleLfgClearOpcode( WorldPacket & /*recv_data */ )
{
// empty packet
sLog.outDebug("CMSG_CLEAR_LOOKING_FOR_GROUP");
DEBUG_LOG("CMSG_CLEAR_LOOKING_FOR_GROUP");
for(int i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
_player->m_lookingForGroup.slots[i].Clear();
@ -219,14 +219,14 @@ void WorldSession::HandleLfgClearOpcode( WorldPacket & /*recv_data */ )
void WorldSession::HandleLfmClearOpcode( WorldPacket & /*recv_data */)
{
// empty packet
sLog.outDebug("CMSG_CLEAR_LOOKING_FOR_MORE");
DEBUG_LOG("CMSG_CLEAR_LOOKING_FOR_MORE");
_player->m_lookingForGroup.more.Clear();
}
void WorldSession::HandleSetLfmOpcode( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_SET_LOOKING_FOR_MORE");
DEBUG_LOG("CMSG_SET_LOOKING_FOR_MORE");
//recv_data.hexlike();
uint32 temp, entry, type;
uint8 unk1;
@ -238,7 +238,7 @@ void WorldSession::HandleSetLfmOpcode( WorldPacket & recv_data )
type = ( (temp >> 24) & 0x000000FF);
_player->m_lookingForGroup.more.Set(entry,type);
sLog.outDebug("LFM set: temp %u, zone %u, type %u", temp, entry, type);
DEBUG_LOG("LFM set: temp %u, zone %u, type %u", temp, entry, type);
if(LookingForGroup_auto_add)
AttemptAddMore(_player);
@ -248,24 +248,24 @@ void WorldSession::HandleSetLfmOpcode( WorldPacket & recv_data )
void WorldSession::HandleSetLfgCommentOpcode( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_SET_LFG_COMMENT");
DEBUG_LOG("CMSG_SET_LFG_COMMENT");
//recv_data.hexlike();
std::string comment;
recv_data >> comment;
sLog.outDebug("LFG comment %s", comment.c_str());
DEBUG_LOG("LFG comment %s", comment.c_str());
_player->m_lookingForGroup.comment = comment;
}
void WorldSession::HandleLookingForGroup(WorldPacket& recv_data)
{
sLog.outDebug("MSG_LOOKING_FOR_GROUP");
DEBUG_LOG("MSG_LOOKING_FOR_GROUP");
//recv_data.hexlike();
uint32 type, entry, unk;
recv_data >> type >> entry >> unk;
sLog.outDebug("MSG_LOOKING_FOR_GROUP: type %u, entry %u, unk %u", type, entry, unk);
DEBUG_LOG("MSG_LOOKING_FOR_GROUP: type %u, entry %u, unk %u", type, entry, unk);
if(LookingForGroup_auto_add)
AttemptAddMore(_player);
@ -412,7 +412,7 @@ void WorldSession::SendLfgResult(uint32 type, uint32 entry, uint8 lfg_type)
void WorldSession::HandleSetLfgOpcode( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_SET_LOOKING_FOR_GROUP");
DEBUG_LOG("CMSG_SET_LOOKING_FOR_GROUP");
recv_data.hexlike();
uint32 slot, temp, entry, type;
uint8 roles, unk1;
@ -427,7 +427,7 @@ void WorldSession::HandleSetLfgOpcode( WorldPacket & recv_data )
_player->m_lookingForGroup.slots[slot].Set(entry, type);
_player->m_lookingForGroup.roles = roles;
sLog.outDebug("LFG set: looknumber %u, temp %X, type %u, entry %u", slot, temp, type, entry);
DEBUG_LOG("LFG set: looknumber %u, temp %X, type %u, entry %u", slot, temp, type, entry);
if(LookingForGroup_auto_join)
AttemptJoin(_player);
@ -438,7 +438,7 @@ void WorldSession::HandleSetLfgOpcode( WorldPacket & recv_data )
void WorldSession::HandleLfgSetRoles(WorldPacket &recv_data)
{
sLog.outDebug("CMSG_LFG_SET_ROLES");
DEBUG_LOG("CMSG_LFG_SET_ROLES");
uint8 roles;
recv_data >> roles;

View file

@ -322,12 +322,12 @@ bool ChatHandler::HandleGPSCommand(const char* args)
cell.GridX(), cell.GridY(), cell.CellX(), cell.CellY(), obj->GetInstanceId(),
zone_x, zone_y, ground_z, floor_z, have_map, have_vmap );
sLog.outDebug("Player %s GPS call for %s '%s' (%s: %u):",
DEBUG_LOG("Player %s GPS call for %s '%s' (%s: %u):",
m_session ? GetNameLink().c_str() : GetMangosString(LANG_CONSOLE_COMMAND),
(obj->GetTypeId() == TYPEID_PLAYER ? "player" : "creature"), obj->GetName(),
(obj->GetTypeId() == TYPEID_PLAYER ? "GUID" : "Entry"), (obj->GetTypeId() == TYPEID_PLAYER ? obj->GetGUIDLow(): obj->GetEntry()) );
sLog.outDebug(GetMangosString(LANG_MAP_POSITION),
DEBUG_LOG(GetMangosString(LANG_MAP_POSITION),
obj->GetMapId(), (mapEntry ? mapEntry->name[sWorld.GetDefaultDbcLocale()] : "<unknown>" ),
zone_id, (zoneEntry ? zoneEntry->area_name[sWorld.GetDefaultDbcLocale()] : "<unknown>" ),
area_id, (areaEntry ? areaEntry->area_name[sWorld.GetDefaultDbcLocale()] : "<unknown>" ),
@ -787,7 +787,7 @@ bool ChatHandler::HandleModifyEnergyCommand(const char* args)
chr->SetMaxPower(POWER_ENERGY,energym );
chr->SetPower(POWER_ENERGY, energy );
sLog.outDetail(GetMangosString(LANG_CURRENT_ENERGY),chr->GetMaxPower(POWER_ENERGY));
DETAIL_LOG(GetMangosString(LANG_CURRENT_ENERGY),chr->GetMaxPower(POWER_ENERGY));
return true;
}
@ -1645,7 +1645,7 @@ bool ChatHandler::HandleModifyMoneyCommand(const char* args)
{
int32 newmoney = int32(moneyuser) + addmoney;
sLog.outDetail(GetMangosString(LANG_CURRENT_MONEY), moneyuser, addmoney, newmoney);
DETAIL_LOG(GetMangosString(LANG_CURRENT_MONEY), moneyuser, addmoney, newmoney);
if (newmoney <= 0 )
{
PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, GetNameLink(chr).c_str());
@ -1677,7 +1677,7 @@ bool ChatHandler::HandleModifyMoneyCommand(const char* args)
chr->ModifyMoney( addmoney );
}
sLog.outDetail(GetMangosString(LANG_NEW_MONEY), moneyuser, addmoney, chr->GetMoney() );
DETAIL_LOG(GetMangosString(LANG_NEW_MONEY), moneyuser, addmoney, chr->GetMoney() );
return true;
}

View file

@ -739,7 +739,7 @@ bool ChatHandler::HandleGameObjectAddCommand(const char* args)
{
uint32 value = atoi((char*)spawntimeSecs);
pGameObj->SetRespawnTime(value);
//sLog.outDebug("*** spawntimeSecs: %d", value);
//DEBUG_LOG("*** spawntimeSecs: %d", value);
}
// fill the gameobject data and save to the db
@ -752,7 +752,7 @@ bool ChatHandler::HandleGameObjectAddCommand(const char* args)
return false;
}
sLog.outDebug(GetMangosString(LANG_GAMEOBJECT_CURRENT), gInfo->name, db_lowGUID, x, y, z, o);
DEBUG_LOG(GetMangosString(LANG_GAMEOBJECT_CURRENT), gInfo->name, db_lowGUID, x, y, z, o);
map->Add(pGameObj);
@ -2435,7 +2435,7 @@ bool ChatHandler::HandleDelTicketCommand(const char *args)
*/
bool ChatHandler::HandleWpAddCommand(const char* args)
{
sLog.outDebug("DEBUG: HandleWpAddCommand");
DEBUG_LOG("DEBUG: HandleWpAddCommand");
// optional
char* guid_str = NULL;
@ -2451,7 +2451,7 @@ bool ChatHandler::HandleWpAddCommand(const char* args)
// Did player provide a GUID?
if (!guid_str)
{
sLog.outDebug("DEBUG: HandleWpAddCommand - No GUID provided");
DEBUG_LOG("DEBUG: HandleWpAddCommand - No GUID provided");
// No GUID provided
// -> Player must have selected a creature
@ -2464,7 +2464,7 @@ bool ChatHandler::HandleWpAddCommand(const char* args)
}
if (target->GetEntry() == VISUAL_WAYPOINT )
{
sLog.outDebug("DEBUG: HandleWpAddCommand - target->GetEntry() == VISUAL_WAYPOINT (1) ");
DEBUG_LOG("DEBUG: HandleWpAddCommand - target->GetEntry() == VISUAL_WAYPOINT (1) ");
QueryResult *result =
WorldDatabase.PQuery( "SELECT id, point FROM creature_movement WHERE wpguid = %u",
@ -2520,7 +2520,7 @@ bool ChatHandler::HandleWpAddCommand(const char* args)
}
else
{
sLog.outDebug("DEBUG: HandleWpAddCommand - GUID provided");
DEBUG_LOG("DEBUG: HandleWpAddCommand - GUID provided");
// GUID provided
// Warn if player also selected a creature
@ -2549,9 +2549,9 @@ bool ChatHandler::HandleWpAddCommand(const char* args)
}
// lowguid -> GUID of the NPC
// point -> number of the waypoint (if not 0)
sLog.outDebug("DEBUG: HandleWpAddCommand - danach");
DEBUG_LOG("DEBUG: HandleWpAddCommand - danach");
sLog.outDebug("DEBUG: HandleWpAddCommand - point == 0");
DEBUG_LOG("DEBUG: HandleWpAddCommand - point == 0");
Player* player = m_session->GetPlayer();
sWaypointMgr.AddLastNode(lowguid, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), 0, 0);
@ -2598,7 +2598,7 @@ bool ChatHandler::HandleWpAddCommand(const char* args)
*/
bool ChatHandler::HandleWpModifyCommand(const char* args)
{
sLog.outDebug("DEBUG: HandleWpModifyCommand");
DEBUG_LOG("DEBUG: HandleWpModifyCommand");
if(!*args)
return false;
@ -2633,7 +2633,7 @@ bool ChatHandler::HandleWpModifyCommand(const char* args)
if(target)
{
sLog.outDebug("DEBUG: HandleWpModifyCommand - User did select an NPC");
DEBUG_LOG("DEBUG: HandleWpModifyCommand - User did select an NPC");
// Did the user select a visual spawnpoint?
if (target->GetEntry() != VISUAL_WAYPOINT )
@ -2655,14 +2655,14 @@ bool ChatHandler::HandleWpModifyCommand(const char* args)
SetSentErrorMessage(true);
return false;
}
sLog.outDebug("DEBUG: HandleWpModifyCommand - After getting wpGuid");
DEBUG_LOG("DEBUG: HandleWpModifyCommand - After getting wpGuid");
Field *fields = result->Fetch();
lowguid = fields[0].GetUInt32();
point = fields[1].GetUInt32();
// Cleanup memory
sLog.outDebug("DEBUG: HandleWpModifyCommand - Cleanup memory");
DEBUG_LOG("DEBUG: HandleWpModifyCommand - Cleanup memory");
delete result;
}
else
@ -2732,7 +2732,7 @@ bool ChatHandler::HandleWpModifyCommand(const char* args)
}
}
sLog.outDebug("DEBUG: HandleWpModifyCommand - Parameters parsed - now execute the command");
DEBUG_LOG("DEBUG: HandleWpModifyCommand - Parameters parsed - now execute the command");
// wpGuid -> GUID of the waypoint creature
// lowguid -> GUID of the NPC
@ -2763,13 +2763,13 @@ bool ChatHandler::HandleWpModifyCommand(const char* args)
return false;
}
sLog.outDebug("DEBUG: HandleWpModifyCommand - add -- npcCreature");
DEBUG_LOG("DEBUG: HandleWpModifyCommand - add -- npcCreature");
// What to do:
// Add the visual spawnpoint (DB only)
// Adjust the waypoints
// Respawn the owner of the waypoints
sLog.outDebug("DEBUG: HandleWpModifyCommand - add");
DEBUG_LOG("DEBUG: HandleWpModifyCommand - add");
Player* chr = m_session->GetPlayer();
Map *map = chr->GetMap();
@ -3007,7 +3007,7 @@ bool ChatHandler::HandleWpModifyCommand(const char* args)
*/
bool ChatHandler::HandleWpShowCommand(const char* args)
{
sLog.outDebug("DEBUG: HandleWpShowCommand");
DEBUG_LOG("DEBUG: HandleWpShowCommand");
if(!*args)
return false;
@ -3020,7 +3020,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args)
}
// second arg: GUID (optional, if a creature is selected)
char* guid_str = strtok((char*)NULL, " ");
sLog.outDebug("DEBUG: HandleWpShowCommand: show_str: %s guid_str: %s", show_str, guid_str);
DEBUG_LOG("DEBUG: HandleWpShowCommand: show_str: %s guid_str: %s", show_str, guid_str);
//if (!guid_str) {
// return false;
//}
@ -3032,7 +3032,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args)
// Did player provide a GUID?
if (!guid_str)
{
sLog.outDebug("DEBUG: HandleWpShowCommand: !guid_str");
DEBUG_LOG("DEBUG: HandleWpShowCommand: !guid_str");
// No GUID provided
// -> Player must have selected a creature
@ -3045,7 +3045,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args)
}
else
{
sLog.outDebug("DEBUG: HandleWpShowCommand: GUID provided");
DEBUG_LOG("DEBUG: HandleWpShowCommand: GUID provided");
// GUID provided
// Warn if player also selected a creature
// -> Creature selection is ignored <-
@ -3079,7 +3079,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args)
std::string show = show_str;
uint32 Maxpoint;
sLog.outDebug("DEBUG: HandleWpShowCommand: lowguid: %u show: %s", lowguid, show_str);
DEBUG_LOG("DEBUG: HandleWpShowCommand: lowguid: %u show: %s", lowguid, show_str);
// Show info for the selected waypoint
if(show == "info")
@ -3230,7 +3230,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args)
}
wpCreature->SetVisibility(VISIBILITY_OFF);
sLog.outDebug("DEBUG: UPDATE creature_movement SET wpguid = '%u", wpCreature->GetGUIDLow());
DEBUG_LOG("DEBUG: UPDATE creature_movement SET wpguid = '%u", wpCreature->GetGUIDLow());
// set "wpguid" column to the visual waypoint
WorldDatabase.PExecuteLog("UPDATE creature_movement SET wpguid = '%u' WHERE id = '%u' and point = '%u'", wpCreature->GetGUIDLow(), lowguid, point);

View file

@ -2114,7 +2114,7 @@ bool ChatHandler::HandleAddItemCommand(const char* args)
if(!plTarget)
plTarget = pl;
sLog.outDetail(GetMangosString(LANG_ADDITEM), itemId, count);
DETAIL_LOG(GetMangosString(LANG_ADDITEM), itemId, count);
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(itemId);
if(!pProto)
@ -2193,7 +2193,7 @@ bool ChatHandler::HandleAddItemSetCommand(const char* args)
if(!plTarget)
plTarget = pl;
sLog.outDetail(GetMangosString(LANG_ADDITEMSET), itemsetId);
DETAIL_LOG(GetMangosString(LANG_ADDITEMSET), itemsetId);
bool found = false;
for (uint32 id = 0; id < sItemStorage.MaxEntry; id++)

View file

@ -33,7 +33,7 @@
void WorldSession::HandleAutostoreLootItemOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_AUTOSTORE_LOOT_ITEM");
DEBUG_LOG("WORLD: CMSG_AUTOSTORE_LOOT_ITEM");
Player *player = GetPlayer();
ObjectGuid lguid = player->GetLootGUID();
Loot *loot;
@ -171,7 +171,7 @@ void WorldSession::HandleAutostoreLootItemOpcode( WorldPacket & recv_data )
void WorldSession::HandleLootMoneyOpcode( WorldPacket & /*recv_data*/ )
{
sLog.outDebug("WORLD: CMSG_LOOT_MONEY");
DEBUG_LOG("WORLD: CMSG_LOOT_MONEY");
Player *player = GetPlayer();
ObjectGuid guid = player->GetLootGUID();
@ -262,7 +262,7 @@ void WorldSession::HandleLootMoneyOpcode( WorldPacket & /*recv_data*/ )
void WorldSession::HandleLootOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_LOOT");
DEBUG_LOG("WORLD: CMSG_LOOT");
uint64 guid;
recv_data >> guid;
@ -276,7 +276,7 @@ void WorldSession::HandleLootOpcode( WorldPacket & recv_data )
void WorldSession::HandleLootReleaseOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_LOOT_RELEASE");
DEBUG_LOG("WORLD: CMSG_LOOT_RELEASE");
// cheaters can modify lguid to prevent correct apply loot release code and re-loot
// use internal stored guid
@ -481,7 +481,7 @@ void WorldSession::HandleLootMasterGiveOpcode( WorldPacket & recv_data )
if(!target)
return;
sLog.outDebug("WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = %s [%s].", target_playerguid.GetString().c_str(), target->GetName());
DEBUG_LOG("WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = %s [%s].", target_playerguid.GetString().c_str(), target->GetName());
if(_player->GetLootGUID() != lootguid.GetRawValue())
return;
@ -509,7 +509,7 @@ void WorldSession::HandleLootMasterGiveOpcode( WorldPacket & recv_data )
if (slotid > pLoot->items.size())
{
sLog.outDebug("AutoLootItem: Player %s might be using a hack! (slot %d, size %lu)",GetPlayer()->GetName(), slotid, (unsigned long)pLoot->items.size());
DEBUG_LOG("AutoLootItem: Player %s might be using a hack! (slot %d, size %lu)",GetPlayer()->GetName(), slotid, (unsigned long)pLoot->items.size());
return;
}

View file

@ -113,13 +113,13 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data )
if (!rc)
{
sLog.outDetail("Player %u is sending mail to %s (GUID: not existed!) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u",
DETAIL_LOG("Player %u is sending mail to %s (GUID: not existed!) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u",
pl->GetGUIDLow(), receiver.c_str(), subject.c_str(), body.c_str(), items_count, money, COD, unk1, unk2);
pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_RECIPIENT_NOT_FOUND);
return;
}
sLog.outDetail("Player %u is sending mail to %s (GUID: %u) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u", pl->GetGUIDLow(), receiver.c_str(), GUID_LOPART(rc), subject.c_str(), body.c_str(), items_count, money, COD, unk1, unk2);
DETAIL_LOG("Player %u is sending mail to %s (GUID: %u) with subject %s and body %s includes %u items, %u copper and %u COD copper with unk1 = %u, unk2 = %u", pl->GetGUIDLow(), receiver.c_str(), GUID_LOPART(rc), subject.c_str(), body.c_str(), items_count, money, COD, unk1, unk2);
if (pl->GetGUID() == rc)
{
@ -719,7 +719,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data )
bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPER | ITEM_FLAGS_UNK4 | ITEM_FLAGS_UNK1);
sLog.outDetail("HandleMailCreateTextItem mailid=%u", mailId);
DETAIL_LOG("HandleMailCreateTextItem mailid=%u", mailId);
ItemPosCountVec dest;
uint8 msg = _player->CanStoreItem( NULL_BAG, NULL_SLOT, dest, bodyItem, false );

View file

@ -125,10 +125,10 @@ void Map::LoadVMap(int gx,int gy)
switch(vmapLoadResult)
{
case VMAP::VMAP_LOAD_RESULT_OK:
sLog.outDetail("VMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx,gy,gx,gy);
DETAIL_LOG("VMAP loaded name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx,gy,gx,gy);
break;
case VMAP::VMAP_LOAD_RESULT_ERROR:
sLog.outDetail("Could not load VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx,gy,gx,gy);
DETAIL_LOG("Could not load VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx,gy,gx,gy);
break;
case VMAP::VMAP_LOAD_RESULT_IGNORED:
DEBUG_LOG("Ignored VMAP name:%s, id:%d, x:%d, y:%d (vmap rep.: x:%d, y:%d)", GetMapName(), GetId(), gx,gy,gx,gy);
@ -158,7 +158,7 @@ void Map::LoadMap(int gx,int gy, bool reload)
//map already load, delete it before reloading (Is it necessary? Do we really need the ability the reload maps during runtime?)
if(GridMaps[gx][gy])
{
sLog.outDetail("Unloading already loaded map %u before reloading.",i_id);
DETAIL_LOG("Unloading already loaded map %u before reloading.",i_id);
delete (GridMaps[gx][gy]);
GridMaps[gx][gy]=NULL;
}
@ -168,7 +168,7 @@ void Map::LoadMap(int gx,int gy, bool reload)
int len = sWorld.GetDataPath().length()+strlen("maps/%03u%02u%02u.map")+1;
tmp = new char[len];
snprintf(tmp, len, (char *)(sWorld.GetDataPath()+"maps/%03u%02u%02u.map").c_str(),i_id,gx,gy);
sLog.outDetail("Loading map %s",tmp);
DETAIL_LOG("Loading map %s",tmp);
// loading data
GridMaps[gx][gy] = new GridMap();
if (!GridMaps[gx][gy]->loadData(tmp))
@ -384,11 +384,11 @@ Map::EnsureGridLoadedAtEnter(const Cell &cell, Player *player)
if (player)
{
DEBUG_LOG("Player %s enter cell[%u,%u] triggers of loading grid[%u,%u] on map %u", player->GetName(), cell.CellX(), cell.CellY(), cell.GridX(), cell.GridY(), i_id);
DEBUG_FILTER_LOG(LOG_FILTER_PLAYER_MOVES, "Player %s enter cell[%u,%u] triggers of loading grid[%u,%u] on map %u", player->GetName(), cell.CellX(), cell.CellY(), cell.GridX(), cell.GridY(), i_id);
}
else
{
DEBUG_LOG("Active object nearby triggers of loading grid [%u,%u] on map %u", cell.GridX(), cell.GridY(), i_id);
DEBUG_FILTER_LOG(LOG_FILTER_PLAYER_MOVES, "Active object nearby triggers of loading grid [%u,%u] on map %u", cell.GridX(), cell.GridY(), i_id);
}
ResetGridExpiry(*getNGrid(cell.GridX(), cell.GridY()), 0.1f);
@ -751,7 +751,7 @@ void Map::Remove(Player *player, bool remove)
return;
}
DEBUG_LOG("Remove player %s from grid[%u,%u]", player->GetName(), cell.GridX(), cell.GridY());
DEBUG_FILTER_LOG(LOG_FILTER_PLAYER_MOVES, "Remove player %s from grid[%u,%u]", player->GetName(), cell.GridX(), cell.GridY());
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
ASSERT(grid != NULL);
@ -824,7 +824,7 @@ Map::PlayerRelocation(Player *player, float x, float y, float z, float orientati
if( old_cell.DiffGrid(new_cell) || old_cell.DiffCell(new_cell) )
{
DEBUG_LOG("Player %s relocation grid[%u,%u]cell[%u,%u]->grid[%u,%u]cell[%u,%u]", player->GetName(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
DEBUG_FILTER_LOG(LOG_FILTER_PLAYER_MOVES, "Player %s relocation grid[%u,%u]cell[%u,%u]->grid[%u,%u]cell[%u,%u]", player->GetName(), old_cell.GridX(), old_cell.GridY(), old_cell.CellX(), old_cell.CellY(), new_cell.GridX(), new_cell.GridY(), new_cell.CellX(), new_cell.CellY());
// update player position for group at taxi flight
if(player->GetGroup() && player->isInFlight())
@ -2032,7 +2032,7 @@ void Map::PlayerRelocationNotify( Player* player, Cell cell, CellPair cellpair )
void Map::SendInitSelf( Player * player )
{
sLog.outDetail("Creating player data for himself %u", player->GetGUIDLow());
DETAIL_LOG("Creating player data for himself %u", player->GetGUIDLow());
UpdateData data;
@ -2129,7 +2129,7 @@ void Map::AddObjectToRemoveList(WorldObject *obj)
obj->CleanupsBeforeDelete(); // remove or simplify at least cross referenced links
i_objectsToRemove.insert(obj);
//sLog.outDebug("Object (GUID: %u TypeId: %u ) added to removing list.",obj->GetGUIDLow(),obj->GetTypeId());
//DEBUG_LOG("Object (GUID: %u TypeId: %u ) added to removing list.",obj->GetGUIDLow(),obj->GetTypeId());
}
void Map::RemoveAllObjectsInRemoveList()
@ -2137,7 +2137,7 @@ void Map::RemoveAllObjectsInRemoveList()
if(i_objectsToRemove.empty())
return;
//sLog.outDebug("Object remover 1 check.");
//DEBUG_LOG("Object remover 1 check.");
while(!i_objectsToRemove.empty())
{
WorldObject* obj = *i_objectsToRemove.begin();
@ -2169,7 +2169,7 @@ void Map::RemoveAllObjectsInRemoveList()
break;
}
}
//sLog.outDebug("Object remover 2 check.");
//DEBUG_LOG("Object remover 2 check.");
}
uint32 Map::GetPlayersCountExceptGMs() const
@ -2325,7 +2325,7 @@ bool InstanceMap::CanEnter(Player *player)
uint32 maxPlayers = GetMaxPlayers();
if (!player->isGameMaster() && GetPlayersCountExceptGMs() >= maxPlayers)
{
sLog.outDetail("MAP: Instance '%u' of map '%s' cannot have more than '%u' players. Player '%s' rejected", GetInstanceId(), GetMapName(), maxPlayers, player->GetName());
DETAIL_LOG("MAP: Instance '%u' of map '%s' cannot have more than '%u' players. Player '%s' rejected", GetInstanceId(), GetMapName(), maxPlayers, player->GetName());
player->SendTransferAborted(GetId(), TRANSFER_ABORT_MAX_PLAYERS);
return false;
}
@ -2362,7 +2362,7 @@ bool InstanceMap::Add(Player *player)
InstanceSave *mapSave = sInstanceSaveMgr.GetInstanceSave(GetInstanceId());
if(!mapSave)
{
sLog.outDetail("InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId());
DETAIL_LOG("InstanceMap::Add: creating instance save for map %d spawnmode %d with instance id %d", GetId(), GetSpawnMode(), GetInstanceId());
mapSave = sInstanceSaveMgr.AddInstanceSave(GetId(), GetInstanceId(), Difficulty(GetSpawnMode()), 0, true);
}
@ -2436,7 +2436,7 @@ bool InstanceMap::Add(Player *player)
// first player enters (no players yet)
SetResetSchedule(false);
sLog.outDetail("MAP: Player '%s' is entering instance '%u' of map '%s'", player->GetName(), GetInstanceId(), GetMapName());
DETAIL_LOG("MAP: Player '%s' is entering instance '%u' of map '%s'", player->GetName(), GetInstanceId(), GetMapName());
// initialize unload state
m_unloadTimer = 0;
m_resetAfterUnload = false;
@ -2469,7 +2469,7 @@ void BattleGroundMap::Update(const uint32& diff)
void InstanceMap::Remove(Player *player, bool remove)
{
sLog.outDetail("MAP: Removing player '%s' from instance '%u' of map '%s' before relocating to other map", player->GetName(), GetInstanceId(), GetMapName());
DETAIL_LOG("MAP: Removing player '%s' from instance '%u' of map '%s' before relocating to other map", player->GetName(), GetInstanceId(), GetMapName());
//if last player set unload timer
if(!m_unloadTimer && m_mapRefManager.getSize() == 1)
m_unloadTimer = m_unloadWhenEmpty ? MIN_UNLOAD_DELAY : std::max(sWorld.getConfig(CONFIG_UINT32_INSTANCE_UNLOAD_DELAY), (uint32)MIN_UNLOAD_DELAY);
@ -2503,7 +2503,7 @@ void InstanceMap::CreateInstanceData(bool load)
const char* data = fields[0].GetString();
if(data)
{
sLog.outDebug("Loading instance data for `%s` with id %u", sObjectMgr.GetScriptName(i_script_id), i_InstanceId);
DEBUG_LOG("Loading instance data for `%s` with id %u", sObjectMgr.GetScriptName(i_script_id), i_InstanceId);
i_data->Load(data);
}
delete result;
@ -2511,7 +2511,7 @@ void InstanceMap::CreateInstanceData(bool load)
}
else
{
sLog.outDebug("New instance data, \"%s\" ,initialized!", sObjectMgr.GetScriptName(i_script_id));
DEBUG_LOG("New instance data, \"%s\" ,initialized!", sObjectMgr.GetScriptName(i_script_id));
i_data->Initialize();
}
}
@ -2678,7 +2678,7 @@ bool BattleGroundMap::Add(Player * player)
void BattleGroundMap::Remove(Player *player, bool remove)
{
sLog.outDetail("MAP: Removing player '%s' from bg '%u' of map '%s' before relocating to other map", player->GetName(), GetInstanceId(), GetMapName());
DETAIL_LOG("MAP: Removing player '%s' from bg '%u' of map '%s' before relocating to other map", player->GetName(), GetInstanceId(), GetMapName());
Map::Remove(player, remove);
}

View file

@ -170,7 +170,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save,
if (!GetMapDifficultyData(GetId(),difficulty))
difficulty = DUNGEON_DIFFICULTY_NORMAL;
sLog.outDebug("MapInstanced::CreateInstance: %s map instance %d for %d created with difficulty %s", save?"":"new ", InstanceId, GetId(), difficulty?"heroic":"normal");
DEBUG_LOG("MapInstanced::CreateInstance: %s map instance %d for %d created with difficulty %s", save?"":"new ", InstanceId, GetId(), difficulty?"heroic":"normal");
InstanceMap *map = new InstanceMap(GetId(), GetGridExpiry(), InstanceId, difficulty, this);
ASSERT(map->IsDungeon());
@ -187,7 +187,7 @@ BattleGroundMap* MapInstanced::CreateBattleGroundMap(uint32 InstanceId, BattleGr
// load/create a map
Guard guard(*this);
sLog.outDebug("MapInstanced::CreateBattleGroundMap: instance:%d for map:%d and bgType:%d created.", InstanceId, GetId(), bg->GetTypeID());
DEBUG_LOG("MapInstanced::CreateBattleGroundMap: instance:%d for map:%d and bgType:%d created.", InstanceId, GetId(), bg->GetTypeID());
PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(),bg->GetMinLevel());

View file

@ -181,7 +181,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
// probably there must be special opcode, because client has this string constant in GlobalStrings.lua
// TODO: this is not a good place to send the message
player->GetSession()->SendAreaTriggerMessage("You must be in a raid group to enter %s instance", mapName);
sLog.outDebug("MAP: Player '%s' must be in a raid group to enter instance of '%s'", player->GetName(), mapName);
DEBUG_LOG("MAP: Player '%s' must be in a raid group to enter instance of '%s'", player->GetName(), mapName);
return false;
}
}
@ -218,21 +218,21 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
if (!instance_map)
{
player->GetSession()->SendAreaTriggerMessage("You cannot enter %s while in a ghost mode", mapName);
sLog.outDebug("MAP: Player '%s' doesn't has a corpse in instance '%s' and can't enter", player->GetName(), mapName);
DEBUG_LOG("MAP: Player '%s' doesn't has a corpse in instance '%s' and can't enter", player->GetName(), mapName);
return false;
}
sLog.outDebug("MAP: Player '%s' has corpse in instance '%s' and can enter", player->GetName(), mapName);
DEBUG_LOG("MAP: Player '%s' has corpse in instance '%s' and can enter", player->GetName(), mapName);
}
else
{
sLog.outDebug("Map::CanEnter - player '%s' is dead but doesn't have a corpse!", player->GetName());
DEBUG_LOG("Map::CanEnter - player '%s' is dead but doesn't have a corpse!", player->GetName());
}
}
// TODO: move this to a map dependent location
/*if(i_data && i_data->IsEncounterInProgress())
{
sLog.outDebug("MAP: Player '%s' can't enter instance '%s' while an encounter is in progress.", player->GetName(), GetMapName());
DEBUG_LOG("MAP: Player '%s' can't enter instance '%s' while an encounter is in progress.", player->GetName(), GetMapName());
player->SendTransferAborted(GetId(), TRANSFER_ABORT_ZONE_IN_COMBAT);
return(false);
}*/

View file

@ -44,7 +44,7 @@
void WorldSession::HandleRepopRequestOpcode( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Recvd CMSG_REPOP_REQUEST Message" );
DEBUG_LOG( "WORLD: Recvd CMSG_REPOP_REQUEST Message" );
recv_data.read_skip<uint8>();
@ -58,7 +58,7 @@ void WorldSession::HandleRepopRequestOpcode( WorldPacket & recv_data )
// release spirit after he's killed but before he is updated
if(GetPlayer()->getDeathState() == JUST_DIED)
{
sLog.outDebug("HandleRepopRequestOpcode: got request after player %s(%d) was killed and before he was updated", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow());
DEBUG_LOG("HandleRepopRequestOpcode: got request after player %s(%d) was killed and before he was updated", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow());
GetPlayer()->KillPlayer();
}
@ -70,7 +70,7 @@ void WorldSession::HandleRepopRequestOpcode( WorldPacket & recv_data )
void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Recvd CMSG_WHO Message" );
DEBUG_LOG( "WORLD: Recvd CMSG_WHO Message" );
//recv_data.hexlike();
uint32 clientcount = 0;
@ -97,7 +97,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
uint32 temp;
recv_data >> temp; // zone id, 0 if zone is unknown...
zoneids[i] = temp;
sLog.outDebug("Zone %u: %u", i, zoneids[i]);
DEBUG_LOG("Zone %u: %u", i, zoneids[i]);
}
recv_data >> str_count; // user entered strings count, client limit=4 (checked on 2.0.10)
@ -105,7 +105,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
if(str_count > 4)
return; // can't be received from real client or broken packet
sLog.outDebug("Minlvl %u, maxlvl %u, name %s, guild %s, racemask %u, classmask %u, zones %u, strings %u", level_min, level_max, player_name.c_str(), guild_name.c_str(), racemask, classmask, zones_count, str_count);
DEBUG_LOG("Minlvl %u, maxlvl %u, name %s, guild %s, racemask %u, classmask %u, zones %u, strings %u", level_min, level_max, player_name.c_str(), guild_name.c_str(), racemask, classmask, zones_count, str_count);
std::wstring str[4]; // 4 is client limit
for(uint32 i = 0; i < str_count; ++i)
@ -118,7 +118,7 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
wstrToLower(str[i]);
sLog.outDebug("String %u: %s", i, temp.c_str());
DEBUG_LOG("String %u: %s", i, temp.c_str());
}
std::wstring wplayer_name;
@ -254,12 +254,12 @@ void WorldSession::HandleWhoOpcode( WorldPacket & recv_data )
data.put( 4, count > 50 ? count : clientcount ); // insert right count, online count
SendPacket(&data);
sLog.outDebug( "WORLD: Send SMSG_WHO Message" );
DEBUG_LOG( "WORLD: Send SMSG_WHO Message" );
}
void WorldSession::HandleLogoutRequestOpcode( WorldPacket & /*recv_data*/ )
{
sLog.outDebug( "WORLD: Recvd CMSG_LOGOUT_REQUEST Message, security - %u", GetSecurity() );
DEBUG_LOG( "WORLD: Recvd CMSG_LOGOUT_REQUEST Message, security - %u", GetSecurity() );
if (uint64 lguid = GetPlayer()->GetLootGUID())
DoLootRelease(lguid);
@ -308,12 +308,12 @@ void WorldSession::HandleLogoutRequestOpcode( WorldPacket & /*recv_data*/ )
void WorldSession::HandlePlayerLogoutOpcode( WorldPacket & /*recv_data*/ )
{
sLog.outDebug( "WORLD: Recvd CMSG_PLAYER_LOGOUT Message" );
DEBUG_LOG( "WORLD: Recvd CMSG_PLAYER_LOGOUT Message" );
}
void WorldSession::HandleLogoutCancelOpcode( WorldPacket & /*recv_data*/ )
{
sLog.outDebug( "WORLD: Recvd CMSG_LOGOUT_CANCEL Message" );
DEBUG_LOG( "WORLD: Recvd CMSG_LOGOUT_CANCEL Message" );
LogoutRequest(0);
@ -336,7 +336,7 @@ void WorldSession::HandleLogoutCancelOpcode( WorldPacket & /*recv_data*/ )
GetPlayer()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
}
sLog.outDebug( "WORLD: sent SMSG_LOGOUT_CANCEL_ACK Message" );
DEBUG_LOG( "WORLD: sent SMSG_LOGOUT_CANCEL_ACK Message" );
}
void WorldSession::HandleTogglePvP( WorldPacket & recv_data )
@ -372,7 +372,7 @@ void WorldSession::HandleZoneUpdateOpcode( WorldPacket & recv_data )
uint32 newZone;
recv_data >> newZone;
sLog.outDetail("WORLD: Recvd ZONE_UPDATE: %u", newZone);
DETAIL_LOG("WORLD: Recvd ZONE_UPDATE: %u", newZone);
// use server size data
uint32 newzone, newarea;
@ -415,7 +415,7 @@ void WorldSession::HandleSetSelectionOpcode( WorldPacket & recv_data )
void WorldSession::HandleStandStateChangeOpcode( WorldPacket & recv_data )
{
// sLog.outDebug( "WORLD: Received CMSG_STANDSTATECHANGE" ); -- too many spam in log at lags/debug stop
// DEBUG_LOG( "WORLD: Received CMSG_STANDSTATECHANGE" ); -- too many spam in log at lags/debug stop
uint32 animstate;
recv_data >> animstate;
@ -424,16 +424,16 @@ void WorldSession::HandleStandStateChangeOpcode( WorldPacket & recv_data )
void WorldSession::HandleContactListOpcode( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Received CMSG_CONTACT_LIST" );
DEBUG_LOG( "WORLD: Received CMSG_CONTACT_LIST" );
uint32 unk;
recv_data >> unk;
sLog.outDebug("unk value is %u", unk);
DEBUG_LOG("unk value is %u", unk);
_player->GetSocial()->SendSocialList();
}
void WorldSession::HandleAddFriendOpcode( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Received CMSG_ADD_FRIEND" );
DEBUG_LOG( "WORLD: Received CMSG_ADD_FRIEND" );
std::string friendName = GetMangosString(LANG_FRIEND_IGNORE_UNKNOWN);
std::string friendNote;
@ -447,7 +447,7 @@ void WorldSession::HandleAddFriendOpcode( WorldPacket & recv_data )
CharacterDatabase.escape_string(friendName); // prevent SQL injection - normal name don't must changed by this call
sLog.outDebug( "WORLD: %s asked to add friend : '%s'",
DEBUG_LOG( "WORLD: %s asked to add friend : '%s'",
GetPlayer()->GetName(), friendName.c_str() );
CharacterDatabase.AsyncPQuery(&WorldSession::HandleAddFriendOpcodeCallBack, GetAccountId(), friendNote, "SELECT guid, race FROM characters WHERE name = '%s'", friendName.c_str());
@ -487,7 +487,7 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult *result, uint32 acc
if(!session->GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(friendGuid), false))
{
friendResult = FRIEND_LIST_FULL;
sLog.outDebug( "WORLD: %s's friend list is full.", session->GetPlayer()->GetName());
DEBUG_LOG( "WORLD: %s's friend list is full.", session->GetPlayer()->GetName());
}
session->GetPlayer()->GetSocial()->SetFriendNote(GUID_LOPART(friendGuid), friendNote);
@ -496,14 +496,14 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult *result, uint32 acc
sSocialMgr.SendFriendStatus(session->GetPlayer(), friendResult, GUID_LOPART(friendGuid), false);
sLog.outDebug( "WORLD: Sent (SMSG_FRIEND_STATUS)" );
DEBUG_LOG( "WORLD: Sent (SMSG_FRIEND_STATUS)" );
}
void WorldSession::HandleDelFriendOpcode( WorldPacket & recv_data )
{
uint64 FriendGUID;
sLog.outDebug( "WORLD: Received CMSG_DEL_FRIEND" );
DEBUG_LOG( "WORLD: Received CMSG_DEL_FRIEND" );
recv_data >> FriendGUID;
@ -511,12 +511,12 @@ void WorldSession::HandleDelFriendOpcode( WorldPacket & recv_data )
sSocialMgr.SendFriendStatus(GetPlayer(), FRIEND_REMOVED, GUID_LOPART(FriendGUID), false);
sLog.outDebug( "WORLD: Sent motd (SMSG_FRIEND_STATUS)" );
DEBUG_LOG( "WORLD: Sent motd (SMSG_FRIEND_STATUS)" );
}
void WorldSession::HandleAddIgnoreOpcode( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Received CMSG_ADD_IGNORE" );
DEBUG_LOG( "WORLD: Received CMSG_ADD_IGNORE" );
std::string IgnoreName = GetMangosString(LANG_FRIEND_IGNORE_UNKNOWN);
@ -527,7 +527,7 @@ void WorldSession::HandleAddIgnoreOpcode( WorldPacket & recv_data )
CharacterDatabase.escape_string(IgnoreName); // prevent SQL injection - normal name don't must changed by this call
sLog.outDebug( "WORLD: %s asked to Ignore: '%s'",
DEBUG_LOG( "WORLD: %s asked to Ignore: '%s'",
GetPlayer()->GetName(), IgnoreName.c_str() );
CharacterDatabase.AsyncPQuery(&WorldSession::HandleAddIgnoreOpcodeCallBack, GetAccountId(), "SELECT guid FROM characters WHERE name = '%s'", IgnoreName.c_str());
@ -565,14 +565,14 @@ void WorldSession::HandleAddIgnoreOpcodeCallBack(QueryResult *result, uint32 acc
sSocialMgr.SendFriendStatus(session->GetPlayer(), ignoreResult, GUID_LOPART(IgnoreGuid), false);
sLog.outDebug( "WORLD: Sent (SMSG_FRIEND_STATUS)" );
DEBUG_LOG( "WORLD: Sent (SMSG_FRIEND_STATUS)" );
}
void WorldSession::HandleDelIgnoreOpcode( WorldPacket & recv_data )
{
uint64 IgnoreGUID;
sLog.outDebug( "WORLD: Received CMSG_DEL_IGNORE" );
DEBUG_LOG( "WORLD: Received CMSG_DEL_IGNORE" );
recv_data >> IgnoreGUID;
@ -580,12 +580,12 @@ void WorldSession::HandleDelIgnoreOpcode( WorldPacket & recv_data )
sSocialMgr.SendFriendStatus(GetPlayer(), FRIEND_IGNORE_REMOVED, GUID_LOPART(IgnoreGUID), false);
sLog.outDebug( "WORLD: Sent motd (SMSG_FRIEND_STATUS)" );
DEBUG_LOG( "WORLD: Sent motd (SMSG_FRIEND_STATUS)" );
}
void WorldSession::HandleSetContactNotesOpcode( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_SET_CONTACT_NOTES");
DEBUG_LOG("CMSG_SET_CONTACT_NOTES");
uint64 guid;
std::string note;
recv_data >> guid >> note;
@ -602,12 +602,12 @@ void WorldSession::HandleBugOpcode( WorldPacket & recv_data )
recv_data >> typelen >> type;
if( suggestion == 0 )
sLog.outDebug( "WORLD: Received CMSG_BUG [Bug Report]" );
DEBUG_LOG( "WORLD: Received CMSG_BUG [Bug Report]" );
else
sLog.outDebug( "WORLD: Received CMSG_BUG [Suggestion]" );
DEBUG_LOG( "WORLD: Received CMSG_BUG [Suggestion]" );
sLog.outDebug("%s", type.c_str() );
sLog.outDebug("%s", content.c_str() );
DEBUG_LOG("%s", type.c_str() );
DEBUG_LOG("%s", content.c_str() );
CharacterDatabase.escape_string(type);
CharacterDatabase.escape_string(content);
@ -616,7 +616,7 @@ void WorldSession::HandleBugOpcode( WorldPacket & recv_data )
void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data)
{
sLog.outDetail("WORLD: Received CMSG_RECLAIM_CORPSE");
DETAIL_LOG("WORLD: Received CMSG_RECLAIM_CORPSE");
uint64 guid;
recv_data >> guid;
@ -653,7 +653,7 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data)
void WorldSession::HandleResurrectResponseOpcode(WorldPacket & recv_data)
{
sLog.outDetail("WORLD: Received CMSG_RESURRECT_RESPONSE");
DETAIL_LOG("WORLD: Received CMSG_RESURRECT_RESPONSE");
uint64 guid;
uint8 status;
@ -677,23 +677,23 @@ void WorldSession::HandleResurrectResponseOpcode(WorldPacket & recv_data)
void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
{
sLog.outDebug("WORLD: Received CMSG_AREATRIGGER");
DEBUG_LOG("WORLD: Received CMSG_AREATRIGGER");
uint32 Trigger_ID;
recv_data >> Trigger_ID;
sLog.outDebug("Trigger ID: %u", Trigger_ID);
DEBUG_LOG("Trigger ID: %u", Trigger_ID);
if(GetPlayer()->isInFlight())
{
sLog.outDebug("Player '%s' (GUID: %u) in flight, ignore Area Trigger ID: %u", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), Trigger_ID);
DEBUG_LOG("Player '%s' (GUID: %u) in flight, ignore Area Trigger ID: %u", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), Trigger_ID);
return;
}
AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(Trigger_ID);
if(!atEntry)
{
sLog.outDebug("Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID: %u", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), Trigger_ID);
DEBUG_LOG("Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID: %u", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), Trigger_ID);
return;
}
@ -704,7 +704,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
if (!IsPointInAreaTriggerZone(atEntry, pl->GetMapId(), pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(), delta))
{
sLog.outDebug("Player '%s' (GUID: %u) too far, ignore Area Trigger ID: %u", pl->GetName(), pl->GetGUIDLow(), Trigger_ID);
DEBUG_LOG("Player '%s' (GUID: %u) too far, ignore Area Trigger ID: %u", pl->GetName(), pl->GetGUIDLow(), Trigger_ID);
return;
}
@ -810,12 +810,12 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data)
{
sLog.outDetail("WORLD: Received CMSG_UPDATE_ACCOUNT_DATA");
DETAIL_LOG("WORLD: Received CMSG_UPDATE_ACCOUNT_DATA");
uint32 type, timestamp, decompressedSize;
recv_data >> type >> timestamp >> decompressedSize;
sLog.outDebug("UAD: type %u, time %u, decompressedSize %u", type, timestamp, decompressedSize);
DEBUG_LOG("UAD: type %u, time %u, decompressedSize %u", type, timestamp, decompressedSize);
if(type > NUM_ACCOUNT_DATA_TYPES)
return;
@ -865,12 +865,12 @@ void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data)
void WorldSession::HandleRequestAccountData(WorldPacket& recv_data)
{
sLog.outDetail("WORLD: Received CMSG_REQUEST_ACCOUNT_DATA");
DETAIL_LOG("WORLD: Received CMSG_REQUEST_ACCOUNT_DATA");
uint32 type;
recv_data >> type;
sLog.outDebug("RAD: type %u", type);
DEBUG_LOG("RAD: type %u", type);
if(type > NUM_ACCOUNT_DATA_TYPES)
return;
@ -886,7 +886,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data)
if(size && compress(const_cast<uint8*>(dest.contents()), &destSize, (uint8*)adata->Data.c_str(), size) != Z_OK)
{
sLog.outDebug("RAD: Failed to compress account data");
DEBUG_LOG("RAD: Failed to compress account data");
return;
}
@ -903,7 +903,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data)
void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
{
sLog.outDebug( "WORLD: Received CMSG_SET_ACTION_BUTTON" );
DEBUG_LOG( "WORLD: Received CMSG_SET_ACTION_BUTTON" );
uint8 button;
uint32 packetData;
recv_data >> button >> packetData;
@ -911,10 +911,10 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
uint32 action = ACTION_BUTTON_ACTION(packetData);
uint8 type = ACTION_BUTTON_TYPE(packetData);
sLog.outDetail( "BUTTON: %u ACTION: %u TYPE: %u", button, action, type );
DETAIL_LOG( "BUTTON: %u ACTION: %u TYPE: %u", button, action, type );
if (!packetData)
{
sLog.outDetail( "MISC: Remove action from button %u", button );
DETAIL_LOG( "MISC: Remove action from button %u", button );
GetPlayer()->removeActionButton(GetPlayer()->GetActiveSpec(),button);
}
else
@ -923,16 +923,16 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
{
case ACTION_BUTTON_MACRO:
case ACTION_BUTTON_CMACRO:
sLog.outDetail( "MISC: Added Macro %u into button %u", action, button );
DETAIL_LOG( "MISC: Added Macro %u into button %u", action, button );
break;
case ACTION_BUTTON_EQSET:
sLog.outDetail( "MISC: Added EquipmentSet %u into button %u", action, button );
DETAIL_LOG( "MISC: Added EquipmentSet %u into button %u", action, button );
break;
case ACTION_BUTTON_SPELL:
sLog.outDetail( "MISC: Added Spell %u into button %u", action, button );
DETAIL_LOG( "MISC: Added Spell %u into button %u", action, button );
break;
case ACTION_BUTTON_ITEM:
sLog.outDetail( "MISC: Added Item %u into button %u", action, button );
DETAIL_LOG( "MISC: Added Item %u into button %u", action, button );
break;
default:
sLog.outError( "MISC: Unknown action button type %u for action %u into button %u", type, action, button );
@ -967,7 +967,7 @@ void WorldSession::HandleMoveTimeSkippedOpcode( WorldPacket & recv_data )
uint32 time_skipped;
recv_data >> guid;
recv_data >> time_skipped;
sLog.outDebug( "WORLD: CMSG_MOVE_TIME_SKIPPED" );
DEBUG_LOG( "WORLD: CMSG_MOVE_TIME_SKIPPED" );
/// TODO
must be need use in mangos
@ -1000,7 +1000,7 @@ void WorldSession::HandleMoveUnRootAck(WorldPacket& recv_data)
return;
}
sLog.outDebug( "WORLD: CMSG_FORCE_MOVE_UNROOT_ACK" );
DEBUG_LOG( "WORLD: CMSG_FORCE_MOVE_UNROOT_ACK" );
recv_data.read_skip<uint32>(); // unk
@ -1024,7 +1024,7 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recv_data)
return;
}
sLog.outDebug( "WORLD: CMSG_FORCE_MOVE_ROOT_ACK" );
DEBUG_LOG( "WORLD: CMSG_FORCE_MOVE_ROOT_ACK" );
recv_data.read_skip<uint32>(); // unk
@ -1055,7 +1055,7 @@ void WorldSession::HandleWardenDataOpcode(WorldPacket& recv_data)
/*
uint8 tmp;
recv_data >> tmp;
sLog.outDebug("Received opcode CMSG_WARDEN_DATA, not resolve.uint8 = %u", tmp);
DEBUG_LOG("Received opcode CMSG_WARDEN_DATA, not resolve.uint8 = %u", tmp);
*/
}
@ -1145,11 +1145,11 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data)
recv_data >> PositionZ;
recv_data >> Orientation; // o (3.141593 = 180 degrees)
//sLog.outDebug("Received opcode CMSG_WORLD_TELEPORT");
//DEBUG_LOG("Received opcode CMSG_WORLD_TELEPORT");
if(GetPlayer()->isInFlight())
{
sLog.outDebug("Player '%s' (GUID: %u) in flight, ignore worldport command.",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow());
DEBUG_LOG("Player '%s' (GUID: %u) in flight, ignore worldport command.",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow());
return;
}
@ -1159,12 +1159,12 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data)
GetPlayer()->TeleportTo(mapid, PositionX, PositionY, PositionZ, Orientation);
else
SendNotification(LANG_YOU_NOT_HAVE_PERMISSION);
sLog.outDebug("Received worldport command from player %s", GetPlayer()->GetName());
DEBUG_LOG("Received worldport command from player %s", GetPlayer()->GetName());
}
void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
{
sLog.outDebug("Received opcode CMSG_WHOIS");
DEBUG_LOG("Received opcode CMSG_WHOIS");
std::string charname;
recv_data >> charname;
@ -1216,12 +1216,12 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
delete result;
sLog.outDebug("Received whois command from player %s for character %s", GetPlayer()->GetName(), charname.c_str());
DEBUG_LOG("Received whois command from player %s for character %s", GetPlayer()->GetName(), charname.c_str());
}
void WorldSession::HandleComplainOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_COMPLAIN");
DEBUG_LOG("WORLD: CMSG_COMPLAIN");
recv_data.hexlike();
uint8 spam_type; // 0 - mail, 1 - chat
@ -1257,12 +1257,12 @@ void WorldSession::HandleComplainOpcode( WorldPacket & recv_data )
data << uint8(0);
SendPacket(&data);
sLog.outDebug("REPORT SPAM: type %u, guid %u, unk1 %u, unk2 %u, unk3 %u, unk4 %u, message %s", spam_type, GUID_LOPART(spammer_guid), unk1, unk2, unk3, unk4, description.c_str());
DEBUG_LOG("REPORT SPAM: type %u, guid %u, unk1 %u, unk2 %u, unk3 %u, unk4 %u, message %s", spam_type, GUID_LOPART(spammer_guid), unk1, unk2, unk3, unk4, description.c_str());
}
void WorldSession::HandleRealmSplitOpcode( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_REALM_SPLIT");
DEBUG_LOG("CMSG_REALM_SPLIT");
uint32 unk;
std::string split_date = "01/01/01";
@ -1277,12 +1277,12 @@ void WorldSession::HandleRealmSplitOpcode( WorldPacket & recv_data )
// 0x2 realm split pending
data << split_date;
SendPacket(&data);
//sLog.outDebug("response sent %u", unk);
//DEBUG_LOG("response sent %u", unk);
}
void WorldSession::HandleFarSightOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_FAR_SIGHT");
DEBUG_LOG("WORLD: CMSG_FAR_SIGHT");
//recv_data.hexlike();
uint8 unk;
@ -1294,17 +1294,17 @@ void WorldSession::HandleFarSightOpcode( WorldPacket & recv_data )
//WorldPacket data(SMSG_CLEAR_FAR_SIGHT_IMMEDIATE, 0)
//SendPacket(&data);
//_player->SetUInt64Value(PLAYER_FARSIGHT, 0);
sLog.outDebug("Removed FarSight from player %u", _player->GetGUIDLow());
DEBUG_LOG("Removed FarSight from player %u", _player->GetGUIDLow());
break;
case 1:
sLog.outDebug("Added FarSight (GUID:%u TypeId:%u) to player %u", GUID_LOPART(_player->GetFarSight()), GuidHigh2TypeId(GUID_HIPART(_player->GetFarSight())), _player->GetGUIDLow());
DEBUG_LOG("Added FarSight (GUID:%u TypeId:%u) to player %u", GUID_LOPART(_player->GetFarSight()), GuidHigh2TypeId(GUID_HIPART(_player->GetFarSight())), _player->GetGUIDLow());
break;
}
}
void WorldSession::HandleSetTitleOpcode( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_SET_TITLE");
DEBUG_LOG("CMSG_SET_TITLE");
int32 title;
recv_data >> title;
@ -1323,27 +1323,27 @@ void WorldSession::HandleSetTitleOpcode( WorldPacket & recv_data )
void WorldSession::HandleTimeSyncResp( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_TIME_SYNC_RESP");
DEBUG_LOG("CMSG_TIME_SYNC_RESP");
uint32 counter, clientTicks;
recv_data >> counter >> clientTicks;
if(counter != _player->m_timeSyncCounter - 1)
sLog.outDebug("Wrong time sync counter from player %s (cheater?)", _player->GetName());
DEBUG_LOG("Wrong time sync counter from player %s (cheater?)", _player->GetName());
sLog.outDebug("Time sync received: counter %u, client ticks %u, time since last sync %u", counter, clientTicks, clientTicks - _player->m_timeSyncClient);
DEBUG_LOG("Time sync received: counter %u, client ticks %u, time since last sync %u", counter, clientTicks, clientTicks - _player->m_timeSyncClient);
uint32 ourTicks = clientTicks + (getMSTime() - _player->m_timeSyncServer);
// diff should be small
sLog.outDebug("Our ticks: %u, diff %u, latency %u", ourTicks, ourTicks - clientTicks, GetLatency());
DEBUG_LOG("Our ticks: %u, diff %u, latency %u", ourTicks, ourTicks - clientTicks, GetLatency());
_player->m_timeSyncClient = clientTicks;
}
void WorldSession::HandleResetInstancesOpcode( WorldPacket & /*recv_data*/ )
{
sLog.outDebug("WORLD: CMSG_RESET_INSTANCES");
DEBUG_LOG("WORLD: CMSG_RESET_INSTANCES");
if(Group *pGroup = _player->GetGroup())
{
@ -1362,7 +1362,7 @@ void WorldSession::HandleResetInstancesOpcode( WorldPacket & /*recv_data*/ )
void WorldSession::HandleSetDungeonDifficultyOpcode( WorldPacket & recv_data )
{
sLog.outDebug("MSG_SET_DUNGEON_DIFFICULTY");
DEBUG_LOG("MSG_SET_DUNGEON_DIFFICULTY");
uint32 mode;
recv_data >> mode;
@ -1406,7 +1406,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode( WorldPacket & recv_data )
void WorldSession::HandleSetRaidDifficultyOpcode( WorldPacket & recv_data )
{
sLog.outDebug("MSG_SET_RAID_DIFFICULTY");
DEBUG_LOG("MSG_SET_RAID_DIFFICULTY");
uint32 mode;
recv_data >> mode;
@ -1450,7 +1450,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode( WorldPacket & recv_data )
void WorldSession::HandleCancelMountAuraOpcode( WorldPacket & /*recv_data*/ )
{
sLog.outDebug("WORLD: CMSG_CANCEL_MOUNT_AURA");
DEBUG_LOG("WORLD: CMSG_CANCEL_MOUNT_AURA");
//If player is not mounted, so go out :)
if (!_player->IsMounted()) // not blizz like; no any messages on blizz
@ -1472,7 +1472,7 @@ void WorldSession::HandleCancelMountAuraOpcode( WorldPacket & /*recv_data*/ )
void WorldSession::HandleMoveSetCanFlyAckOpcode( WorldPacket & recv_data )
{
// fly mode on/off
sLog.outDebug("WORLD: CMSG_MOVE_SET_CAN_FLY_ACK");
DEBUG_LOG("WORLD: CMSG_MOVE_SET_CAN_FLY_ACK");
//recv_data.hexlike();
ObjectGuid guid; // guid - unused
@ -1489,7 +1489,7 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode( WorldPacket & recv_data )
void WorldSession::HandleRequestPetInfoOpcode( WorldPacket & /*recv_data */)
{
/*
sLog.outDebug("WORLD: CMSG_REQUEST_PET_INFO");
DEBUG_LOG("WORLD: CMSG_REQUEST_PET_INFO");
recv_data.hexlike();
*/
}
@ -1499,7 +1499,7 @@ void WorldSession::HandleSetTaxiBenchmarkOpcode( WorldPacket & recv_data )
uint8 mode;
recv_data >> mode;
sLog.outDebug("Client used \"/timetest %d\" command", mode);
DEBUG_LOG("Client used \"/timetest %d\" command", mode);
}
void WorldSession::HandleQueryInspectAchievements( WorldPacket & recv_data )
@ -1515,7 +1515,7 @@ void WorldSession::HandleQueryInspectAchievements( WorldPacket & recv_data )
void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recv_data*/)
{
// empty opcode
sLog.outDebug("WORLD: CMSG_WORLD_STATE_UI_TIMER_UPDATE");
DEBUG_LOG("WORLD: CMSG_WORLD_STATE_UI_TIMER_UPDATE");
WorldPacket data(SMSG_WORLD_STATE_UI_TIMER_UPDATE, 4);
data << uint32(time(NULL));
@ -1525,14 +1525,14 @@ void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recv_data*/)
void WorldSession::HandleReadyForAccountDataTimes(WorldPacket& /*recv_data*/)
{
// empty opcode
sLog.outDebug("WORLD: CMSG_READY_FOR_ACCOUNT_DATA_TIMES");
DEBUG_LOG("WORLD: CMSG_READY_FOR_ACCOUNT_DATA_TIMES");
SendAccountDataTimes(GLOBAL_CACHE_MASK);
}
void WorldSession::HandleHearthandResurrect(WorldPacket & /*recv_data*/)
{
sLog.outDebug("WORLD: CMSG_HEARTH_AND_RESURRECT");
DEBUG_LOG("WORLD: CMSG_HEARTH_AND_RESURRECT");
AreaTableEntry const* atEntry = sAreaStore.LookupEntry(_player->GetAreaId());
if(!atEntry || !(atEntry->flags & AREA_FLAG_CAN_HEARTH_AND_RES))

View file

@ -218,7 +218,7 @@ void MotionMaster::MoveRandom()
}
else
{
DEBUG_LOG("%s move random.", i_owner->GetObjectGuid().GetString().c_str());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s move random.", i_owner->GetObjectGuid().GetString().c_str());
Mutate(new RandomMovementGenerator<Creature>(*i_owner));
}
}
@ -233,19 +233,19 @@ MotionMaster::MoveTargetedHome()
if(i_owner->GetTypeId()==TYPEID_UNIT && !((Creature*)i_owner)->GetCharmerOrOwnerGUID())
{
DEBUG_LOG("%s targeted home", i_owner->GetObjectGuid().GetString().c_str());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s targeted home", i_owner->GetObjectGuid().GetString().c_str());
Mutate(new HomeMovementGenerator<Creature>());
}
else if(i_owner->GetTypeId()==TYPEID_UNIT && ((Creature*)i_owner)->GetCharmerOrOwnerGUID())
{
if (Unit *target = ((Creature*)i_owner)->GetCharmerOrOwner())
{
DEBUG_LOG("%s follow to %s", i_owner->GetObjectGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s follow to %s", i_owner->GetObjectGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str());
Mutate(new FollowMovementGenerator<Creature>(*target,PET_FOLLOW_DIST,PET_FOLLOW_ANGLE));
}
else
{
DEBUG_LOG("%s attempt but fail to follow owner", i_owner->GetObjectGuid().GetString().c_str());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s attempt but fail to follow owner", i_owner->GetObjectGuid().GetString().c_str());
}
}
else
@ -255,7 +255,7 @@ MotionMaster::MoveTargetedHome()
void
MotionMaster::MoveConfused()
{
DEBUG_LOG("%s move confused", i_owner->GetObjectGuid().GetString().c_str());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s move confused", i_owner->GetObjectGuid().GetString().c_str());
if(i_owner->GetTypeId()==TYPEID_PLAYER)
Mutate(new ConfusedMovementGenerator<Player>());
@ -270,7 +270,7 @@ MotionMaster::MoveChase(Unit* target, float dist, float angle)
if(!target)
return;
DEBUG_LOG("%s chase to %s", i_owner->GetObjectGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s chase to %s", i_owner->GetObjectGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str());
if(i_owner->GetTypeId()==TYPEID_PLAYER)
Mutate(new ChaseMovementGenerator<Player>(*target,dist,angle));
@ -287,7 +287,7 @@ MotionMaster::MoveFollow(Unit* target, float dist, float angle)
if(!target)
return;
DEBUG_LOG("%s follow to %s", i_owner->GetObjectGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s follow to %s", i_owner->GetObjectGuid().GetString().c_str(), target->GetObjectGuid().GetString().c_str());
if(i_owner->GetTypeId()==TYPEID_PLAYER)
Mutate(new FollowMovementGenerator<Player>(*target,dist,angle));
@ -298,7 +298,7 @@ MotionMaster::MoveFollow(Unit* target, float dist, float angle)
void
MotionMaster::MovePoint(uint32 id, float x, float y, float z)
{
DEBUG_LOG("%s targeted point (Id: %u X: %f Y: %f Z: %f)", i_owner->GetObjectGuid().GetString().c_str(), id, x, y, z );
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s targeted point (Id: %u X: %f Y: %f Z: %f)", i_owner->GetObjectGuid().GetString().c_str(), id, x, y, z );
if(i_owner->GetTypeId()==TYPEID_PLAYER)
Mutate(new PointMovementGenerator<Player>(id,x,y,z));
@ -315,7 +315,7 @@ MotionMaster::MoveSeekAssistance(float x, float y, float z)
}
else
{
DEBUG_LOG("%s seek assistance (X: %f Y: %f Z: %f)",
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s seek assistance (X: %f Y: %f Z: %f)",
i_owner->GetObjectGuid().GetString().c_str(), x, y, z );
Mutate(new AssistanceMovementGenerator(x,y,z));
}
@ -330,7 +330,7 @@ MotionMaster::MoveSeekAssistanceDistract(uint32 time)
}
else
{
DEBUG_LOG("%s is distracted after assistance call (Time: %u)",
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s is distracted after assistance call (Time: %u)",
i_owner->GetObjectGuid().GetString().c_str(), time );
Mutate(new AssistanceDistractMovementGenerator(time));
}
@ -342,7 +342,7 @@ MotionMaster::MoveFleeing(Unit* enemy, uint32 time)
if(!enemy)
return;
DEBUG_LOG("%s flee from %s", i_owner->GetObjectGuid().GetString().c_str(), enemy->GetObjectGuid().GetString().c_str());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s flee from %s", i_owner->GetObjectGuid().GetString().c_str(), enemy->GetObjectGuid().GetString().c_str());
if(i_owner->GetTypeId()==TYPEID_PLAYER)
Mutate(new FleeingMovementGenerator<Player>(enemy->GetGUID()));
@ -362,7 +362,7 @@ MotionMaster::MoveTaxiFlight(uint32 path, uint32 pathnode)
{
if(path < sTaxiPathNodesByPath.size())
{
DEBUG_LOG("%s taxi to (Path %u node %u)", i_owner->GetObjectGuid().GetString().c_str(), path, pathnode);
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s taxi to (Path %u node %u)", i_owner->GetObjectGuid().GetString().c_str(), path, pathnode);
FlightPathMovementGenerator* mgen = new FlightPathMovementGenerator(sTaxiPathNodesByPath[path],pathnode);
Mutate(mgen);
}
@ -382,7 +382,7 @@ MotionMaster::MoveTaxiFlight(uint32 path, uint32 pathnode)
void
MotionMaster::MoveDistract(uint32 timer)
{
DEBUG_LOG("%s distracted (timer: %u)", i_owner->GetObjectGuid().GetString().c_str(), timer);
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s distracted (timer: %u)", i_owner->GetObjectGuid().GetString().c_str(), timer);
DistractMovementGenerator* mgen = new DistractMovementGenerator(timer);
Mutate(mgen);
}

View file

@ -34,7 +34,7 @@
void WorldSession::HandleMoveWorldportAckOpcode( WorldPacket & /*recv_data*/ )
{
sLog.outDebug( "WORLD: got MSG_MOVE_WORLDPORT_ACK." );
DEBUG_LOG( "WORLD: got MSG_MOVE_WORLDPORT_ACK." );
HandleMoveWorldportAckOpcode();
}
@ -170,7 +170,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
{
sLog.outDebug("MSG_MOVE_TELEPORT_ACK");
DEBUG_LOG("MSG_MOVE_TELEPORT_ACK");
ObjectGuid guid;
@ -220,7 +220,7 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
{
uint32 opcode = recv_data.GetOpcode();
sLog.outDebug("WORLD: Recvd %s (%u, 0x%X) opcode", LookupOpcodeName(opcode), opcode, opcode);
DEBUG_LOG("WORLD: Recvd %s (%u, 0x%X) opcode", LookupOpcodeName(opcode), opcode, opcode);
recv_data.hexlike();
Unit *mover = _player->m_mover;
@ -361,7 +361,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
{
uint32 opcode = recv_data.GetOpcode();
sLog.outDebug("WORLD: Recvd %s (%u, 0x%X) opcode", LookupOpcodeName(opcode), opcode, opcode);
DEBUG_LOG("WORLD: Recvd %s (%u, 0x%X) opcode", LookupOpcodeName(opcode), opcode, opcode);
/* extract packet */
ObjectGuid guid;
MovementInfo movementInfo;
@ -422,7 +422,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
}
else // must be lesser - cheating
{
sLog.outBasic("Player %s from account id %u kicked for incorrect speed (must be %f instead %f)",
BASIC_LOG("Player %s from account id %u kicked for incorrect speed (must be %f instead %f)",
_player->GetName(),_player->GetSession()->GetAccountId(),_player->GetSpeed(move_type), newspeed);
_player->GetSession()->KickPlayer();
}
@ -431,7 +431,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: Recvd CMSG_SET_ACTIVE_MOVER");
DEBUG_LOG("WORLD: Recvd CMSG_SET_ACTIVE_MOVER");
recv_data.hexlike();
uint64 guid;
@ -446,7 +446,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: Recvd CMSG_MOVE_NOT_ACTIVE_MOVER");
DEBUG_LOG("WORLD: Recvd CMSG_MOVE_NOT_ACTIVE_MOVER");
recv_data.hexlike();
ObjectGuid old_mover_guid;
@ -467,7 +467,7 @@ void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data)
void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data)
{
sLog.outDebug("WORLD: Recvd CMSG_DISMISS_CONTROLLED_VEHICLE");
DEBUG_LOG("WORLD: Recvd CMSG_DISMISS_CONTROLLED_VEHICLE");
recv_data.hexlike();
ObjectGuid guid;
@ -493,7 +493,7 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data)
void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvdata*/)
{
//sLog.outDebug("WORLD: Recvd CMSG_MOUNTSPECIAL_ANIM");
//DEBUG_LOG("WORLD: Recvd CMSG_MOUNTSPECIAL_ANIM");
WorldPacket data(SMSG_MOUNTSPECIAL_ANIM, 8);
data << uint64(GetPlayer()->GetGUID());
@ -503,7 +503,7 @@ void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recvdata*/)
void WorldSession::HandleMoveKnockBackAck( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_MOVE_KNOCK_BACK_ACK");
DEBUG_LOG("CMSG_MOVE_KNOCK_BACK_ACK");
ObjectGuid guid; // guid - unused
MovementInfo movementInfo;
@ -515,7 +515,7 @@ void WorldSession::HandleMoveKnockBackAck( WorldPacket & recv_data )
void WorldSession::HandleMoveHoverAck( WorldPacket& recv_data )
{
sLog.outDebug("CMSG_MOVE_HOVER_ACK");
DEBUG_LOG("CMSG_MOVE_HOVER_ACK");
ObjectGuid guid; // guid - unused
MovementInfo movementInfo;
@ -528,7 +528,7 @@ void WorldSession::HandleMoveHoverAck( WorldPacket& recv_data )
void WorldSession::HandleMoveWaterWalkAck(WorldPacket& recv_data)
{
sLog.outDebug("CMSG_MOVE_WATER_WALK_ACK");
DEBUG_LOG("CMSG_MOVE_WATER_WALK_ACK");
ObjectGuid guid; // guid - unused
MovementInfo movementInfo;

View file

@ -42,7 +42,7 @@ void WorldSession::HandleTabardVendorActivateOpcode( WorldPacket & recv_data )
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TABARDDESIGNER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleTabardVendorActivateOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleTabardVendorActivateOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
return;
}
@ -64,14 +64,14 @@ void WorldSession::HandleBankerActivateOpcode( WorldPacket & recv_data )
{
uint64 guid;
sLog.outDebug( "WORLD: Received CMSG_BANKER_ACTIVATE" );
DEBUG_LOG( "WORLD: Received CMSG_BANKER_ACTIVATE" );
recv_data >> guid;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_BANKER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleBankerActivateOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleBankerActivateOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
return;
}
@ -105,12 +105,12 @@ void WorldSession::SendTrainerList( uint64 guid )
void WorldSession::SendTrainerList( uint64 guid, const std::string& strTitle )
{
sLog.outDebug( "WORLD: SendTrainerList" );
DEBUG_LOG( "WORLD: SendTrainerList" );
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
sLog.outDebug( "WORLD: SendTrainerList - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: SendTrainerList - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
return;
}
@ -126,14 +126,14 @@ void WorldSession::SendTrainerList( uint64 guid, const std::string& strTitle )
if (!ci)
{
sLog.outDebug( "WORLD: SendTrainerList - (GUID: %u) NO CREATUREINFO!",GUID_LOPART(guid) );
DEBUG_LOG( "WORLD: SendTrainerList - (GUID: %u) NO CREATUREINFO!",GUID_LOPART(guid) );
return;
}
TrainerSpellData const* trainer_spells = unit->GetTrainerSpells();
if(!trainer_spells)
{
sLog.outDebug( "WORLD: SendTrainerList - Training spells not found for creature (GUID: %u Entry: %u)",
DEBUG_LOG( "WORLD: SendTrainerList - Training spells not found for creature (GUID: %u Entry: %u)",
GUID_LOPART(guid), unit->GetEntry());
return;
}
@ -190,12 +190,12 @@ void WorldSession::HandleTrainerBuySpellOpcode( WorldPacket & recv_data )
uint32 spellId = 0;
recv_data >> guid >> spellId;
sLog.outDebug( "WORLD: Received CMSG_TRAINER_BUY_SPELL NpcGUID=%u, learn spell id is: %u",uint32(GUID_LOPART(guid)), spellId );
DEBUG_LOG( "WORLD: Received CMSG_TRAINER_BUY_SPELL NpcGUID=%u, learn spell id is: %u",uint32(GUID_LOPART(guid)), spellId );
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleTrainerBuySpellOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleTrainerBuySpellOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
return;
}
@ -253,7 +253,7 @@ void WorldSession::HandleTrainerBuySpellOpcode( WorldPacket & recv_data )
void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
{
sLog.outDebug("WORLD: Received CMSG_GOSSIP_HELLO");
DEBUG_LOG("WORLD: Received CMSG_GOSSIP_HELLO");
uint64 guid;
recv_data >> guid;
@ -262,7 +262,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
if (!pCreature)
{
sLog.outDebug("WORLD: HandleGossipHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
DEBUG_LOG("WORLD: HandleGossipHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@ -286,7 +286,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_GOSSIP_SELECT_OPTION");
DEBUG_LOG("WORLD: CMSG_GOSSIP_SELECT_OPTION");
uint32 gossipListId;
uint32 menuId;
@ -297,9 +297,8 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
if (_player->PlayerTalkClass->GossipOptionCoded(gossipListId))
{
sLog.outBasic("reading string");
recv_data >> code;
sLog.outBasic("string read: %s", code.c_str());
DEBUG_LOG("Gossip code: %s", code.c_str());
}
// remove fake death
@ -313,7 +312,7 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
if (!pCreature)
{
sLog.outDebug("WORLD: HandleGossipSelectOptionOpcode - %s not found or you can't interact with it.", guid.GetString().c_str());
DEBUG_LOG("WORLD: HandleGossipSelectOptionOpcode - %s not found or you can't interact with it.", guid.GetString().c_str());
return;
}
@ -334,7 +333,7 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
if (!pGo)
{
sLog.outDebug("WORLD: HandleGossipSelectOptionOpcode - %s not found or you can't interact with it.", guid.GetString().c_str());
DEBUG_LOG("WORLD: HandleGossipSelectOptionOpcode - %s not found or you can't interact with it.", guid.GetString().c_str());
return;
}
@ -353,7 +352,7 @@ void WorldSession::HandleGossipSelectOptionOpcode( WorldPacket & recv_data )
void WorldSession::HandleSpiritHealerActivateOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_SPIRIT_HEALER_ACTIVATE");
DEBUG_LOG("WORLD: CMSG_SPIRIT_HEALER_ACTIVATE");
uint64 guid;
@ -362,7 +361,7 @@ void WorldSession::HandleSpiritHealerActivateOpcode( WorldPacket & recv_data )
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_SPIRITHEALER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleSpiritHealerActivateOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleSpiritHealerActivateOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
return;
}
@ -417,7 +416,7 @@ void WorldSession::HandleBinderActivateOpcode( WorldPacket & recv_data )
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID,UNIT_NPC_FLAG_INNKEEPER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleBinderActivateOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
DEBUG_LOG( "WORLD: HandleBinderActivateOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
return;
}
@ -447,7 +446,7 @@ void WorldSession::SendBindPoint(Creature *npc)
void WorldSession::HandleListStabledPetsOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Recv MSG_LIST_STABLED_PETS");
DEBUG_LOG("WORLD: Recv MSG_LIST_STABLED_PETS");
uint64 npcGUID;
recv_data >> npcGUID;
@ -455,7 +454,7 @@ void WorldSession::HandleListStabledPetsOpcode( WorldPacket & recv_data )
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_STABLEMASTER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleListStabledPetsOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
DEBUG_LOG( "WORLD: HandleListStabledPetsOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
return;
}
@ -468,7 +467,7 @@ void WorldSession::HandleListStabledPetsOpcode( WorldPacket & recv_data )
void WorldSession::SendStablePet(uint64 guid )
{
sLog.outDebug("WORLD: Recv MSG_LIST_STABLED_PETS Send.");
DEBUG_LOG("WORLD: Recv MSG_LIST_STABLED_PETS Send.");
WorldPacket data(MSG_LIST_STABLED_PETS, 200); // guess size
data << uint64 ( guid );
@ -521,7 +520,7 @@ void WorldSession::SendStablePet(uint64 guid )
void WorldSession::HandleStablePet( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Recv CMSG_STABLE_PET");
DEBUG_LOG("WORLD: Recv CMSG_STABLE_PET");
uint64 npcGUID;
recv_data >> npcGUID;
@ -532,7 +531,7 @@ void WorldSession::HandleStablePet( WorldPacket & recv_data )
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_STABLEMASTER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleStablePet - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
DEBUG_LOG( "WORLD: HandleStablePet - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
return;
}
@ -588,7 +587,7 @@ void WorldSession::HandleStablePet( WorldPacket & recv_data )
void WorldSession::HandleUnstablePet( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Recv CMSG_UNSTABLE_PET.");
DEBUG_LOG("WORLD: Recv CMSG_UNSTABLE_PET.");
uint64 npcGUID;
uint32 petnumber;
@ -597,7 +596,7 @@ void WorldSession::HandleUnstablePet( WorldPacket & recv_data )
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_STABLEMASTER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleUnstablePet - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
DEBUG_LOG( "WORLD: HandleUnstablePet - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
return;
}
@ -666,7 +665,7 @@ void WorldSession::HandleUnstablePet( WorldPacket & recv_data )
void WorldSession::HandleBuyStableSlot( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Recv CMSG_BUY_STABLE_SLOT.");
DEBUG_LOG("WORLD: Recv CMSG_BUY_STABLE_SLOT.");
uint64 npcGUID;
recv_data >> npcGUID;
@ -674,7 +673,7 @@ void WorldSession::HandleBuyStableSlot( WorldPacket & recv_data )
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_STABLEMASTER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleBuyStableSlot - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
DEBUG_LOG( "WORLD: HandleBuyStableSlot - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
return;
}
@ -704,12 +703,12 @@ void WorldSession::HandleBuyStableSlot( WorldPacket & recv_data )
void WorldSession::HandleStableRevivePet( WorldPacket &/* recv_data */)
{
sLog.outDebug("HandleStableRevivePet: Not implemented");
DEBUG_LOG("HandleStableRevivePet: Not implemented");
}
void WorldSession::HandleStableSwapPet( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: Recv CMSG_STABLE_SWAP_PET.");
DEBUG_LOG("WORLD: Recv CMSG_STABLE_SWAP_PET.");
uint64 npcGUID;
uint32 pet_number;
@ -718,7 +717,7 @@ void WorldSession::HandleStableSwapPet( WorldPacket & recv_data )
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_STABLEMASTER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleStableSwapPet - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
DEBUG_LOG( "WORLD: HandleStableSwapPet - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
return;
}
@ -781,7 +780,7 @@ void WorldSession::HandleStableSwapPet( WorldPacket & recv_data )
void WorldSession::HandleRepairItemOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_REPAIR_ITEM");
DEBUG_LOG("WORLD: CMSG_REPAIR_ITEM");
uint64 npcGUID, itemGUID;
uint8 guildBank; // new in 2.3.2, bool that means from guild bank money
@ -791,7 +790,7 @@ void WorldSession::HandleRepairItemOpcode( WorldPacket & recv_data )
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(npcGUID, UNIT_NPC_FLAG_REPAIR);
if (!unit)
{
sLog.outDebug( "WORLD: HandleRepairItemOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
DEBUG_LOG( "WORLD: HandleRepairItemOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(npcGUID)) );
return;
}
@ -805,7 +804,7 @@ void WorldSession::HandleRepairItemOpcode( WorldPacket & recv_data )
uint32 TotalCost = 0;
if (itemGUID)
{
sLog.outDebug("ITEM: Repair item, itemGUID = %u, npcGUID = %u", GUID_LOPART(itemGUID), GUID_LOPART(npcGUID));
DEBUG_LOG("ITEM: Repair item, itemGUID = %u, npcGUID = %u", GUID_LOPART(itemGUID), GUID_LOPART(npcGUID));
Item* item = _player->GetItemByGuid(itemGUID);
@ -814,7 +813,7 @@ void WorldSession::HandleRepairItemOpcode( WorldPacket & recv_data )
}
else
{
sLog.outDebug("ITEM: Repair all items, npcGUID = %u", GUID_LOPART(npcGUID));
DEBUG_LOG("ITEM: Repair all items, npcGUID = %u", GUID_LOPART(npcGUID));
TotalCost = _player->DurabilityRepairAll(true,discountMod,guildBank>0?true:false);
}

View file

@ -182,7 +182,7 @@ void Object::BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) c
}
}
//sLog.outDebug("BuildCreateUpdate: update-type: %u, object-type: %u got updateFlags: %X", updatetype, m_objectTypeId, updateFlags);
//DEBUG_LOG("BuildCreateUpdate: update-type: %u, object-type: %u got updateFlags: %X", updatetype, m_objectTypeId, updateFlags);
ByteBuffer buf(500);
buf << uint8(updatetype);
@ -329,7 +329,7 @@ void Object::BuildMovementUpdate(ByteBuffer * data, uint16 updateFlags) const
{
if(GetTypeId() != TYPEID_PLAYER)
{
sLog.outDebug("_BuildMovementUpdate: MOVEFLAG_SPLINE_ENABLED for non-player");
DEBUG_LOG("_BuildMovementUpdate: MOVEFLAG_SPLINE_ENABLED for non-player");
return;
}
@ -337,7 +337,7 @@ void Object::BuildMovementUpdate(ByteBuffer * data, uint16 updateFlags) const
if(!player->isInFlight())
{
sLog.outDebug("_BuildMovementUpdate: MOVEFLAG_SPLINE_ENABLED but not in flight");
DEBUG_LOG("_BuildMovementUpdate: MOVEFLAG_SPLINE_ENABLED but not in flight");
return;
}

View file

@ -232,7 +232,7 @@ void ObjectGridLoader::LoadN(void)
loader.Load(i_grid(x, y), *this);
}
}
sLog.outDebug("%u GameObjects, %u Creatures, and %u Corpses/Bones loaded for grid %u on map %u", i_gameObjects, i_creatures, i_corpses,i_grid.GetGridId(), i_map->GetId());
DEBUG_LOG("%u GameObjects, %u Creatures, and %u Corpses/Bones loaded for grid %u on map %u", i_gameObjects, i_creatures, i_corpses,i_grid.GetGridId(), i_map->GetId());
}
void ObjectGridUnloader::MoveToRespawnN()

View file

@ -2278,7 +2278,7 @@ void ObjectMgr::LoadPetLevelInfo()
sLog.outErrorDb("Wrong (> %u) level %u in `pet_levelstats` table, ignoring.",STRONG_MAX_LEVEL,current_level);
else
{
sLog.outDetail("Unused (> MaxPlayerLevel in mangosd.conf) level %u in `pet_levelstats` table, ignoring.",current_level);
DETAIL_LOG("Unused (> MaxPlayerLevel in mangosd.conf) level %u in `pet_levelstats` table, ignoring.",current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
}
continue;
@ -2676,7 +2676,7 @@ void ObjectMgr::LoadPlayerInfo()
sLog.outErrorDb("Wrong (> %u) level %u in `player_classlevelstats` table, ignoring.",STRONG_MAX_LEVEL,current_level);
else
{
sLog.outDetail("Unused (> MaxPlayerLevel in mangosd.conf) level %u in `player_classlevelstats` table, ignoring.",current_level);
DETAIL_LOG("Unused (> MaxPlayerLevel in mangosd.conf) level %u in `player_classlevelstats` table, ignoring.",current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
}
continue;
@ -2774,7 +2774,7 @@ void ObjectMgr::LoadPlayerInfo()
sLog.outErrorDb("Wrong (> %u) level %u in `player_levelstats` table, ignoring.",STRONG_MAX_LEVEL,current_level);
else
{
sLog.outDetail("Unused (> MaxPlayerLevel in mangosd.conf) level %u in `player_levelstats` table, ignoring.",current_level);
DETAIL_LOG("Unused (> MaxPlayerLevel in mangosd.conf) level %u in `player_levelstats` table, ignoring.",current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
}
continue;
@ -2885,7 +2885,7 @@ void ObjectMgr::LoadPlayerInfo()
sLog.outErrorDb("Wrong (> %u) level %u in `player_xp_for_level` table, ignoring.", STRONG_MAX_LEVEL,current_level);
else
{
sLog.outDetail("Unused (> MaxPlayerLevel in mangosd.conf) level %u in `player_xp_for_levels` table, ignoring.",current_level);
DETAIL_LOG("Unused (> MaxPlayerLevel in mangosd.conf) level %u in `player_xp_for_levels` table, ignoring.",current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
}
continue;
@ -4865,7 +4865,7 @@ void ObjectMgr::LoadNpcTextLocales()
void ObjectMgr::ReturnOrDeleteOldMails(bool serverUp)
{
time_t basetime = time(NULL);
sLog.outDebug("Returning mails current time: hour: %d, minute: %d, second: %d ", localtime(&basetime)->tm_hour, localtime(&basetime)->tm_min, localtime(&basetime)->tm_sec);
DEBUG_LOG("Returning mails current time: hour: %d, minute: %d, second: %d ", localtime(&basetime)->tm_hour, localtime(&basetime)->tm_min, localtime(&basetime)->tm_sec);
//delete all old mails without item and without body immediately, if starting server
if (!serverUp)
CharacterDatabase.PExecute("DELETE FROM mail WHERE expire_time < '" UI64FMTD "' AND has_items = '0' AND body = ''", (uint64)basetime);

View file

@ -306,7 +306,7 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
_LoadSpellCooldowns();
owner->SetPet(this); // in DB stored only full controlled creature
sLog.outDebug("New Pet has guid %u", GetGUIDLow());
DEBUG_LOG("New Pet has guid %u", GetGUIDLow());
if (owner->GetTypeId() == TYPEID_PLAYER)
{
@ -743,7 +743,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
uint32 guid = creature->GetMap()->GenerateLocalLowGuid(HIGHGUID_PET);
sLog.outBasic("Create pet");
BASIC_LOG("Create pet");
uint32 pet_number = sObjectMgr.GeneratePetNumber();
if(!Create(guid, creature->GetMap(), creature->GetPhaseMask(), creature->GetEntry(), pet_number))
return false;
@ -1058,7 +1058,7 @@ void Pet::_LoadSpellCooldowns()
_AddCreatureSpellCooldown(spell_id,db_time);
sLog.outDebug("Pet (Number: %u) spell %u cooldown loaded (%u secs).", m_charmInfo->GetPetNumber(), spell_id, uint32(db_time-curTime));
DEBUG_LOG("Pet (Number: %u) spell %u cooldown loaded (%u secs).", m_charmInfo->GetPetNumber(), spell_id, uint32(db_time-curTime));
}
while( result->NextRow() );

View file

@ -43,7 +43,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
// used also for charmed creature
Unit* pet= ObjectAccessor::GetUnit(*_player, guid1);
sLog.outDetail("HandlePetAction.Pet %u flag is %u, spellid is %u, target %u.", uint32(GUID_LOPART(guid1)), uint32(flag), spellid, uint32(GUID_LOPART(guid2)) );
DETAIL_LOG("HandlePetAction.Pet %u flag is %u, spellid is %u, target %u.", uint32(GUID_LOPART(guid1)), uint32(flag), spellid, uint32(GUID_LOPART(guid2)) );
if (!pet)
{
sLog.outError( "Pet %u not exist.", uint32(GUID_LOPART(guid1)) );
@ -273,7 +273,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
void WorldSession::HandlePetNameQuery( WorldPacket & recv_data )
{
sLog.outDetail( "HandlePetNameQuery. CMSG_PET_NAME_QUERY" );
DETAIL_LOG( "HandlePetNameQuery. CMSG_PET_NAME_QUERY" );
uint32 petnumber;
uint64 petguid;
@ -311,7 +311,7 @@ void WorldSession::SendPetNameQuery( uint64 petguid, uint32 petnumber)
void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
{
sLog.outDetail( "HandlePetSetAction. CMSG_PET_SET_ACTION" );
DETAIL_LOG( "HandlePetSetAction. CMSG_PET_SET_ACTION" );
uint64 petguid;
uint8 count;
@ -395,7 +395,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
uint32 spell_id = UNIT_ACTION_BUTTON_ACTION(data[i]);
uint8 act_state = UNIT_ACTION_BUTTON_TYPE(data[i]);
sLog.outDetail( "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X", _player->GetName(), position[i], spell_id, uint32(act_state));
DETAIL_LOG( "Player %s has changed pet spell action. Position: %u, Spell: %u, State: 0x%X", _player->GetName(), position[i], spell_id, uint32(act_state));
//if it's act for spell (en/disable/cast) and there is a spell given (0 = remove spell) which pet doesn't know, don't add
if(!((act_state == ACT_ENABLED || act_state == ACT_DISABLED || act_state == ACT_PASSIVE) && spell_id && !pet->HasSpell(spell_id)))
@ -424,7 +424,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
void WorldSession::HandlePetRename( WorldPacket & recv_data )
{
sLog.outDetail( "HandlePetRename. CMSG_PET_RENAME" );
DETAIL_LOG( "HandlePetRename. CMSG_PET_RENAME" );
uint64 petguid;
uint8 isdeclined;
@ -500,7 +500,7 @@ void WorldSession::HandlePetAbandon( WorldPacket & recv_data )
{
uint64 guid;
recv_data >> guid; //pet guid
sLog.outDetail( "HandlePetAbandon. CMSG_PET_ABANDON pet guid is %u", GUID_LOPART(guid) );
DETAIL_LOG( "HandlePetAbandon. CMSG_PET_ABANDON pet guid is %u", GUID_LOPART(guid) );
if(!_player->IsInWorld())
return;
@ -527,7 +527,7 @@ void WorldSession::HandlePetAbandon( WorldPacket & recv_data )
void WorldSession::HandlePetUnlearnOpcode(WorldPacket& recvPacket)
{
sLog.outDetail("CMSG_PET_UNLEARN");
DETAIL_LOG("CMSG_PET_UNLEARN");
uint64 guid;
recvPacket >> guid; // Pet guid
@ -554,7 +554,7 @@ void WorldSession::HandlePetUnlearnOpcode(WorldPacket& recvPacket)
void WorldSession::HandlePetSpellAutocastOpcode( WorldPacket& recvPacket )
{
sLog.outDetail("CMSG_PET_SPELL_AUTOCAST");
DETAIL_LOG("CMSG_PET_SPELL_AUTOCAST");
uint64 guid;
uint32 spellid;
uint8 state; //1 for on, 0 for off
@ -593,7 +593,7 @@ void WorldSession::HandlePetSpellAutocastOpcode( WorldPacket& recvPacket )
void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
{
sLog.outDetail("WORLD: CMSG_PET_CAST_SPELL");
DETAIL_LOG("WORLD: CMSG_PET_CAST_SPELL");
uint64 guid;
uint32 spellid;
@ -602,7 +602,7 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
recvPacket >> guid >> cast_count >> spellid >> unk_flags;
sLog.outDebug("WORLD: CMSG_PET_CAST_SPELL, cast_count: %u, spellid %u, unk_flags %u", cast_count, spellid, unk_flags);
DEBUG_LOG("WORLD: CMSG_PET_CAST_SPELL, cast_count: %u, spellid %u, unk_flags %u", cast_count, spellid, unk_flags);
if (!_player->GetPet() && !_player->GetCharm())
return;
@ -684,7 +684,7 @@ void WorldSession::SendPetNameInvalid(uint32 error, const std::string& name, Dec
void WorldSession::HandlePetLearnTalent( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_PET_LEARN_TALENT");
DEBUG_LOG("WORLD: CMSG_PET_LEARN_TALENT");
uint64 guid;
uint32 talent_id, requested_rank;
@ -696,7 +696,7 @@ void WorldSession::HandlePetLearnTalent( WorldPacket & recv_data )
void WorldSession::HandleLearnPreviewTalentsPet( WorldPacket & recv_data )
{
sLog.outDebug("CMSG_LEARN_PREVIEW_TALENTS_PET");
DEBUG_LOG("CMSG_LEARN_PREVIEW_TALENTS_PET");
uint64 guid;
recv_data >> guid;

View file

@ -49,7 +49,7 @@
void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
{
sLog.outDebug("Received opcode CMSG_PETITION_BUY");
DEBUG_LOG("Received opcode CMSG_PETITION_BUY");
recv_data.hexlike();
uint64 guidNPC;
@ -79,13 +79,13 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
recv_data >> clientIndex; // index
recv_data.read_skip<uint32>(); // 0
sLog.outDebug("Petitioner with GUID %u tried sell petition: name %s", GUID_LOPART(guidNPC), name.c_str());
DEBUG_LOG("Petitioner with GUID %u tried sell petition: name %s", GUID_LOPART(guidNPC), name.c_str());
// prevent cheating
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guidNPC,UNIT_NPC_FLAG_PETITIONER);
if (!pCreature)
{
sLog.outDebug("WORLD: HandlePetitionBuyOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guidNPC));
DEBUG_LOG("WORLD: HandlePetitionBuyOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guidNPC));
return;
}
@ -134,7 +134,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
type = 5; // 5v5
break;
default:
sLog.outDebug("unknown selection at buy arena petition: %u", clientIndex);
DEBUG_LOG("unknown selection at buy arena petition: %u", clientIndex);
return;
}
@ -224,7 +224,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
// delete petitions with the same guid as this one
ssInvalidPetitionGUIDs << "'" << charter->GetGUIDLow() << "'";
sLog.outDebug("Invalid petition GUIDs: %s", ssInvalidPetitionGUIDs.str().c_str());
DEBUG_LOG("Invalid petition GUIDs: %s", ssInvalidPetitionGUIDs.str().c_str());
CharacterDatabase.escape_string(name);
CharacterDatabase.BeginTransaction();
CharacterDatabase.PExecute("DELETE FROM petition WHERE petitionguid IN ( %s )", ssInvalidPetitionGUIDs.str().c_str());
@ -237,7 +237,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
{
// ok
sLog.outDebug("Received opcode CMSG_PETITION_SHOW_SIGNATURES");
DEBUG_LOG("Received opcode CMSG_PETITION_SHOW_SIGNATURES");
//recv_data.hexlike();
uint8 signs = 0;
@ -267,7 +267,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
if(result)
signs = (uint8)result->GetRowCount();
sLog.outDebug("CMSG_PETITION_SHOW_SIGNATURES petition entry: '%u'", petitionguid_low);
DEBUG_LOG("CMSG_PETITION_SHOW_SIGNATURES petition entry: '%u'", petitionguid_low);
WorldPacket data(SMSG_PETITION_SHOW_SIGNATURES, (8+8+4+1+signs*12));
data << uint64(petitionguid); // petition guid
@ -291,14 +291,14 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
void WorldSession::HandlePetitionQueryOpcode(WorldPacket & recv_data)
{
sLog.outDebug("Received opcode CMSG_PETITION_QUERY"); // ok
DEBUG_LOG("Received opcode CMSG_PETITION_QUERY"); // ok
//recv_data.hexlike();
uint32 guildguid;
uint64 petitionguid;
recv_data >> guildguid; // in mangos always same as GUID_LOPART(petitionguid)
recv_data >> petitionguid; // petition guid
sLog.outDebug("CMSG_PETITION_QUERY Petition GUID %u Guild GUID %u", GUID_LOPART(petitionguid), guildguid);
DEBUG_LOG("CMSG_PETITION_QUERY Petition GUID %u Guild GUID %u", GUID_LOPART(petitionguid), guildguid);
SendPetitionQueryOpcode(petitionguid);
}
@ -327,7 +327,7 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
}
else
{
sLog.outDebug("CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
DEBUG_LOG("CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
return;
}
@ -372,7 +372,7 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
{
sLog.outDebug("Received opcode MSG_PETITION_RENAME"); // ok
DEBUG_LOG("Received opcode MSG_PETITION_RENAME"); // ok
//recv_data.hexlike();
uint64 petitionguid;
@ -396,7 +396,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
}
else
{
sLog.outDebug("CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
DEBUG_LOG("CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
return;
}
@ -432,7 +432,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
CharacterDatabase.PExecute("UPDATE petition SET name = '%s' WHERE petitionguid = '%u'",
db_newname.c_str(), GUID_LOPART(petitionguid));
sLog.outDebug("Petition (GUID: %u) renamed to '%s'", GUID_LOPART(petitionguid), newname.c_str());
DEBUG_LOG("Petition (GUID: %u) renamed to '%s'", GUID_LOPART(petitionguid), newname.c_str());
WorldPacket data(MSG_PETITION_RENAME, (8+newname.size()+1));
data << uint64(petitionguid);
@ -442,7 +442,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
{
sLog.outDebug("Received opcode CMSG_PETITION_SIGN"); // ok
DEBUG_LOG("Received opcode CMSG_PETITION_SIGN"); // ok
//recv_data.hexlike();
Field *fields;
@ -548,7 +548,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
CharacterDatabase.PExecute("INSERT INTO petition_sign (ownerguid,petitionguid, playerguid, player_account) VALUES ('%u', '%u', '%u','%u')", GUID_LOPART(ownerguid),GUID_LOPART(petitionguid), plguidlo,GetAccountId());
sLog.outDebug("PETITION SIGN: GUID %u by player: %s (GUID: %u Account: %u)", GUID_LOPART(petitionguid), _player->GetName(),plguidlo,GetAccountId());
DEBUG_LOG("PETITION SIGN: GUID %u by player: %s (GUID: %u Account: %u)", GUID_LOPART(petitionguid), _player->GetName(),plguidlo,GetAccountId());
WorldPacket data(SMSG_PETITION_SIGN_RESULTS, (8+8+4));
data << uint64(petitionguid);
@ -570,13 +570,13 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data)
{
sLog.outDebug("Received opcode MSG_PETITION_DECLINE"); // ok
DEBUG_LOG("Received opcode MSG_PETITION_DECLINE"); // ok
//recv_data.hexlike();
uint64 petitionguid;
uint64 ownerguid;
recv_data >> petitionguid; // petition guid
sLog.outDebug("Petition %u declined by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow());
DEBUG_LOG("Petition %u declined by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow());
QueryResult *result = CharacterDatabase.PQuery("SELECT ownerguid FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid));
if(!result)
@ -597,7 +597,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data)
void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
{
sLog.outDebug("Received opcode CMSG_OFFER_PETITION"); // ok
DEBUG_LOG("Received opcode CMSG_OFFER_PETITION"); // ok
//recv_data.hexlike();
uint8 signs = 0;
@ -620,7 +620,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
type = fields[0].GetUInt32();
delete result;
sLog.outDebug("OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid));
DEBUG_LOG("OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid));
if (!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != player->GetTeam() )
{
@ -700,7 +700,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
{
sLog.outDebug("Received opcode CMSG_TURN_IN_PETITION"); // ok
DEBUG_LOG("Received opcode CMSG_TURN_IN_PETITION"); // ok
//recv_data.hexlike();
WorldPacket data;
@ -712,7 +712,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
recv_data >> petitionguid;
sLog.outDebug("Petition %u turned in by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow());
DEBUG_LOG("Petition %u turned in by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow());
// data
QueryResult *result = CharacterDatabase.PQuery("SELECT ownerguid, name, type FROM petition WHERE petitionguid = '%u'", GUID_LOPART(petitionguid));
@ -853,14 +853,14 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
// register team and add captain
sObjectMgr.AddArenaTeam(at);
sLog.outDebug("PetitonsHandler: arena team added to objmrg");
DEBUG_LOG("PetitonsHandler: arena team added to objmrg");
// add members
for(uint8 i = 0; i < signs; ++i)
{
Field* fields = result->Fetch();
uint64 memberGUID = fields[0].GetUInt64();
sLog.outDebug("PetitionsHandler: adding arena member %u", GUID_LOPART(memberGUID));
DEBUG_LOG("PetitionsHandler: adding arena member %u", GUID_LOPART(memberGUID));
at->AddMember(memberGUID);
result->NextRow();
}
@ -874,7 +874,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
CharacterDatabase.CommitTransaction();
// created
sLog.outDebug("TURN IN PETITION GUID %u", GUID_LOPART(petitionguid));
DEBUG_LOG("TURN IN PETITION GUID %u", GUID_LOPART(petitionguid));
data.Initialize(SMSG_TURN_IN_PETITION_RESULTS, 4);
data << uint32(PETITION_TURN_OK);
@ -883,7 +883,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
void WorldSession::HandlePetitionShowListOpcode(WorldPacket & recv_data)
{
sLog.outDebug("Received CMSG_PETITION_SHOWLIST"); // ok
DEBUG_LOG("Received CMSG_PETITION_SHOWLIST"); // ok
//recv_data.hexlike();
uint64 guid;
@ -897,7 +897,7 @@ void WorldSession::SendPetitionShowList(uint64 guid)
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_PETITIONER);
if (!pCreature)
{
sLog.outDebug("WORLD: HandlePetitionShowListOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
DEBUG_LOG("WORLD: HandlePetitionShowListOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@ -957,5 +957,5 @@ void WorldSession::SendPetitionShowList(uint64 guid)
// data << uint32(9); // required signs?
//}
SendPacket(&data);
sLog.outDebug("Sent SMSG_PETITION_SHOWLIST");
DEBUG_LOG("Sent SMSG_PETITION_SHOWLIST");
}

View file

@ -768,7 +768,7 @@ bool Player::Create( uint32 guidlow, const std::string& name, uint8 race, uint8
bool Player::StoreNewItemInBestSlots(uint32 titem_id, uint32 titem_amount)
{
sLog.outDebug("STORAGE: Creating initial item, itemId = %u, count = %u",titem_id, titem_amount);
DEBUG_LOG("STORAGE: Creating initial item, itemId = %u, count = %u",titem_id, titem_amount);
// attempt equip by one
while(titem_amount > 0)
@ -1313,7 +1313,7 @@ void Player::Update( uint32 p_time )
{
// m_nextSave reseted in SaveToDB call
SaveToDB();
sLog.outDetail("Player '%s' (GUID: %u) saved", GetName(), GetGUIDLow());
DETAIL_LOG("Player '%s' (GUID: %u) saved", GetName(), GetGUIDLow());
}
else
m_nextSave -= p_time;
@ -1637,7 +1637,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// client without expansion support
if(GetSession()->Expansion() < mEntry->Expansion())
{
sLog.outDebug("Player %s using client without required expansion tried teleport to non accessible map %u", GetName(), mapid);
DEBUG_LOG("Player %s using client without required expansion tried teleport to non accessible map %u", GetName(), mapid);
if(GetTransport())
RepopAtGraveyard(); // teleport to near graveyard if on transport, looks blizz like :)
@ -1648,7 +1648,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
}
else
{
sLog.outDebug("Player %s is being teleported to map %u", GetName(), mapid);
DEBUG_LOG("Player %s is being teleported to map %u", GetName(), mapid);
}
// if we were on a transport, leave
@ -2803,7 +2803,7 @@ void Player::SendInitialSpells()
GetSession()->SendPacket(&data);
sLog.outDetail( "CHARACTER: Sent Initial Spells" );
DETAIL_LOG( "CHARACTER: Sent Initial Spells" );
}
void Player::RemoveMail(uint32 id)
@ -3590,7 +3590,7 @@ void Player::_LoadSpellCooldowns(QueryResult *result)
AddSpellCooldown(spell_id, item_id, db_time);
sLog.outDebug("Player (GUID: %u) spell %u, item %u cooldown loaded (%u secs).", GetGUIDLow(), spell_id, item_id, uint32(db_time-curTime));
DEBUG_LOG("Player (GUID: %u) spell %u, item %u cooldown loaded (%u secs).", GetGUIDLow(), spell_id, item_id, uint32(db_time-curTime));
}
while( result->NextRow() );
@ -4809,7 +4809,7 @@ void Player::CleanupChannels()
cMgr->LeftChannel(ch->GetName()); // deleted channel if empty
}
sLog.outDebug("Player: channels cleaned up!");
DEBUG_LOG("Player: channels cleaned up!");
}
void Player::UpdateLocalChannels(uint32 newZone )
@ -4858,7 +4858,7 @@ void Player::UpdateLocalChannels(uint32 newZone )
cMgr->LeftChannel(name); // delete if empty
}
}
sLog.outDebug("Player: channels cleaned up!");
DEBUG_LOG("Player: channels cleaned up!");
}
void Player::LeaveLFGChannel()
@ -5292,7 +5292,7 @@ inline int SkillGainChance(uint32 SkillValue, uint32 GrayLevel, uint32 GreenLeve
bool Player::UpdateCraftSkill(uint32 spellid)
{
sLog.outDebug("UpdateCraftSkill spellid %d", spellid);
DEBUG_LOG("UpdateCraftSkill spellid %d", spellid);
SkillLineAbilityMapBounds bounds = sSpellMgr.GetSkillLineAbilityMapBounds(spellid);
@ -5324,7 +5324,7 @@ bool Player::UpdateCraftSkill(uint32 spellid)
bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue, uint32 RedLevel, uint32 Multiplicator )
{
sLog.outDebug("UpdateGatherSkill(SkillId %d SkillLevel %d RedLevel %d)", SkillId, SkillValue, RedLevel);
DEBUG_LOG("UpdateGatherSkill(SkillId %d SkillLevel %d RedLevel %d)", SkillId, SkillValue, RedLevel);
uint32 gathering_skill_gain = sWorld.getConfig(CONFIG_UINT32_SKILL_GAIN_GATHERING);
@ -5352,7 +5352,7 @@ bool Player::UpdateGatherSkill(uint32 SkillId, uint32 SkillValue, uint32 RedLeve
bool Player::UpdateFishingSkill()
{
sLog.outDebug("UpdateFishingSkill");
DEBUG_LOG("UpdateFishingSkill");
uint32 SkillValue = GetPureSkillValue(SKILL_FISHING);
@ -5370,13 +5370,13 @@ static uint32 bonusSkillLevels[] = {75,150,225,300,375,450};
bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
{
sLog.outDebug("UpdateSkillPro(SkillId %d, Chance %3.1f%%)", SkillId, Chance/10.0);
DEBUG_LOG("UpdateSkillPro(SkillId %d, Chance %3.1f%%)", SkillId, Chance/10.0);
if ( !SkillId )
return false;
if(Chance <= 0) // speedup in 0 chance case
{
sLog.outDebug("Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0);
DEBUG_LOG("Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0);
return false;
}
@ -5413,11 +5413,11 @@ bool Player::UpdateSkillPro(uint16 SkillId, int32 Chance, uint32 step)
}
}
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL,SkillId);
sLog.outDebug("Player::UpdateSkillPro Chance=%3.1f%% taken", Chance/10.0);
DEBUG_LOG("Player::UpdateSkillPro Chance=%3.1f%% taken", Chance/10.0);
return true;
}
sLog.outDebug("Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0);
DEBUG_LOG("Player::UpdateSkillPro Chance=%3.1f%% missed", Chance/10.0);
return false;
}
@ -5791,7 +5791,7 @@ int16 Player::GetSkillTempBonusValue(uint32 skill) const
void Player::SendInitialActionButtons() const
{
sLog.outDetail( "Initializing Action Buttons for '%u' spec '%u'", GetGUIDLow(), m_activeSpec);
DETAIL_LOG( "Initializing Action Buttons for '%u' spec '%u'", GetGUIDLow(), m_activeSpec);
WorldPacket data(SMSG_ACTION_BUTTONS, 1+(MAX_ACTION_BUTTONS*4));
data << uint8(1); // talent spec amount (in packet)
@ -5806,7 +5806,7 @@ void Player::SendInitialActionButtons() const
}
GetSession()->SendPacket( &data );
sLog.outDetail( "Action Buttons for '%u' spec '%u' Initialized", GetGUIDLow(), m_activeSpec );
DETAIL_LOG( "Action Buttons for '%u' spec '%u' Initialized", GetGUIDLow(), m_activeSpec );
}
bool Player::IsActionButtonDataValid(uint8 button, uint32 action, uint8 type, Player* player, bool msg)
@ -5890,7 +5890,7 @@ ActionButton* Player::addActionButton(uint8 spec, uint8 button, uint32 action, u
// set data and update to CHANGED if not NEW
ab.SetActionAndType(action,ActionButtonType(type));
sLog.outDetail("Player '%u' Added Action '%u' (type %u) to Button '%u' for spec %u", GetGUIDLow(), action, uint32(type), button, spec);
DETAIL_LOG("Player '%u' Added Action '%u' (type %u) to Button '%u' for spec %u", GetGUIDLow(), action, uint32(type), button, spec);
return &ab;
}
@ -5906,7 +5906,7 @@ void Player::removeActionButton(uint8 spec, uint8 button)
else
buttonItr->second.uState = ACTIONBUTTON_DELETED; // saved, will deleted at next save
sLog.outDetail("Action Button '%u' Removed from Player '%u' for spec %u", button, GetGUIDLow(), spec);
DETAIL_LOG("Action Button '%u' Removed from Player '%u' for spec %u", button, GetGUIDLow(), spec);
}
ActionButton const* Player::GetActionButton(uint8 button)
@ -5924,7 +5924,7 @@ bool Player::SetPosition(float x, float y, float z, float orientation, bool tele
// prevent crash when a bad coord is sent by the client
if(!MaNGOS::IsValidMapCoord(x,y,z,orientation))
{
sLog.outDebug("Player::SetPosition(%f, %f, %f, %f, %d) .. bad coordinates for player %d!",x,y,z,orientation,teleport,GetGUIDLow());
DEBUG_LOG("Player::SetPosition(%f, %f, %f, %f, %d) .. bad coordinates for player %d!",x,y,z,orientation,teleport,GetGUIDLow());
return false;
}
@ -6099,7 +6099,7 @@ void Player::CheckExploreSystem()
GiveXP( XP, NULL );
SendExplorationExperience(area,XP);
}
sLog.outDetail("PLAYER: Player %u discovered a new area: %u", GetGUIDLow(), area);
DETAIL_LOG("PLAYER: Player %u discovered a new area: %u", GetGUIDLow(), area);
}
}
}
@ -6791,7 +6791,7 @@ void Player::_ApplyItemMods(Item *item, uint8 slot,bool apply)
if(!proto)
return;
sLog.outDetail("applying mods for item %u ",item->GetGUIDLow());
DETAIL_LOG("applying mods for item %u ",item->GetGUIDLow());
uint32 attacktype = Player::GetAttackBySlot(slot);
if(attacktype < MAX_ATTACK)
@ -6808,7 +6808,7 @@ void Player::_ApplyItemMods(Item *item, uint8 slot,bool apply)
if(proto->Socket[0].Color) //only (un)equipping of items with sockets can influence metagems, so no need to waste time with normal items
CorrectMetaGemEnchants(slot, apply);
sLog.outDebug("_ApplyItemMods complete.");
DEBUG_LOG("_ApplyItemMods complete.");
}
void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool apply, bool only_level_scale /*= false*/)
@ -7470,7 +7470,7 @@ void Player::CastItemUseSpell(Item *item,SpellCastTargets const& targets,uint8 c
void Player::_RemoveAllItemMods()
{
sLog.outDebug("_RemoveAllItemMods start.");
DEBUG_LOG("_RemoveAllItemMods start.");
for (int i = 0; i < INVENTORY_SLOT_BAG_END; ++i)
{
@ -7513,12 +7513,12 @@ void Player::_RemoveAllItemMods()
}
}
sLog.outDebug("_RemoveAllItemMods complete.");
DEBUG_LOG("_RemoveAllItemMods complete.");
}
void Player::_ApplyAllItemMods()
{
sLog.outDebug("_ApplyAllItemMods start.");
DEBUG_LOG("_ApplyAllItemMods start.");
for (int i = 0; i < INVENTORY_SLOT_BAG_END; ++i)
{
@ -7562,7 +7562,7 @@ void Player::_ApplyAllItemMods()
}
}
sLog.outDebug("_ApplyAllItemMods complete.");
DEBUG_LOG("_ApplyAllItemMods complete.");
}
void Player::_ApplyAllLevelScaleItemMods(bool apply)
@ -7691,12 +7691,12 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
Loot *loot = 0;
PermissionTypes permission = ALL_PERMISSION;
sLog.outDebug("Player::SendLoot");
DEBUG_LOG("Player::SendLoot");
switch(guid.GetHigh())
{
case HIGHGUID_GAMEOBJECT:
{
sLog.outDebug(" IS_GAMEOBJECT_GUID(guid)");
DEBUG_LOG(" IS_GAMEOBJECT_GUID(guid)");
GameObject *go = GetMap()->GetGameObject(guid);
// not check distance for GO in case owned GO (fishing bobber case, for example)
@ -7723,7 +7723,7 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
if (lootid)
{
sLog.outDebug(" if(lootid)");
DEBUG_LOG(" if(lootid)");
loot->clear();
loot->FillLoot(lootid, LootTemplates_Gameobject, this, false);
loot->generateMoneyLoot(go->GetGOInfo()->MinMoneyLoot, go->GetGOInfo()->MaxMoneyLoot);
@ -7983,7 +7983,7 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
uint16 NumberOfFields = 0;
uint32 mapid = GetMapId();
sLog.outDebug("Sending SMSG_INIT_WORLD_STATES to Map:%u, Zone: %u", mapid, zoneid);
DEBUG_LOG("Sending SMSG_INIT_WORLD_STATES to Map:%u, Zone: %u", mapid, zoneid);
// may be exist better way to do this...
switch(zoneid)
@ -8380,7 +8380,7 @@ uint32 Player::GetXPRestBonus(uint32 xp)
SetRestBonus( GetRestBonus() - rested_bonus);
sLog.outDetail("Player gain %u xp (+ %u Rested Bonus). Rested points=%f",xp+rested_bonus,rested_bonus,GetRestBonus());
DETAIL_LOG("Player gain %u xp (+ %u Rested Bonus). Rested points=%f",xp+rested_bonus,rested_bonus,GetRestBonus());
return rested_bonus;
}
@ -9454,7 +9454,7 @@ uint8 Player::_CanStoreItem_InInventorySlots( uint8 slot_begin, uint8 slot_end,
uint8 Player::_CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 entry, uint32 count, Item *pItem, bool swap, uint32* no_space_count ) const
{
sLog.outDebug( "STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count);
DEBUG_LOG( "STORAGE: CanStoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, entry, count);
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(entry);
if (!pProto)
@ -9950,7 +9950,7 @@ uint8 Player::CanStoreItems( Item **pItems,int count) const
// no item
if (!pItem) continue;
sLog.outDebug( "STORAGE: CanStoreItems %i. item = %u, count = %u", k+1, pItem->GetEntry(), pItem->GetCount());
DEBUG_LOG( "STORAGE: CanStoreItems %i. item = %u, count = %u", k+1, pItem->GetEntry(), pItem->GetCount());
ItemPrototype const *pProto = pItem->GetProto();
// strange item
@ -10160,7 +10160,7 @@ uint8 Player::CanEquipItem( uint8 slot, uint16 &dest, Item *pItem, bool swap, bo
dest = 0;
if( pItem )
{
sLog.outDebug( "STORAGE: CanEquipItem slot = %u, item = %u, count = %u", slot, pItem->GetEntry(), pItem->GetCount());
DEBUG_LOG( "STORAGE: CanEquipItem slot = %u, item = %u, count = %u", slot, pItem->GetEntry(), pItem->GetCount());
ItemPrototype const *pProto = pItem->GetProto();
if( pProto )
{
@ -10305,7 +10305,7 @@ uint8 Player::CanUnequipItem( uint16 pos, bool swap ) const
if( !pItem )
return EQUIP_ERR_OK;
sLog.outDebug( "STORAGE: CanUnequipItem slot = %u, item = %u, count = %u", pos, pItem->GetEntry(), pItem->GetCount());
DEBUG_LOG( "STORAGE: CanUnequipItem slot = %u, item = %u, count = %u", pos, pItem->GetEntry(), pItem->GetCount());
ItemPrototype const *pProto = pItem->GetProto();
if( !pProto )
@ -10341,7 +10341,7 @@ uint8 Player::CanBankItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *p
uint32 count = pItem->GetCount();
sLog.outDebug( "STORAGE: CanBankItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, pItem->GetEntry(), pItem->GetCount());
DEBUG_LOG( "STORAGE: CanBankItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, pItem->GetEntry(), pItem->GetCount());
ItemPrototype const *pProto = pItem->GetProto();
if (!pProto)
return swap ? EQUIP_ERR_ITEMS_CANT_BE_SWAPPED : EQUIP_ERR_ITEM_NOT_FOUND;
@ -10519,7 +10519,7 @@ uint8 Player::CanUseItem( Item *pItem, bool not_loading ) const
{
if (pItem)
{
sLog.outDebug( "STORAGE: CanUseItem item = %u", pItem->GetEntry());
DEBUG_LOG( "STORAGE: CanUseItem item = %u", pItem->GetEntry());
if (!isAlive() && not_loading)
return EQUIP_ERR_YOU_ARE_DEAD;
@ -10624,7 +10624,7 @@ bool Player::CanUseItem( ItemPrototype const *pProto )
uint8 Player::CanUseAmmo( uint32 item ) const
{
sLog.outDebug( "STORAGE: CanUseAmmo item = %u", item);
DEBUG_LOG( "STORAGE: CanUseAmmo item = %u", item);
if( !isAlive() )
return EQUIP_ERR_YOU_ARE_DEAD;
//if( isStunned() )
@ -10749,7 +10749,7 @@ Item* Player::_StoreItem( uint16 pos, Item *pItem, uint32 count, bool clone, boo
uint8 bag = pos >> 8;
uint8 slot = pos & 255;
sLog.outDebug( "STORAGE: StoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, pItem->GetEntry(), count);
DEBUG_LOG( "STORAGE: StoreItem bag = %u, slot = %u, item = %u, count = %u", bag, slot, pItem->GetEntry(), count);
Item *pItem2 = GetItemByPos( bag, slot );
@ -11001,7 +11001,7 @@ void Player::VisualizeItem( uint8 slot, Item *pItem)
if( pItem->GetProto()->Bonding == BIND_WHEN_EQUIPED || pItem->GetProto()->Bonding == BIND_WHEN_PICKED_UP || pItem->GetProto()->Bonding == BIND_QUEST_ITEM )
pItem->SetBinding( true );
sLog.outDebug( "STORAGE: EquipItem slot = %u, item = %u", slot, pItem->GetEntry());
DEBUG_LOG( "STORAGE: EquipItem slot = %u, item = %u", slot, pItem->GetEntry());
m_items[slot] = pItem;
SetUInt64Value( PLAYER_FIELD_INV_SLOT_HEAD + (slot * 2), pItem->GetGUID() );
@ -11026,7 +11026,7 @@ void Player::RemoveItem( uint8 bag, uint8 slot, bool update )
Item *pItem = GetItemByPos( bag, slot );
if( pItem )
{
sLog.outDebug( "STORAGE: RemoveItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
DEBUG_LOG( "STORAGE: RemoveItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
RemoveEnchantmentDurations(pItem);
RemoveItemDurations(pItem);
@ -11140,7 +11140,7 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
Item *pItem = GetItemByPos( bag, slot );
if( pItem )
{
sLog.outDebug( "STORAGE: DestroyItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
DEBUG_LOG( "STORAGE: DestroyItem bag = %u, slot = %u, item = %u", bag, slot, pItem->GetEntry());
// start from destroy contained items (only equipped bag can have its)
if (pItem->IsBag() && pItem->IsEquipped()) // this also prevent infinity loop if empty bag stored in bag==slot
@ -11217,7 +11217,7 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
void Player::DestroyItemCount( uint32 item, uint32 count, bool update, bool unequip_check)
{
sLog.outDebug( "STORAGE: DestroyItemCount item = %u, count = %u", item, count);
DEBUG_LOG( "STORAGE: DestroyItemCount item = %u, count = %u", item, count);
uint32 remcount = 0;
// in inventory
@ -11346,7 +11346,7 @@ void Player::DestroyItemCount( uint32 item, uint32 count, bool update, bool uneq
void Player::DestroyZoneLimitedItem( bool update, uint32 new_zone )
{
sLog.outDebug( "STORAGE: DestroyZoneLimitedItem in map %u and area %u", GetMapId(), new_zone );
DEBUG_LOG( "STORAGE: DestroyZoneLimitedItem in map %u and area %u", GetMapId(), new_zone );
// in inventory
for(int i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; ++i)
@ -11378,7 +11378,7 @@ void Player::DestroyConjuredItems( bool update )
{
// used when entering arena
// destroys all conjured items
sLog.outDebug( "STORAGE: DestroyConjuredItems" );
DEBUG_LOG( "STORAGE: DestroyConjuredItems" );
// in inventory
for(int i = INVENTORY_SLOT_ITEM_START; i < INVENTORY_SLOT_ITEM_END; ++i)
@ -11406,7 +11406,7 @@ void Player::DestroyItemCount( Item* pItem, uint32 &count, bool update )
if(!pItem)
return;
sLog.outDebug( "STORAGE: DestroyItemCount item (GUID: %u, Entry: %u) count = %u", pItem->GetGUIDLow(),pItem->GetEntry(), count);
DEBUG_LOG( "STORAGE: DestroyItemCount item (GUID: %u, Entry: %u) count = %u", pItem->GetGUIDLow(),pItem->GetEntry(), count);
if( pItem->GetCount() <= count )
{
@ -11461,7 +11461,7 @@ void Player::SplitItem( uint16 src, uint16 dst, uint32 count )
return;
}
sLog.outDebug( "STORAGE: SplitItem bag = %u, slot = %u, item = %u, count = %u", dstbag, dstslot, pSrcItem->GetEntry(), count);
DEBUG_LOG( "STORAGE: SplitItem bag = %u, slot = %u, item = %u, count = %u", dstbag, dstslot, pSrcItem->GetEntry(), count);
Item *pNewItem = pSrcItem->CloneItem( count, this );
if( !pNewItem )
{
@ -11546,7 +11546,7 @@ void Player::SwapItem( uint16 src, uint16 dst )
if (!pSrcItem)
return;
sLog.outDebug( "STORAGE: SwapItem bag = %u, slot = %u, item = %u", dstbag, dstslot, pSrcItem->GetEntry());
DEBUG_LOG( "STORAGE: SwapItem bag = %u, slot = %u, item = %u", dstbag, dstslot, pSrcItem->GetEntry());
if (!isAlive())
{
@ -11862,7 +11862,7 @@ void Player::AddItemToBuyBackSlot( Item *pItem )
}
RemoveItemFromBuyBackSlot( slot, true );
sLog.outDebug( "STORAGE: AddItemToBuyBackSlot item = %u, slot = %u", pItem->GetEntry(), slot);
DEBUG_LOG( "STORAGE: AddItemToBuyBackSlot item = %u, slot = %u", pItem->GetEntry(), slot);
m_items[slot] = pItem;
time_t base = time(NULL);
@ -11884,7 +11884,7 @@ void Player::AddItemToBuyBackSlot( Item *pItem )
Item* Player::GetItemFromBuyBackSlot( uint32 slot )
{
sLog.outDebug( "STORAGE: GetItemFromBuyBackSlot slot = %u", slot);
DEBUG_LOG( "STORAGE: GetItemFromBuyBackSlot slot = %u", slot);
if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END)
return m_items[slot];
return NULL;
@ -11892,7 +11892,7 @@ Item* Player::GetItemFromBuyBackSlot( uint32 slot )
void Player::RemoveItemFromBuyBackSlot( uint32 slot, bool del )
{
sLog.outDebug( "STORAGE: RemoveItemFromBuyBackSlot slot = %u", slot);
DEBUG_LOG( "STORAGE: RemoveItemFromBuyBackSlot slot = %u", slot);
if (slot >= BUYBACK_SLOT_START && slot < BUYBACK_SLOT_END)
{
Item *pItem = m_items[slot];
@ -11917,7 +11917,7 @@ void Player::RemoveItemFromBuyBackSlot( uint32 slot, bool del )
void Player::SendEquipError( uint8 msg, Item* pItem, Item *pItem2, uint32 itemid /*= 0*/ )
{
sLog.outDebug( "WORLD: Sent SMSG_INVENTORY_CHANGE_FAILURE (%u)", msg);
DEBUG_LOG( "WORLD: Sent SMSG_INVENTORY_CHANGE_FAILURE (%u)", msg);
WorldPacket data(SMSG_INVENTORY_CHANGE_FAILURE, 1+8+8+1);
data << uint8(msg);
@ -11960,7 +11960,7 @@ void Player::SendEquipError( uint8 msg, Item* pItem, Item *pItem2, uint32 itemid
void Player::SendBuyError( uint8 msg, Creature* pCreature, uint32 item, uint32 param )
{
sLog.outDebug( "WORLD: Sent SMSG_BUY_FAILED" );
DEBUG_LOG( "WORLD: Sent SMSG_BUY_FAILED" );
WorldPacket data( SMSG_BUY_FAILED, (8+4+4+1) );
data << uint64(pCreature ? pCreature->GetGUID() : 0);
data << uint32(item);
@ -11972,7 +11972,7 @@ void Player::SendBuyError( uint8 msg, Creature* pCreature, uint32 item, uint32 p
void Player::SendSellError( uint8 msg, Creature* pCreature, uint64 guid, uint32 param )
{
sLog.outDebug( "WORLD: Sent SMSG_SELL_ITEM" );
DEBUG_LOG( "WORLD: Sent SMSG_SELL_ITEM" );
WorldPacket data( SMSG_SELL_ITEM,(8+8+(param?4:0)+1)); // last check 2.0.10
data << uint64(pCreature ? pCreature->GetGUID() : 0);
data << uint64(guid);
@ -12017,7 +12017,7 @@ void Player::UpdateItemDuration(uint32 time, bool realtimeonly)
if (m_itemDuration.empty())
return;
sLog.outDebug("Player::UpdateItemDuration(%u,%u)", time, realtimeonly);
DEBUG_LOG("Player::UpdateItemDuration(%u,%u)", time, realtimeonly);
for(ItemDurationList::const_iterator itr = m_itemDuration.begin(); itr != m_itemDuration.end(); )
{
@ -12266,81 +12266,81 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
}
}
sLog.outDebug("Adding %u to stat nb %u",enchant_amount,enchant_spell_id);
DEBUG_LOG("Adding %u to stat nb %u",enchant_amount,enchant_spell_id);
switch (enchant_spell_id)
{
case ITEM_MOD_MANA:
sLog.outDebug("+ %u MANA",enchant_amount);
DEBUG_LOG("+ %u MANA",enchant_amount);
HandleStatModifier(UNIT_MOD_MANA, BASE_VALUE, float(enchant_amount), apply);
break;
case ITEM_MOD_HEALTH:
sLog.outDebug("+ %u HEALTH",enchant_amount);
DEBUG_LOG("+ %u HEALTH",enchant_amount);
HandleStatModifier(UNIT_MOD_HEALTH, BASE_VALUE, float(enchant_amount), apply);
break;
case ITEM_MOD_AGILITY:
sLog.outDebug("+ %u AGILITY",enchant_amount);
DEBUG_LOG("+ %u AGILITY",enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_AGILITY, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_AGILITY, float(enchant_amount), apply);
break;
case ITEM_MOD_STRENGTH:
sLog.outDebug("+ %u STRENGTH",enchant_amount);
DEBUG_LOG("+ %u STRENGTH",enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_STRENGTH, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_STRENGTH, float(enchant_amount), apply);
break;
case ITEM_MOD_INTELLECT:
sLog.outDebug("+ %u INTELLECT",enchant_amount);
DEBUG_LOG("+ %u INTELLECT",enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_INTELLECT, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_INTELLECT, float(enchant_amount), apply);
break;
case ITEM_MOD_SPIRIT:
sLog.outDebug("+ %u SPIRIT",enchant_amount);
DEBUG_LOG("+ %u SPIRIT",enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_SPIRIT, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_SPIRIT, float(enchant_amount), apply);
break;
case ITEM_MOD_STAMINA:
sLog.outDebug("+ %u STAMINA",enchant_amount);
DEBUG_LOG("+ %u STAMINA",enchant_amount);
HandleStatModifier(UNIT_MOD_STAT_STAMINA, TOTAL_VALUE, float(enchant_amount), apply);
ApplyStatBuffMod(STAT_STAMINA, float(enchant_amount), apply);
break;
case ITEM_MOD_DEFENSE_SKILL_RATING:
((Player*)this)->ApplyRatingMod(CR_DEFENSE_SKILL, enchant_amount, apply);
sLog.outDebug("+ %u DEFENCE", enchant_amount);
DEBUG_LOG("+ %u DEFENCE", enchant_amount);
break;
case ITEM_MOD_DODGE_RATING:
((Player*)this)->ApplyRatingMod(CR_DODGE, enchant_amount, apply);
sLog.outDebug("+ %u DODGE", enchant_amount);
DEBUG_LOG("+ %u DODGE", enchant_amount);
break;
case ITEM_MOD_PARRY_RATING:
((Player*)this)->ApplyRatingMod(CR_PARRY, enchant_amount, apply);
sLog.outDebug("+ %u PARRY", enchant_amount);
DEBUG_LOG("+ %u PARRY", enchant_amount);
break;
case ITEM_MOD_BLOCK_RATING:
((Player*)this)->ApplyRatingMod(CR_BLOCK, enchant_amount, apply);
sLog.outDebug("+ %u SHIELD_BLOCK", enchant_amount);
DEBUG_LOG("+ %u SHIELD_BLOCK", enchant_amount);
break;
case ITEM_MOD_HIT_MELEE_RATING:
((Player*)this)->ApplyRatingMod(CR_HIT_MELEE, enchant_amount, apply);
sLog.outDebug("+ %u MELEE_HIT", enchant_amount);
DEBUG_LOG("+ %u MELEE_HIT", enchant_amount);
break;
case ITEM_MOD_HIT_RANGED_RATING:
((Player*)this)->ApplyRatingMod(CR_HIT_RANGED, enchant_amount, apply);
sLog.outDebug("+ %u RANGED_HIT", enchant_amount);
DEBUG_LOG("+ %u RANGED_HIT", enchant_amount);
break;
case ITEM_MOD_HIT_SPELL_RATING:
((Player*)this)->ApplyRatingMod(CR_HIT_SPELL, enchant_amount, apply);
sLog.outDebug("+ %u SPELL_HIT", enchant_amount);
DEBUG_LOG("+ %u SPELL_HIT", enchant_amount);
break;
case ITEM_MOD_CRIT_MELEE_RATING:
((Player*)this)->ApplyRatingMod(CR_CRIT_MELEE, enchant_amount, apply);
sLog.outDebug("+ %u MELEE_CRIT", enchant_amount);
DEBUG_LOG("+ %u MELEE_CRIT", enchant_amount);
break;
case ITEM_MOD_CRIT_RANGED_RATING:
((Player*)this)->ApplyRatingMod(CR_CRIT_RANGED, enchant_amount, apply);
sLog.outDebug("+ %u RANGED_CRIT", enchant_amount);
DEBUG_LOG("+ %u RANGED_CRIT", enchant_amount);
break;
case ITEM_MOD_CRIT_SPELL_RATING:
((Player*)this)->ApplyRatingMod(CR_CRIT_SPELL, enchant_amount, apply);
sLog.outDebug("+ %u SPELL_CRIT", enchant_amount);
DEBUG_LOG("+ %u SPELL_CRIT", enchant_amount);
break;
// Values from ITEM_STAT_MELEE_HA_RATING to ITEM_MOD_HASTE_RANGED_RATING are never used
// in Enchantments
@ -12375,13 +12375,13 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
((Player*)this)->ApplyRatingMod(CR_HIT_MELEE, enchant_amount, apply);
((Player*)this)->ApplyRatingMod(CR_HIT_RANGED, enchant_amount, apply);
((Player*)this)->ApplyRatingMod(CR_HIT_SPELL, enchant_amount, apply);
sLog.outDebug("+ %u HIT", enchant_amount);
DEBUG_LOG("+ %u HIT", enchant_amount);
break;
case ITEM_MOD_CRIT_RATING:
((Player*)this)->ApplyRatingMod(CR_CRIT_MELEE, enchant_amount, apply);
((Player*)this)->ApplyRatingMod(CR_CRIT_RANGED, enchant_amount, apply);
((Player*)this)->ApplyRatingMod(CR_CRIT_SPELL, enchant_amount, apply);
sLog.outDebug("+ %u CRITICAL", enchant_amount);
DEBUG_LOG("+ %u CRITICAL", enchant_amount);
break;
// Values ITEM_MOD_HIT_TAKEN_RATING and ITEM_MOD_CRIT_TAKEN_RATING are never used in Enchantment
// case ITEM_MOD_HIT_TAKEN_RATING:
@ -12398,38 +12398,38 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool
((Player*)this)->ApplyRatingMod(CR_CRIT_TAKEN_MELEE, enchant_amount, apply);
((Player*)this)->ApplyRatingMod(CR_CRIT_TAKEN_RANGED, enchant_amount, apply);
((Player*)this)->ApplyRatingMod(CR_CRIT_TAKEN_SPELL, enchant_amount, apply);
sLog.outDebug("+ %u RESILIENCE", enchant_amount);
DEBUG_LOG("+ %u RESILIENCE", enchant_amount);
break;
case ITEM_MOD_HASTE_RATING:
((Player*)this)->ApplyRatingMod(CR_HASTE_MELEE, enchant_amount, apply);
((Player*)this)->ApplyRatingMod(CR_HASTE_RANGED, enchant_amount, apply);
((Player*)this)->ApplyRatingMod(CR_HASTE_SPELL, enchant_amount, apply);
sLog.outDebug("+ %u HASTE", enchant_amount);
DEBUG_LOG("+ %u HASTE", enchant_amount);
break;
case ITEM_MOD_EXPERTISE_RATING:
((Player*)this)->ApplyRatingMod(CR_EXPERTISE, enchant_amount, apply);
sLog.outDebug("+ %u EXPERTISE", enchant_amount);
DEBUG_LOG("+ %u EXPERTISE", enchant_amount);
break;
case ITEM_MOD_ATTACK_POWER:
HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(enchant_amount), apply);
HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
sLog.outDebug("+ %u ATTACK_POWER", enchant_amount);
DEBUG_LOG("+ %u ATTACK_POWER", enchant_amount);
break;
case ITEM_MOD_RANGED_ATTACK_POWER:
HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
sLog.outDebug("+ %u RANGED_ATTACK_POWER", enchant_amount);
DEBUG_LOG("+ %u RANGED_ATTACK_POWER", enchant_amount);
break;
case ITEM_MOD_MANA_REGENERATION:
((Player*)this)->ApplyManaRegenBonus(enchant_amount, apply);
sLog.outDebug("+ %u MANA_REGENERATION", enchant_amount);
DEBUG_LOG("+ %u MANA_REGENERATION", enchant_amount);
break;
case ITEM_MOD_ARMOR_PENETRATION_RATING:
((Player*)this)->ApplyRatingMod(CR_ARMOR_PENETRATION, enchant_amount, apply);
sLog.outDebug("+ %u ARMOR PENETRATION", enchant_amount);
DEBUG_LOG("+ %u ARMOR PENETRATION", enchant_amount);
break;
case ITEM_MOD_SPELL_POWER:
((Player*)this)->ApplySpellPowerBonus(enchant_amount, apply);
sLog.outDebug("+ %u SPELL_POWER", enchant_amount);
DEBUG_LOG("+ %u SPELL_POWER", enchant_amount);
break;
case ITEM_MOD_BLOCK_VALUE:
HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(enchant_amount), apply);
@ -13682,7 +13682,7 @@ bool Player::SatisfyQuestLog( bool msg )
{
WorldPacket data( SMSG_QUESTLOG_FULL, 0 );
GetSession()->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_QUESTLOG_FULL" );
DEBUG_LOG( "WORLD: Sent SMSG_QUESTLOG_FULL" );
}
return false;
}
@ -14559,14 +14559,14 @@ void Player::SendQuestComplete( uint32 quest_id )
WorldPacket data( SMSG_QUESTUPDATE_COMPLETE, 4 );
data << uint32(quest_id);
GetSession()->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest_id );
DEBUG_LOG( "WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest_id );
}
}
void Player::SendQuestReward( Quest const *pQuest, uint32 XP, Object * questGiver )
{
uint32 questid = pQuest->GetQuestId();
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid );
DEBUG_LOG( "WORLD: Sent SMSG_QUESTGIVER_QUEST_COMPLETE quest = %u", questid );
WorldPacket data( SMSG_QUESTGIVER_QUEST_COMPLETE, (4+4+4+4+4) );
data << uint32(questid);
@ -14598,7 +14598,7 @@ void Player::SendQuestFailed( uint32 quest_id )
data << uint32(quest_id);
data << uint32(0); // failed reason (4 for inventory is full)
GetSession()->SendPacket( &data );
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED");
DEBUG_LOG("WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED");
}
}
@ -14609,7 +14609,7 @@ void Player::SendQuestTimerFailed( uint32 quest_id )
WorldPacket data( SMSG_QUESTUPDATE_FAILEDTIMER, 4 );
data << uint32(quest_id);
GetSession()->SendPacket( &data );
sLog.outDebug("WORLD: Sent SMSG_QUESTUPDATE_FAILEDTIMER");
DEBUG_LOG("WORLD: Sent SMSG_QUESTUPDATE_FAILEDTIMER");
}
}
@ -14618,7 +14618,7 @@ void Player::SendCanTakeQuestResponse( uint32 msg )
WorldPacket data( SMSG_QUESTGIVER_QUEST_INVALID, 4 );
data << uint32(msg);
GetSession()->SendPacket( &data );
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_INVALID");
DEBUG_LOG("WORLD: Sent SMSG_QUESTGIVER_QUEST_INVALID");
}
void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver)
@ -14644,7 +14644,7 @@ void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver)
data << uint64(GetGUID());
pReceiver->GetSession()->SendPacket(&data);
sLog.outDebug("WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT");
DEBUG_LOG("WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT");
}
}
@ -14656,14 +14656,14 @@ void Player::SendPushToPartyResponse( Player *pPlayer, uint32 msg )
data << uint64(pPlayer->GetGUID());
data << uint8(msg); // valid values: 0-8
GetSession()->SendPacket( &data );
sLog.outDebug("WORLD: Sent MSG_QUEST_PUSH_RESULT");
DEBUG_LOG("WORLD: Sent MSG_QUEST_PUSH_RESULT");
}
}
void Player::SendQuestUpdateAddItem( Quest const* /*pQuest*/, uint32 /*item_idx*/, uint32 /*count*/ )
{
WorldPacket data( SMSG_QUESTUPDATE_ADD_ITEM, 0 );
sLog.outDebug( "WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM" );
DEBUG_LOG( "WORLD: Sent SMSG_QUESTUPDATE_ADD_ITEM" );
//data << pQuest->ReqItemId[item_idx];
//data << count;
GetSession()->SendPacket( &data );
@ -14679,7 +14679,7 @@ void Player::SendQuestUpdateAddCreatureOrGo( Quest const* pQuest, ObjectGuid gui
entry = (-entry) | 0x80000000;
WorldPacket data( SMSG_QUESTUPDATE_ADD_KILL, (4*4+8) );
sLog.outDebug( "WORLD: Sent SMSG_QUESTUPDATE_ADD_KILL" );
DEBUG_LOG( "WORLD: Sent SMSG_QUESTUPDATE_ADD_KILL" );
data << uint32(pQuest->GetQuestId());
data << uint32(entry);
data << uint32(old_count + add_count);
@ -14938,8 +14938,8 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
}
}
sLog.outDebug("Load Basic value of player %s is: ", m_name.c_str());
outDebugValues();
DEBUG_FILTER_LOG(LOG_FILTER_PLAYER_STATS, "Load Basic value of player %s is: ", m_name.c_str());
outDebugStatsValues();
//Need to call it to initialize m_team (m_team can be calculated from race)
//Other way is to saves m_team into characters table.
@ -15095,7 +15095,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
// client without expansion support
if(GetSession()->Expansion() < transMapEntry->Expansion())
{
sLog.outDebug("Player %s using client without required expansion tried login at transport at non accessible map %u", GetName(), (*iter)->GetMapId());
DEBUG_LOG("Player %s using client without required expansion tried login at transport at non accessible map %u", GetName(), (*iter)->GetMapId());
break;
}
@ -15124,7 +15124,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
// client without expansion support
if(GetSession()->Expansion() < mapEntry->Expansion())
{
sLog.outDebug("Player %s using client without required expansion tried login at non accessible map %u", GetName(), GetMapId());
DEBUG_LOG("Player %s using client without required expansion tried login at non accessible map %u", GetName(), GetMapId());
RelocateToHomebind();
}
}
@ -15373,8 +15373,8 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
SetPower(Powers(i),savedpower > GetMaxPower(Powers(i)) ? GetMaxPower(Powers(i)) : savedpower);
}
sLog.outDebug("The value of player %s after load item and aura is: ", m_name.c_str());
outDebugValues();
DEBUG_FILTER_LOG(LOG_FILTER_PLAYER_STATS, "The value of player %s after load item and aura is: ", m_name.c_str());
outDebugStatsValues();
// all fields read
delete result;
@ -15566,7 +15566,7 @@ void Player::_LoadAuras(QueryResult *result, uint32 timediff)
aura->SetLoadedState(caster_guid,damage,maxduration,remaintime,remaincharges);
AddAura(aura);
sLog.outDetail("Added aura spellid %u, effect %u", spellproto->Id, effindex);
DETAIL_LOG("Added aura spellid %u, effect %u", spellproto->Id, effindex);
}
}
while( result->NextRow() );
@ -16005,7 +16005,7 @@ void Player::_LoadQuestStatus(QueryResult *result)
m_questRewardTalentCount += pQuest->GetBonusTalents();
}
sLog.outDebug("Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.m_status, quest_id, GetGUIDLow());
DEBUG_LOG("Quest status is {%u} for quest {%u} for player (GUID: %u)", questStatusData.m_status, quest_id, GetGUIDLow());
}
}
while( result->NextRow() );
@ -16048,7 +16048,7 @@ void Player::_LoadDailyQuestStatus(QueryResult *result)
SetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1+quest_daily_idx,quest_id);
++quest_daily_idx;
sLog.outDebug("Daily quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
DEBUG_LOG("Daily quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
}
while( result->NextRow() );
@ -16078,7 +16078,7 @@ void Player::_LoadWeeklyQuestStatus(QueryResult *result)
m_weeklyquests.insert(quest_id);
sLog.outDebug("Weekly quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
DEBUG_LOG("Weekly quest {%u} cooldown for player (GUID: %u)", quest_id, GetGUIDLow());
}
while( result->NextRow() );
@ -16328,7 +16328,7 @@ InstancePlayerBind* Player::BindToInstance(InstanceSave *save, bool permanent, b
bind.save = save;
bind.perm = permanent;
if(!load) sLog.outDebug("Player::BindToInstance: %s(%d) is now bound to map %d, instance %d, difficulty %d", GetName(), GetGUIDLow(), save->GetMapId(), save->GetInstanceId(), save->GetDifficulty());
if(!load) DEBUG_LOG("Player::BindToInstance: %s(%d) is now bound to map %d, instance %d, difficulty %d", GetName(), GetGUIDLow(), save->GetMapId(), save->GetInstanceId(), save->GetDifficulty());
return &bind;
}
else
@ -16521,8 +16521,8 @@ void Player::SaveToDB()
// first save/honor gain after midnight will also update the player's honor fields
UpdateHonorFields();
sLog.outDebug("The value of player %s at save: ", m_name.c_str());
outDebugValues();
DEBUG_FILTER_LOG(LOG_FILTER_PLAYER_STATS, "The value of player %s at save: ", m_name.c_str());
outDebugStatsValues();
CharacterDatabase.BeginTransaction();
@ -17130,9 +17130,10 @@ void Player::_SaveStats()
CharacterDatabase.Execute( ss.str().c_str() );
}
void Player::outDebugValues() const
void Player::outDebugStatsValues() const
{
if(!sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG)) // optimize disabled debug output
// optimize disabled debug output
if(!sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG) || (sLog.getLogFilter() & LOG_FILTER_PLAYER_STATS)!=0)
return;
sLog.outDebug("HP is: \t\t\t%u\t\tMP is: \t\t\t%u",GetMaxHealth(), GetMaxPower(POWER_MANA));
@ -17205,7 +17206,7 @@ void Player::SavePositionInDB(uint32 mapid, float x,float y,float z,float o,uint
<< "',position_z='"<<z<<"',orientation='"<<o<<"',map='"<<mapid
<< "',zone='"<<zone<<"',trans_x='0',trans_y='0',trans_z='0',"
<< "transguid='0',taxi_path='' WHERE guid='"<< GUID_LOPART(guid) <<"'";
sLog.outDebug("%s", ss.str().c_str());
DEBUG_LOG("%s", ss.str().c_str());
CharacterDatabase.Execute(ss.str().c_str());
}
@ -17583,7 +17584,7 @@ void Player::PetSpellInitialize()
if(!pet)
return;
sLog.outDebug("Pet Spells Groups");
DEBUG_LOG("Pet Spells Groups");
CharmInfo *charmInfo = pet->GetCharmInfo();
@ -18166,7 +18167,7 @@ bool Player::ActivateTaxiPathTo(std::vector<uint32> const& nodes, Creature* npc
data << uint32(ERR_TAXIOK);
GetSession()->SendPacket(&data);
sLog.outDebug("WORLD: Sent SMSG_ACTIVATETAXIREPLY");
DEBUG_LOG("WORLD: Sent SMSG_ACTIVATETAXIREPLY");
GetSession()->SendDoFlight(mount_display_id, sourcepath);
@ -18194,7 +18195,7 @@ void Player::ContinueTaxiFlight()
if (!sourceNode)
return;
sLog.outDebug( "WORLD: Restart character %u taxi flight", GetGUIDLow() );
DEBUG_LOG( "WORLD: Restart character %u taxi flight", GetGUIDLow() );
uint32 mountDisplayId = sObjectMgr.GetTaxiMountDisplayId(sourceNode, GetTeam(),true);
uint32 path = m_taxi.GetCurrentTaxiPath();
@ -18363,7 +18364,7 @@ bool Player::BuyItemFromVendorSlot(uint64 vendorguid, uint32 vendorslot, uint32
Creature *pCreature = GetNPCIfCanInteractWith(vendorguid,UNIT_NPC_FLAG_VENDOR);
if (!pCreature)
{
sLog.outDebug( "WORLD: BuyItemFromVendor - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)) );
DEBUG_LOG( "WORLD: BuyItemFromVendor - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(vendorguid)) );
SendBuyError( BUY_ERR_DISTANCE_TOO_FAR, NULL, item, 0);
return false;
}
@ -18608,7 +18609,7 @@ void Player::UpdateHomebindTime(uint32 time)
data << uint32(m_HomebindTimer);
data << uint32(ERR_RAID_GROUP_NONE); // error used only when timer = 0
GetSession()->SendPacket(&data);
sLog.outDebug("PLAYER: Player '%s' (GUID: %u) will be teleported to homebind in 60 seconds", GetName(),GetGUIDLow());
DEBUG_LOG("PLAYER: Player '%s' (GUID: %u) will be teleported to homebind in 60 seconds", GetName(),GetGUIDLow());
}
}
@ -18847,7 +18848,7 @@ bool Player::EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot)
}
}
sLog.outDebug("Checking Condition %u, there are %u Meta Gems, %u Red Gems, %u Yellow Gems and %u Blue Gems, Activate:%s", enchantmentcondition, curcount[0], curcount[1], curcount[2], curcount[3], activate ? "yes" : "no");
DEBUG_LOG("Checking Condition %u, there are %u Meta Gems, %u Red Gems, %u Yellow Gems and %u Blue Gems, Activate:%s", enchantmentcondition, curcount[0], curcount[1], curcount[2], curcount[3], activate ? "yes" : "no");
return activate;
}
@ -19497,7 +19498,7 @@ void Player::learnDefaultSpells()
for (PlayerCreateInfoSpells::const_iterator itr = info->spell.begin(); itr!=info->spell.end(); ++itr)
{
uint32 tspell = *itr;
sLog.outDebug("PLAYER (Class: %u Race: %u): Adding initial spell, id = %u",uint32(getClass()),uint32(getRace()), tspell);
DEBUG_LOG("PLAYER (Class: %u Race: %u): Adding initial spell, id = %u",uint32(getClass()),uint32(getRace()), tspell);
if(!IsInWorld()) // will send in INITIAL_SPELLS in list anyway at map add
addSpell(tspell, true, true, true, false);
else // but send in normal spell in game learn case
@ -21115,7 +21116,7 @@ void Player::HandleFall(MovementInfo const& movementInfo)
{
// calculate total z distance of the fall
float z_diff = m_lastFallZ - movementInfo.GetPos()->z;
sLog.outDebug("zDiff = %f", z_diff);
DEBUG_LOG("zDiff = %f", z_diff);
//Players with low fall distance, Feather Fall or physical immunity (charges used) are ignored
// 14.57 can be calculated by resolving damageperc formula below to 0
@ -21250,7 +21251,7 @@ void Player::LearnTalent(uint32 talentId, uint32 talentRank)
// learn! (other talent ranks will unlearned at learning)
learnSpell(spellid, false);
sLog.outDetail("TalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
DETAIL_LOG("TalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
}
void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
@ -21382,7 +21383,7 @@ void Player::LearnPetTalent(uint64 petGuid, uint32 talentId, uint32 talentRank)
// learn! (other talent ranks will unlearned at learning)
pet->learnSpell(spellid);
sLog.outDetail("PetTalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
DETAIL_LOG("PetTalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
}
void Player::UpdateKnownCurrencies(uint32 itemId, bool apply)

View file

@ -2391,7 +2391,7 @@ class MANGOS_DLL_SPEC Player : public Unit
/*********************************************************/
time_t m_lastHonorUpdateTime;
void outDebugValues() const;
void outDebugStatsValues() const;
ObjectGuid m_lootGuid;
uint32 m_team;

View file

@ -310,7 +310,7 @@ void PoolGroup<Creature>::Spawn1Object(PoolObject* obj, bool instantly)
if (!map->Instanceable() && map->IsLoaded(data->posX, data->posY))
{
Creature* pCreature = new Creature;
//sLog.outDebug("Spawning creature %u",obj->guid);
//DEBUG_LOG("Spawning creature %u",obj->guid);
if (!pCreature->LoadFromDB(obj->guid, map))
{
delete pCreature;
@ -351,7 +351,7 @@ void PoolGroup<GameObject>::Spawn1Object(PoolObject* obj, bool instantly)
if (!map->Instanceable() && map->IsLoaded(data->posX, data->posY))
{
GameObject* pGameobject = new GameObject;
//sLog.outDebug("Spawning gameobject %u", obj->guid);
//DEBUG_LOG("Spawning gameobject %u", obj->guid);
if (!pGameobject->LoadFromDB(obj->guid, map))
{
delete pGameobject;
@ -714,7 +714,7 @@ void PoolManager::Initialize()
delete result;
}
sLog.outBasic("Pool handling system initialized, %u pools spawned.", count);
BASIC_LOG("Pool handling system initialized, %u pools spawned.", count);
}
// Call to spawn a pool, if cache if true the method will spawn only if cached entry is different

View file

@ -170,7 +170,7 @@ void WorldSession::HandleCreatureQueryOpcode( WorldPacket & recv_data )
SubName = cl->SubName[loc_idx];
}
}
sLog.outDetail("WORLD: CMSG_CREATURE_QUERY '%s' - Entry: %u.", ci->Name, entry);
DETAIL_LOG("WORLD: CMSG_CREATURE_QUERY '%s' - Entry: %u.", ci->Name, entry);
// guess size
WorldPacket data( SMSG_CREATURE_QUERY_RESPONSE, 100 );
data << uint32(entry); // creature entry
@ -195,16 +195,16 @@ void WorldSession::HandleCreatureQueryOpcode( WorldPacket & recv_data )
data << uint32(ci->questItems[i]); // itemId[6], quest drop
data << uint32(ci->movementId); // CreatureMovementInfo.dbc
SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE" );
DEBUG_LOG( "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE" );
}
else
{
sLog.outDebug("WORLD: CMSG_CREATURE_QUERY - NO CREATURE INFO! (GUID: %u, ENTRY: %u)",
DEBUG_LOG("WORLD: CMSG_CREATURE_QUERY - NO CREATURE INFO! (GUID: %u, ENTRY: %u)",
GUID_LOPART(guid), entry);
WorldPacket data( SMSG_CREATURE_QUERY_RESPONSE, 4 );
data << uint32(entry | 0x80000000);
SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE" );
DEBUG_LOG( "WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE" );
}
}
@ -239,7 +239,7 @@ void WorldSession::HandleGameObjectQueryOpcode( WorldPacket & recv_data )
CastBarCaption = gl->CastBarCaption[loc_idx];
}
}
sLog.outDetail("WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->name, entryID);
DETAIL_LOG("WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->name, entryID);
WorldPacket data ( SMSG_GAMEOBJECT_QUERY_RESPONSE, 150 );
data << uint32(entryID);
data << uint32(info->type);
@ -254,22 +254,22 @@ void WorldSession::HandleGameObjectQueryOpcode( WorldPacket & recv_data )
for(uint32 i = 0; i < 6; ++i)
data << uint32(info->questItems[i]); // itemId[6], quest drop
SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE" );
DEBUG_LOG( "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE" );
}
else
{
sLog.outDebug( "WORLD: CMSG_GAMEOBJECT_QUERY - Missing gameobject info for (GUID: %u, ENTRY: %u)",
DEBUG_LOG( "WORLD: CMSG_GAMEOBJECT_QUERY - Missing gameobject info for (GUID: %u, ENTRY: %u)",
GUID_LOPART(guid), entryID );
WorldPacket data ( SMSG_GAMEOBJECT_QUERY_RESPONSE, 4 );
data << uint32(entryID | 0x80000000);
SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE" );
DEBUG_LOG( "WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE" );
}
}
void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
{
sLog.outDetail("WORLD: Received MSG_CORPSE_QUERY");
DETAIL_LOG("WORLD: Received MSG_CORPSE_QUERY");
Corpse *corpse = GetPlayer()->GetCorpse();
@ -324,7 +324,7 @@ void WorldSession::HandleNpcTextQueryOpcode( WorldPacket & recv_data )
uint64 guid;
recv_data >> textID;
sLog.outDetail("WORLD: CMSG_NPC_TEXT_QUERY ID '%u'", textID);
DETAIL_LOG("WORLD: CMSG_NPC_TEXT_QUERY ID '%u'", textID);
recv_data >> guid;
_player->SetTargetGUID(guid);
@ -401,12 +401,12 @@ void WorldSession::HandleNpcTextQueryOpcode( WorldPacket & recv_data )
SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_NPC_TEXT_UPDATE" );
DEBUG_LOG( "WORLD: Sent SMSG_NPC_TEXT_UPDATE" );
}
void WorldSession::HandlePageTextQueryOpcode( WorldPacket & recv_data )
{
sLog.outDetail("WORLD: Received CMSG_PAGE_TEXT_QUERY");
DETAIL_LOG("WORLD: Received CMSG_PAGE_TEXT_QUERY");
recv_data.hexlike();
uint32 pageID;
@ -447,13 +447,13 @@ void WorldSession::HandlePageTextQueryOpcode( WorldPacket & recv_data )
}
SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE" );
DEBUG_LOG( "WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE" );
}
}
void WorldSession::HandleCorpseMapPositionQuery( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY" );
DEBUG_LOG( "WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY" );
uint32 unk;
recv_data >> unk;

View file

@ -40,7 +40,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode( WorldPacket & recv_data )
Object* questgiver = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_OR_GAMEOBJECT);
if(!questgiver)
{
sLog.outDetail("Error in CMSG_QUESTGIVER_STATUS_QUERY, called for not found questgiver (Typeid: %u GUID: %u)",GuidHigh2TypeId(GUID_HIPART(guid)),GUID_LOPART(guid));
DETAIL_LOG("Error in CMSG_QUESTGIVER_STATUS_QUERY, called for not found questgiver (Typeid: %u GUID: %u)",GuidHigh2TypeId(GUID_HIPART(guid)),GUID_LOPART(guid));
return;
}
@ -48,7 +48,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode( WorldPacket & recv_data )
{
case TYPEID_UNIT:
{
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for npc, guid = %u",uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for npc, guid = %u",uint32(GUID_LOPART(guid)) );
Creature* cr_questgiver=(Creature*)questgiver;
if( !cr_questgiver->IsHostileTo(_player)) // not show quest status to enemies
{
@ -60,7 +60,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode( WorldPacket & recv_data )
}
case TYPEID_GAMEOBJECT:
{
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for GameObject guid = %u",uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for GameObject guid = %u",uint32(GUID_LOPART(guid)) );
GameObject* go_questgiver=(GameObject*)questgiver;
questStatus = Script->GODialogStatus(_player, go_questgiver);
if( questStatus > 6 )
@ -81,13 +81,13 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
sLog.outDebug ("WORLD: Received CMSG_QUESTGIVER_HELLO npc = %u", GUID_LOPART(guid));
DEBUG_LOG ("WORLD: Received CMSG_QUESTGIVER_HELLO npc = %u", GUID_LOPART(guid));
Creature *pCreature = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!pCreature)
{
sLog.outDebug ("WORLD: HandleQuestgiverHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guid));
DEBUG_LOG ("WORLD: HandleQuestgiverHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guid));
return;
}
@ -116,7 +116,7 @@ void WorldSession::HandleQuestgiverAcceptQuestOpcode( WorldPacket & recv_data )
if(!GetPlayer()->isAlive())
return;
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), quest, unk1 );
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), quest, unk1 );
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_GAMEOBJECT_PLAYER_OR_ITEM);
@ -231,7 +231,7 @@ void WorldSession::HandleQuestgiverQueryQuestOpcode( WorldPacket & recv_data )
uint32 quest;
uint8 unk1;
recv_data >> guid >> quest >> unk1;
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), quest, unk1 );
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_QUERY_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), quest, unk1 );
// Verify that the guid is valid and is a questgiver or involved in the requested quest
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_GAMEOBJECT_OR_ITEM);
@ -252,7 +252,7 @@ void WorldSession::HandleQuestQueryOpcode( WorldPacket & recv_data )
{
uint32 quest;
recv_data >> quest;
sLog.outDebug( "WORLD: Received CMSG_QUEST_QUERY quest = %u",quest );
DEBUG_LOG( "WORLD: Received CMSG_QUEST_QUERY quest = %u",quest );
Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest);
if ( pQuest )
@ -276,7 +276,7 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode( WorldPacket & recv_data )
if(!GetPlayer()->isAlive())
return;
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc = %u, quest = %u, reward = %u",uint32(GUID_LOPART(guid)),quest,reward );
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc = %u, quest = %u, reward = %u",uint32(GUID_LOPART(guid)),quest,reward );
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_OR_GAMEOBJECT);
if(!pObject)
@ -326,7 +326,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode( WorldPacket & recv_data
if(!GetPlayer()->isAlive())
return;
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest );
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest );
Object* pObject = _player->GetObjectByTypeMask(guid, TYPEMASK_CREATURE_OR_GAMEOBJECT);
if(!pObject||!pObject->hasInvolvedQuest(quest))
@ -344,7 +344,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode( WorldPacket & recv_data
void WorldSession::HandleQuestgiverCancel(WorldPacket& /*recv_data*/ )
{
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_CANCEL" );
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_CANCEL" );
_player->PlayerTalkClass->CloseGossip();
}
@ -357,7 +357,7 @@ void WorldSession::HandleQuestLogSwapQuest(WorldPacket& recv_data )
if(slot1 == slot2 || slot1 >= MAX_QUEST_LOG_SIZE || slot2 >= MAX_QUEST_LOG_SIZE)
return;
sLog.outDebug( "WORLD: Received CMSG_QUESTLOG_SWAP_QUEST slot 1 = %u, slot 2 = %u", slot1, slot2 );
DEBUG_LOG( "WORLD: Received CMSG_QUESTLOG_SWAP_QUEST slot 1 = %u, slot 2 = %u", slot1, slot2 );
GetPlayer()->SwapQuestSlot(slot1,slot2);
}
@ -367,7 +367,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recv_data)
uint8 slot;
recv_data >> slot;
sLog.outDebug( "WORLD: Received CMSG_QUESTLOG_REMOVE_QUEST slot = %u",slot );
DEBUG_LOG( "WORLD: Received CMSG_QUESTLOG_REMOVE_QUEST slot = %u",slot );
if( slot < MAX_QUEST_LOG_SIZE )
{
@ -396,7 +396,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recv_data)
uint32 quest;
recv_data >> quest;
sLog.outDebug("WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u", quest);
DEBUG_LOG("WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u", quest);
if (const Quest* pQuest = sObjectMgr.GetQuestTemplate(quest))
{
@ -435,7 +435,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data)
if(!GetPlayer()->isAlive())
return;
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest );
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest );
Quest const *pQuest = sObjectMgr.GetQuestTemplate(quest);
if( pQuest )
@ -459,7 +459,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data)
void WorldSession::HandleQuestgiverQuestAutoLaunch(WorldPacket& /*recvPacket*/)
{
sLog.outDebug( "WORLD: Received CMSG_QUESTGIVER_QUEST_AUTOLAUNCH" );
DEBUG_LOG( "WORLD: Received CMSG_QUESTGIVER_QUEST_AUTOLAUNCH" );
}
void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
@ -467,7 +467,7 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
uint32 questId;
recvPacket >> questId;
sLog.outDebug("WORLD: Received CMSG_PUSHQUESTTOPARTY quest = %u", questId);
DEBUG_LOG("WORLD: Received CMSG_PUSHQUESTTOPARTY quest = %u", questId);
if (Quest const *pQuest = sObjectMgr.GetQuestTemplate(questId))
{
@ -525,7 +525,7 @@ void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket)
uint8 msg;
recvPacket >> guid >> msg;
sLog.outDebug( "WORLD: Received MSG_QUEST_PUSH_RESULT" );
DEBUG_LOG( "WORLD: Received MSG_QUEST_PUSH_RESULT" );
if( _player->GetDivider() != 0 )
{
@ -632,7 +632,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket*/)
{
sLog.outDebug("WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY");
DEBUG_LOG("WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY");
uint32 count = 0;

View file

@ -47,7 +47,7 @@ ReactorAI::AttackStart(Unit *p)
if(m_creature->Attack(p,true))
{
DEBUG_LOG("Tag unit GUID: %u (TypeId: %u) as a victim", p->GetGUIDLow(), p->GetTypeId());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Tag unit GUID: %u (TypeId: %u) as a victim", p->GetGUIDLow(), p->GetTypeId());
i_victimGuid = p->GetGUID();
m_creature->AddThreat(p);
@ -88,7 +88,7 @@ ReactorAI::EnterEvadeMode()
{
if (!m_creature->isAlive())
{
DEBUG_LOG("Creature stopped attacking, he is dead [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, he is dead [guid=%u]", m_creature->GetGUIDLow());
m_creature->GetMotionMaster()->MovementExpired();
m_creature->GetMotionMaster()->MoveIdle();
i_victimGuid = 0;
@ -101,19 +101,19 @@ ReactorAI::EnterEvadeMode()
if (!victim)
{
DEBUG_LOG("Creature stopped attacking, no victim [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, no victim [guid=%u]", m_creature->GetGUIDLow());
}
else if (victim->HasStealthAura())
{
DEBUG_LOG("Creature stopped attacking, victim is in stealth [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, victim is in stealth [guid=%u]", m_creature->GetGUIDLow());
}
else if (victim->isInFlight())
{
DEBUG_LOG("Creature stopped attacking, victim is in flight [guid=%u]", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, victim is in flight [guid=%u]", m_creature->GetGUIDLow());
}
else
{
DEBUG_LOG("Creature stopped attacking, victim %s [guid=%u]", victim->isAlive() ? "out run him" : "is dead", m_creature->GetGUIDLow());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Creature stopped attacking, victim %s [guid=%u]", victim->isAlive() ? "out run him" : "is dead", m_creature->GetGUIDLow());
}
m_creature->RemoveAllAuras();

View file

@ -36,7 +36,7 @@ void WorldSession::HandleLearnTalentOpcode( WorldPacket & recv_data )
void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
{
sLog.outDebug("CMSG_LEARN_PREVIEW_TALENTS");
DEBUG_LOG("CMSG_LEARN_PREVIEW_TALENTS");
uint32 talentsCount;
recvPacket >> talentsCount;
@ -55,14 +55,14 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
void WorldSession::HandleTalentWipeConfirmOpcode( WorldPacket & recv_data )
{
sLog.outDetail("MSG_TALENT_WIPE_CONFIRM");
DETAIL_LOG("MSG_TALENT_WIPE_CONFIRM");
uint64 guid;
recv_data >> guid;
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid,UNIT_NPC_FLAG_TRAINER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleTalentWipeConfirmOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleTalentWipeConfirmOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
return;
}

View file

@ -152,7 +152,7 @@ void PlayerSocial::SendSocialList()
}
plr->GetSession()->SendPacket(&data);
sLog.outDebug("WORLD: Sent SMSG_CONTACT_LIST");
DEBUG_LOG("WORLD: Sent SMSG_CONTACT_LIST");
}
bool PlayerSocial::HasFriend(uint32 friend_guid)

View file

@ -3267,7 +3267,7 @@ void Spell::SendSpellStart()
if (!IsNeedSendToClient())
return;
sLog.outDebug("Sending SMSG_SPELL_START id=%u", m_spellInfo->Id);
DEBUG_LOG("Sending SMSG_SPELL_START id=%u", m_spellInfo->Id);
uint32 castFlags = CAST_FLAG_UNKNOWN1;
if (IsRangedSpell())
@ -3325,7 +3325,7 @@ void Spell::SendSpellGo()
if(!IsNeedSendToClient())
return;
sLog.outDebug("Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id);
DEBUG_LOG("Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id);
uint32 castFlags = CAST_FLAG_UNKNOWN3;
if(IsRangedSpell())
@ -4002,11 +4002,11 @@ void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTar
damage = int32(CalculateDamage(i, unitTarget) * DamageMultiplier);
sLog.outDebug("Spell %u Effect%d : %u", m_spellInfo->Id, i, eff);
DEBUG_LOG("Spell %u Effect%d : %u", m_spellInfo->Id, i, eff);
if(eff < TOTAL_SPELL_EFFECTS)
{
//sLog.outDebug( "WORLD: Spell FX %d < TOTAL_SPELL_EFFECTS ", eff);
//DEBUG_LOG( "WORLD: Spell FX %d < TOTAL_SPELL_EFFECTS ", eff);
(*this.*SpellEffects[eff])(i);
}
else
@ -5425,7 +5425,7 @@ int32 Spell::CalculatePowerCost()
break;
case POWER_RUNE:
case POWER_RUNIC_POWER:
sLog.outDebug("Spell::CalculateManaCost: Not implemented yet!");
DEBUG_LOG("Spell::CalculateManaCost: Not implemented yet!");
break;
default:
sLog.outError("Spell::CalculateManaCost: Unknown power type '%d' in spell %d", m_spellInfo->powerType, m_spellInfo->Id);
@ -5958,7 +5958,7 @@ void Spell::Delayed()
else
m_timer += delaytime;
sLog.outDetail("Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime);
DETAIL_LOG("Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime);
WorldPacket data(SMSG_SPELL_DELAYED, 8+4);
data << m_caster->GetPackGUID();
@ -5993,7 +5993,7 @@ void Spell::DelayedChannel()
else
m_timer -= delaytime;
sLog.outDebug("Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer);
DEBUG_LOG("Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer);
for(std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
{

View file

@ -447,7 +447,7 @@ m_isRemovedOnShapeLost(true), m_in_use(0), m_deleted(false)
m_duration = m_maxduration;
sLog.outDebug("Aura: construct Spellid : %u, Aura : %u Duration : %d Target : %d Damage : %d", m_spellProto->Id, m_spellProto->EffectApplyAuraName[eff], m_maxduration, m_spellProto->EffectImplicitTargetA[eff],damage);
DEBUG_LOG("Aura: construct Spellid : %u, Aura : %u Duration : %d Target : %d Damage : %d", m_spellProto->Id, m_spellProto->EffectApplyAuraName[eff], m_maxduration, m_spellProto->EffectImplicitTargetA[eff],damage);
SetModifier(AuraType(m_spellProto->EffectApplyAuraName[eff]), damage, m_spellProto->EffectAmplitude[eff], m_spellProto->EffectMiscValue[eff]);
@ -5796,7 +5796,7 @@ void Aura::HandleModDamageDone(bool apply, bool Real)
void Aura::HandleModDamagePercentDone(bool apply, bool Real)
{
sLog.outDebug("AURA MOD DAMAGE type:%u negative:%u", m_modifier.m_miscvalue, m_positive ? 0 : 1);
DEBUG_LOG("AURA MOD DAMAGE type:%u negative:%u", m_modifier.m_miscvalue, m_positive ? 0 : 1);
// apply item specific bonuses for already equipped weapon
if(Real && m_target->GetTypeId() == TYPEID_PLAYER)
@ -5859,7 +5859,7 @@ void Aura::HandleModOffhandDamagePercent(bool apply, bool Real)
if(!Real)
return;
sLog.outDebug("AURA MOD OFFHAND DAMAGE");
DEBUG_LOG("AURA MOD OFFHAND DAMAGE");
m_target->HandleStatModifier(UNIT_MOD_DAMAGE_OFFHAND, TOTAL_PCT, float(m_modifier.m_amount), apply);
}
@ -7133,7 +7133,7 @@ void Aura::PeriodicTick()
m_target->CalculateAbsorbAndResist(pCaster, GetSpellSchoolMask(GetSpellProto()), DOT, pdamage, &absorb, &resist, !(GetSpellProto()->AttributesEx2 & SPELL_ATTR_EX2_CANT_REFLECTED));
sLog.outDetail("PeriodicTick: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId(),absorb);
pCaster->DealDamageMods(m_target, pdamage, &absorb);
@ -7212,7 +7212,7 @@ void Aura::PeriodicTick()
if(m_target->GetHealth() < pdamage)
pdamage = uint32(m_target->GetHealth());
sLog.outDetail("PeriodicTick: %u (TypeId: %u) health leech of %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) health leech of %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId(),absorb);
pCaster->SendSpellNonMeleeDamageLog(m_target, GetId(), pdamage, GetSpellSchoolMask(GetSpellProto()), absorb, resist, false, 0, isCrit);
@ -7291,7 +7291,7 @@ void Aura::PeriodicTick()
// This method can modify pdamage
bool isCrit = IsCritFromAbilityAura(pCaster, pdamage);
sLog.outDetail("PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health inflicted by %u",
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health inflicted by %u",
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId());
int32 gain = m_target->ModifyHealth(pdamage);
@ -7387,7 +7387,7 @@ void Aura::PeriodicTick()
pdamage = maxmana;
}
sLog.outDetail("PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u",
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u",
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId());
int32 drain_amount = m_target->GetPower(power) > pdamage ? pdamage : m_target->GetPower(power);
@ -7429,7 +7429,7 @@ void Aura::PeriodicTick()
// ignore non positive values (can be result apply spellmods to aura damage
uint32 pdamage = m_modifier.m_amount > 0 ? m_modifier.m_amount : 0;
sLog.outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u",
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u",
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId());
if(m_modifier.m_miscvalue < 0 || m_modifier.m_miscvalue >= MAX_POWERS)
@ -7460,7 +7460,7 @@ void Aura::PeriodicTick()
uint32 pdamage = uint32(m_target->GetMaxPower(POWER_MANA) * amount / 100);
sLog.outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u mana inflicted by %u",
DETAIL_FILTER_LOG(LOG_FILTER_PERIODIC_AFFECTS, "PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u mana inflicted by %u",
GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), m_target->GetGUIDLow(), m_target->GetTypeId(), pdamage, GetId());
if(m_target->GetMaxPower(POWER_MANA) == 0)

View file

@ -234,7 +234,7 @@ void Spell::EffectEmpty(SpellEffectIndex /*eff_idx*/)
void Spell::EffectNULL(SpellEffectIndex /*eff_idx*/)
{
sLog.outDebug("WORLD: Spell Effect DUMMY");
DEBUG_LOG("WORLD: Spell Effect DUMMY");
}
void Spell::EffectUnused(SpellEffectIndex /*eff_idx*/)
@ -2901,7 +2901,7 @@ void Spell::EffectApplyAura(SpellEffectIndex eff_idx)
return;
}
sLog.outDebug("Spell: Aura is: %u", m_spellInfo->EffectApplyAuraName[eff_idx]);
DEBUG_LOG("Spell: Aura is: %u", m_spellInfo->EffectApplyAuraName[eff_idx]);
Aura* Aur = CreateAura(m_spellInfo, eff_idx, &m_currentBasePoints[eff_idx], unitTarget, caster, m_CastItem);
@ -2937,7 +2937,7 @@ void Spell::EffectUnlearnSpecialization(SpellEffectIndex eff_idx)
_player->removeSpell(spellToUnlearn);
sLog.outDebug( "Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow() );
DEBUG_LOG( "Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow() );
}
void Spell::EffectPowerDrain(SpellEffectIndex eff_idx)
@ -2996,7 +2996,7 @@ void Spell::EffectSendEvent(SpellEffectIndex effectIndex)
/*
we do not handle a flag dropping or clicking on flag in battleground by sendevent system
*/
sLog.outDebug("Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->EffectMiscValue[effectIndex], m_spellInfo->Id);
DEBUG_LOG("Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->EffectMiscValue[effectIndex], m_spellInfo->Id);
m_caster->GetMap()->ScriptsStart(sEventScripts, m_spellInfo->EffectMiscValue[effectIndex], m_caster, focusObject);
}
@ -3187,7 +3187,7 @@ void Spell::EffectHealthLeech(SpellEffectIndex eff_idx)
if (damage < 0)
return;
sLog.outDebug("HealthLeech :%i", damage);
DEBUG_LOG("HealthLeech :%i", damage);
uint32 curHealth = unitTarget->GetHealth();
damage = m_caster->SpellNonMeleeDamageLog(unitTarget, m_spellInfo->Id, damage );
@ -3532,7 +3532,7 @@ void Spell::EffectOpenLock(SpellEffectIndex eff_idx)
{
if (!m_caster || m_caster->GetTypeId() != TYPEID_PLAYER)
{
sLog.outDebug( "WORLD: Open Lock - No Player Caster!");
DEBUG_LOG( "WORLD: Open Lock - No Player Caster!");
return;
}
@ -3580,7 +3580,7 @@ void Spell::EffectOpenLock(SpellEffectIndex eff_idx)
}
else
{
sLog.outDebug( "WORLD: Open Lock - No GameObject/Item Target!");
DEBUG_LOG( "WORLD: Open Lock - No GameObject/Item Target!");
return;
}
@ -3976,7 +3976,7 @@ void Spell::EffectLearnSpell(SpellEffectIndex eff_idx)
uint32 spellToLearn = ((m_spellInfo->Id==SPELL_ID_GENERIC_LEARN) || (m_spellInfo->Id==SPELL_ID_GENERIC_LEARN_PET)) ? damage : m_spellInfo->EffectTriggerSpell[eff_idx];
player->learnSpell(spellToLearn, false);
sLog.outDebug( "Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow() );
DEBUG_LOG( "Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow() );
}
void Spell::EffectDispel(SpellEffectIndex eff_idx)
@ -4103,7 +4103,7 @@ void Spell::EffectDualWield(SpellEffectIndex /*eff_idx*/)
void Spell::EffectPull(SpellEffectIndex /*eff_idx*/)
{
// TODO: create a proper pull towards distract spell center for distract
sLog.outDebug("WORLD: Spell Effect DUMMY");
DEBUG_LOG("WORLD: Spell Effect DUMMY");
}
void Spell::EffectDistract(SpellEffectIndex /*eff_idx*/)
@ -4152,7 +4152,7 @@ void Spell::EffectPickPocket(SpellEffectIndex /*eff_idx*/)
if (chance > irand(0, 19))
{
// Stealing successful
//sLog.outDebug("Sending loot from pickpocket");
//DEBUG_LOG("Sending loot from pickpocket");
((Player*)m_caster)->SendLoot(unitTarget->GetGUID(),LOOT_PICKPOCKETING);
}
else
@ -4390,7 +4390,7 @@ void Spell::EffectAddHonor(SpellEffectIndex /*eff_idx*/)
if (m_CastItem)
{
((Player*)unitTarget)->RewardHonor(NULL, 1, float(damage / 10));
sLog.outDebug("SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage/10, m_CastItem->GetEntry(),((Player*)unitTarget)->GetGUIDLow());
DEBUG_LOG("SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage/10, m_CastItem->GetEntry(),((Player*)unitTarget)->GetGUIDLow());
return;
}
@ -4399,7 +4399,7 @@ void Spell::EffectAddHonor(SpellEffectIndex /*eff_idx*/)
{
float honor_reward = MaNGOS::Honor::hk_honor_at_level(unitTarget->getLevel(), damage);
((Player*)unitTarget)->RewardHonor(NULL, 1, honor_reward);
sLog.outDebug("SpellEffect::AddHonor (spell_id %u) rewards %f honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, ((Player*)unitTarget)->GetGUIDLow());
DEBUG_LOG("SpellEffect::AddHonor (spell_id %u) rewards %f honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, ((Player*)unitTarget)->GetGUIDLow());
}
else
{
@ -4868,7 +4868,7 @@ void Spell::EffectSummonPet(SpellEffectIndex eff_idx)
map->Add((Creature*)NewSummon);
m_caster->SetPet(NewSummon);
sLog.outDebug("New Pet has guid %u", NewSummon->GetGUIDLow());
DEBUG_LOG("New Pet has guid %u", NewSummon->GetGUIDLow());
if(m_caster->GetTypeId() == TYPEID_PLAYER)
{
@ -6215,7 +6215,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
if (!unitTarget)
return;
sLog.outDebug("Spell ScriptStart spellid %u in EffectScriptEffect ", m_spellInfo->Id);
DEBUG_LOG("Spell ScriptStart spellid %u in EffectScriptEffect ", m_spellInfo->Id);
m_caster->GetMap()->ScriptsStart(sSpellScripts, m_spellInfo->Id, m_caster, unitTarget);
}
@ -6346,8 +6346,8 @@ void Spell::EffectStuck(SpellEffectIndex /*eff_idx*/)
Player* pTarget = (Player*)unitTarget;
sLog.outDebug("Spell Effect: Stuck");
sLog.outDetail("Player %s (guid %u) used auto-unstuck future at map %u (%f, %f, %f)", pTarget->GetName(), pTarget->GetGUIDLow(), m_caster->GetMapId(), m_caster->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ());
DEBUG_LOG("Spell Effect: Stuck");
DETAIL_LOG("Player %s (guid %u) used auto-unstuck future at map %u (%f, %f, %f)", pTarget->GetName(), pTarget->GetGUIDLow(), m_caster->GetMapId(), m_caster->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ());
if(pTarget->isInFlight())
return;
@ -7340,7 +7340,7 @@ void Spell::EffectMilling(SpellEffectIndex /*eff_idx*/)
void Spell::EffectSkill(SpellEffectIndex /*eff_idx*/)
{
sLog.outDebug("WORLD: SkillEFFECT");
DEBUG_LOG("WORLD: SkillEFFECT");
}
void Spell::EffectSpiritHeal(SpellEffectIndex /*eff_idx*/)
@ -7362,7 +7362,7 @@ void Spell::EffectSpiritHeal(SpellEffectIndex /*eff_idx*/)
// remove insignia spell effect
void Spell::EffectSkinPlayerCorpse(SpellEffectIndex /*eff_idx*/)
{
sLog.outDebug("Effect: SkinPlayerCorpse");
DEBUG_LOG("Effect: SkinPlayerCorpse");
if ( (m_caster->GetTypeId() != TYPEID_PLAYER) || (unitTarget->GetTypeId() != TYPEID_PLAYER) || (unitTarget->isAlive()) )
return;
@ -7371,7 +7371,7 @@ void Spell::EffectSkinPlayerCorpse(SpellEffectIndex /*eff_idx*/)
void Spell::EffectStealBeneficialBuff(SpellEffectIndex eff_idx)
{
sLog.outDebug("Effect: StealBeneficialBuff");
DEBUG_LOG("Effect: StealBeneficialBuff");
if(!unitTarget || unitTarget==m_caster) // can't steal from self
return;

View file

@ -67,7 +67,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
return;
}
sLog.outDetail("WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, cast_count: %u, spellid: %u, Item: %u, glyphIndex: %u, unk_flags: %u, data length = %i", bagIndex, slot, cast_count, spellid, pItem->GetEntry(), glyphIndex, unk_flags, (uint32)recvPacket.size());
DETAIL_LOG("WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, cast_count: %u, spellid: %u, Item: %u, glyphIndex: %u, unk_flags: %u, data length = %i", bagIndex, slot, cast_count, spellid, pItem->GetEntry(), glyphIndex, unk_flags, (uint32)recvPacket.size());
ItemPrototype const *proto = pItem->GetProto();
if (!proto)
@ -165,7 +165,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
{
sLog.outDetail("WORLD: CMSG_OPEN_ITEM packet, data length = %i",(uint32)recvPacket.size());
DETAIL_LOG("WORLD: CMSG_OPEN_ITEM packet, data length = %i",(uint32)recvPacket.size());
Player* pUser = _player;
@ -177,7 +177,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
recvPacket >> bagIndex >> slot;
sLog.outDetail("bagIndex: %u, slot: %u",bagIndex,slot);
DETAIL_LOG("bagIndex: %u, slot: %u",bagIndex,slot);
Item *pItem = pUser->GetItemByPos(bagIndex, slot);
if(!pItem)
@ -247,7 +247,7 @@ void WorldSession::HandleGameObjectUseOpcode( WorldPacket & recv_data )
recv_data >> guid;
sLog.outDebug( "WORLD: Recvd CMSG_GAMEOBJ_USE Message [guid=%u]", GUID_LOPART(guid));
DEBUG_LOG( "WORLD: Recvd CMSG_GAMEOBJ_USE Message [guid=%u]", GUID_LOPART(guid));
// ignore for remote control state
if(_player->m_mover != _player)
@ -266,7 +266,7 @@ void WorldSession::HandleGameobjectReportUse(WorldPacket& recvPacket)
uint64 guid;
recvPacket >> guid;
sLog.outDebug( "WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [in game guid: %u]", GUID_LOPART(guid));
DEBUG_LOG( "WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [in game guid: %u]", GUID_LOPART(guid));
// ignore for remote control state
if(_player->m_mover != _player)
@ -298,7 +298,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
return;
}
sLog.outDebug("WORLD: got cast spell packet, spellId - %u, cast_count: %u, unk_flags %u, data length = %i",
DEBUG_LOG("WORLD: got cast spell packet, spellId - %u, cast_count: %u, unk_flags %u, data length = %i",
spellId, cast_count, unk_flags, (uint32)recvPacket.size());
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId );
@ -528,7 +528,7 @@ void WorldSession::HandleTotemDestroyed( WorldPacket& recvPacket)
void WorldSession::HandleSelfResOpcode( WorldPacket & /*recv_data*/ )
{
sLog.outDebug("WORLD: CMSG_SELF_RES"); // empty opcode
DEBUG_LOG("WORLD: CMSG_SELF_RES"); // empty opcode
if(_player->GetUInt32Value(PLAYER_SELF_RES_SPELL))
{

View file

@ -31,7 +31,7 @@
void WorldSession::HandleTaxiNodeStatusQueryOpcode( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Received CMSG_TAXINODE_STATUS_QUERY" );
DEBUG_LOG( "WORLD: Received CMSG_TAXINODE_STATUS_QUERY" );
uint64 guid;
@ -45,7 +45,7 @@ void WorldSession::SendTaxiStatus( uint64 guid )
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
{
sLog.outDebug( "WorldSession::SendTaxiStatus - Unit (GUID: %u) not found.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WorldSession::SendTaxiStatus - Unit (GUID: %u) not found.", uint32(GUID_LOPART(guid)) );
return;
}
@ -55,18 +55,18 @@ void WorldSession::SendTaxiStatus( uint64 guid )
if(curloc == 0)
return;
sLog.outDebug( "WORLD: current location %u ",curloc);
DEBUG_LOG( "WORLD: current location %u ",curloc);
WorldPacket data( SMSG_TAXINODE_STATUS, 9 );
data << guid;
data << uint8( GetPlayer( )->m_taxi.IsTaximaskNodeKnown(curloc) ? 1 : 0 );
SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_TAXINODE_STATUS" );
DEBUG_LOG( "WORLD: Sent SMSG_TAXINODE_STATUS" );
}
void WorldSession::HandleTaxiQueryAvailableNodes( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Received CMSG_TAXIQUERYAVAILABLENODES" );
DEBUG_LOG( "WORLD: Received CMSG_TAXIQUERYAVAILABLENODES" );
uint64 guid;
recv_data >> guid;
@ -75,7 +75,7 @@ void WorldSession::HandleTaxiQueryAvailableNodes( WorldPacket & recv_data )
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleTaxiQueryAvailableNodes - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleTaxiQueryAvailableNodes - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
return;
}
@ -99,7 +99,7 @@ void WorldSession::SendTaxiMenu( Creature* unit )
if ( curloc == 0 )
return;
sLog.outDebug( "WORLD: CMSG_TAXINODE_STATUS_QUERY %u ",curloc);
DEBUG_LOG( "WORLD: CMSG_TAXINODE_STATUS_QUERY %u ",curloc);
WorldPacket data( SMSG_SHOWTAXINODES, (4+8+4+8*4) );
data << uint32( 1 );
@ -108,7 +108,7 @@ void WorldSession::SendTaxiMenu( Creature* unit )
GetPlayer()->m_taxi.AppendTaximaskTo(data,GetPlayer()->isTaxiCheater());
SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_SHOWTAXINODES" );
DEBUG_LOG( "WORLD: Sent SMSG_SHOWTAXINODES" );
}
void WorldSession::SendDoFlight( uint32 mountDisplayId, uint32 path, uint32 pathNode )
@ -152,7 +152,7 @@ bool WorldSession::SendLearnNewTaxiNode( Creature* unit )
void WorldSession::HandleActivateTaxiExpressOpcode ( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Received CMSG_ACTIVATETAXIEXPRESS" );
DEBUG_LOG( "WORLD: Received CMSG_ACTIVATETAXIEXPRESS" );
uint64 guid;
uint32 node_count;
@ -162,7 +162,7 @@ void WorldSession::HandleActivateTaxiExpressOpcode ( WorldPacket & recv_data )
Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!npc)
{
sLog.outDebug( "WORLD: HandleActivateTaxiExpressOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleActivateTaxiExpressOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)) );
return;
}
std::vector<uint32> nodes;
@ -177,14 +177,14 @@ void WorldSession::HandleActivateTaxiExpressOpcode ( WorldPacket & recv_data )
if(nodes.empty())
return;
sLog.outDebug( "WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d" ,nodes.front(),nodes.back());
DEBUG_LOG( "WORLD: Received CMSG_ACTIVATETAXIEXPRESS from %d to %d" ,nodes.front(),nodes.back());
GetPlayer()->ActivateTaxiPathTo(nodes, npc);
}
void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
{
sLog.outDebug( "WORLD: Received CMSG_MOVE_SPLINE_DONE" );
DEBUG_LOG( "WORLD: Received CMSG_MOVE_SPLINE_DONE" );
ObjectGuid guid; // used only for proper packet read
MovementInfo movementInfo; // used only for proper packet read
@ -239,7 +239,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
}
}
sLog.outDebug( "WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode );
DEBUG_LOG( "WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode );
uint32 mountDisplayId = sObjectMgr.GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
@ -257,18 +257,18 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
void WorldSession::HandleActivateTaxiOpcode( WorldPacket & recv_data )
{
sLog.outDebug( "WORLD: Received CMSG_ACTIVATETAXI" );
DEBUG_LOG( "WORLD: Received CMSG_ACTIVATETAXI" );
uint64 guid;
std::vector<uint32> nodes;
nodes.resize(2);
recv_data >> guid >> nodes[0] >> nodes[1];
sLog.outDebug( "WORLD: Received CMSG_ACTIVATETAXI from %d to %d" ,nodes[0],nodes[1]);
DEBUG_LOG( "WORLD: Received CMSG_ACTIVATETAXI from %d to %d" ,nodes[0],nodes[1]);
Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!npc)
{
sLog.outDebug( "WORLD: HandleActivateTaxiOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)) );
DEBUG_LOG( "WORLD: HandleActivateTaxiOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)) );
return;
}

View file

@ -94,13 +94,13 @@ void WorldSession::SendTradeStatus(uint32 status)
void WorldSession::HandleIgnoreTradeOpcode(WorldPacket& /*recvPacket*/)
{
sLog.outDebug( "WORLD: Ignore Trade %u",_player->GetGUIDLow());
DEBUG_LOG( "WORLD: Ignore Trade %u",_player->GetGUIDLow());
// recvPacket.print_storage();
}
void WorldSession::HandleBusyTradeOpcode(WorldPacket& /*recvPacket*/)
{
sLog.outDebug( "WORLD: Busy Trade %u",_player->GetGUIDLow());
DEBUG_LOG( "WORLD: Busy Trade %u",_player->GetGUIDLow());
// recvPacket.print_storage();
}
@ -191,7 +191,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if(myItems[i])
{
// logging
sLog.outDebug("partner storing: %u",myItems[i]->GetGUIDLow());
DEBUG_LOG("partner storing: %u",myItems[i]->GetGUIDLow());
if( _player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_BOOL_GM_LOG_TRADE) )
{
sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
@ -206,7 +206,7 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if(hisItems[i])
{
// logging
sLog.outDebug("player storing: %u",hisItems[i]->GetGUIDLow());
DEBUG_LOG("player storing: %u",hisItems[i]->GetGUIDLow());
if( _player->pTrader->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getConfig(CONFIG_BOOL_GM_LOG_TRADE) )
{
sLog.outCommand(_player->pTrader->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
@ -313,7 +313,7 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
{
if(_player->tradeItems[i] != NULL_SLOT )
{
sLog.outDebug("player trade item bag: %u slot: %u",_player->tradeItems[i] >> 8, _player->tradeItems[i] & 255 );
DEBUG_LOG("player trade item bag: %u slot: %u",_player->tradeItems[i] >> 8, _player->tradeItems[i] & 255 );
//Can return NULL
myItems[i]=_player->GetItemByPos( _player->tradeItems[i] );
if (myItems[i])
@ -321,7 +321,7 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
}
if(_player->pTrader->tradeItems[i] != NULL_SLOT)
{
sLog.outDebug("partner trade item bag: %u slot: %u",_player->pTrader->tradeItems[i] >> 8,_player->pTrader->tradeItems[i] & 255);
DEBUG_LOG("partner trade item bag: %u slot: %u",_player->pTrader->tradeItems[i] >> 8,_player->pTrader->tradeItems[i] & 255);
//Can return NULL
hisItems[i]=_player->pTrader->GetItemByPos( _player->pTrader->tradeItems[i]);
if(hisItems[i])

View file

@ -471,7 +471,7 @@ bool Transport::AddPassenger(Player* passenger)
{
if (m_passengers.find(passenger) == m_passengers.end())
{
sLog.outDetail("Player %s boarded transport %s.", passenger->GetName(), GetName());
DETAIL_LOG("Player %s boarded transport %s.", passenger->GetName(), GetName());
m_passengers.insert(passenger);
}
return true;
@ -480,7 +480,7 @@ bool Transport::AddPassenger(Player* passenger)
bool Transport::RemovePassenger(Player* passenger)
{
if (m_passengers.erase(passenger))
sLog.outDetail("Player %s removed from transport %s.", passenger->GetName(), GetName());
DETAIL_LOG("Player %s removed from transport %s.", passenger->GetName(), GetName());
return true;
}
@ -521,11 +521,10 @@ void Transport::Update(time_t /*p_time*/)
m_nextNodeTime = m_curr->first;
if (m_curr == m_WayPoints.begin() && (sLog.getLogFilter() & LOG_FILTER_TRANSPORT_MOVES)==0)
sLog.outDetail(" ************ BEGIN ************** %s", GetName());
if (m_curr == m_WayPoints.begin())
DETAIL_FILTER_LOG(LOG_FILTER_TRANSPORT_MOVES, " ************ BEGIN ************** %s", GetName());
if ((sLog.getLogFilter() & LOG_FILTER_TRANSPORT_MOVES)==0)
sLog.outDetail("%s moved to %f %f %f %d", GetName(), m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid);
DETAIL_FILTER_LOG(LOG_FILTER_TRANSPORT_MOVES, "%s moved to %f %f %f %d", GetName(), m_curr->second.x, m_curr->second.y, m_curr->second.z, m_curr->second.mapid);
}
}

View file

@ -581,7 +581,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
DEBUG_LOG("DealDamageStart");
uint32 health = pVictim->GetHealth();
sLog.outDetail("deal dmg:%d to health:%d ",damage,health);
DETAIL_LOG("deal dmg:%d to health:%d ",damage,health);
// duel ends when player has 1 or less hp
bool duel_hasEnded = false;
@ -1000,14 +1000,14 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
}
else if( (channelInterruptFlags & (CHANNEL_FLAG_DAMAGE | CHANNEL_FLAG_DAMAGE2)) )
{
sLog.outDetail("Spell %u canceled at damage!",spell->m_spellInfo->Id);
DETAIL_LOG("Spell %u canceled at damage!",spell->m_spellInfo->Id);
pVictim->InterruptSpell(CURRENT_CHANNELED_SPELL);
}
}
else if (spell->getState() == SPELL_STATE_DELAYED)
// break channeled spell in delayed state on damage
{
sLog.outDetail("Spell %u canceled at damage!",spell->m_spellInfo->Id);
DETAIL_LOG("Spell %u canceled at damage!",spell->m_spellInfo->Id);
pVictim->InterruptSpell(CURRENT_CHANNELED_SPELL);
}
}
@ -1272,7 +1272,7 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage *damageInfo, bool durabilityLoss)
SpellEntry const *spellProto = sSpellStore.LookupEntry(damageInfo->SpellID);
if (spellProto == NULL)
{
sLog.outDebug("Unit::DealSpellDamage have wrong damageInfo->SpellID: %u", damageInfo->SpellID);
DEBUG_LOG("Unit::DealSpellDamage have wrong damageInfo->SpellID: %u", damageInfo->SpellID);
return;
}
@ -2661,7 +2661,7 @@ void Unit::SendMeleeAttackStop(Unit* victim)
data << victim->GetPackGUID(); // can be 0x00...
data << uint32(0); // can be 0x1
SendMessageToSet(&data, true);
sLog.outDetail("%s %u stopped attacking %s %u", (GetTypeId()==TYPEID_PLAYER ? "player" : "creature"), GetGUIDLow(), (victim->GetTypeId()==TYPEID_PLAYER ? "player" : "creature"),victim->GetGUIDLow());
DETAIL_LOG("%s %u stopped attacking %s %u", (GetTypeId()==TYPEID_PLAYER ? "player" : "creature"), GetGUIDLow(), (victim->GetTypeId()==TYPEID_PLAYER ? "player" : "creature"),victim->GetGUIDLow());
/*if(victim->GetTypeId() == TYPEID_UNIT)
((Creature*)victim)->AI().EnterEvadeMode(this);*/
@ -3924,7 +3924,7 @@ bool Unit::AddAura(Aura *Aur)
}
Aur->ApplyModifier(true,true);
sLog.outDebug("Aura %u now is in use", aurName);
DEBUG_LOG("Aura %u now is in use", aurName);
// if aura deleted before boosts apply ignore
// this can be possible it it removed indirectly by triggered spell effect at ApplyModifier
@ -4440,7 +4440,7 @@ void Unit::RemoveAura(Aura* aura, AuraRemoveMode mode /*= AURA_REMOVE_BY_DEFAULT
return;
}
}
sLog.outDebug("Trying to remove aura id %u effect %u by pointer but aura not found on target", aura->GetId(), aura->GetEffIndex());
DEBUG_LOG("Trying to remove aura id %u effect %u by pointer but aura not found on target", aura->GetId(), aura->GetEffIndex());
}
void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
@ -4476,7 +4476,7 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
if(caster->GetTypeId()==TYPEID_UNIT && ((Creature*)caster)->isTotem() && ((Totem*)caster)->GetTotemType()==TOTEM_STATUE)
statue = ((Totem*)caster);
sLog.outDebug("Aura %u now is remove mode %d",Aur->GetModifier()->m_auraname, mode);
DEBUG_LOG("Aura %u now is remove mode %d",Aur->GetModifier()->m_auraname, mode);
// some auras also need to apply modifier (on caster) on remove
if (mode != AURA_REMOVE_BY_DELETE || Aur->GetModifier()->m_auraname == SPELL_AURA_MOD_POSSESS)
@ -4558,7 +4558,7 @@ void Unit::DelayAura(uint32 spellId, SpellEffectIndex effindex, int32 delaytime)
else
iter->second->SetAuraDuration(iter->second->GetAuraDuration() - delaytime);
iter->second->SendAuraUpdate(false);
sLog.outDebug("Aura %u partially interrupted on unit %u, new duration: %u ms",iter->second->GetModifier()->m_auraname, GetGUIDLow(), iter->second->GetAuraDuration());
DEBUG_LOG("Aura %u partially interrupted on unit %u, new duration: %u ms",iter->second->GetModifier()->m_auraname, GetGUIDLow(), iter->second->GetAuraDuration());
}
}
@ -4883,7 +4883,7 @@ void Unit::SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo)
void Unit::SendAttackStateUpdate(CalcDamageInfo *damageInfo)
{
sLog.outDebug("WORLD: Sending SMSG_ATTACKERSTATEUPDATE");
DEBUG_LOG("WORLD: Sending SMSG_ATTACKERSTATEUPDATE");
uint32 count = 1;
WorldPacket data(SMSG_ATTACKERSTATEUPDATE, 16 + 45); // we guess size
@ -12633,7 +12633,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
{
case SPELL_AURA_PROC_TRIGGER_SPELL:
{
sLog.outDebug("ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
DEBUG_LOG("ProcDamageAndSpell: casting spell %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
// Don`t drop charge or add cooldown for not started trigger
if (!HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
{
@ -12644,7 +12644,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
}
case SPELL_AURA_PROC_TRIGGER_DAMAGE:
{
sLog.outDebug("ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", auraModifier->m_amount, spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
DEBUG_LOG("ProcDamageAndSpell: doing %u damage from spell id %u (triggered by %s aura of spell %u)", auraModifier->m_amount, spellInfo->Id, (isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
SpellNonMeleeDamage damageInfo(this, pTarget, spellInfo->Id, spellInfo->SchoolMask);
CalculateSpellDamage(&damageInfo, auraModifier->m_amount, spellInfo);
damageInfo.target->CalculateAbsorbResistBlock(this, &damageInfo, spellInfo);
@ -12659,7 +12659,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
case SPELL_AURA_ADD_PCT_MODIFIER:
case SPELL_AURA_DUMMY:
{
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
DEBUG_LOG("ProcDamageAndSpell: casting spell id %u (triggered by %s dummy aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (!HandleDummyAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
{
triggeredByAura->SetInUse(false);
@ -12669,7 +12669,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
}
case SPELL_AURA_MOD_HASTE:
{
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s haste aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
DEBUG_LOG("ProcDamageAndSpell: casting spell id %u (triggered by %s haste aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (!HandleHasteAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
{
triggeredByAura->SetInUse(false);
@ -12679,7 +12679,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
}
case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS:
{
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
DEBUG_LOG("ProcDamageAndSpell: casting spell id %u (triggered by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (!HandleOverrideClassScriptAuraProc(pTarget, damage, triggeredByAura, procSpell, cooldown))
{
triggeredByAura->SetInUse(false);
@ -12689,7 +12689,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
}
case SPELL_AURA_PRAYER_OF_MENDING:
{
sLog.outDebug("ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
DEBUG_LOG("ProcDamageAndSpell: casting mending (triggered by %s dummy aura of spell %u)",
(isVictim?"a victim's":"an attacker's"),triggeredByAura->GetId());
HandleMendingAuraProc(triggeredByAura);
@ -12697,7 +12697,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
}
case SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE:
{
sLog.outDebug("ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
DEBUG_LOG("ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (!HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
{
@ -12763,7 +12763,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
triggeredByAura->SetInUse(false);
continue;
}
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s spell crit chance aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
DEBUG_LOG("ProcDamageAndSpell: casting spell id %u (triggered by %s spell crit chance aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
if (!HandleSpellCritChanceAuraProc(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
{
triggeredByAura->SetInUse(false);
@ -12771,7 +12771,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
}
break;
case SPELL_AURA_MAELSTROM_WEAPON:
sLog.outDebug("ProcDamageAndSpell: casting spell id %u (triggered by %s maelstrom aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
DEBUG_LOG("ProcDamageAndSpell: casting spell id %u (triggered by %s maelstrom aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
// remove all stack;
RemoveSpellsCausingAura(SPELL_AURA_MAELSTROM_WEAPON);
@ -13835,7 +13835,7 @@ void Unit::SendThreatUpdate()
ThreatList const& tlist = getThreatManager().getThreatList();
if (uint32 count = tlist.size())
{
sLog.outDebug( "WORLD: Send SMSG_THREAT_UPDATE Message" );
DEBUG_LOG( "WORLD: Send SMSG_THREAT_UPDATE Message" );
WorldPacket data(SMSG_THREAT_UPDATE, 8 + count * 8);
data << GetPackGUID();
data << uint32(count);
@ -13853,7 +13853,7 @@ void Unit::SendHighestThreatUpdate(HostileReference* pHostilReference)
ThreatList const& tlist = getThreatManager().getThreatList();
if (uint32 count = tlist.size())
{
sLog.outDebug( "WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message" );
DEBUG_LOG( "WORLD: Send SMSG_HIGHEST_THREAT_UPDATE Message" );
WorldPacket data(SMSG_HIGHEST_THREAT_UPDATE, 8 + 8 + count * 8);
data << GetPackGUID();
data.appendPackGUID(pHostilReference->getUnitGuid());
@ -13869,7 +13869,7 @@ void Unit::SendHighestThreatUpdate(HostileReference* pHostilReference)
void Unit::SendThreatClear()
{
sLog.outDebug( "WORLD: Send SMSG_THREAT_CLEAR Message" );
DEBUG_LOG( "WORLD: Send SMSG_THREAT_CLEAR Message" );
WorldPacket data(SMSG_THREAT_CLEAR, 8);
data << GetPackGUID();
SendMessageToSet(&data, false);
@ -13877,7 +13877,7 @@ void Unit::SendThreatClear()
void Unit::SendThreatRemove(HostileReference* pHostileReference)
{
sLog.outDebug( "WORLD: Send SMSG_THREAT_REMOVE Message" );
DEBUG_LOG( "WORLD: Send SMSG_THREAT_REMOVE Message" );
WorldPacket data(SMSG_THREAT_REMOVE, 8 + 8);
data << GetPackGUID();
data.appendPackGUID(pHostileReference->getUnitGuid());

View file

@ -24,7 +24,7 @@
void WorldSession::HandleVoiceSessionEnableOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_VOICE_SESSION_ENABLE");
DEBUG_LOG("WORLD: CMSG_VOICE_SESSION_ENABLE");
// uint8 isVoiceEnabled, uint8 isMicrophoneEnabled
recv_data.read_skip<uint8>();
recv_data.read_skip<uint8>();
@ -33,14 +33,14 @@ void WorldSession::HandleVoiceSessionEnableOpcode( WorldPacket & recv_data )
void WorldSession::HandleChannelVoiceOnOpcode( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_CHANNEL_VOICE_ON");
DEBUG_LOG("WORLD: CMSG_CHANNEL_VOICE_ON");
// Enable Voice button in channel context menu
recv_data.hexlike();
}
void WorldSession::HandleSetActiveVoiceChannel( WorldPacket & recv_data )
{
sLog.outDebug("WORLD: CMSG_SET_ACTIVE_VOICE_CHANNEL");
DEBUG_LOG("WORLD: CMSG_SET_ACTIVE_VOICE_CHANNEL");
recv_data.read_skip<uint32>();
recv_data.read_skip<char*>();
recv_data.hexlike();

View file

@ -45,7 +45,7 @@ alter table creature_movement add `wpguid` int(11) default '0';
//-----------------------------------------------//
void WaypointMovementGenerator<Creature>::LoadPath(Creature &c)
{
sLog.outDetail("LoadPath: loading waypoint path for creature %u, %u", c.GetGUIDLow(), c.GetDBTableGUIDLow());
DETAIL_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "LoadPath: loading waypoint path for creature %u, %u", c.GetGUIDLow(), c.GetDBTableGUIDLow());
i_path = sWaypointMgr.GetPath(c.GetDBTableGUIDLow());
@ -364,7 +364,7 @@ bool FlightPathMovementGenerator::Update(Player &player, const uint32 &diff)
{
DoEventIfAny(player,(*i_path)[i_currentNode],true);
DEBUG_LOG("loading node %u for player %s", i_currentNode, player.GetName());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "loading node %u for player %s", i_currentNode, player.GetName());
if ((*i_path)[i_currentNode].mapid == curMap)
{
// do not send movement, it was sent already
@ -405,7 +405,7 @@ void FlightPathMovementGenerator::DoEventIfAny(Player& player, TaxiPathNodeEntry
{
if (uint32 eventid = departure ? node.departureEventID : node.arrivalEventID)
{
DEBUG_LOG("Taxi %s event %u of node %u of path %u for player %s", departure ? "departure" : "arrival", eventid, node.index, node.path, player.GetName());
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "Taxi %s event %u of node %u of path %u for player %s", departure ? "departure" : "arrival", eventid, node.index, node.path, player.GetName());
player.GetMap()->ScriptsStart(sEventScripts, eventid, &player, &player);
}
}

View file

@ -35,7 +35,7 @@ Weather::Weather(uint32 zone, WeatherZoneChances const* weatherChances) : m_zone
m_type = WEATHER_TYPE_FINE;
m_grade = 0;
sLog.outDetail("WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE*IN_MILLISECONDS)) );
DETAIL_FILTER_LOG(LOG_FILTER_WEATHER, "WORLD: Starting weather system for zone %u (change every %u minutes).", m_zone, (uint32)(m_timer.GetInterval() / (MINUTE*IN_MILLISECONDS)) );
}
/// Launch a weather update
@ -92,7 +92,7 @@ bool Weather::ReGenerate()
static char const* seasonName[WEATHER_SEASONS] = { "spring", "summer", "fall", "winter" };
sLog.outDebug("Generating a change in %s weather for zone %u.", seasonName[season], m_zone);
DEBUG_FILTER_LOG(LOG_FILTER_WEATHER, "Generating a change in %s weather for zone %u.", seasonName[season], m_zone);
if ((u < 60) && (m_grade < 0.33333334f)) // Get fair
{
@ -261,7 +261,8 @@ bool Weather::UpdateWeather()
wthstr = "fine";
break;
}
sLog.outDetail("Change the weather of zone %u to %s.", m_zone, wthstr);
DETAIL_FILTER_LOG(LOG_FILTER_WEATHER, "Change the weather of zone %u to %s.", m_zone, wthstr);
return true;
}

View file

@ -238,7 +238,7 @@ World::AddSession_ (WorldSession* s)
{
AddQueuedPlayer (s);
UpdateMaxSessionCounters ();
sLog.outDetail ("PlayerQueue: Account id %u is in Queue Position (%u).", s->GetAccountId (), ++QueueSize);
DETAIL_LOG("PlayerQueue: Account id %u is in Queue Position (%u).", s->GetAccountId (), ++QueueSize);
return;
}
@ -267,7 +267,7 @@ World::AddSession_ (WorldSession* s)
popu /= pLimit;
popu *= 2;
loginDatabase.PExecute ("UPDATE realmlist SET population = '%f' WHERE id = '%d'", popu, realmID);
sLog.outDetail ("Server Population (%f).", popu);
DETAIL_LOG("Server Population (%f).", popu);
}
}
@ -1250,7 +1250,7 @@ void World::SetInitialWorldSettings()
mail_timer = uint32((((localtime( &m_gameTime )->tm_hour + 20) % 24)* HOUR * IN_MILLISECONDS) / m_timers[WUPDATE_AUCTIONS].GetInterval() );
//1440
mail_timer_expires = uint32( (DAY * IN_MILLISECONDS) / (m_timers[WUPDATE_AUCTIONS].GetInterval()));
sLog.outDebug("Mail timer set to: %u, mail return is called every %u minutes", mail_timer, mail_timer_expires);
DEBUG_LOG("Mail timer set to: %u, mail return is called every %u minutes", mail_timer, mail_timer_expires);
///- Initialize static helper structures
AIRegistry::Initialize();
@ -1854,7 +1854,7 @@ void World::ProcessCliCommands()
CliCommandHolder* command;
while (cliCmdQueue.next(command))
{
sLog.outDebug("CLI command under processing...");
DEBUG_LOG("CLI command under processing...");
zprint = command->m_print;
callbackArg = command->m_callbackArg;
CliHandler handler(command->m_cliAccountId, command->m_cliAccessLevel, callbackArg, zprint);
@ -1963,7 +1963,7 @@ void World::InitDailyQuestResetTime()
void World::ResetDailyQuests()
{
sLog.outDetail("Daily quests reset for all characters.");
DETAIL_LOG("Daily quests reset for all characters.");
CharacterDatabase.Execute("DELETE FROM character_queststatus_daily");
for(SessionMap::const_iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
if (itr->second->GetPlayer())
@ -1975,7 +1975,7 @@ void World::ResetDailyQuests()
void World::ResetWeeklyQuests()
{
sLog.outDetail("Weekly quests reset for all characters.");
DETAIL_LOG("Weekly quests reset for all characters.");
CharacterDatabase.Execute("DELETE FROM character_queststatus_weekly");
for(SessionMap::const_iterator itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
if (itr->second->GetPlayer())

View file

@ -119,8 +119,8 @@ void WorldSession::SendPacket(WorldPacket const* packet)
{
uint64 minTime = uint64(cur_time - lastTime);
uint64 fullTime = uint64(lastTime - firstTime);
sLog.outDetail("Send all time packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f time: %u",sendPacketCount,sendPacketBytes,float(sendPacketCount)/fullTime,float(sendPacketBytes)/fullTime,uint32(fullTime));
sLog.outDetail("Send last min packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f",sendLastPacketCount,sendLastPacketBytes,float(sendLastPacketCount)/minTime,float(sendLastPacketBytes)/minTime);
DETAIL_LOG("Send all time packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f time: %u",sendPacketCount,sendPacketBytes,float(sendPacketCount)/fullTime,float(sendPacketBytes)/fullTime,uint32(fullTime));
DETAIL_LOG("Send last min packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f",sendLastPacketCount,sendLastPacketBytes,float(sendLastPacketCount)/minTime,float(sendLastPacketBytes)/minTime);
lastTime = cur_time;
sendLastPacketCount = 1;
@ -239,7 +239,7 @@ bool WorldSession::Update(uint32 /*diff*/)
packet->GetOpcode());
break;
case STATUS_UNHANDLED:
sLog.outDebug("SESSION: received not handled opcode %s (0x%.4X)",
DEBUG_LOG("SESSION: received not handled opcode %s (0x%.4X)",
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode());
break;
@ -262,7 +262,7 @@ bool WorldSession::Update(uint32 /*diff*/)
if (sWorld.getConfig(CONFIG_BOOL_KICK_PLAYER_ON_BAD_PACKET))
{
sLog.outDetail("Disconnecting session [account id %u / address %s] for badly formatted packet.",
DETAIL_LOG("Disconnecting session [account id %u / address %s] for badly formatted packet.",
GetAccountId(), GetRemoteAddress().c_str());
KickPlayer();
@ -454,7 +454,7 @@ void WorldSession::LogoutPlayer(bool Save)
//No SQL injection as AccountId is uint32
CharacterDatabase.PExecute("UPDATE characters SET online = 0 WHERE account = '%u'",
GetAccountId());
sLog.outDebug( "SESSION: Sent SMSG_LOGOUT_COMPLETE Message" );
DEBUG_LOG( "SESSION: Sent SMSG_LOGOUT_COMPLETE Message" );
}
m_playerLogout = false;
@ -763,7 +763,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
addonInfo >> enabled >> crc >> unk1;
sLog.outDebug("ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1);
DEBUG_LOG("ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1);
m_addonsList.push_back(AddonInfo(addonName, enabled, crc));
}
@ -772,7 +772,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
addonInfo >> unk2;
if(addonInfo.rpos() != addonInfo.size())
sLog.outDebug("packet under read!");
DEBUG_LOG("packet under read!");
}
else
sLog.outError("Addon packet uncompress error!");

View file

@ -59,7 +59,7 @@ struct ServerPktHeader
uint8 headerIndex=0;
if(isLargePacket())
{
sLog.outDebug("initializing large server to client packet. Size: %u, cmd: %u", size, cmd);
DEBUG_LOG("initializing large server to client packet. Size: %u, cmd: %u", size, cmd);
header[headerIndex++] = 0x80|(0xFF &(size>>16));
}
header[headerIndex++] = 0xFF &(size>>8);
@ -726,7 +726,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
if (sWorld.getConfig(CONFIG_BOOL_KICK_PLAYER_ON_BAD_PACKET))
{
sLog.outDetail("Disconnecting session [account id %i / address %s] for badly formatted packet.",
DETAIL_LOG("Disconnecting session [account id %i / address %s] for badly formatted packet.",
m_Session?m_Session->GetAccountId():-1, GetRemoteAddress().c_str());
return -1;
@ -848,7 +848,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
SendPacket (packet);
delete result;
sLog.outBasic ("WorldSocket::HandleAuthSession: Sent Auth Response (Account IP differs).");
BASIC_LOG("WorldSocket::HandleAuthSession: Sent Auth Response (Account IP differs).");
return -1;
}
}
@ -897,7 +897,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
SendPacket (packet);
sLog.outBasic ("WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
BASIC_LOG("WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
return -1;
}

View file

@ -242,7 +242,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
m_NetThreads = new ReactorRunnable[m_NetThreadsCount];
sLog.outBasic ("Max allowed socket connections %d",ACE::max_handles ());
BASIC_LOG("Max allowed socket connections %d",ACE::max_handles ());
// -1 means use default
m_SockOutKBuff = sConfig.GetIntDefault ("Network.OutKBuff", -1);

View file

@ -87,7 +87,7 @@ bool ChatHandler::HandleDebugSendPoiCommand(const char* args)
uint32 icon = atol(icon_text);
uint32 flags = atol(flags_text);
sLog.outDetail("Command : POI, NPC = %u, icon = %u flags = %u", target->GetGUIDLow(), icon,flags);
DETAIL_LOG("Command : POI, NPC = %u, icon = %u flags = %u", target->GetGUIDLow(), icon,flags);
pPlayer->PlayerTalkClass->SendPointOfInterest(target->GetPositionX(), target->GetPositionY(), Poi_Icon(icon), flags, 30, "Test POI");
return true;
}
@ -187,12 +187,12 @@ bool ChatHandler::HandleDebugSendOpcodeCommand(const char* /*args*/)
}
else
{
sLog.outDebug("Sending opcode: unknown type '%s'", type.c_str());
DEBUG_LOG("Sending opcode: unknown type '%s'", type.c_str());
break;
}
}
ifs.close();
sLog.outDebug("Sending opcode %u", data.GetOpcode());
DEBUG_LOG("Sending opcode %u", data.GetOpcode());
data.hexlike();
((Player*)unit)->GetSession()->SendPacket(&data);
PSendSysMessage(LANG_COMMAND_OPCODESENT, data.GetOpcode(), unit->GetName());
@ -813,14 +813,14 @@ bool ChatHandler::HandleDebugSetValueCommand(const char* args)
if(isint32)
{
iValue = (uint32)atoi(py);
sLog.outDebug(GetMangosString(LANG_SET_UINT), GUID_LOPART(guid), Opcode, iValue);
DEBUG_LOG(GetMangosString(LANG_SET_UINT), GUID_LOPART(guid), Opcode, iValue);
target->SetUInt32Value( Opcode , iValue );
PSendSysMessage(LANG_SET_UINT_FIELD, GUID_LOPART(guid), Opcode,iValue);
}
else
{
fValue = (float)atof(py);
sLog.outDebug(GetMangosString(LANG_SET_FLOAT), GUID_LOPART(guid), Opcode, fValue);
DEBUG_LOG(GetMangosString(LANG_SET_FLOAT), GUID_LOPART(guid), Opcode, fValue);
target->SetFloatValue( Opcode , fValue );
PSendSysMessage(LANG_SET_FLOAT_FIELD, GUID_LOPART(guid), Opcode,fValue);
}
@ -864,13 +864,13 @@ bool ChatHandler::HandleDebugGetValueCommand(const char* args)
if(isint32)
{
iValue = target->GetUInt32Value( Opcode );
sLog.outDebug(GetMangosString(LANG_GET_UINT), GUID_LOPART(guid), Opcode, iValue);
DEBUG_LOG(GetMangosString(LANG_GET_UINT), GUID_LOPART(guid), Opcode, iValue);
PSendSysMessage(LANG_GET_UINT_FIELD, GUID_LOPART(guid), Opcode, iValue);
}
else
{
fValue = target->GetFloatValue( Opcode );
sLog.outDebug(GetMangosString(LANG_GET_FLOAT), GUID_LOPART(guid), Opcode, fValue);
DEBUG_LOG(GetMangosString(LANG_GET_FLOAT), GUID_LOPART(guid), Opcode, fValue);
PSendSysMessage(LANG_GET_FLOAT_FIELD, GUID_LOPART(guid), Opcode, fValue);
}
@ -897,7 +897,7 @@ bool ChatHandler::HandleDebugMod32ValueCommand(const char* args)
return false;
}
sLog.outDebug(GetMangosString(LANG_CHANGE_32BIT), Opcode, Value);
DEBUG_LOG(GetMangosString(LANG_CHANGE_32BIT), Opcode, Value);
int CurrentValue = (int)m_session->GetPlayer( )->GetUInt32Value( Opcode );

View file

@ -56,7 +56,7 @@ void MaNGOSsoapRunnable::run()
continue;
}
sLog.outDebug("MaNGOSsoap: accepted connection from IP=%d.%d.%d.%d", (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
DEBUG_LOG("MaNGOSsoap: accepted connection from IP=%d.%d.%d.%d", (int)(soap.ip>>24)&0xFF, (int)(soap.ip>>16)&0xFF, (int)(soap.ip>>8)&0xFF, (int)soap.ip&0xFF);
struct soap* thread_soap = soap_copy(&soap);// make a safe copy
ACE_Message_Block *mb = new ACE_Message_Block(sizeof(struct soap*));
@ -93,33 +93,33 @@ int ns1__executeCommand(soap* soap, char* command, char** result)
// security check
if (!soap->userid || !soap->passwd)
{
sLog.outDebug("MaNGOSsoap: Client didn't provide login information");
DEBUG_LOG("MaNGOSsoap: Client didn't provide login information");
return 401;
}
uint32 accountId = sAccountMgr.GetId(soap->userid);
if(!accountId)
{
sLog.outDebug("MaNGOSsoap: Client used invalid username '%s'", soap->userid);
DEBUG_LOG("MaNGOSsoap: Client used invalid username '%s'", soap->userid);
return 401;
}
if(!sAccountMgr.CheckPassword(accountId, soap->passwd))
{
sLog.outDebug("MaNGOSsoap: invalid password for account '%s'", soap->userid);
DEBUG_LOG("MaNGOSsoap: invalid password for account '%s'", soap->userid);
return 401;
}
if(sAccountMgr.GetSecurity(accountId) < SEC_ADMINISTRATOR)
{
sLog.outDebug("MaNGOSsoap: %s's gmlevel is too low", soap->userid);
DEBUG_LOG("MaNGOSsoap: %s's gmlevel is too low", soap->userid);
return 403;
}
if(!command || !*command)
return soap_sender_fault(soap, "Command mustn't be empty", "The supplied command was an empty string");
sLog.outDebug("MaNGOSsoap: got command '%s'", command);
DEBUG_LOG("MaNGOSsoap: got command '%s'", command);
SOAPCommand connection;
// commands are executed in the world thread. We have to wait for them to be completed

View file

@ -161,13 +161,14 @@ extern int main(int argc, char **argv)
sLog.outString("Using configuration file %s.", cfg_file);
sLog.outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
DETAIL_LOG("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
if (SSLeay() < 0x009080bfL )
{
sLog.outDetail("WARNING: Outdated version of OpenSSL lib. Logins to server may not work!");
sLog.outDetail("WARNING: Minimal required version [OpenSSL 0.9.8k]");
DETAIL_LOG("WARNING: Outdated version of OpenSSL lib. Logins to server may not work!");
DETAIL_LOG("WARNING: Minimal required version [OpenSSL 0.9.8k]");
}
sLog.outDetail("Using ACE: %s", ACE_VERSION);
DETAIL_LOG("Using ACE: %s", ACE_VERSION);
///- and run the 'Master'
/// \todo Why do we need this 'Master'? Can't all of this be in the Main as for Realmd?

View file

@ -86,7 +86,7 @@ int RASocket::close(int)
{
if(closing_)
return -1;
sLog.outDebug("RASocket::close");
DEBUG_LOG("RASocket::close");
shutdown();
closing_ = true;
@ -99,7 +99,7 @@ int RASocket::handle_close (ACE_HANDLE h, ACE_Reactor_Mask)
{
if(closing_)
return -1;
sLog.outDebug("RASocket::handle_close");
DEBUG_LOG("RASocket::handle_close");
ACE_GUARD_RETURN (ACE_Thread_Mutex, Guard, outBufferLock, -1);
closing_ = true;
@ -146,7 +146,7 @@ int RASocket::handle_output (ACE_HANDLE)
/// Read data from the network
int RASocket::handle_input(ACE_HANDLE)
{
sLog.outDebug("RASocket::handle_input");
DEBUG_LOG("RASocket::handle_input");
if(closing_)
{
sLog.outError("Called RASocket::handle_input with closing_ = true");
@ -157,7 +157,7 @@ int RASocket::handle_input(ACE_HANDLE)
if(readBytes <= 0)
{
sLog.outDebug("read %u bytes in RASocket::handle_input", readBytes);
DEBUG_LOG("read %u bytes in RASocket::handle_input", readBytes);
return -1;
}

View file

@ -240,10 +240,20 @@ AddonChannel = 1
# LogFilter_CreatureMoves
# LogFilter_TransportMoves
# LogFilter_VisibilityChanges
# Log filters
# LogFilter_Weather
# Log filters (active by default)
# Default: 1 - not include with any log level
# 0 - include in log if log level permit
#
# LogFilter_PeriodicAffects
# LogFilter_PlayerMoves
# LogFilter_SQLText
# LogFilter_AIAndMovegens
# LogFilter_PlayerStats
# Log filters (disabled by default, mostly debug only output affected cases)
# Default: 0 - include in log if log level permit
# 1 - not include with any log level
#
# WorldLogFile
# Packet logging file for the worldserver
# Default: "world.log"

View file

@ -250,7 +250,7 @@ AuthSocket::~AuthSocket()
/// Accept the connection and set the s random value for SRP6
void AuthSocket::OnAccept()
{
sLog.outBasic("Accepting connection from '%s:%d'",
BASIC_LOG("Accepting connection from '%s:%d'",
GetRemoteAddress().c_str(), GetRemotePort());
}
@ -433,7 +433,7 @@ bool AuthSocket::_HandleLogonChallenge()
if (result)
{
pkt << (uint8)WOW_FAIL_BANNED;
sLog.outBasic("[AuthChallenge] Banned ip %s tries to login!", GetRemoteAddress().c_str());
BASIC_LOG("[AuthChallenge] Banned ip %s tries to login!", GetRemoteAddress().c_str());
delete result;
}
else
@ -476,12 +476,12 @@ bool AuthSocket::_HandleLogonChallenge()
if((*banresult)[0].GetUInt64() != (*banresult)[1].GetUInt64())
{
pkt << (uint8) WOW_FAIL_BANNED;
sLog.outBasic("[AuthChallenge] Banned account %s tries to login!",_login.c_str ());
BASIC_LOG("[AuthChallenge] Banned account %s tries to login!",_login.c_str ());
}
else
{
pkt << (uint8) WOW_FAIL_SUSPENDED;
sLog.outBasic("[AuthChallenge] Temporarily banned account %s tries to login!",_login.c_str ());
BASIC_LOG("[AuthChallenge] Temporarily banned account %s tries to login!",_login.c_str ());
}
delete banresult;
@ -495,7 +495,7 @@ bool AuthSocket::_HandleLogonChallenge()
std::string databaseV = (*result)[5].GetCppString();
std::string databaseS = (*result)[6].GetCppString();
sLog.outDebug("database authentication values: v='%s' s='%s'", databaseV.c_str(), databaseS.c_str());
DEBUG_LOG("database authentication values: v='%s' s='%s'", databaseV.c_str(), databaseS.c_str());
// multiply with 2, bytes are stored as hexstring
if(databaseV.size() != s_BYTE_SIZE*2 || databaseS.size() != s_BYTE_SIZE*2)
@ -556,7 +556,7 @@ bool AuthSocket::_HandleLogonChallenge()
for(int i = 0; i < 4; ++i)
_localizationName[i] = ch->country[4-i-1];
sLog.outBasic("[AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", _login.c_str (), ch->country[3], ch->country[2], ch->country[1], ch->country[0], GetLocaleByName(_localizationName));
BASIC_LOG("[AuthChallenge] account %s is using '%c%c%c%c' locale (%u)", _login.c_str (), ch->country[3], ch->country[2], ch->country[1], ch->country[0], GetLocaleByName(_localizationName));
}
}
delete result;
@ -715,7 +715,7 @@ bool AuthSocket::_HandleLogonProof()
///- Check if SRP6 results match (password is correct), else send an error
if (!memcmp(M.AsByteArray(), lp.M1, 20))
{
sLog.outBasic("User '%s' successfully authenticated", _login.c_str());
BASIC_LOG("User '%s' successfully authenticated", _login.c_str());
///- Update the sessionkey, last_ip, last login time and reset number of failed logins in the account table for this account
// No SQL injection (escaped user name) and IP address as received by socket
@ -737,7 +737,7 @@ bool AuthSocket::_HandleLogonProof()
{
char data[4]= { AUTH_LOGON_PROOF, WOW_FAIL_UNKNOWN_ACCOUNT, 3, 0};
SendBuf(data, sizeof(data));
sLog.outBasic("[AuthChallenge] account %s tried to login with wrong password!",_login.c_str ());
BASIC_LOG("[AuthChallenge] account %s tried to login with wrong password!",_login.c_str ());
uint32 MaxWrongPassCount = sConfig.GetIntDefault("WrongPass.MaxCount", 0);
if(MaxWrongPassCount > 0)
@ -760,7 +760,7 @@ bool AuthSocket::_HandleLogonProof()
uint32 acc_id = fields[0].GetUInt32();
loginDatabase.PExecute("INSERT INTO account_banned VALUES ('%u',UNIX_TIMESTAMP(),UNIX_TIMESTAMP()+'%u','MaNGOS realmd','Failed login autoban',1)",
acc_id, WrongPassBanTime);
sLog.outBasic("[AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times",
BASIC_LOG("[AuthChallenge] account %s got banned for '%u' seconds because it failed to authenticate '%u' times",
_login.c_str(), WrongPassBanTime, failed_logins);
}
else
@ -769,7 +769,7 @@ bool AuthSocket::_HandleLogonProof()
loginDatabase.escape_string(current_ip);
loginDatabase.PExecute("INSERT INTO ip_banned VALUES ('%s',UNIX_TIMESTAMP(),UNIX_TIMESTAMP()+'%u','MaNGOS realmd','Failed login autoban')",
current_ip.c_str(), WrongPassBanTime);
sLog.outBasic("[AuthChallenge] IP %s got banned for '%u' seconds because account %s failed to authenticate '%u' times",
BASIC_LOG("[AuthChallenge] IP %s got banned for '%u' seconds because account %s failed to authenticate '%u' times",
current_ip.c_str(), WrongPassBanTime, _login.c_str(), failed_logins);
}
}
@ -1200,7 +1200,7 @@ void Patcher::LoadPatchMD5(char * szFileName)
std::string path = "./patches/";
path += szFileName;
FILE *pPatch = fopen(path.c_str(), "rb");
sLog.outDebug("Loading patch info from %s\n", path.c_str());
DEBUG_LOG("Loading patch info from %s\n", path.c_str());
if(!pPatch)
{
sLog.outError("Error loading patch %s\n", path.c_str());

View file

@ -164,11 +164,11 @@ extern int main(int argc, char **argv)
while (pause > clock()) {}
}
sLog.outDetail("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
DETAIL_LOG("%s (Library: %s)", OPENSSL_VERSION_TEXT, SSLeay_version(SSLEAY_VERSION));
if (SSLeay() < 0x009080bfL )
{
sLog.outDetail("WARNING: Outdated version of OpenSSL lib. Logins to server may not work!");
sLog.outDetail("WARNING: Minimal required version [OpenSSL 0.9.8k]");
DETAIL_LOG("WARNING: Outdated version of OpenSSL lib. Logins to server may not work!");
DETAIL_LOG("WARNING: Minimal required version [OpenSSL 0.9.8k]");
}
/// realmd PID file creation
@ -275,7 +275,7 @@ extern int main(int argc, char **argv)
if( (++loopCounter) == numLoops )
{
loopCounter = 0;
sLog.outDetail("Ping MySQL to keep connection alive");
DETAIL_LOG("Ping MySQL to keep connection alive");
delete loginDatabase.Query("SELECT 1 FROM realmlist LIMIT 1");
}
#ifdef WIN32

View file

@ -137,7 +137,7 @@ void RealmList::UpdateIfNeed()
void RealmList::UpdateRealms(bool init)
{
sLog.outDetail("Updating Realm List...");
DETAIL_LOG("Updating Realm List...");
//// 0 1 2 3 4 5 6 7 8 9
QueryResult *result = loginDatabase.Query( "SELECT id, name, address, port, icon, realmflags, timezone, allowedSecurityLevel, population, realmbuilds FROM realmlist WHERE (realmflags & 1) = 0 ORDER BY name" );

View file

@ -141,7 +141,7 @@ bool DatabaseMysql::Initialize(const char *infoString)
if (mMysql)
{
sLog.outDetail( "Connected to MySQL database at %s",
DETAIL_LOG( "Connected to MySQL database at %s",
host.c_str());
sLog.outString( "MySQL client library: %s", mysql_get_client_info());
sLog.outString( "MySQL server ver: %s ", mysql_get_server_info( mMysql));
@ -155,9 +155,9 @@ bool DatabaseMysql::Initialize(const char *infoString)
// autocommit is turned of during it.
// Setting it to on makes atomic updates work
if (!mysql_autocommit(mMysql, 1))
sLog.outDetail("AUTOCOMMIT SUCCESSFULLY SET TO 1");
DETAIL_LOG("AUTOCOMMIT SUCCESSFULLY SET TO 1");
else
sLog.outDetail("AUTOCOMMIT NOT SET TO 1");
DETAIL_LOG("AUTOCOMMIT NOT SET TO 1");
/*-------------------------------------*/
// set connection properties to UTF8 to properly handle locales for different
@ -184,9 +184,9 @@ bool DatabaseMysql::_Query(const char *sql, MYSQL_RES **pResult, MYSQL_FIELD **p
{
// guarded block for thread-safe mySQL request
ACE_Guard<ACE_Thread_Mutex> query_connection_guard(mMutex);
#ifdef MANGOS_DEBUG
uint32 _s = getMSTime();
#endif
if(mysql_query(mMysql, sql))
{
sLog.outErrorDb( "SQL: %s", sql );
@ -195,9 +195,7 @@ bool DatabaseMysql::_Query(const char *sql, MYSQL_RES **pResult, MYSQL_FIELD **p
}
else
{
#ifdef MANGOS_DEBUG
sLog.outDebug("[%u ms] SQL: %s", getMSTimeDiff(_s,getMSTime()), sql );
#endif
DEBUG_FILTER_LOG(LOG_FILTER_SQL_TEXT, "[%u ms] SQL: %s", getMSTimeDiff(_s,getMSTime()), sql );
}
*pResult = mysql_store_result(mMysql);
@ -289,9 +287,8 @@ bool DatabaseMysql::DirectExecute(const char* sql)
// guarded block for thread-safe mySQL request
ACE_Guard<ACE_Thread_Mutex> query_connection_guard(mMutex);
#ifdef MANGOS_DEBUG
uint32 _s = getMSTime();
#endif
if(mysql_query(mMysql, sql))
{
sLog.outErrorDb("SQL: %s", sql);
@ -300,9 +297,7 @@ bool DatabaseMysql::DirectExecute(const char* sql)
}
else
{
#ifdef MANGOS_DEBUG
sLog.outDebug("[%u ms] SQL: %s", getMSTimeDiff(_s,getMSTime()), sql );
#endif
DEBUG_FILTER_LOG(LOG_FILTER_SQL_TEXT, "[%u ms] SQL: %s", getMSTimeDiff(_s,getMSTime()), sql );
}
// end guarded block
}
@ -320,7 +315,7 @@ bool DatabaseMysql::_TransactionCmd(const char *sql)
}
else
{
DEBUG_LOG("SQL: %s", sql);
DEBUG_FILTER_LOG(LOG_FILTER_SQL_TEXT, "SQL: %s", sql);
}
return true;
}

View file

@ -246,14 +246,25 @@ void Log::Initialize()
m_logFilter = 0;
if (sConfig.GetBoolDefault("LogFilter_TransportMoves", true))
if (sConfig.GetBoolDefault("LogFilter_TransportMoves", true))
m_logFilter |= LOG_FILTER_TRANSPORT_MOVES;
if (sConfig.GetBoolDefault("LogFilter_CreatureMoves", true))
if (sConfig.GetBoolDefault("LogFilter_CreatureMoves", true))
m_logFilter |= LOG_FILTER_CREATURE_MOVES;
if (sConfig.GetBoolDefault("LogFilter_VisibilityChanges", true))
if (sConfig.GetBoolDefault("LogFilter_VisibilityChanges", true))
m_logFilter |= LOG_FILTER_VISIBILITY_CHANGES;
if (sConfig.GetBoolDefault("LogFilter_AchievementUpdates", true))
m_logFilter |= LOG_FILTER_ACHIEVEMENT_UPDATES;
if (sConfig.GetBoolDefault("LogFilter_Weather", true))
m_logFilter |= LOG_FILTER_WEATHER;
if (sConfig.GetBoolDefault("LogFilter_SQLText", false))
m_logFilter |= LOG_FILTER_SQL_TEXT;
if (sConfig.GetBoolDefault("LogFilter_PlayerMoves", false))
m_logFilter |= LOG_FILTER_PLAYER_MOVES;
if (sConfig.GetBoolDefault("LogFilter_PeriodicAffects", false))
m_logFilter |= LOG_FILTER_PERIODIC_AFFECTS;
if (sConfig.GetBoolDefault("LogFilter_AIAndMovegens", false))
m_logFilter |= LOG_FILTER_AI_AND_MOVEGENSS;
// Char log settings
m_charLog_Dump = sConfig.GetBoolDefault("CharLogDump", false);
@ -843,7 +854,7 @@ void debug_log(const char * str, ...)
vsnprintf(buf,256, str, ap);
va_end(ap);
sLog.outDebug("%s", buf);
DEBUG_LOG("%s", buf);
}
void error_log(const char * str, ...)

View file

@ -36,10 +36,16 @@ enum LogLevel
// bitmask
enum LogFilters
{
LOG_FILTER_TRANSPORT_MOVES = 0x01,
LOG_FILTER_CREATURE_MOVES = 0x02,
LOG_FILTER_VISIBILITY_CHANGES = 0x04,
LOG_FILTER_ACHIEVEMENT_UPDATES= 0x08
LOG_FILTER_TRANSPORT_MOVES = 0x0001, // any related to transport moves
LOG_FILTER_CREATURE_MOVES = 0x0002, // creature move by cells
LOG_FILTER_VISIBILITY_CHANGES = 0x0004, // update visibility for diff objects and players
LOG_FILTER_ACHIEVEMENT_UPDATES= 0x0008, // achievement update broadcasts
LOG_FILTER_WEATHER = 0x0010, // weather changes
LOG_FILTER_PLAYER_STATS = 0x0020, // player save data
LOG_FILTER_SQL_TEXT = 0x0040, // raw SQL text send to DB engine
LOG_FILTER_PLAYER_MOVES = 0x0080, // player moves by grid/cell
LOG_FILTER_PERIODIC_AFFECTS = 0x0100, // DoT/HoT apply trace
LOG_FILTER_AI_AND_MOVEGENSS = 0x0200, // DoT/HoT apply trace
};
enum Color
@ -167,14 +173,26 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ACE_Th
#define sLog MaNGOS::Singleton<Log>::Instance()
#define BASIC_LOG(...) if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC)) sLog.outBasic(__VA_ARGS__)
#define BASIC_FILTER_LOG(F,...) if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC) && (sLog.getLogFilter() & (F))==0) sLog.outBasic(__VA_ARGS__)
#define BASIC_LOG(...) \
if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC)) \
sLog.outBasic(__VA_ARGS__)
#define BASIC_FILTER_LOG(F,...) \
if (sLog.HasLogLevelOrHigher(LOG_LVL_BASIC) && (sLog.getLogFilter() & (F))==0) \
sLog.outBasic(__VA_ARGS__)
#define DETAIL_LOG(...) if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL)) sLog.outDebug(__VA_ARGS__)
#define DETAIL_FILTER_LOG(F,...) if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL) && (sLog.getLogFilter() & (F))==0) sLog.outDetail(__VA_ARGS__)
#define DETAIL_LOG(...) \
if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL)) \
sLog.outDetail(__VA_ARGS__)
#define DETAIL_FILTER_LOG(F,...) \
if (sLog.HasLogLevelOrHigher(LOG_LVL_DETAIL) && (sLog.getLogFilter() & (F))==0) \
sLog.outDetail(__VA_ARGS__)
#define DEBUG_LOG(...) if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG)) sLog.outDebug( __VA_ARGS__)
#define DEBUG_FILTER_LOG(F,...) if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG) && (sLog.getLogFilter() & (F))==0) sLog.outDetail(__VA_ARGS__)
#define DEBUG_LOG(...) \
if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG)) \
sLog.outDebug(__VA_ARGS__)
#define DEBUG_FILTER_LOG(F,...) \
if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG) && (sLog.getLogFilter() & (F))==0) \
sLog.outDebug(__VA_ARGS__)
// primary for script library
void MANGOS_DLL_SPEC outstring_log(const char * str, ...) ATTR_PRINTF(1,2);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "9837"
#define REVISION_NR "9838"
#endif // __REVISION_NR_H__