aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/GuildHandler.cpp
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2013-05-13 15:07:36 +0200
committerSpp <spp@jorge.gr>2013-05-13 15:07:36 +0200
commitd1677b2db08f71a5bddedd9659cc5a66f325f47f (patch)
treeafb68e15d84d4e64de9f80b9bbbeb126c4aa8c54 /src/server/game/Handlers/GuildHandler.cpp
parent243c325ca4323feb4f7f80c0ecd3873c78cbf887 (diff)
Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros. Memleak fix
Diffstat (limited to 'src/server/game/Handlers/GuildHandler.cpp')
-rw-r--r--src/server/game/Handlers/GuildHandler.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/server/game/Handlers/GuildHandler.cpp b/src/server/game/Handlers/GuildHandler.cpp
index 60749932637..aa7c4b0b34a 100644
--- a/src/server/game/Handlers/GuildHandler.cpp
+++ b/src/server/game/Handlers/GuildHandler.cpp
@@ -33,7 +33,7 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
uint32 guildId;
recvPacket >> guildId;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_QUERY [%s]: Guild: %u", GetPlayerInfo().c_str(), guildId);
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_QUERY [%s]: Guild: %u", GetPlayerInfo().c_str(), guildId);
if (!guildId)
return;
@@ -43,7 +43,7 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
{
- sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_CREATE");
+ TC_LOG_DEBUG(LOG_FILTER_NETWORKIO, "WORLD: Received CMSG_GUILD_CREATE");
std::string name;
recvPacket >> name;
@@ -63,7 +63,7 @@ void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
std::string invitedName;
recvPacket >> invitedName;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_INVITE [%s]: Invited: %s", GetPlayerInfo().c_str(), invitedName.c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_INVITE [%s]: Invited: %s", GetPlayerInfo().c_str(), invitedName.c_str());
if (normalizePlayerName(invitedName))
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleInviteMember(this, invitedName);
@@ -74,7 +74,7 @@ void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket)
std::string playerName;
recvPacket >> playerName;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_REMOVE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_REMOVE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
if (normalizePlayerName(playerName))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -83,7 +83,7 @@ void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
{
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_ACCEPT [%s]", GetPlayer()->GetName().c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_ACCEPT [%s]", GetPlayer()->GetName().c_str());
if (!GetPlayer()->GetGuildId())
if (Guild* guild = sGuildMgr->GetGuildById(GetPlayer()->GetGuildIdInvited()))
@@ -92,7 +92,7 @@ void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/)
{
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_DECLINE [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_DECLINE [%s]", GetPlayerInfo().c_str());
GetPlayer()->SetGuildIdInvited(0);
GetPlayer()->SetInGuild(0);
@@ -100,7 +100,7 @@ void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
{
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_INFO [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_INFO [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendInfo(this);
@@ -108,7 +108,7 @@ void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildRosterOpcode(WorldPacket& /*recvPacket*/)
{
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_ROSTER [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_ROSTER [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleRoster(this);
@@ -121,7 +121,7 @@ void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket)
std::string playerName;
recvPacket >> playerName;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_PROMOTE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_PROMOTE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
if (normalizePlayerName(playerName))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -133,7 +133,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
std::string playerName;
recvPacket >> playerName;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_DEMOTE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_DEMOTE [%s]: Target: %s", GetPlayerInfo().c_str(), playerName.c_str());
if (normalizePlayerName(playerName))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -142,7 +142,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/)
{
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_LEAVE [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_LEAVE [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleLeaveMember(this);
@@ -150,7 +150,7 @@ void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildDisbandOpcode(WorldPacket& /*recvPacket*/)
{
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_DISBAND [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_DISBAND [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleDisband(this);
@@ -161,7 +161,7 @@ void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket)
std::string name;
recvPacket >> name;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_LEADER [%s]: Target: %s", GetPlayerInfo().c_str(), name.c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_LEADER [%s]: Target: %s", GetPlayerInfo().c_str(), name.c_str());
if (normalizePlayerName(name))
if (Guild* guild = GetPlayer()->GetGuild())
@@ -173,7 +173,7 @@ void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket)
std::string motd;
recvPacket >> motd;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_MOTD [%s]: MOTD: %s", GetPlayerInfo().c_str(), motd.c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_MOTD [%s]: MOTD: %s", GetPlayerInfo().c_str(), motd.c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleSetMOTD(this, motd);
@@ -185,7 +185,7 @@ void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket)
std::string note;
recvPacket >> playerName >> note;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_SET_PUBLIC_NOTE [%s]: Target: %s, Note: %s",
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_SET_PUBLIC_NOTE [%s]: Target: %s, Note: %s",
GetPlayerInfo().c_str(), playerName.c_str(), note.c_str());
if (normalizePlayerName(playerName))
@@ -199,7 +199,7 @@ void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket)
std::string note;
recvPacket >> playerName >> note;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_SET_OFFICER_NOTE [%s]: Target: %s, Note: %s",
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_SET_OFFICER_NOTE [%s]: Target: %s, Note: %s",
GetPlayerInfo().c_str(), playerName.c_str(), note.c_str());
if (normalizePlayerName(playerName))
@@ -221,7 +221,7 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
uint32 money;
recvPacket >> money;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_RANK [%s]: Rank: %s (%u)", GetPlayerInfo().c_str(), rankName.c_str(), rankId);
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_RANK [%s]: Rank: %s (%u)", GetPlayerInfo().c_str(), rankName.c_str(), rankId);
Guild* guild = GetPlayer()->GetGuild();
if (!guild)
@@ -251,7 +251,7 @@ void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
std::string rankName;
recvPacket >> rankName;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_ADD_RANK [%s]: Rank: %s", GetPlayerInfo().c_str(), rankName.c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_ADD_RANK [%s]: Rank: %s", GetPlayerInfo().c_str(), rankName.c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleAddNewRank(this, rankName);
@@ -259,7 +259,7 @@ void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildDelRankOpcode(WorldPacket& /*recvPacket*/)
{
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_DEL_RANK [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_DEL_RANK [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleRemoveLowestRank(this);
@@ -270,7 +270,7 @@ void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket)
std::string info;
recvPacket >> info;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_INFO_TEXT [%s]: %s", GetPlayerInfo().c_str(), info.c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_INFO_TEXT [%s]: %s", GetPlayerInfo().c_str(), info.c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->HandleSetInfo(this, info);
@@ -284,7 +284,7 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
EmblemInfo emblemInfo;
emblemInfo.ReadPacket(recvPacket);
- sLog->outDebug(LOG_FILTER_GUILD, "MSG_SAVE_GUILD_EMBLEM [%s]: Guid: [" UI64FMTD
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_SAVE_GUILD_EMBLEM [%s]: Guid: [" UI64FMTD
"] Style: %d, Color: %d, BorderStyle: %d, BorderColor: %d, BackgroundColor: %d"
, GetPlayerInfo().c_str(), vendorGuid, emblemInfo.GetStyle()
, emblemInfo.GetColor(), emblemInfo.GetBorderStyle()
@@ -307,7 +307,7 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
{
- sLog->outDebug(LOG_FILTER_GUILD, "MSG_GUILD_EVENT_LOG_QUERY [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_GUILD_EVENT_LOG_QUERY [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendEventLog(this);
@@ -315,7 +315,7 @@ void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket & /* recvData */)
{
- sLog->outDebug(LOG_FILTER_GUILD, "MSG_GUILD_BANK_MONEY_WITHDRAWN [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_GUILD_BANK_MONEY_WITHDRAWN [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendMoneyInfo(this);
@@ -323,7 +323,7 @@ void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket & /* recvData */)
void WorldSession::HandleGuildPermissions(WorldPacket& /* recvData */)
{
- sLog->outDebug(LOG_FILTER_GUILD, "MSG_GUILD_PERMISSIONS [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_GUILD_PERMISSIONS [%s]", GetPlayerInfo().c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendPermissions(this);
@@ -336,7 +336,7 @@ void WorldSession::HandleGuildBankerActivate(WorldPacket& recvData)
bool sendAllSlots;
recvData >> guid >> sendAllSlots;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANKER_ACTIVATE [%s]: Go: [" UI64FMTD "] AllSlots: %u"
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANKER_ACTIVATE [%s]: Go: [" UI64FMTD "] AllSlots: %u"
, GetPlayerInfo().c_str(), guid, sendAllSlots);
Guild* const guild = GetPlayer()->GetGuild();
@@ -358,7 +358,7 @@ void WorldSession::HandleGuildBankQueryTab(WorldPacket& recvData)
recvData >> guid >> tabId >> full;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_QUERY_TAB [%s]: Go: [" UI64FMTD "], TabId: %u, ShowTabs: %u"
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_QUERY_TAB [%s]: Go: [" UI64FMTD "], TabId: %u, ShowTabs: %u"
, GetPlayerInfo().c_str(), guid, tabId, full);
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
@@ -372,7 +372,7 @@ void WorldSession::HandleGuildBankDepositMoney(WorldPacket& recvData)
uint32 money;
recvData >> guid >> money;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_DEPOSIT_MONEY [%s]: Go: [" UI64FMTD "], money: %u",
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_DEPOSIT_MONEY [%s]: Go: [" UI64FMTD "], money: %u",
GetPlayerInfo().c_str(), guid, money);
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
@@ -387,7 +387,7 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket& recvData)
uint32 money;
recvData >> guid >> money;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_WITHDRAW_MONEY [%s]: Go: [" UI64FMTD "], money: %u",
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_WITHDRAW_MONEY [%s]: Go: [" UI64FMTD "], money: %u",
GetPlayerInfo().c_str(), guid, money);
if (money && GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
@@ -397,7 +397,7 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket& recvData)
void WorldSession::HandleGuildBankSwapItems(WorldPacket& recvData)
{
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_SWAP_ITEMS [%s]", GetPlayerInfo().c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_SWAP_ITEMS [%s]", GetPlayerInfo().c_str());
uint64 GoGuid;
recvData >> GoGuid;
@@ -483,7 +483,7 @@ void WorldSession::HandleGuildBankBuyTab(WorldPacket& recvData)
recvData >> guid >> tabId;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_BUY_TAB [%s]: Go: [" UI64FMTD "], TabId: %u", GetPlayerInfo().c_str(), guid, tabId);
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_BUY_TAB [%s]: Go: [" UI64FMTD "], TabId: %u", GetPlayerInfo().c_str(), guid, tabId);
if (GetPlayer()->GetGameObjectIfCanInteractWith(guid, GAMEOBJECT_TYPE_GUILD_BANK))
@@ -499,7 +499,7 @@ void WorldSession::HandleGuildBankUpdateTab(WorldPacket& recvData)
recvData >> guid >> tabId >> name >> icon;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_UPDATE_TAB [%s]: Go: [" UI64FMTD "], TabId: %u, Name: %s, Icon: %s"
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_GUILD_BANK_UPDATE_TAB [%s]: Go: [" UI64FMTD "], TabId: %u, Name: %s, Icon: %s"
, GetPlayerInfo().c_str(), guid, tabId, name.c_str(), icon.c_str());
if (!name.empty() && !icon.empty())
@@ -513,7 +513,7 @@ void WorldSession::HandleGuildBankLogQuery(WorldPacket& recvData)
uint8 tabId;
recvData >> tabId;
- sLog->outDebug(LOG_FILTER_GUILD, "MSG_GUILD_BANK_LOG_QUERY [%s]: TabId: %u", GetPlayerInfo().c_str(), tabId);
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_GUILD_BANK_LOG_QUERY [%s]: TabId: %u", GetPlayerInfo().c_str(), tabId);
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendBankLog(this, tabId);
@@ -524,7 +524,7 @@ void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recvData)
uint8 tabId;
recvData >> tabId;
- sLog->outDebug(LOG_FILTER_GUILD, "MSG_QUERY_GUILD_BANK_TEXT [%s]: TabId: %u", GetPlayerInfo().c_str(), tabId);
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "MSG_QUERY_GUILD_BANK_TEXT [%s]: TabId: %u", GetPlayerInfo().c_str(), tabId);
if (Guild* guild = GetPlayer()->GetGuild())
guild->SendBankTabText(this, tabId);
@@ -536,7 +536,7 @@ void WorldSession::HandleSetGuildBankTabText(WorldPacket &recvData)
std::string text;
recvData >> tabId >> text;
- sLog->outDebug(LOG_FILTER_GUILD, "CMSG_SET_GUILD_BANK_TEXT [%s]: TabId: %u, Text: %s", GetPlayerInfo().c_str(), tabId, text.c_str());
+ TC_LOG_DEBUG(LOG_FILTER_GUILD, "CMSG_SET_GUILD_BANK_TEXT [%s]: TabId: %u, Text: %s", GetPlayerInfo().c_str(), tabId, text.c_str());
if (Guild* guild = GetPlayer()->GetGuild())
guild->SetBankTabText(tabId, text);