aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Server')
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/AddonHandler.cpp6
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp34
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp48
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp74
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/CalendarHandler.cpp32
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/ChannelHandler.cpp34
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/CharacterHandler.cpp122
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/ChatHandler.cpp48
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/CombatHandler.cpp12
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/DuelHandler.cpp8
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/GroupHandler.cpp26
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/GuildHandler.cpp70
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/ItemHandler.cpp98
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/LFGHandler.cpp60
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/LootHandler.cpp18
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/MailHandler.cpp30
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/MiscHandler.cpp234
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/MovementHandler.cpp40
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/NPCHandler.cpp58
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/PetHandler.cpp62
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp78
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/QueryHandler.cpp34
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/QuestHandler.cpp48
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/SkillHandler.cpp6
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/SpellHandler.cpp30
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/TaxiHandler.cpp32
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/TicketHandler.cpp12
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/TradeHandler.cpp44
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp6
-rwxr-xr-xsrc/server/game/Server/Protocol/WorldLog.cpp14
-rwxr-xr-xsrc/server/game/Server/Protocol/WorldLog.h2
-rwxr-xr-xsrc/server/game/Server/WorldSession.cpp68
-rwxr-xr-xsrc/server/game/Server/WorldSession.h2
-rwxr-xr-xsrc/server/game/Server/WorldSocket.cpp94
-rwxr-xr-xsrc/server/game/Server/WorldSocketMgr.cpp26
35 files changed, 805 insertions, 805 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp b/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp
index 5b18154103c..96c4602182b 100755
--- a/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/AddonHandler.cpp
@@ -98,7 +98,7 @@ bool AddonHandler::BuildAddonPacket(WorldPacket *Source, WorldPacket *Target)
AddOnPacked >> enabled >> crc >> unk2;
- sLog.outDebug("ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk2);
+ sLog->outDebug("ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk2);
uint8 state = (enabled ? 2 : 1);
*Target << uint8(state);
@@ -131,11 +131,11 @@ bool AddonHandler::BuildAddonPacket(WorldPacket *Source, WorldPacket *Target)
*Target << uint32(count);
if(AddOnPacked.rpos() != AddOnPacked.size())
- sLog.outDebug("packet under read!");
+ sLog->outDebug("packet under read!");
}
else
{
- sLog.outError("Addon packet uncompress error :(");
+ sLog->outError("Addon packet uncompress error :(");
return false;
}
return true;
diff --git a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp b/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp
index 9a211d49acf..51ac64411c1 100755
--- a/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ArenaTeamHandler.cpp
@@ -29,11 +29,11 @@
void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("MSG_INSPECT_ARENA_TEAMS");
+ sLog->outDebug("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)));
+ sLog->outDebug("Inspect Arena stats (GUID: %u TypeId: %u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
if (Player *plr = sObjectMgr->GetPlayer(guid))
{
@@ -50,7 +50,7 @@ void WorldSession::HandleInspectArenaTeamsOpcode(WorldPacket & recv_data)
void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_ARENA_TEAM_QUERY");
+ sLog->outDebug("WORLD: Received CMSG_ARENA_TEAM_QUERY");
uint32 ArenaTeamId;
recv_data >> ArenaTeamId;
@@ -64,7 +64,7 @@ void WorldSession::HandleArenaTeamQueryOpcode(WorldPacket & recv_data)
void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_ARENA_TEAM_ROSTER");
+ sLog->outDebug("WORLD: Received CMSG_ARENA_TEAM_ROSTER");
uint32 ArenaTeamId; // arena team id
recv_data >> ArenaTeamId;
@@ -75,7 +75,7 @@ void WorldSession::HandleArenaTeamRosterOpcode(WorldPacket & recv_data)
void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("CMSG_ARENA_TEAM_INVITE");
+ sLog->outDebug("CMSG_ARENA_TEAM_INVITE");
uint32 ArenaTeamId; // arena team id
std::string Invitedname;
@@ -89,7 +89,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
if (!normalizePlayerName(Invitedname))
return;
- player = sObjectAccessor.FindPlayerByName(Invitedname.c_str());
+ player = sObjectAccessor->FindPlayerByName(Invitedname.c_str());
}
if (!player)
@@ -98,7 +98,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
return;
}
- if (player->getLevel() < sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ if (player->getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", player->GetName(), ERR_ARENA_TEAM_TARGET_TOO_LOW_S);
return;
@@ -115,7 +115,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
if (player->GetSocial()->HasIgnore(GetPlayer()->GetGUIDLow()))
return;
- if (!sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && player->GetTeam() != GetPlayer()->GetTeam())
+ if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && player->GetTeam() != GetPlayer()->GetTeam())
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
return;
@@ -139,7 +139,7 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
return;
}
- sLog.outDebug("Player %s Invited %s to Join his ArenaTeam", GetPlayer()->GetName(), Invitedname.c_str());
+ sLog->outDebug("Player %s Invited %s to Join his ArenaTeam", GetPlayer()->GetName(), Invitedname.c_str());
player->SetArenaTeamIdInvited(arenateam->GetId());
@@ -148,12 +148,12 @@ void WorldSession::HandleArenaTeamInviteOpcode(WorldPacket & recv_data)
data << arenateam->GetName();
player->GetSession()->SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_ARENA_TEAM_INVITE");
+ sLog->outDebug("WORLD: Sent SMSG_ARENA_TEAM_INVITE");
}
void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
{
- sLog.outDebug("CMSG_ARENA_TEAM_ACCEPT"); // empty opcode
+ sLog->outDebug("CMSG_ARENA_TEAM_ACCEPT"); // empty opcode
ArenaTeam *at = sObjectMgr->GetArenaTeamById(_player->GetArenaTeamIdInvited());
if (!at)
@@ -166,7 +166,7 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
return;
}
- if (!sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && _player->GetTeam() != sObjectMgr->GetPlayerTeamByGUID(at->GetCaptain()))
+ if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && _player->GetTeam() != sObjectMgr->GetPlayerTeamByGUID(at->GetCaptain()))
{
// not let enemies sign petition
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
@@ -186,14 +186,14 @@ void WorldSession::HandleArenaTeamAcceptOpcode(WorldPacket & /*recv_data*/)
void WorldSession::HandleArenaTeamDeclineOpcode(WorldPacket & /*recv_data*/)
{
- sLog.outDebug("CMSG_ARENA_TEAM_DECLINE"); // empty opcode
+ sLog->outDebug("CMSG_ARENA_TEAM_DECLINE"); // empty opcode
_player->SetArenaTeamIdInvited(0); // no more invited
}
void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("CMSG_ARENA_TEAM_LEAVE");
+ sLog->outDebug("CMSG_ARENA_TEAM_LEAVE");
uint32 ArenaTeamId; // arena team id
recv_data >> ArenaTeamId;
@@ -228,7 +228,7 @@ void WorldSession::HandleArenaTeamLeaveOpcode(WorldPacket & recv_data)
void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("CMSG_ARENA_TEAM_DISBAND");
+ sLog->outDebug("CMSG_ARENA_TEAM_DISBAND");
uint32 ArenaTeamId; // arena team id
recv_data >> ArenaTeamId;
@@ -248,7 +248,7 @@ void WorldSession::HandleArenaTeamDisbandOpcode(WorldPacket & recv_data)
void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("CMSG_ARENA_TEAM_REMOVE");
+ sLog->outDebug("CMSG_ARENA_TEAM_REMOVE");
uint32 ArenaTeamId;
std::string name;
@@ -290,7 +290,7 @@ void WorldSession::HandleArenaTeamRemoveOpcode(WorldPacket & recv_data)
void WorldSession::HandleArenaTeamLeaderOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("CMSG_ARENA_TEAM_LEADER");
+ sLog->outDebug("CMSG_ARENA_TEAM_LEADER");
uint32 ArenaTeamId;
std::string name;
diff --git a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
index dbb55094de3..fe8dbbe1b24 100755
--- a/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/AuctionHouseHandler.cpp
@@ -40,7 +40,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)));
+ sLog->outDebug("WORLD: HandleAuctionHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -54,9 +54,9 @@ void WorldSession::HandleAuctionHelloOpcode(WorldPacket & recv_data)
//this void causes that auction window is opened
void WorldSession::SendAuctionHello(uint64 guid, Creature* unit)
{
- if (GetPlayer()->getLevel() < sWorld.getIntConfig(CONFIG_AUCTION_LEVEL_REQ))
+ if (GetPlayer()->getLevel() < sWorld->getIntConfig(CONFIG_AUCTION_LEVEL_REQ))
{
- SendNotification(GetTrinityString(LANG_AUCTION_REQ), sWorld.getIntConfig(CONFIG_AUCTION_LEVEL_REQ));
+ SendNotification(GetTrinityString(LANG_AUCTION_REQ), sWorld->getIntConfig(CONFIG_AUCTION_LEVEL_REQ));
return;
}
@@ -132,23 +132,23 @@ 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)));
+ sLog->outDebug("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)));
+ sLog->outDebug("WORLD: HandleAuctionSellItem - Unit (GUID: %u) has wrong faction.", uint32(GUID_LOPART(auctioneer)));
return;
}
- sLog.outDebug("WORLD: HandleAuctionSellItem - ETIME: %u", etime);
+ sLog->outDebug("WORLD: HandleAuctionSellItem - ETIME: %u", etime);
// client send time in minutes, convert to common used sec time
etime *= MINUTE;
- sLog.outDebug("WORLD: HandleAuctionSellItem - ETIME: %u", etime);
+ sLog->outDebug("WORLD: HandleAuctionSellItem - ETIME: %u", etime);
// client understand only 3 auction time
switch(etime)
@@ -169,7 +169,7 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
//do not allow to sell already auctioned items
if (sAuctionMgr->GetAItem(GUID_LOPART(item)))
{
- sLog.outError("AuctionError, player %s is sending item id: %u, but item is already in another auction", pl->GetName(), GUID_LOPART(item));
+ sLog->outError("AuctionError, player %s is sending item id: %u, but item is already in another auction", pl->GetName(), GUID_LOPART(item));
SendAuctionCommandResult(0, AUCTION_SELL_ITEM, AUCTION_INTERNAL_ERROR);
return;
}
@@ -208,19 +208,19 @@ void WorldSession::HandleAuctionSellItem(WorldPacket & recv_data)
return;
}
- if (GetSecurity() > SEC_PLAYER && sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE))
+ if (GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
{
- sLog.outCommand(GetAccountId(),"GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
+ sLog->outCommand(GetAccountId(),"GM %s (Account: %u) create auction: %s (Entry: %u Count: %u)",
GetPlayerName(),GetAccountId(),it->GetProto()->Name1,it->GetEntry(),count);
}
pl->ModifyMoney(-int32(deposit));
- uint32 auction_time = uint32(etime * sWorld.getRate(RATE_AUCTION_TIME));
+ uint32 auction_time = uint32(etime * sWorld->getRate(RATE_AUCTION_TIME));
AuctionEntry *AH = new AuctionEntry;
AH->Id = sObjectMgr->GenerateAuctionID();
- if (sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
+ if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
AH->auctioneer = 23442;
else
AH->auctioneer = GUID_LOPART(auctioneer);
@@ -235,7 +235,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), AH->auctioneer, bid, buyout, auction_time, AH->GetHouseId());
+ 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), AH->auctioneer, bid, buyout, auction_time, AH->GetHouseId());
sAuctionMgr->AddAItem(it);
auctionHouse->AddAuction(AH);
@@ -268,7 +268,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)));
+ sLog->outDebug("WORLD: HandleAuctionPlaceBid - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)));
return;
}
@@ -381,12 +381,12 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
uint32 auctionId;
recv_data >> auctioneer;
recv_data >> auctionId;
- //sLog.outDebug("Cancel AUCTION AuctionID: %u", auctionId);
+ //sLog->outDebug("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)));
+ sLog->outDebug("WORLD: HandleAuctionRemoveItem - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(auctioneer)));
return;
}
@@ -425,7 +425,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
}
else
{
- sLog.outError("Auction id: %u has non-existed item (item guid : %u)!!!", auction->Id, auction->item_guidlow);
+ sLog->outError("Auction id: %u has non-existed item (item guid : %u)!!!", auction->Id, auction->item_guidlow);
SendAuctionCommandResult(0, AUCTION_CANCEL, AUCTION_INTERNAL_ERROR);
return;
}
@@ -434,7 +434,7 @@ void WorldSession::HandleAuctionRemoveItem(WorldPacket & recv_data)
{
SendAuctionCommandResult(0, AUCTION_CANCEL, AUCTION_INTERNAL_ERROR);
//this code isn't possible ... maybe there should be assert
- sLog.outError("CHEATER : %u, he tried to cancel auction (id: %u) of another player, or auction is NULL", pl->GetGUIDLow(), auctionId);
+ sLog->outError("CHEATER : %u, he tried to cancel auction (id: %u) of another player, or auction is NULL", pl->GetGUIDLow(), auctionId);
return;
}
@@ -464,14 +464,14 @@ void WorldSession::HandleAuctionListBidderItems(WorldPacket & recv_data)
recv_data >> outbiddedCount;
if (recv_data.size() != (16 + outbiddedCount * 4))
{
- sLog.outError("Client sent bad opcode!!! with count: %u and size : %lu (must be: %u)", outbiddedCount, (unsigned long)recv_data.size(),(16 + outbiddedCount * 4));
+ sLog->outError("Client sent bad opcode!!! with count: %u and size : %lu (must be: %u)", outbiddedCount, (unsigned long)recv_data.size(),(16 + outbiddedCount * 4));
outbiddedCount = 0;
}
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)));
+ sLog->outDebug("WORLD: HandleAuctionListBidderItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -518,7 +518,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)));
+ sLog->outDebug("WORLD: HandleAuctionListOwnerItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -571,7 +571,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)));
+ sLog->outDebug("WORLD: HandleAuctionListItems - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -581,7 +581,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",
+ //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",
// 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));
@@ -609,7 +609,7 @@ void WorldSession::HandleAuctionListItems(WorldPacket & recv_data)
void WorldSession::HandleAuctionListPendingSales(WorldPacket & recv_data)
{
- sLog.outDebug("CMSG_AUCTION_LIST_PENDING_SALES");
+ sLog->outDebug("CMSG_AUCTION_LIST_PENDING_SALES");
recv_data.read_skip<uint64>();
diff --git a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp
index 700053d430d..63e9a6f72bb 100755
--- a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp
@@ -39,7 +39,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)));
+ sLog->outDebug("WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
Creature *unit = GetPlayer()->GetMap()->GetCreature(guid);
if (!unit)
@@ -86,7 +86,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
if (!sBattlemasterListStore.LookupEntry(bgTypeId_))
{
- sLog.outError("Battleground: invalid bgtype (%u) received. possible cheater? player guid %u",bgTypeId_,_player->GetGUIDLow());
+ sLog->outError("Battleground: invalid bgtype (%u) received. possible cheater? player guid %u",bgTypeId_,_player->GetGUIDLow());
return;
}
@@ -98,7 +98,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)));
+ sLog->outDebug("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);
@@ -189,7 +189,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());
+ sLog->outDebug("Battleground: player joined queue for bg queue type %u bg type %u: GUID %u, NAME %s",bgQueueTypeId,bgTypeId,_player->GetGUIDLow(), _player->GetName());
}
else
{
@@ -208,7 +208,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
if (err > 0)
{
- sLog.outDebug("Battleground: the following players are joining as group:");
+ sLog->outDebug("Battleground: the following players are joining as group:");
ginfo = bgQueue.AddGroup(_player, grp, bgTypeId, bracketEntry, 0, false, isPremade, 0, 0);
avgTime = bgQueue.GetAverageQueueWaitTime(ginfo, bracketEntry->GetBracketId());
}
@@ -235,9 +235,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());
+ sLog->outDebug("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");
+ sLog->outDebug("Battleground: group end");
}
sBattlegroundMgr->ScheduleQueueUpdate(0, 0, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
@@ -246,7 +246,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data)
void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket & /*recv_data*/)
{
// empty opcode
- sLog.outDebug("WORLD: Recvd MSG_BATTLEGROUND_PLAYER_POSITIONS Message");
+ sLog->outDebug("WORLD: Recvd MSG_BATTLEGROUND_PLAYER_POSITIONS Message");
Battleground *bg = _player->GetBattleground();
if (!bg) // can't be received if player not in battleground
@@ -313,7 +313,7 @@ void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket & /*recv_
void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recv_data*/)
{
- sLog.outDebug("WORLD: Recvd MSG_PVP_LOG_DATA Message");
+ sLog->outDebug("WORLD: Recvd MSG_PVP_LOG_DATA Message");
Battleground *bg = _player->GetBattleground();
if (!bg)
@@ -323,12 +323,12 @@ void WorldSession::HandlePVPLogDataOpcode(WorldPacket & /*recv_data*/)
sBattlegroundMgr->BuildPvpLogDataPacket(&data, bg);
SendPacket(&data);
- sLog.outDebug("WORLD: Sent MSG_PVP_LOG_DATA Message");
+ sLog->outDebug("WORLD: Sent MSG_PVP_LOG_DATA Message");
}
void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: Recvd CMSG_BATTLEFIELD_LIST Message");
+ sLog->outDebug("WORLD: Recvd CMSG_BATTLEFIELD_LIST Message");
uint32 bgTypeId;
recv_data >> bgTypeId; // id from DBC
@@ -342,7 +342,7 @@ void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recv_data)
BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId);
if (!bl)
{
- sLog.outError("Battleground: invalid bgtype received.");
+ sLog->outError("Battleground: invalid bgtype received.");
return;
}
@@ -353,7 +353,7 @@ void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recv_data)
void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: Recvd CMSG_BATTLEFIELD_PORT Message");
+ sLog->outDebug("WORLD: Recvd CMSG_BATTLEFIELD_PORT Message");
uint8 type; // arenatype if arena
uint8 unk2; // unk, can be 0x0 (may be if was invited?) and 0x1
@@ -365,12 +365,12 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
if (!sBattlemasterListStore.LookupEntry(bgTypeId_))
{
- sLog.outError("BattlegroundHandler: invalid bgtype (%u) received.", bgTypeId_);
+ sLog->outError("BattlegroundHandler: invalid bgtype (%u) received.", bgTypeId_);
return;
}
if (!_player->InBattlegroundQueue())
{
- sLog.outError("BattlegroundHandler: Invalid CMSG_BATTLEFIELD_PORT received from player (%u), he is not in bg_queue.", _player->GetGUIDLow());
+ sLog->outError("BattlegroundHandler: Invalid CMSG_BATTLEFIELD_PORT received from player (%u), he is not in bg_queue.", _player->GetGUIDLow());
return;
}
@@ -382,13 +382,13 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
GroupQueueInfo ginfo;
if (!bgQueue.GetPlayerGroupInfoData(_player->GetGUID(), &ginfo))
{
- sLog.outError("BattlegroundHandler: itrplayerstatus not found.");
+ sLog->outError("BattlegroundHandler: itrplayerstatus not found.");
return;
}
// if action == 1, then instanceId is required
if (!ginfo.IsInvitedToBGInstanceGUID && action == 1)
{
- sLog.outError("BattlegroundHandler: instance not found.");
+ sLog->outError("BattlegroundHandler: instance not found.");
return;
}
@@ -399,7 +399,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
bg = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId);
if (!bg)
{
- sLog.outError("BattlegroundHandler: bg_template not found for type id %u.", bgTypeId);
+ sLog->outError("BattlegroundHandler: bg_template not found for type id %u.", bgTypeId);
return;
}
@@ -419,12 +419,12 @@ 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());
+ sLog->outDebug("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())
{
- sLog.outError("Battleground: Player %s (%u) has level (%u) higher than maxlevel (%u) of battleground (%u)! Do not port him to battleground!",
+ sLog->outError("Battleground: Player %s (%u) has level (%u) higher than maxlevel (%u) of battleground (%u)! Do not port him to battleground!",
_player->GetName(), _player->GetGUIDLow(), _player->getLevel(), bg->GetMaxLevel(), bg->GetTypeID());
action = 0;
}
@@ -470,7 +470,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);
+ 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);
break;
case 0: // leave queue
// if player leaves rated arena match before match start, it is counted as he played but he lost
@@ -479,7 +479,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);
+ 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);
at->MemberLost(_player, ginfo.OpponentsMatchmakerRating);
at->SaveToDB();
}
@@ -491,17 +491,17 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recv_data)
if (!ginfo.ArenaType)
sBattlegroundMgr->ScheduleQueueUpdate(ginfo.ArenaMatchmakerRating, 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);
+ sLog->outDebug("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);
+ sLog->outError("Battleground port: unknown action %u", action);
break;
}
}
void WorldSession::HandleLeaveBattlefieldOpcode(WorldPacket& recv_data)
{
- sLog.outDebug("WORLD: Recvd CMSG_LEAVE_BATTLEFIELD Message");
+ sLog->outDebug("WORLD: Recvd CMSG_LEAVE_BATTLEFIELD Message");
recv_data.read_skip<uint8>(); // unk1
recv_data.read_skip<uint8>(); // unk2
@@ -520,7 +520,7 @@ void WorldSession::HandleLeaveBattlefieldOpcode(WorldPacket& recv_data)
void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recv_data*/)
{
// empty opcode
- sLog.outDebug("WORLD: Battleground status");
+ sLog->outDebug("WORLD: Battleground status");
WorldPacket data;
// we must update all queues here
@@ -583,7 +583,7 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recv_data*/)
void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY");
+ sLog->outDebug("WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY");
Battleground *bg = _player->GetBattleground();
@@ -604,7 +604,7 @@ void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data)
void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE");
+ sLog->outDebug("WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE");
Battleground *bg = _player->GetBattleground();
@@ -625,7 +625,7 @@ void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket & recv_data)
void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");
+ sLog->outDebug("WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");
//recv_data.hexlike();
uint64 guid; // arena Battlemaster guid
@@ -663,7 +663,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
arenatype = ARENA_TYPE_5v5;
break;
default:
- sLog.outError("Unknown arena slot %u at HandleBattlemasterJoinArena()", arenaslot);
+ sLog->outError("Unknown arena slot %u at HandleBattlemasterJoinArena()", arenaslot);
return;
}
@@ -671,7 +671,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(BATTLEGROUND_AA);
if (!bg)
{
- sLog.outError("Battleground: template bg (all arenas) not found");
+ sLog->outError("Battleground: template bg (all arenas) not found");
return;
}
@@ -738,10 +738,10 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
if (err > 0)
{
- sLog.outDebug("Battleground: arena join as group start");
+ sLog->outDebug("Battleground: arena join as group start");
if (isRated)
{
- sLog.outDebug("Battleground: arena team id %u, leader %s queued with matchmaker rating %u for type %u",_player->GetArenaTeamId(arenaslot),_player->GetName(),matchmakerRating,arenatype);
+ sLog->outDebug("Battleground: arena team id %u, leader %s queued with matchmaker rating %u for type %u",_player->GetArenaTeamId(arenaslot),_player->GetName(),matchmakerRating,arenatype);
bg->SetRated(true);
}
else
@@ -774,7 +774,7 @@ 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());
+ 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());
}
}
else
@@ -787,7 +787,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());
+ 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());
}
sBattlegroundMgr->ScheduleQueueUpdate(matchmakerRating, arenatype, bgQueueTypeId, bgTypeId, bracketEntry->GetBracketId());
}
@@ -800,11 +800,11 @@ void WorldSession::HandleReportPvPAFK(WorldPacket & recv_data)
if (!reportedPlayer)
{
- sLog.outDebug("WorldSession::HandleReportPvPAFK: player not found");
+ sLog->outDebug("WorldSession::HandleReportPvPAFK: player not found");
return;
}
- sLog.outDebug("WorldSession::HandleReportPvPAFK: %s reported %s", _player->GetName(), reportedPlayer->GetName());
+ sLog->outDebug("WorldSession::HandleReportPvPAFK: %s reported %s", _player->GetName(), reportedPlayer->GetName());
reportedPlayer->ReportedAfkBy(_player);
}
diff --git a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp b/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp
index 9c13aba4109..364a245145c 100755
--- a/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CalendarHandler.cpp
@@ -27,7 +27,7 @@
void WorldSession::HandleCalendarGetCalendar(WorldPacket & /*recv_data*/)
{
- sLog.outDebug("WORLD: CMSG_CALENDAR_GET_CALENDAR"); // empty
+ sLog->outDebug("WORLD: CMSG_CALENDAR_GET_CALENDAR"); // empty
time_t cur_time = time(NULL);
@@ -126,21 +126,21 @@ void WorldSession::HandleCalendarGetCalendar(WorldPacket & /*recv_data*/)
}
*/
- sLog.outDebug("Sending calendar");
+ sLog->outDebug("Sending calendar");
data.hexlike();
SendPacket(&data);
}
void WorldSession::HandleCalendarGetEvent(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: CMSG_CALENDAR_GET_EVENT");
+ sLog->outDebug("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");
+ sLog->outDebug("WORLD: CMSG_CALENDAR_GUILD_FILTER");
recv_data.hexlike();
recv_data.read_skip<uint32>(); // unk1
recv_data.read_skip<uint32>(); // unk2
@@ -149,14 +149,14 @@ void WorldSession::HandleCalendarGuildFilter(WorldPacket &recv_data)
void WorldSession::HandleCalendarArenaTeam(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: CMSG_CALENDAR_ARENA_TEAM");
+ sLog->outDebug("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");
+ sLog->outDebug("WORLD: CMSG_CALENDAR_ADD_EVENT");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@@ -192,7 +192,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket &recv_data)
void WorldSession::HandleCalendarUpdateEvent(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: CMSG_CALENDAR_UPDATE_EVENT");
+ sLog->outDebug("WORLD: CMSG_CALENDAR_UPDATE_EVENT");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@@ -211,7 +211,7 @@ void WorldSession::HandleCalendarUpdateEvent(WorldPacket &recv_data)
void WorldSession::HandleCalendarRemoveEvent(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: CMSG_CALENDAR_REMOVE_EVENT");
+ sLog->outDebug("WORLD: CMSG_CALENDAR_REMOVE_EVENT");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@@ -223,7 +223,7 @@ void WorldSession::HandleCalendarRemoveEvent(WorldPacket &recv_data)
void WorldSession::HandleCalendarCopyEvent(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: CMSG_CALENDAR_COPY_EVENT");
+ sLog->outDebug("WORLD: CMSG_CALENDAR_COPY_EVENT");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@@ -235,7 +235,7 @@ void WorldSession::HandleCalendarCopyEvent(WorldPacket &recv_data)
void WorldSession::HandleCalendarEventInvite(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_INVITE");
+ sLog->outDebug("WORLD: CMSG_CALENDAR_EVENT_INVITE");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@@ -249,7 +249,7 @@ void WorldSession::HandleCalendarEventInvite(WorldPacket &recv_data)
void WorldSession::HandleCalendarEventRsvp(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_RSVP");
+ sLog->outDebug("WORLD: CMSG_CALENDAR_EVENT_RSVP");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@@ -261,7 +261,7 @@ void WorldSession::HandleCalendarEventRsvp(WorldPacket &recv_data)
void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_REMOVE_INVITE");
+ sLog->outDebug("WORLD: CMSG_CALENDAR_EVENT_REMOVE_INVITE");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@@ -273,7 +273,7 @@ void WorldSession::HandleCalendarEventRemoveInvite(WorldPacket &recv_data)
void WorldSession::HandleCalendarEventStatus(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_STATUS");
+ sLog->outDebug("WORLD: CMSG_CALENDAR_EVENT_STATUS");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@@ -286,7 +286,7 @@ void WorldSession::HandleCalendarEventStatus(WorldPacket &recv_data)
void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: CMSG_CALENDAR_EVENT_MODERATOR_STATUS");
+ sLog->outDebug("WORLD: CMSG_CALENDAR_EVENT_MODERATOR_STATUS");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@@ -299,7 +299,7 @@ void WorldSession::HandleCalendarEventModeratorStatus(WorldPacket &recv_data)
void WorldSession::HandleCalendarComplain(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: CMSG_CALENDAR_COMPLAIN");
+ sLog->outDebug("WORLD: CMSG_CALENDAR_COMPLAIN");
recv_data.hexlike();
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
@@ -310,7 +310,7 @@ void WorldSession::HandleCalendarComplain(WorldPacket &recv_data)
void WorldSession::HandleCalendarGetNumPending(WorldPacket & /*recv_data*/)
{
- sLog.outDebug("WORLD: CMSG_CALENDAR_GET_NUM_PENDING"); // empty
+ sLog->outDebug("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
diff --git a/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp
index c956a7deaee..a3ff1bc5fe0 100755
--- a/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ChannelHandler.cpp
@@ -21,7 +21,7 @@
void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
uint32 channel_id;
uint8 unknown1, unknown2;
@@ -60,7 +60,7 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
void WorldSession::HandleLeaveChannel(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
uint32 unk;
@@ -81,7 +81,7 @@ void WorldSession::HandleLeaveChannel(WorldPacket& recvPacket)
void WorldSession::HandleChannelList(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname;
recvPacket >> channelname;
@@ -93,7 +93,7 @@ void WorldSession::HandleChannelList(WorldPacket& recvPacket)
void WorldSession::HandleChannelPassword(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, pass;
recvPacket >> channelname;
@@ -107,7 +107,7 @@ void WorldSession::HandleChannelPassword(WorldPacket& recvPacket)
void WorldSession::HandleChannelSetOwner(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, newp;
recvPacket >> channelname;
@@ -124,7 +124,7 @@ void WorldSession::HandleChannelSetOwner(WorldPacket& recvPacket)
void WorldSession::HandleChannelOwner(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname;
recvPacket >> channelname;
@@ -135,7 +135,7 @@ void WorldSession::HandleChannelOwner(WorldPacket& recvPacket)
void WorldSession::HandleChannelModerator(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
recvPacket >> channelname;
@@ -152,7 +152,7 @@ void WorldSession::HandleChannelModerator(WorldPacket& recvPacket)
void WorldSession::HandleChannelUnmoderator(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
recvPacket >> channelname;
@@ -169,7 +169,7 @@ void WorldSession::HandleChannelUnmoderator(WorldPacket& recvPacket)
void WorldSession::HandleChannelMute(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
recvPacket >> channelname;
@@ -186,7 +186,7 @@ void WorldSession::HandleChannelMute(WorldPacket& recvPacket)
void WorldSession::HandleChannelUnmute(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
@@ -204,7 +204,7 @@ void WorldSession::HandleChannelUnmute(WorldPacket& recvPacket)
void WorldSession::HandleChannelInvite(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
recvPacket >> channelname;
@@ -221,7 +221,7 @@ void WorldSession::HandleChannelInvite(WorldPacket& recvPacket)
void WorldSession::HandleChannelKick(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
recvPacket >> channelname;
@@ -237,7 +237,7 @@ void WorldSession::HandleChannelKick(WorldPacket& recvPacket)
void WorldSession::HandleChannelBan(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
recvPacket >> channelname;
@@ -254,7 +254,7 @@ void WorldSession::HandleChannelBan(WorldPacket& recvPacket)
void WorldSession::HandleChannelUnban(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname, otp;
@@ -272,7 +272,7 @@ void WorldSession::HandleChannelUnban(WorldPacket& recvPacket)
void WorldSession::HandleChannelAnnouncements(WorldPacket& recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname;
recvPacket >> channelname;
@@ -289,7 +289,7 @@ void WorldSession::HandleChannelDisplayListQuery(WorldPacket &recvPacket)
void WorldSession::HandleGetChannelMemberCount(WorldPacket &recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname;
recvPacket >> channelname;
@@ -308,7 +308,7 @@ void WorldSession::HandleGetChannelMemberCount(WorldPacket &recvPacket)
void WorldSession::HandleSetChannelWatch(WorldPacket &recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
//recvPacket.hexlike();
std::string channelname;
recvPacket >> channelname;
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
index 1873de650f2..ec1ace4fffc 100755
--- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
@@ -127,7 +127,7 @@ bool LoginQueryHolder::Initialize()
stmt->setUInt32(0, lowGuid);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADSPELLCOOLDOWNS, stmt);
- if (sWorld.getBoolConfig(CONFIG_DECLINED_NAMES_USED))
+ if (sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED))
{
stmt = CharacterDatabase.GetPreparedStatement(CHAR_LOAD_PLAYER_DECLINEDNAMES);
stmt->setUInt32(0, lowGuid);
@@ -202,7 +202,7 @@ void WorldSession::HandleCharEnum(QueryResult result)
do
{
uint32 guidlow = (*result)[0].GetUInt32();
- sLog.outDetail("Loading char guid %u from account %u.",guidlow,GetAccountId());
+ sLog->outDetail("Loading char guid %u from account %u.",guidlow,GetAccountId());
if (Player::BuildEnumData(result, &data))
++num;
}
@@ -223,7 +223,7 @@ void WorldSession::HandleCharEnumOpcode(WorldPacket & /*recv_data*/)
/// get all the data necessary for loading all characters (along with their pets) on the account
m_charEnumCallback =
CharacterDatabase.AsyncPQuery(
- !sWorld.getBoolConfig(CONFIG_DECLINED_NAMES_USED) ?
+ !sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED) ?
// ------- Query Without Declined Names --------
// 0 1 2 3 4 5 6 7
"SELECT characters.guid, characters.name, characters.race, characters.class, characters.gender, characters.playerBytes, characters.playerBytes2, characters.level, "
@@ -266,7 +266,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
if (GetSecurity() == SEC_PLAYER)
{
- if (uint32 mask = sWorld.getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED))
+ if (uint32 mask = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED))
{
bool disabled = false;
@@ -293,7 +293,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
{
data << (uint8)CHAR_CREATE_FAILED;
SendPacket(&data);
- sLog.outError("Class: %u or Race %u not found in DBC (Wrong DBC files?) or Cheater?", class_, race_);
+ sLog->outError("Class: %u or Race %u not found in DBC (Wrong DBC files?) or Cheater?", class_, race_);
return;
}
@@ -301,7 +301,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
if (raceEntry->expansion > Expansion())
{
data << (uint8)CHAR_CREATE_EXPANSION;
- sLog.outError("Expansion %u account:[%d] tried to Create character with expansion %u race (%u)",Expansion(),GetAccountId(),raceEntry->expansion,race_);
+ sLog->outError("Expansion %u account:[%d] tried to Create character with expansion %u race (%u)",Expansion(),GetAccountId(),raceEntry->expansion,race_);
SendPacket(&data);
return;
}
@@ -310,14 +310,14 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
if (classEntry->expansion > Expansion())
{
data << (uint8)CHAR_CREATE_EXPANSION_CLASS;
- sLog.outError("Expansion %u account:[%d] tried to Create character with expansion %u class (%u)",Expansion(),GetAccountId(),classEntry->expansion,class_);
+ sLog->outError("Expansion %u account:[%d] tried to Create character with expansion %u class (%u)",Expansion(),GetAccountId(),classEntry->expansion,class_);
SendPacket(&data);
return;
}
if (GetSecurity() == SEC_PLAYER)
{
- uint32 raceMaskDisabled = sWorld.getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK);
+ uint32 raceMaskDisabled = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK);
if ((1 << (race_ - 1)) & raceMaskDisabled)
{
data << uint8(CHAR_CREATE_DISABLED);
@@ -325,7 +325,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
return;
}
- uint32 classMaskDisabled = sWorld.getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED_CLASSMASK);
+ uint32 classMaskDisabled = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED_CLASSMASK);
if ((1 << (class_ - 1)) & classMaskDisabled)
{
data << uint8(CHAR_CREATE_DISABLED);
@@ -339,7 +339,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
{
data << (uint8)CHAR_NAME_NO_NAME;
SendPacket(&data);
- sLog.outError("Account:[%d] but tried to Create character with empty [name] ",GetAccountId());
+ sLog->outError("Account:[%d] but tried to Create character with empty [name] ",GetAccountId());
return;
}
@@ -372,7 +372,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
Field *fields = resultacct->Fetch();
uint32 acctcharcount = fields[0].GetUInt32();
- if (acctcharcount >= sWorld.getIntConfig(CONFIG_CHARACTERS_PER_ACCOUNT))
+ if (acctcharcount >= sWorld->getIntConfig(CONFIG_CHARACTERS_PER_ACCOUNT))
{
data << (uint8)CHAR_CREATE_ACCOUNT_LIMIT;
SendPacket(&data);
@@ -387,7 +387,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
Field *fields=result->Fetch();
charcount = fields[0].GetUInt8();
- if (charcount >= sWorld.getIntConfig(CONFIG_CHARACTERS_PER_REALM))
+ if (charcount >= sWorld->getIntConfig(CONFIG_CHARACTERS_PER_REALM))
{
data << (uint8)CHAR_CREATE_SERVER_LIMIT;
SendPacket(&data);
@@ -396,7 +396,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
}
// speedup check for heroic class disabled case
- uint32 heroic_free_slots = sWorld.getIntConfig(CONFIG_HEROIC_CHARACTERS_PER_REALM);
+ uint32 heroic_free_slots = sWorld->getIntConfig(CONFIG_HEROIC_CHARACTERS_PER_REALM);
if (heroic_free_slots == 0 && GetSecurity() == SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT)
{
data << (uint8)CHAR_CREATE_UNIQUE_CLASS_LIMIT;
@@ -405,16 +405,16 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
}
// speedup check for heroic class disabled case
- uint32 req_level_for_heroic = sWorld.getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER);
- if (GetSecurity() == SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT && req_level_for_heroic > sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ uint32 req_level_for_heroic = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_MIN_LEVEL_FOR_HEROIC_CHARACTER);
+ if (GetSecurity() == SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT && req_level_for_heroic > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
data << (uint8)CHAR_CREATE_LEVEL_REQUIREMENT;
SendPacket(&data);
return;
}
- bool AllowTwoSideAccounts = !sWorld.IsPvPRealm() || sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ACCOUNTS) || GetSecurity() > SEC_PLAYER;
- uint32 skipCinematics = sWorld.getIntConfig(CONFIG_SKIP_CINEMATICS);
+ bool AllowTwoSideAccounts = !sWorld->IsPvPRealm() || sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ACCOUNTS) || GetSecurity() > SEC_PLAYER;
+ uint32 skipCinematics = sWorld->getIntConfig(CONFIG_SKIP_CINEMATICS);
bool have_same_race = false;
@@ -528,7 +528,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
{
uint8 unk;
recv_data >> unk;
- sLog.outDebug("Character creation %s (account %u) has unhandled tail data: [%u]", name.c_str(), GetAccountId(), unk);
+ sLog->outDebug("Character creation %s (account %u) has unhandled tail data: [%u]", name.c_str(), GetAccountId(), unk);
}
Player * pNewChar = new Player(this);
@@ -562,8 +562,8 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data)
SendPacket(&data);
std::string IP_str = GetRemoteAddress();
- sLog.outDetail("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());
+ sLog->outDetail("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());
sScriptMgr->OnPlayerCreate(pNewChar);
delete pNewChar; // created only to call SaveToDB()
@@ -612,15 +612,15 @@ void WorldSession::HandleCharDeleteOpcode(WorldPacket & recv_data)
return;
std::string IP_str = GetRemoteAddress();
- sLog.outDetail("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));
+ sLog->outDetail("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));
sScriptMgr->OnPlayerDelete(guid);
- if (sLog.IsOutCharDump()) // optimize GetPlayerDump call
+ if (sLog->IsOutCharDump()) // optimize GetPlayerDump call
{
std::string dump;
if (PlayerDumpWriter().GetDump(GUID_LOPART(guid), dump))
- sLog.outCharDump(dump.c_str(),GetAccountId(),GUID_LOPART(guid),name.c_str());
+ sLog->outCharDump(dump.c_str(),GetAccountId(),GUID_LOPART(guid),name.c_str());
}
Player::DeleteFromDB(guid, GetAccountId());
@@ -634,14 +634,14 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recv_data)
{
if (PlayerLoading() || GetPlayer() != NULL)
{
- sLog.outError("Player tryes to login again, AccountId = %d",GetAccountId());
+ sLog->outError("Player tryes to login again, AccountId = %d",GetAccountId());
return;
}
m_playerLoading = true;
uint64 playerGuid = 0;
- sLog.outStaticDebug("WORLD: Recvd Player Logon Message");
+ sLog->outStaticDebug("WORLD: Recvd Player Logon Message");
recv_data >> playerGuid;
@@ -703,7 +703,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
data << (uint32)0;
uint32 linecount=0;
- std::string str_motd = sWorld.GetMotd();
+ std::string str_motd = sWorld->GetMotd();
std::string::size_type pos, nextpos;
pos = 0;
@@ -726,13 +726,13 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
data.put(0, linecount);
SendPacket(&data);
- sLog.outStaticDebug("WORLD: Sent motd (SMSG_MOTD)");
+ sLog->outStaticDebug("WORLD: Sent motd (SMSG_MOTD)");
// send server info
- if (sWorld.getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
+ if (sWorld->getIntConfig(CONFIG_ENABLE_SINFO_LOGIN) == 1)
chH.PSendSysMessage(_FULLVERSION);
- sLog.outStaticDebug("WORLD: Sent server info");
+ sLog->outStaticDebug("WORLD: Sent server info");
}
//QueryResult *result = CharacterDatabase.PQuery("SELECT guildid,rank FROM guild_member WHERE guid = '%u'",pCurrChar->GetGUIDLow());
@@ -755,7 +755,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
else
{
// remove wrong guild data
- sLog.outError("Player %s (GUID: %u) marked as member of not existing guild (id: %u), removing guild membership for player.",pCurrChar->GetName(),pCurrChar->GetGUIDLow(),pCurrChar->GetGuildId());
+ sLog->outError("Player %s (GUID: %u) marked as member of not existing guild (id: %u), removing guild membership for player.",pCurrChar->GetName(),pCurrChar->GetGUIDLow(),pCurrChar->GetGuildId());
pCurrChar->SetInGuild(0);
}
}
@@ -780,8 +780,8 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
pCurrChar->SendCinematicStart(rEntry->CinematicSequence);
// send new char string if not empty
- if (!sWorld.GetNewCharString().empty())
- chH.PSendSysMessage("%s", sWorld.GetNewCharString().c_str());
+ if (!sWorld->GetNewCharString().empty())
+ chH.PSendSysMessage("%s", sWorld->GetNewCharString().c_str());
}
}
@@ -794,8 +794,8 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
pCurrChar->TeleportTo(pCurrChar->m_homebindMapId, pCurrChar->m_homebindX, pCurrChar->m_homebindY, pCurrChar->m_homebindZ, pCurrChar->GetOrientation());
}
- sObjectAccessor.AddObject(pCurrChar);
- //sLog.outDebug("Player %s added to Map.",pCurrChar->GetName());
+ sObjectAccessor->AddObject(pCurrChar);
+ //sLog->outDebug("Player %s added to Map.",pCurrChar->GetName());
pCurrChar->SendInitialPacketsAfterAddToMap();
@@ -838,7 +838,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
pCurrChar->LoadPet();
// Set FFA PvP for non GM in non-rest mode
- if (sWorld.IsFFAPvPRealm() && !pCurrChar->isGameMaster() && !pCurrChar->HasFlag(PLAYER_FLAGS,PLAYER_FLAGS_RESTING))
+ if (sWorld->IsFFAPvPRealm() && !pCurrChar->isGameMaster() && !pCurrChar->HasFlag(PLAYER_FLAGS,PLAYER_FLAGS_RESTING))
pCurrChar->SetByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
if (pCurrChar->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_CONTESTED_PVP))
@@ -862,17 +862,17 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
pCurrChar->RemoveAtLoginFlag(AT_LOGIN_FIRST);
// show time before shutdown if shutdown planned.
- if (sWorld.IsShutdowning())
- sWorld.ShutdownMsg(true,pCurrChar);
+ if (sWorld->IsShutdowning())
+ sWorld->ShutdownMsg(true,pCurrChar);
- if (sWorld.getBoolConfig(CONFIG_ALL_TAXI_PATHS))
+ if (sWorld->getBoolConfig(CONFIG_ALL_TAXI_PATHS))
pCurrChar->SetTaxiCheater(true);
if (pCurrChar->isGameMaster())
SendNotification(LANG_GM_ON);
std::string IP_str = GetRemoteAddress();
- sLog.outChar("Account: %d (IP: %s) Login Character:[%s] (GUID: %u)",
+ sLog->outChar("Account: %d (IP: %s) Login Character:[%s] (GUID: %u)",
GetAccountId(),IP_str.c_str(),pCurrChar->GetName() ,pCurrChar->GetGUIDLow());
if (!pCurrChar->IsStandState() && !pCurrChar->HasUnitState(UNIT_STAT_STUNNED))
@@ -886,7 +886,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
void WorldSession::HandleSetFactionAtWar(WorldPacket & recv_data)
{
- sLog.outStaticDebug("WORLD: Received CMSG_SET_FACTION_ATWAR");
+ sLog->outStaticDebug("WORLD: Received CMSG_SET_FACTION_ATWAR");
uint32 repListID;
uint8 flag;
@@ -900,7 +900,7 @@ void WorldSession::HandleSetFactionAtWar(WorldPacket & recv_data)
//I think this function is never used :/ I dunno, but i guess this opcode not exists
void WorldSession::HandleSetFactionCheat(WorldPacket & /*recv_data*/)
{
- sLog.outError("WORLD SESSION: HandleSetFactionCheat, not expected call, please report.");
+ sLog->outError("WORLD SESSION: HandleSetFactionCheat, not expected call, please report.");
/*
uint32 FactionID;
uint32 Standing;
@@ -925,7 +925,7 @@ void WorldSession::HandleSetFactionCheat(WorldPacket & /*recv_data*/)
void WorldSession::HandleMeetingStoneInfo(WorldPacket & /*recv_data*/)
{
- sLog.outStaticDebug("WORLD: Received CMSG_MEETING_STONE_INFO");
+ sLog->outStaticDebug("WORLD: Received CMSG_MEETING_STONE_INFO");
//SendLfgUpdate(0, 0, 0);
}
@@ -938,7 +938,7 @@ void WorldSession::HandleTutorialFlag(WorldPacket & recv_data)
uint32 wInt = (iFlag / 32);
if (wInt >= 8)
{
- //sLog.outError("CHEATER? Account:[%d] Guid[%u] tried to send wrong CMSG_TUTORIAL_FLAG", GetAccountId(),GetGUID());
+ //sLog->outError("CHEATER? Account:[%d] Guid[%u] tried to send wrong CMSG_TUTORIAL_FLAG", GetAccountId(),GetGUID());
return;
}
uint32 rInt = (iFlag % 32);
@@ -947,7 +947,7 @@ void WorldSession::HandleTutorialFlag(WorldPacket & recv_data)
tutflag |= (1 << rInt);
SetTutorialInt(wInt, tutflag);
- //sLog.outDebug("Received Tutorial Flag Set {%u}.", iFlag);
+ //sLog->outDebug("Received Tutorial Flag Set {%u}.", iFlag);
}
void WorldSession::HandleTutorialClear(WorldPacket & /*recv_data*/)
@@ -964,7 +964,7 @@ void WorldSession::HandleTutorialReset(WorldPacket & /*recv_data*/)
void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recv_data)
{
- sLog.outStaticDebug("WORLD: Received CMSG_SET_WATCHED_FACTION");
+ sLog->outStaticDebug("WORLD: Received CMSG_SET_WATCHED_FACTION");
uint32 fact;
recv_data >> fact;
GetPlayer()->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, fact);
@@ -972,7 +972,7 @@ void WorldSession::HandleSetWatchedFactionOpcode(WorldPacket & recv_data)
void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recv_data)
{
- sLog.outStaticDebug("WORLD: Received CMSG_SET_FACTION_INACTIVE");
+ sLog->outStaticDebug("WORLD: Received CMSG_SET_FACTION_INACTIVE");
uint32 replistid;
uint8 inactive;
recv_data >> replistid >> inactive;
@@ -982,13 +982,13 @@ void WorldSession::HandleSetFactionInactiveOpcode(WorldPacket & recv_data)
void WorldSession::HandleShowingHelmOpcode(WorldPacket & /*recv_data*/)
{
- sLog.outStaticDebug("CMSG_SHOWING_HELM for %s", _player->GetName());
+ sLog->outStaticDebug("CMSG_SHOWING_HELM for %s", _player->GetName());
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM);
}
void WorldSession::HandleShowingCloakOpcode(WorldPacket & /*recv_data*/)
{
- sLog.outStaticDebug("CMSG_SHOWING_CLOAK for %s", _player->GetName());
+ sLog->outStaticDebug("CMSG_SHOWING_CLOAK for %s", _player->GetName());
_player->ToggleFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK);
}
@@ -1058,7 +1058,7 @@ void WorldSession::HandleChangePlayerNameOpcodeCallBack(QueryResult result, std:
CharacterDatabase.PExecute("UPDATE characters set name = '%s', at_login = at_login & ~ %u WHERE guid ='%u'", newname.c_str(), uint32(AT_LOGIN_RENAME), guidLow);
CharacterDatabase.PExecute("DELETE FROM character_declinedname WHERE guid ='%u'", guidLow);
- sLog.outChar("Account: %d (IP: %s) Character:[%s] (guid:%u) Changed name to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldname.c_str(), guidLow, newname.c_str());
+ sLog->outChar("Account: %d (IP: %s) Character:[%s] (guid:%u) Changed name to: %s", GetAccountId(), GetRemoteAddress().c_str(), oldname.c_str(), guidLow, newname.c_str());
WorldPacket data(SMSG_CHAR_RENAME, 1+8+(newname.size()+1));
data << uint8(RESPONSE_SUCCESS);
@@ -1156,7 +1156,7 @@ void WorldSession::HandleSetPlayerDeclinedNames(WorldPacket& recv_data)
void WorldSession::HandleAlterAppearance(WorldPacket & recv_data)
{
- sLog.outDebug("CMSG_ALTER_APPEARANCE");
+ sLog->outDebug("CMSG_ALTER_APPEARANCE");
uint32 Hair, Color, FacialHair, SkinColor;
recv_data >> Hair >> Color >> FacialHair >> SkinColor;
@@ -1216,7 +1216,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);
+ sLog->outDebug("Client sent wrong glyph slot number in opcode CMSG_REMOVE_GLYPH %u", slot);
return;
}
@@ -1306,7 +1306,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
{
std::string oldname = result->Fetch()[0].GetString();
std::string IP_str = GetRemoteAddress();
- sLog.outChar("Account: %d (IP: %s), Character[%s] (guid:%u) Customized to: %s", GetAccountId(), IP_str.c_str(), oldname.c_str(), GUID_LOPART(guid), newname.c_str());
+ sLog->outChar("Account: %d (IP: %s), Character[%s] (guid:%u) Customized to: %s", GetAccountId(), IP_str.c_str(), oldname.c_str(), GUID_LOPART(guid), newname.c_str());
}
Player::Customize(guid, gender, skin, face, hairStyle, hairColor, facialHair);
CharacterDatabase.PExecute("UPDATE characters set name = '%s', at_login = at_login & ~ %u WHERE guid ='%u'", newname.c_str(), uint32(AT_LOGIN_CUSTOMIZE), GUID_LOPART(guid));
@@ -1327,7 +1327,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recv_data)
void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data)
{
- sLog.outDebug("CMSG_EQUIPMENT_SET_SAVE");
+ sLog->outDebug("CMSG_EQUIPMENT_SET_SAVE");
uint64 setGuid;
recv_data.readPackGUID(setGuid);
@@ -1371,7 +1371,7 @@ void WorldSession::HandleEquipmentSetSave(WorldPacket &recv_data)
void WorldSession::HandleEquipmentSetDelete(WorldPacket &recv_data)
{
- sLog.outDebug("CMSG_EQUIPMENT_SET_DELETE");
+ sLog->outDebug("CMSG_EQUIPMENT_SET_DELETE");
uint64 setGuid;
recv_data.readPackGUID(setGuid);
@@ -1381,7 +1381,7 @@ void WorldSession::HandleEquipmentSetDelete(WorldPacket &recv_data)
void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
{
- sLog.outDebug("CMSG_EQUIPMENT_SET_USE");
+ sLog->outDebug("CMSG_EQUIPMENT_SET_USE");
recv_data.hexlike();
for (uint32 i = 0; i < EQUIPMENT_SLOT_END; ++i)
@@ -1392,7 +1392,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
uint8 srcbag, srcslot;
recv_data >> srcbag >> srcslot;
- sLog.outDebug("Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot);
+ sLog->outDebug("Item " UI64FMTD ": srcbag %u, srcslot %u", itemGuid, srcbag, srcslot);
Item *item = _player->GetItemByGuid(itemGuid);
@@ -1472,7 +1472,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
if (GetSecurity() == SEC_PLAYER)
{
- uint32 raceMaskDisabled = sWorld.getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK);
+ uint32 raceMaskDisabled = sWorld->getIntConfig(CONFIG_CHARACTER_CREATING_DISABLED_RACEMASK);
if ((1 << (race - 1)) & raceMaskDisabled)
{
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1);
@@ -1671,13 +1671,13 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
trans->PAppend("DELETE FROM `character_queststatus` WHERE guid='%u' AND quest IN (%s)", lowGuid, questsStr.c_str());
}
- if (!sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD))
+ if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD))
{
// Reset guild
trans->PAppend("DELETE FROM `guild_member` WHERE `guid`= '%u'", lowGuid);
}
- if (!sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND))
+ if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND))
{
// Delete Friend List
trans->PAppend("DELETE FROM `character_social` WHERE `guid`= '%u'", lowGuid);
@@ -1746,7 +1746,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
CharacterDatabase.CommitTransaction(trans);
std::string IP_str = GetRemoteAddress();
- sLog.outDebug("Account: %d (IP: %s), Character guid: %u Change Race/Faction to: %s", GetAccountId(), IP_str.c_str(), lowGuid, newname.c_str());
+ sLog->outDebug("Account: %d (IP: %s), Character guid: %u Change Race/Faction to: %s", GetAccountId(), IP_str.c_str(), lowGuid, newname.c_str());
WorldPacket data(SMSG_CHAR_FACTION_CHANGE, 1 + 8 + (newname.size() + 1) + 1 + 1 + 1 + 1 + 1 + 1 + 1);
data << uint8(RESPONSE_SUCCESS);
diff --git a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
index d236c7f0196..cb1969c5b32 100755
--- a/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ChatHandler.cpp
@@ -44,15 +44,15 @@ bool WorldSession::processChatmessageFurtherAfterSecurityChecks(std::string& msg
if (lang != LANG_ADDON)
{
// strip invisible characters for non-addon messages
- if (sWorld.getBoolConfig(CONFIG_CHAT_FAKE_MESSAGE_PREVENTING))
+ if (sWorld->getBoolConfig(CONFIG_CHAT_FAKE_MESSAGE_PREVENTING))
stripLineInvisibleChars(msg);
- if (sWorld.getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY) && GetSecurity() < SEC_MODERATOR
+ if (sWorld->getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_SEVERITY) && GetSecurity() < SEC_MODERATOR
&& !ChatHandler(this).isValidChatMessage(msg.c_str()))
{
- sLog.outError("Player %s (GUID: %u) sent a chatmessage with an invalid link: %s", GetPlayer()->GetName(),
+ sLog->outError("Player %s (GUID: %u) sent a chatmessage with an invalid link: %s", GetPlayer()->GetName(),
GetPlayer()->GetGUIDLow(), msg.c_str());
- if (sWorld.getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_KICK))
+ if (sWorld->getIntConfig(CONFIG_CHAT_STRICT_LINK_CHECKING_KICK))
KickPlayer();
return false;
}
@@ -71,11 +71,11 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
if (type >= MAX_CHAT_MSG_TYPE)
{
- sLog.outError("CHAT: Wrong message type received: %u", type);
+ sLog->outError("CHAT: Wrong message type received: %u", type);
return;
}
- //sLog.outDebug("CHAT: packet received. type %u, lang %u", type, lang);
+ //sLog->outDebug("CHAT: packet received. type %u, lang %u", type, lang);
// prevent talking at unknown language (cheating)
LanguageDesc const* langDesc = GetLanguageDescByID(lang);
@@ -106,14 +106,14 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
if (lang == LANG_ADDON)
{
- if (sWorld.getBoolConfig(CONFIG_CHATLOG_ADDON))
+ if (sWorld->getBoolConfig(CONFIG_CHATLOG_ADDON))
{
std::string msg = "";
recv_data >> msg;
if (msg.empty())
{
- sLog.outDebug("Player %s send empty addon msg", GetPlayer()->GetName());
+ sLog->outDebug("Player %s send empty addon msg", GetPlayer()->GetName());
return;
}
@@ -121,7 +121,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
}
// Disabled addon channel?
- if (!sWorld.getBoolConfig(CONFIG_ADDON_CHANNEL))
+ if (!sWorld->getBoolConfig(CONFIG_ADDON_CHANNEL))
return;
}
// LANG_ADDON should not be changed nor be affected by flood control
@@ -133,7 +133,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
else
{
// send in universal language in two side iteration allowed mode
- if (sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT))
+ if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT))
lang = LANG_UNIVERSAL;
else
{
@@ -145,13 +145,13 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
case CHAT_MSG_RAID_LEADER:
case CHAT_MSG_RAID_WARNING:
// allow two side chat at group channel if two side group allowed
- if (sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
+ if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
lang = LANG_UNIVERSAL;
break;
case CHAT_MSG_GUILD:
case CHAT_MSG_OFFICER:
// allow two side chat at guild channel if two side guild allowed
- if (sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD))
+ if (sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD))
lang = LANG_UNIVERSAL;
break;
}
@@ -237,9 +237,9 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
case CHAT_MSG_EMOTE:
case CHAT_MSG_YELL:
{
- if (_player->getLevel() < sWorld.getIntConfig(CONFIG_CHAT_SAY_LEVEL_REQ))
+ if (_player->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_SAY_LEVEL_REQ))
{
- SendNotification(GetTrinityString(LANG_SAY_REQ), sWorld.getIntConfig(CONFIG_CHAT_SAY_LEVEL_REQ));
+ SendNotification(GetTrinityString(LANG_SAY_REQ), sWorld->getIntConfig(CONFIG_CHAT_SAY_LEVEL_REQ));
return;
}
@@ -252,9 +252,9 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
} break;
case CHAT_MSG_WHISPER:
{
- if (_player->getLevel() < sWorld.getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ))
+ if (_player->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ))
{
- SendNotification(GetTrinityString(LANG_WHISPER_REQ), sWorld.getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
+ SendNotification(GetTrinityString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
return;
}
@@ -273,7 +273,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
return;
}
- if (!sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT) && tSecurity == SEC_PLAYER && pSecurity == SEC_PLAYER)
+ if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT) && tSecurity == SEC_PLAYER && pSecurity == SEC_PLAYER)
{
uint32 sidea = GetPlayer()->GetTeam();
uint32 sideb = player->GetTeam();
@@ -412,9 +412,9 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
} break;
case CHAT_MSG_CHANNEL:
{
- if (_player->getLevel() < sWorld.getIntConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ))
+ if (_player->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ))
{
- SendNotification(GetTrinityString(LANG_CHANNEL_REQ), sWorld.getIntConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ));
+ SendNotification(GetTrinityString(LANG_CHANNEL_REQ), sWorld->getIntConfig(CONFIG_CHAT_CHANNEL_LEVEL_REQ));
return;
}
@@ -466,7 +466,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket & recv_data)
}
} break;
default:
- sLog.outError("CHAT: unknown message type %u, lang: %u", type, lang);
+ sLog->outError("CHAT: unknown message type %u, lang: %u", type, lang);
break;
}
}
@@ -566,9 +566,9 @@ void WorldSession::HandleTextEmoteOpcode(WorldPacket & recv_data)
Trinity::EmoteChatBuilder emote_builder(*GetPlayer(), text_emote, emoteNum, unit);
Trinity::LocalizedPacketDo<Trinity::EmoteChatBuilder > emote_do(emote_builder);
- Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::EmoteChatBuilder > > emote_worker(GetPlayer(), sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE), emote_do);
+ Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::EmoteChatBuilder > > emote_worker(GetPlayer(), sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE), emote_do);
TypeContainerVisitor<Trinity::PlayerDistWorker<Trinity::LocalizedPacketDo<Trinity::EmoteChatBuilder> >, WorldTypeMapContainer> message(emote_worker);
- cell.Visit(p, message, *GetPlayer()->GetMap(), *GetPlayer(), sWorld.getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE));
+ cell.Visit(p, message, *GetPlayer()->GetMap(), *GetPlayer(), sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_TEXTEMOTE));
GetPlayer()->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_DO_EMOTE, text_emote, 0, unit);
@@ -581,7 +581,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recv_data)
{
uint64 iguid;
uint8 unk;
- //sLog.outDebug("WORLD: Received CMSG_CHAT_IGNORED");
+ //sLog->outDebug("WORLD: Received CMSG_CHAT_IGNORED");
recv_data >> iguid;
recv_data >> unk; // probably related to spam reporting
@@ -597,7 +597,7 @@ void WorldSession::HandleChatIgnoredOpcode(WorldPacket& recv_data)
void WorldSession::HandleChannelDeclineInvite(WorldPacket &recvPacket)
{
- sLog.outDebug("Opcode %u", recvPacket.GetOpcode());
+ sLog->outDebug("Opcode %u", recvPacket.GetOpcode());
}
void WorldSession::SendPlayerNotFoundNotice(std::string name)
diff --git a/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp b/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp
index 146255493e3..8c8faf80b60 100755
--- a/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CombatHandler.cpp
@@ -29,16 +29,16 @@ void WorldSession::HandleAttackSwingOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
- sLog.outStaticDebug("WORLD: Recvd CMSG_ATTACKSWING Message guidlow:%u guidhigh:%u", GUID_LOPART(guid), GUID_HIPART(guid));
+ sLog->outStaticDebug("WORLD: Recvd CMSG_ATTACKSWING Message guidlow:%u guidhigh:%u", GUID_LOPART(guid), GUID_HIPART(guid));
Unit *pEnemy = ObjectAccessor::GetUnit(*_player, guid);
if (!pEnemy)
{
if (!IS_UNIT_GUID(guid))
- sLog.outError("WORLD: Object %u (TypeID: %u) isn't player, pet or creature",GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
+ sLog->outError("WORLD: Object %u (TypeID: %u) isn't player, pet or creature",GUID_LOPART(guid),GuidHigh2TypeId(GUID_HIPART(guid)));
else
- sLog.outError("WORLD: Enemy %s %u not found",GetLogNameForGuid(guid),GUID_LOPART(guid));
+ sLog->outError("WORLD: Enemy %s %u not found",GetLogNameForGuid(guid),GUID_LOPART(guid));
// stop attack state at client
SendAttackStop(NULL);
@@ -47,7 +47,7 @@ void WorldSession::HandleAttackSwingOpcode(WorldPacket & recv_data)
if (!_player->canAttack(pEnemy))
{
- sLog.outError("WORLD: Enemy %s %u is friendly",(IS_PLAYER_GUID(guid) ? "player" : "creature"),GUID_LOPART(guid));
+ sLog->outError("WORLD: Enemy %s %u is friendly",(IS_PLAYER_GUID(guid) ? "player" : "creature"),GUID_LOPART(guid));
// stop attack state at client
SendAttackStop(pEnemy);
@@ -67,11 +67,11 @@ 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);
+ //sLog->outDebug("WORLD: Recvd CMSG_SETSHEATHED Message guidlow:%u value1:%u", GetPlayer()->GetGUIDLow(), sheathed);
if (sheathed >= MAX_SHEATH_STATE)
{
- sLog.outError("Unknown sheath state %u ??",sheathed);
+ sLog->outError("Unknown sheath state %u ??",sheathed);
return;
}
diff --git a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp b/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp
index 580ccbca660..bbc646f55e3 100755
--- a/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/DuelHandler.cpp
@@ -41,9 +41,9 @@ 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");
- sLog.outStaticDebug("Player 1 is: %u (%s)", pl->GetGUIDLow(),pl->GetName());
- sLog.outStaticDebug("Player 2 is: %u (%s)", plTarget->GetGUIDLow(),plTarget->GetName());
+ //sLog->outDebug("WORLD: received CMSG_DUEL_ACCEPTED");
+ sLog->outStaticDebug("Player 1 is: %u (%s)", pl->GetGUIDLow(),pl->GetName());
+ sLog->outStaticDebug("Player 2 is: %u (%s)", plTarget->GetGUIDLow(),plTarget->GetName());
time_t now = time(NULL);
pl->duel->startTimer = now;
@@ -55,7 +55,7 @@ void WorldSession::HandleDuelAcceptedOpcode(WorldPacket& recvPacket)
void WorldSession::HandleDuelCancelledOpcode(WorldPacket& recvPacket)
{
- //sLog.outDebug("WORLD: received CMSG_DUEL_CANCELLED");
+ //sLog->outDebug("WORLD: received CMSG_DUEL_CANCELLED");
// no duel requested
if (!GetPlayer()->duel)
diff --git a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
index cc395d4e5b7..0064181d2d0 100755
--- a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp
@@ -80,11 +80,11 @@ void WorldSession::HandleGroupInviteOpcode(WorldPacket & recv_data)
}
// restrict invite to GMs
- if (!sWorld.getBoolConfig(CONFIG_ALLOW_GM_GROUP) && !GetPlayer()->isGameMaster() && player->isGameMaster())
+ if (!sWorld->getBoolConfig(CONFIG_ALLOW_GM_GROUP) && !GetPlayer()->isGameMaster() && player->isGameMaster())
return;
// can't group with
- if (!sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP) && GetPlayer()->GetTeam() != player->GetTeam())
+ if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP) && GetPlayer()->GetTeam() != player->GetTeam())
{
SendPartyResult(PARTY_OP_INVITE, membername, ERR_PLAYER_WRONG_FACTION);
return;
@@ -197,7 +197,7 @@ void WorldSession::HandleGroupAcceptOpcode(WorldPacket& recv_data)
if (group->GetLeaderGUID() == GetPlayer()->GetGUID())
{
- sLog.outError("HandleGroupAcceptOpcode: player %s(%d) tried to accept an invite to his own group", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow());
+ sLog->outError("HandleGroupAcceptOpcode: player %s(%d) tried to accept an invite to his own group", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow());
return;
}
@@ -262,7 +262,7 @@ void WorldSession::HandleGroupUninviteGuidOpcode(WorldPacket & recv_data)
//can't uninvite yourself
if (guid == GetPlayer()->GetGUID())
{
- sLog.outError("WorldSession::HandleGroupUninviteGuidOpcode: leader %s(%d) tried to uninvite himself from the group.", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow());
+ sLog->outError("WorldSession::HandleGroupUninviteGuidOpcode: leader %s(%d) tried to uninvite himself from the group.", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow());
return;
}
@@ -304,7 +304,7 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recv_data)
// can't uninvite yourself
if (GetPlayer()->GetName() == membername)
{
- sLog.outError("WorldSession::HandleGroupUninviteOpcode: leader %s(%d) tried to uninvite himself from the group.", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow());
+ sLog->outError("WorldSession::HandleGroupUninviteOpcode: leader %s(%d) tried to uninvite himself from the group.", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow());
return;
}
@@ -410,7 +410,7 @@ void WorldSession::HandleLootRoll(WorldPacket &recv_data)
recv_data >> NumberOfPlayers;
recv_data >> rollType; //0: pass, 1: need, 2: greed
- //sLog.outDebug("WORLD RECIEVE CMSG_LOOT_ROLL, From:%u, Numberofplayers:%u, Choise:%u", (uint32)Guid, NumberOfPlayers, Choise);
+ //sLog->outDebug("WORLD RECIEVE CMSG_LOOT_ROLL, From:%u, Numberofplayers:%u, Choise:%u", (uint32)Guid, NumberOfPlayers, Choise);
Group* group = GetPlayer()->GetGroup();
if (!group)
@@ -439,7 +439,7 @@ void WorldSession::HandleMinimapPingOpcode(WorldPacket& recv_data)
recv_data >> x;
recv_data >> y;
- //sLog.outDebug("Received opcode MSG_MINIMAP_PING X: %f, Y: %f", x, y);
+ //sLog->outDebug("Received opcode MSG_MINIMAP_PING X: %f, Y: %f", x, y);
/** error handling **/
/********************/
@@ -466,7 +466,7 @@ void WorldSession::HandleRandomRollOpcode(WorldPacket& recv_data)
// everything's fine, do it
roll = urand(minimum, maximum);
- //sLog.outDebug("ROLL: MIN: %u, MAX: %u, ROLL: %u", minimum, maximum, roll);
+ //sLog->outDebug("ROLL: MIN: %u, MAX: %u, ROLL: %u", minimum, maximum, roll);
WorldPacket data(MSG_RANDOM_ROLL, 4+4+4+8);
data << uint32(minimum);
@@ -586,7 +586,7 @@ void WorldSession::HandleGroupAssistantLeaderOpcode(WorldPacket & recv_data)
void WorldSession::HandlePartyAssignmentOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("MSG_PARTY_ASSIGNMENT");
+ sLog->outDebug("MSG_PARTY_ASSIGNMENT");
Group *group = GetPlayer()->GetGroup();
if (!group)
@@ -828,7 +828,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");
+ sLog->outDebug("WORLD: Received CMSG_REQUEST_PARTY_MEMBER_STATS");
uint64 Guid;
recv_data >> Guid;
@@ -924,12 +924,12 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode(WorldPacket &recv_data)
/*void WorldSession::HandleGroupCancelOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: got CMSG_GROUP_CANCEL.");
+ sLog->outDebug("WORLD: got CMSG_GROUP_CANCEL.");
}*/
void WorldSession::HandleOptOutOfLootOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_OPT_OUT_OF_LOOT");
+ sLog->outDebug("WORLD: Received CMSG_OPT_OUT_OF_LOOT");
uint32 passOnLoot;
recv_data >> passOnLoot; // 1 always pass, 0 do not pass
@@ -938,7 +938,7 @@ void WorldSession::HandleOptOutOfLootOpcode(WorldPacket & recv_data)
if (!GetPlayer()) // needed because STATUS_AUTHED
{
if (passOnLoot != 0)
- sLog.outError("CMSG_OPT_OUT_OF_LOOT value<>0 for not-loaded character!");
+ sLog->outError("CMSG_OPT_OUT_OF_LOOT value<>0 for not-loaded character!");
return;
}
diff --git a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp b/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp
index cbd443ec4fe..a6edee2701e 100755
--- a/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/GuildHandler.cpp
@@ -41,7 +41,7 @@ inline Guild* _GetPlayerGuild(WorldSession* session, bool sendError = false)
void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_QUERY");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_QUERY");
uint32 guildId;
recvPacket >> guildId;
@@ -54,7 +54,7 @@ void WorldSession::HandleGuildQueryOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_CREATE");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_CREATE");
std::string name;
recvPacket >> name;
@@ -71,7 +71,7 @@ void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_INVITE");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_INVITE");
std::string invitedName;
recvPacket >> invitedName;
@@ -83,7 +83,7 @@ void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_REMOVE");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_REMOVE");
std::string playerName;
recvPacket >> playerName;
@@ -95,7 +95,7 @@ void WorldSession::HandleGuildRemoveOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_ACCEPT");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_ACCEPT");
// Player cannot be in guild
if (!GetPlayer()->GetGuildId())
// Guild where player was invited must exist
@@ -105,7 +105,7 @@ void WorldSession::HandleGuildAcceptOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_DECLINE");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_DECLINE");
GetPlayer()->SetGuildIdInvited(0);
GetPlayer()->SetInGuild(0);
@@ -113,7 +113,7 @@ void WorldSession::HandleGuildDeclineOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_INFO");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_INFO");
if (Guild* pGuild = _GetPlayerGuild(this, true))
pGuild->SendInfo(this);
@@ -121,7 +121,7 @@ void WorldSession::HandleGuildInfoOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildRosterOpcode(WorldPacket& /*recvPacket*/)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_ROSTER");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_ROSTER");
if (Guild* pGuild = _GetPlayerGuild(this))
pGuild->HandleRoster(this);
@@ -129,7 +129,7 @@ void WorldSession::HandleGuildRosterOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_PROMOTE");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_PROMOTE");
std::string playerName;
recvPacket >> playerName;
@@ -141,7 +141,7 @@ void WorldSession::HandleGuildPromoteOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_DEMOTE");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_DEMOTE");
std::string playerName;
recvPacket >> playerName;
@@ -153,7 +153,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_LEAVE");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_LEAVE");
if (Guild* pGuild = _GetPlayerGuild(this, true))
pGuild->HandleLeaveMember(this);
@@ -161,7 +161,7 @@ void WorldSession::HandleGuildLeaveOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildDisbandOpcode(WorldPacket& /*recvPacket*/)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_DISBAND");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_DISBAND");
if (Guild* pGuild = _GetPlayerGuild(this, true))
pGuild->HandleDisband(this);
@@ -169,7 +169,7 @@ void WorldSession::HandleGuildDisbandOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_LEADER");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_LEADER");
std::string name;
recvPacket >> name;
@@ -181,7 +181,7 @@ void WorldSession::HandleGuildLeaderOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_MOTD");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_MOTD");
std::string motd; // Empty by default
if (!recvPacket.empty())
@@ -193,7 +193,7 @@ void WorldSession::HandleGuildMOTDOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_SET_PUBLIC_NOTE");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_SET_PUBLIC_NOTE");
std::string playerName;
recvPacket >> playerName;
@@ -208,7 +208,7 @@ void WorldSession::HandleGuildSetPublicNoteOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_SET_OFFICER_NOTE");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_SET_OFFICER_NOTE");
std::string playerName;
recvPacket >> playerName;
@@ -223,7 +223,7 @@ void WorldSession::HandleGuildSetOfficerNoteOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_RANK");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_RANK");
Guild* pGuild = _GetPlayerGuild(this, true);
if (!pGuild)
@@ -261,7 +261,7 @@ void WorldSession::HandleGuildRankOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_ADD_RANK");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_ADD_RANK");
std::string rankName;
recvPacket >> rankName;
@@ -272,7 +272,7 @@ void WorldSession::HandleGuildAddRankOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGuildDelRankOpcode(WorldPacket& /*recvPacket*/)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_DEL_RANK");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_DEL_RANK");
if (Guild* pGuild = _GetPlayerGuild(this, true))
pGuild->HandleRemoveLowestRank(this);
@@ -280,7 +280,7 @@ void WorldSession::HandleGuildDelRankOpcode(WorldPacket& /*recvPacket*/)
void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received CMSG_GUILD_INFO_TEXT");
+ sLog->outDebug("WORLD: Received CMSG_GUILD_INFO_TEXT");
std::string info;
recvPacket >> info;
@@ -291,7 +291,7 @@ void WorldSession::HandleGuildChangeInfoTextOpcode(WorldPacket& recvPacket)
void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: Received MSG_SAVE_GUILD_EMBLEM");
+ sLog->outDebug("WORLD: Received MSG_SAVE_GUILD_EMBLEM");
uint64 vendorGuid;
recvPacket >> vendorGuid;
@@ -315,13 +315,13 @@ void WorldSession::HandleSaveGuildEmblemOpcode(WorldPacket& recvPacket)
{
// "That's not an emblem vendor!"
Guild::SendSaveEmblemResult(this, ERR_GUILDEMBLEM_INVALIDVENDOR);
- sLog.outDebug("WORLD: HandleSaveGuildEmblemOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(vendorGuid));
+ sLog->outDebug("WORLD: HandleSaveGuildEmblemOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(vendorGuid));
}
}
void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
{
- sLog.outDebug("WORLD: Received (MSG_GUILD_EVENT_LOG_QUERY)");
+ sLog->outDebug("WORLD: Received (MSG_GUILD_EVENT_LOG_QUERY)");
if (Guild* pGuild = _GetPlayerGuild(this))
pGuild->SendEventLog(this);
@@ -329,7 +329,7 @@ void WorldSession::HandleGuildEventLogQueryOpcode(WorldPacket& /* recvPacket */)
void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket & /* recv_data */)
{
- sLog.outDebug("WORLD: Received (MSG_GUILD_BANK_MONEY_WITHDRAWN)");
+ sLog->outDebug("WORLD: Received (MSG_GUILD_BANK_MONEY_WITHDRAWN)");
if (Guild* pGuild = _GetPlayerGuild(this))
pGuild->SendMoneyInfo(this);
@@ -337,7 +337,7 @@ void WorldSession::HandleGuildBankMoneyWithdrawn(WorldPacket & /* recv_data */)
void WorldSession::HandleGuildPermissions(WorldPacket& /* recv_data */)
{
- sLog.outDebug("WORLD: Received (MSG_GUILD_PERMISSIONS)");
+ sLog->outDebug("WORLD: Received (MSG_GUILD_PERMISSIONS)");
if (Guild* pGuild = _GetPlayerGuild(this))
pGuild->SendPermissions(this);
@@ -346,7 +346,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)");
+ sLog->outDebug("WORLD: Received (CMSG_GUILD_BANKER_ACTIVATE)");
uint64 GoGuid;
recv_data >> GoGuid;
@@ -366,7 +366,7 @@ void WorldSession::HandleGuildBankerActivate(WorldPacket & recv_data)
// Called when opening pGuild bank tab only (first one)
void WorldSession::HandleGuildBankQueryTab(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_QUERY_TAB)");
+ sLog->outDebug("WORLD: Received (CMSG_GUILD_BANK_QUERY_TAB)");
uint64 GoGuid;
recv_data >> GoGuid;
@@ -384,7 +384,7 @@ void WorldSession::HandleGuildBankQueryTab(WorldPacket & recv_data)
void WorldSession::HandleGuildBankDepositMoney(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_DEPOSIT_MONEY)");
+ sLog->outDebug("WORLD: Received (CMSG_GUILD_BANK_DEPOSIT_MONEY)");
uint64 GoGuid;
recv_data >> GoGuid;
@@ -400,7 +400,7 @@ void WorldSession::HandleGuildBankDepositMoney(WorldPacket & recv_data)
void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_WITHDRAW_MONEY)");
+ sLog->outDebug("WORLD: Received (CMSG_GUILD_BANK_WITHDRAW_MONEY)");
uint64 GoGuid;
recv_data >> GoGuid;
@@ -416,7 +416,7 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPacket & recv_data)
void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_SWAP_ITEMS)");
+ sLog->outDebug("WORLD: Received (CMSG_GUILD_BANK_SWAP_ITEMS)");
uint64 GoGuid;
recv_data >> GoGuid;
@@ -497,7 +497,7 @@ void WorldSession::HandleGuildBankSwapItems(WorldPacket & recv_data)
void WorldSession::HandleGuildBankBuyTab(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_BUY_TAB)");
+ sLog->outDebug("WORLD: Received (CMSG_GUILD_BANK_BUY_TAB)");
uint64 GoGuid;
recv_data >> GoGuid;
@@ -512,7 +512,7 @@ void WorldSession::HandleGuildBankBuyTab(WorldPacket & recv_data)
void WorldSession::HandleGuildBankUpdateTab(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received (CMSG_GUILD_BANK_UPDATE_TAB)");
+ sLog->outDebug("WORLD: Received (CMSG_GUILD_BANK_UPDATE_TAB)");
uint64 GoGuid;
recv_data >> GoGuid;
@@ -534,7 +534,7 @@ void WorldSession::HandleGuildBankUpdateTab(WorldPacket & recv_data)
void WorldSession::HandleGuildBankLogQuery(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received (MSG_GUILD_BANK_LOG_QUERY)");
+ sLog->outDebug("WORLD: Received (MSG_GUILD_BANK_LOG_QUERY)");
uint8 tabId;
recv_data >> tabId;
@@ -545,7 +545,7 @@ void WorldSession::HandleGuildBankLogQuery(WorldPacket & recv_data)
void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: Received MSG_QUERY_GUILD_BANK_TEXT");
+ sLog->outDebug("WORLD: Received MSG_QUERY_GUILD_BANK_TEXT");
uint8 tabId;
recv_data >> tabId;
@@ -556,7 +556,7 @@ void WorldSession::HandleQueryGuildBankTabText(WorldPacket &recv_data)
void WorldSession::HandleSetGuildBankTabText(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_SET_GUILD_BANK_TEXT");
+ sLog->outDebug("WORLD: Received CMSG_SET_GUILD_BANK_TEXT");
uint8 tabId;
recv_data >> tabId;
diff --git a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
index c3a1f66012c..b1aec467db5 100755
--- a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp
@@ -29,12 +29,12 @@
void WorldSession::HandleSplitItemOpcode(WorldPacket & recv_data)
{
- //sLog.outDebug("WORLD: CMSG_SPLIT_ITEM");
+ //sLog->outDebug("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);
+ //sLog->outDebug("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);
@@ -62,11 +62,11 @@ void WorldSession::HandleSplitItemOpcode(WorldPacket & recv_data)
void WorldSession::HandleSwapInvItemOpcode(WorldPacket & recv_data)
{
- //sLog.outDebug("WORLD: CMSG_SWAP_INV_ITEM");
+ //sLog->outDebug("WORLD: CMSG_SWAP_INV_ITEM");
uint8 srcslot, dstslot;
recv_data >> dstslot >> srcslot;
- //sLog.outDebug("STORAGE: receive srcslot = %u, dstslot = %u", srcslot, dstslot);
+ //sLog->outDebug("STORAGE: receive srcslot = %u, dstslot = %u", srcslot, dstslot);
// prevent attempt swap same item to current position generated by client at special checting sequence
if (srcslot == dstslot)
@@ -111,11 +111,11 @@ void WorldSession::HandleAutoEquipItemSlotOpcode(WorldPacket & recv_data)
void WorldSession::HandleSwapItem(WorldPacket & recv_data)
{
- //sLog.outDebug("WORLD: CMSG_SWAP_ITEM");
+ //sLog->outDebug("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);
+ //sLog->outDebug("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u, dstslot = %u", srcbag, srcslot, dstbag, dstslot);
uint16 src = ((srcbag << 8) | srcslot);
uint16 dst = ((dstbag << 8) | dstslot);
@@ -141,11 +141,11 @@ void WorldSession::HandleSwapItem(WorldPacket & recv_data)
void WorldSession::HandleAutoEquipItemOpcode(WorldPacket & recv_data)
{
- //sLog.outDebug("WORLD: CMSG_AUTOEQUIP_ITEM");
+ //sLog->outDebug("WORLD: CMSG_AUTOEQUIP_ITEM");
uint8 srcbag, srcslot;
recv_data >> srcbag >> srcslot;
- //sLog.outDebug("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
+ //sLog->outDebug("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
Item *pSrcItem = _player->GetItemByPos(srcbag, srcslot);
if (!pSrcItem)
@@ -235,11 +235,11 @@ void WorldSession::HandleAutoEquipItemOpcode(WorldPacket & recv_data)
void WorldSession::HandleDestroyItemOpcode(WorldPacket & recv_data)
{
- //sLog.outDebug("WORLD: CMSG_DESTROYITEM");
+ //sLog->outDebug("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);
+ //sLog->outDebug("STORAGE: receive bag = %u, slot = %u, count = %u", bag, slot, count);
uint16 pos = (bag << 8) | slot;
@@ -279,11 +279,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");
+ //sLog->outDebug("WORLD: CMSG_ITEM_QUERY_SINGLE");
uint32 item;
recv_data >> item;
- sLog.outDetail("STORAGE: Item Query = %u", item);
+ sLog->outDetail("STORAGE: Item Query = %u", item);
ItemPrototype const *pProto = ObjectMgr::GetItemPrototype(item);
if (pProto)
@@ -429,7 +429,7 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data)
}
else
{
- sLog.outDebug("WORLD: CMSG_ITEM_QUERY_SINGLE - NO item INFO! (ENTRY: %u)", item);
+ sLog->outDebug("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);
@@ -438,12 +438,12 @@ void WorldSession::HandleItemQuerySingleOpcode(WorldPacket & recv_data)
void WorldSession::HandleReadItem(WorldPacket & recv_data)
{
- //sLog.outDebug("WORLD: CMSG_READ_ITEM");
+ //sLog->outDebug("WORLD: CMSG_READ_ITEM");
uint8 bag, slot;
recv_data >> bag >> slot;
- //sLog.outDetail("STORAGE: Read bag = %u, slot = %u", bag, slot);
+ //sLog->outDetail("STORAGE: Read bag = %u, slot = %u", bag, slot);
Item *pItem = _player->GetItemByPos(bag, slot);
if (pItem && pItem->GetProto()->PageText)
@@ -454,12 +454,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");
+ sLog->outDetail("STORAGE: Item page sent");
}
else
{
data.Initialize(SMSG_READ_ITEM_FAILED, 8);
- sLog.outDetail("STORAGE: Unable to read item");
+ sLog->outDetail("STORAGE: Unable to read item");
_player->SendEquipError(msg, pItem, NULL);
}
data << pItem->GetGUID();
@@ -471,20 +471,20 @@ void WorldSession::HandleReadItem(WorldPacket & recv_data)
void WorldSession::HandlePageQuerySkippedOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_PAGE_TEXT_QUERY");
+ sLog->outDebug("WORLD: Received CMSG_PAGE_TEXT_QUERY");
uint32 itemid;
uint64 guid;
recv_data >> itemid >> guid;
- sLog.outDetail("Packet Info: itemid: %u guidlow: %u guidentry: %u guidhigh: %u",
+ sLog->outDetail("Packet Info: itemid: %u guidlow: %u guidentry: %u guidhigh: %u",
itemid, GUID_LOPART(guid), GUID_ENPART(guid), GUID_HIPART(guid));
}
void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_SELL_ITEM");
+ sLog->outDebug("WORLD: Received CMSG_SELL_ITEM");
uint64 vendorguid, itemguid;
uint32 count;
@@ -496,7 +496,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 not interact with him.", uint32(GUID_LOPART(vendorguid)));
+ sLog->outDebug("WORLD: HandleSellItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid)));
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, itemguid, 0);
return;
}
@@ -554,7 +554,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data)
Item *pNewItem = pItem->CloneItem(count, _player);
if (!pNewItem)
{
- sLog.outError("WORLD: HandleSellItemOpcode - could not create clone of item %u; count = %u", pItem->GetEntry(), count);
+ sLog->outError("WORLD: HandleSellItemOpcode - could not create clone of item %u; count = %u", pItem->GetEntry(), count);
_player->SendSellError(SELL_ERR_CANT_SELL_ITEM, pCreature, itemguid, 0);
return;
}
@@ -592,7 +592,7 @@ void WorldSession::HandleSellItemOpcode(WorldPacket & recv_data)
void WorldSession::HandleBuybackItem(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_BUYBACK_ITEM");
+ sLog->outDebug("WORLD: Received CMSG_BUYBACK_ITEM");
uint64 vendorguid;
uint32 slot;
@@ -601,7 +601,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 not interact with him.", uint32(GUID_LOPART(vendorguid)));
+ sLog->outDebug("WORLD: HandleBuybackItem - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid)));
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
return;
}
@@ -640,7 +640,7 @@ void WorldSession::HandleBuybackItem(WorldPacket & recv_data)
void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_BUY_ITEM_IN_SLOT");
+ sLog->outDebug("WORLD: Received CMSG_BUY_ITEM_IN_SLOT");
uint64 vendorguid, bagguid;
uint32 item, slot, count;
uint8 bagslot;
@@ -682,7 +682,7 @@ void WorldSession::HandleBuyItemInSlotOpcode(WorldPacket & recv_data)
void WorldSession::HandleBuyItemOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_BUY_ITEM");
+ sLog->outDebug("WORLD: Received CMSG_BUY_ITEM");
uint64 vendorguid;
uint32 item, slot, count;
uint8 unk1;
@@ -707,19 +707,19 @@ void WorldSession::HandleListInventoryOpcode(WorldPacket & recv_data)
if (!GetPlayer()->isAlive())
return;
- sLog.outDebug("WORLD: Recvd CMSG_LIST_INVENTORY");
+ sLog->outDebug("WORLD: Recvd CMSG_LIST_INVENTORY");
SendListInventory(guid);
}
void WorldSession::SendListInventory(uint64 vendorguid)
{
- sLog.outDebug("WORLD: Sent SMSG_LIST_INVENTORY");
+ sLog->outDebug("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 not interact with him.", uint32(GUID_LOPART(vendorguid)));
+ sLog->outDebug("WORLD: SendListInventory - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(vendorguid)));
_player->SendSellError(SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
return;
}
@@ -796,11 +796,11 @@ void WorldSession::SendListInventory(uint64 vendorguid)
void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket & recv_data)
{
- //sLog.outDebug("WORLD: CMSG_AUTOSTORE_BAG_ITEM");
+ //sLog->outDebug("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);
+ //sLog->outDebug("STORAGE: receive srcbag = %u, srcslot = %u, dstbag = %u", srcbag, srcslot, dstbag);
Item *pItem = _player->GetItemByPos(srcbag, srcslot);
if (!pItem)
@@ -847,7 +847,7 @@ void WorldSession::HandleAutoStoreBagItemOpcode(WorldPacket & recv_data)
void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: CMSG_BUY_BANK_SLOT");
+ sLog->outDebug("WORLD: CMSG_BUY_BANK_SLOT");
uint64 guid;
recvPacket >> guid;
@@ -857,7 +857,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)));
+ sLog->outDebug("WORLD: HandleBuyBankSlotOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
*/
@@ -867,7 +867,7 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
// next slot
++slot;
- sLog.outDetail("PLAYER: Buy bank bag slot, slot number = %u", slot);
+ sLog->outDetail("PLAYER: Buy bank bag slot, slot number = %u", slot);
BankBagSlotPricesEntry const* slotEntry = sBankBagSlotPricesStore.LookupEntry(slot);
@@ -900,11 +900,11 @@ void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
void WorldSession::HandleAutoBankItemOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: CMSG_AUTOBANK_ITEM");
+ sLog->outDebug("WORLD: CMSG_AUTOBANK_ITEM");
uint8 srcbag, srcslot;
recvPacket >> srcbag >> srcslot;
- sLog.outDebug("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
+ sLog->outDebug("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
Item *pItem = _player->GetItemByPos(srcbag, srcslot);
if (!pItem)
@@ -930,11 +930,11 @@ void WorldSession::HandleAutoBankItemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleAutoStoreBankItemOpcode(WorldPacket& recvPacket)
{
- sLog.outDebug("WORLD: CMSG_AUTOSTORE_BANK_ITEM");
+ sLog->outDebug("WORLD: CMSG_AUTOSTORE_BANK_ITEM");
uint8 srcbag, srcslot;
recvPacket >> srcbag >> srcslot;
- sLog.outDebug("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
+ sLog->outDebug("STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
Item *pItem = _player->GetItemByPos(srcbag, srcslot);
if (!pItem)
@@ -976,7 +976,7 @@ void WorldSession::HandleSetAmmoOpcode(WorldPacket & recv_data)
return;
}
- sLog.outDebug("WORLD: CMSG_SET_AMMO");
+ sLog->outDebug("WORLD: CMSG_SET_AMMO");
uint32 item;
recv_data >> item;
@@ -1015,7 +1015,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);
+ sLog->outDebug("WORLD: CMSG_ITEM_NAME_QUERY %u", itemid);
ItemSetNameEntry const *pName = sObjectMgr->GetItemSetNameEntry(itemid);
if (pName)
{
@@ -1035,7 +1035,7 @@ void WorldSession::HandleItemNameQueryOpcode(WorldPacket & recv_data)
void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data)
{
- sLog.outDebug("Received opcode CMSG_WRAP_ITEM");
+ sLog->outDebug("Received opcode CMSG_WRAP_ITEM");
uint8 gift_bag, gift_slot, item_bag, item_slot;
//recv_data.hexlike();
@@ -1043,7 +1043,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);
+ sLog->outDebug("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)
@@ -1140,7 +1140,7 @@ void WorldSession::HandleWrapItemOpcode(WorldPacket& recv_data)
void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
{
- sLog.outDebug("WORLD: CMSG_SOCKET_GEMS");
+ sLog->outDebug("WORLD: CMSG_SOCKET_GEMS");
uint64 item_guid;
uint64 gem_guids[MAX_GEM_SOCKETS];
@@ -1334,7 +1334,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data)
void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data)
{
- sLog.outDebug("WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT");
+ sLog->outDebug("WORLD: CMSG_CANCEL_TEMP_ENCHANTMENT");
uint32 eslot;
@@ -1358,7 +1358,7 @@ void WorldSession::HandleCancelTempEnchantmentOpcode(WorldPacket& recv_data)
void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data)
{
- sLog.outDebug("WORLD: CMSG_ITEM_REFUND_INFO");
+ sLog->outDebug("WORLD: CMSG_ITEM_REFUND_INFO");
uint64 guid;
recv_data >> guid; // item guid
@@ -1366,7 +1366,7 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data)
Item *item = _player->GetItemByGuid(guid);
if (!item)
{
- sLog.outDebug("Item refund: item not found!");
+ sLog->outDebug("Item refund: item not found!");
return;
}
@@ -1375,14 +1375,14 @@ void WorldSession::HandleItemRefundInfoRequest(WorldPacket& recv_data)
void WorldSession::HandleItemRefund(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: CMSG_ITEM_REFUND");
+ sLog->outDebug("WORLD: CMSG_ITEM_REFUND");
uint64 guid;
recv_data >> guid; // item guid
Item *item = _player->GetItemByGuid(guid);
if (!item)
{
- sLog.outDebug("Item refund: item not found!");
+ sLog->outDebug("Item refund: item not found!");
return;
}
@@ -1399,7 +1399,7 @@ void WorldSession::HandleItemTextQuery(WorldPacket & recv_data )
uint64 itemGuid;
recv_data >> itemGuid;
- sLog.outDebug("CMSG_ITEM_TEXT_QUERY item guid: %u", GUID_LOPART(itemGuid));
+ sLog->outDebug("CMSG_ITEM_TEXT_QUERY item guid: %u", GUID_LOPART(itemGuid));
WorldPacket data(SMSG_ITEM_TEXT_QUERY_RESPONSE, (4+10)); // guess size
diff --git a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp b/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp
index 8400ec30646..35c9cf894f6 100755
--- a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp
@@ -46,7 +46,7 @@ void BuildPartyLockDungeonBlock(WorldPacket& data, const LfgLockPartyMap& lockMa
void WorldSession::HandleLfgJoinOpcode(WorldPacket& recv_data)
{
- if (!sWorld.getBoolConfig(CONFIG_DUNGEON_FINDER_ENABLE) ||
+ if (!sWorld->getBoolConfig(CONFIG_DUNGEON_FINDER_ENABLE) ||
(GetPlayer()->GetGroup() && GetPlayer()->GetGroup()->GetLeaderGUID() != GetPlayer()->GetGUID()))
{
recv_data.rpos(recv_data.wpos());
@@ -62,7 +62,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recv_data)
recv_data >> numDungeons;
if (!numDungeons)
{
- sLog.outDebug("CMSG_LFG_JOIN [" UI64FMTD "] no dungeons selected", GetPlayer()->GetGUID());
+ sLog->outDebug("CMSG_LFG_JOIN [" UI64FMTD "] no dungeons selected", GetPlayer()->GetGUID());
recv_data.rpos(recv_data.wpos());
return;
}
@@ -78,7 +78,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recv_data)
std::string comment;
recv_data >> comment;
- sLog.outDebug("CMSG_LFG_JOIN [" UI64FMTD "] roles: %u, Dungeons: %u, Comment: %s", GetPlayer()->GetGUID(), roles, uint8(newDungeons.size()), comment.c_str());
+ sLog->outDebug("CMSG_LFG_JOIN [" UI64FMTD "] roles: %u, Dungeons: %u, Comment: %s", GetPlayer()->GetGUID(), roles, uint8(newDungeons.size()), comment.c_str());
sLFGMgr->Join(GetPlayer(), uint8(roles), newDungeons, comment);
}
@@ -86,7 +86,7 @@ void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recv_data*/)
{
Group* grp = GetPlayer()->GetGroup();
- sLog.outDebug("CMSG_LFG_LEAVE [" UI64FMTD "] in group: %u", GetPlayer()->GetGUID(), grp ? 1 : 0);
+ sLog->outDebug("CMSG_LFG_LEAVE [" UI64FMTD "] in group: %u", GetPlayer()->GetGUID(), grp ? 1 : 0);
// Check cheating - only leader can leave the queue
if (!grp || grp->GetLeaderGUID() == GetPlayer()->GetGUID())
@@ -100,7 +100,7 @@ void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recv_data)
recv_data >> lfgGroupID;
recv_data >> accept;
- sLog.outDebug("CMSG_LFG_PROPOSAL_RESULT [" UI64FMTD "] proposal: %u accept: %u", GetPlayer()->GetGUID(), lfgGroupID, accept ? 1 : 0);
+ sLog->outDebug("CMSG_LFG_PROPOSAL_RESULT [" UI64FMTD "] proposal: %u accept: %u", GetPlayer()->GetGUID(), lfgGroupID, accept ? 1 : 0);
sLFGMgr->UpdateProposal(lfgGroupID, GetPlayer()->GetGUID(), accept);
}
@@ -112,11 +112,11 @@ void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recv_data)
Group* grp = GetPlayer()->GetGroup();
if (!grp)
{
- sLog.outDebug("CMSG_LFG_SET_ROLES [" UI64FMTD "] Not in group", guid);
+ sLog->outDebug("CMSG_LFG_SET_ROLES [" UI64FMTD "] Not in group", guid);
return;
}
uint64 gguid = grp->GetGUID();
- sLog.outDebug("CMSG_LFG_SET_ROLES: Group [" UI64FMTD "], Player [" UI64FMTD "], Roles: %u", gguid, guid, roles);
+ sLog->outDebug("CMSG_LFG_SET_ROLES: Group [" UI64FMTD "], Player [" UI64FMTD "], Roles: %u", gguid, guid, roles);
sLFGMgr->UpdateRoleCheck(gguid, guid, roles);
}
@@ -125,7 +125,7 @@ void WorldSession::HandleLfgSetCommentOpcode(WorldPacket& recv_data)
std::string comment;
recv_data >> comment;
uint64 guid = GetPlayer()->GetGUID();
- sLog.outDebug("CMSG_SET_LFG_COMMENT [" UI64FMTD "] comment: %s", guid, comment.c_str());
+ sLog->outDebug("CMSG_SET_LFG_COMMENT [" UI64FMTD "] comment: %s", guid, comment.c_str());
sLFGMgr->SetComment(guid, comment);
}
@@ -135,7 +135,7 @@ void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recv_data)
bool agree; // Agree to kick player
recv_data >> agree;
- sLog.outDebug("CMSG_LFG_SET_BOOT_VOTE [" UI64FMTD "] agree: %u", GetPlayer()->GetGUID(), agree ? 1 : 0);
+ sLog->outDebug("CMSG_LFG_SET_BOOT_VOTE [" UI64FMTD "] agree: %u", GetPlayer()->GetGUID(), agree ? 1 : 0);
sLFGMgr->UpdateBoot(GetPlayer(), agree);
}
@@ -144,14 +144,14 @@ void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recv_data)
bool out;
recv_data >> out;
- sLog.outDebug("CMSG_LFG_TELEPORT [" UI64FMTD "] out: %u", GetPlayer()->GetGUID(), out ? 1 : 0);
+ sLog->outDebug("CMSG_LFG_TELEPORT [" UI64FMTD "] out: %u", GetPlayer()->GetGUID(), out ? 1 : 0);
sLFGMgr->TeleportPlayer(GetPlayer(), out, true);
}
void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data*/)
{
uint64 guid = GetPlayer()->GetGUID();
- sLog.outDebug("CMSG_LFD_PLAYER_LOCK_INFO_REQUEST [" UI64FMTD "]", guid);
+ sLog->outDebug("CMSG_LFD_PLAYER_LOCK_INFO_REQUEST [" UI64FMTD "]", guid);
// Get Random dungeons that can be done at a certain level and expansion
// FIXME - Should return seasonals (when not disabled)
@@ -171,7 +171,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data
uint32 rsize = uint32(randomDungeons.size());
uint32 lsize = uint32(lock.size());
- sLog.outDebug("SMSG_LFG_PLAYER_INFO [" UI64FMTD "]", guid);
+ sLog->outDebug("SMSG_LFG_PLAYER_INFO [" UI64FMTD "]", guid);
WorldPacket data(SMSG_LFG_PLAYER_INFO, 1 + rsize * (4 + 1 + 4 + 4 + 4 + 4 + 1 + 4 + 4 + 4) + 4 + lsize * (1 + 4 + 4 + 4 + 4 + 1 + 4 + 4 + 4));
data << uint8(randomDungeons.size()); // Random Dungeon count
@@ -232,7 +232,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recv_data
void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recv_data*/)
{
uint64 guid = GetPlayer()->GetGUID();
- sLog.outDebug("CMSG_LFD_PARTY_LOCK_INFO_REQUEST [" UI64FMTD "]", guid);
+ sLog->outDebug("CMSG_LFD_PARTY_LOCK_INFO_REQUEST [" UI64FMTD "]", guid);
Group* grp = GetPlayer()->GetGroup();
if (!grp)
@@ -257,7 +257,7 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recv_data
for (LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
size += 8 + 4 + uint32(it->second.size()) * (4 + 4);
- sLog.outDebug("SMSG_LFG_PARTY_INFO [" UI64FMTD "]", guid);
+ sLog->outDebug("SMSG_LFG_PARTY_INFO [" UI64FMTD "]", guid);
WorldPacket data(SMSG_LFG_PARTY_INFO, 1 + size);
BuildPartyLockDungeonBlock(data, lockMap);
SendPacket(&data);
@@ -267,7 +267,7 @@ void WorldSession::HandleLfrSearchOpcode(WorldPacket& recv_data)
{
uint32 entry; // Raid id to search
recv_data >> entry;
- sLog.outDebug("CMSG_SEARCH_LFG_JOIN [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), entry);
+ sLog->outDebug("CMSG_SEARCH_LFG_JOIN [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), entry);
//SendLfrUpdateListOpcode(entry);
}
@@ -275,7 +275,7 @@ void WorldSession::HandleLfrLeaveOpcode(WorldPacket& recv_data)
{
uint32 dungeonId; // Raid id queue to leave
recv_data >> dungeonId;
- sLog.outDebug("CMSG_SEARCH_LFG_LEAVE [" UI64FMTD "] dungeonId: %u", GetPlayer()->GetGUID(), dungeonId);
+ sLog->outDebug("CMSG_SEARCH_LFG_LEAVE [" UI64FMTD "] dungeonId: %u", GetPlayer()->GetGUID(), dungeonId);
//sLFGMgr->LeaveLfr(GetPlayer(), dungeonId);
}
@@ -302,7 +302,7 @@ void WorldSession::SendLfgUpdatePlayer(const LfgUpdateData& updateData)
uint64 guid = GetPlayer()->GetGUID();
uint8 size = uint8(updateData.dungeons.size());
- sLog.outDebug("SMSG_LFG_UPDATE_PLAYER [" UI64FMTD "] updatetype: %u", guid, updateData.updateType);
+ sLog->outDebug("SMSG_LFG_UPDATE_PLAYER [" UI64FMTD "] updatetype: %u", guid, updateData.updateType);
WorldPacket data(SMSG_LFG_UPDATE_PLAYER, 1 + 1 + (extrainfo ? 1 : 0) * (1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
data << uint8(extrainfo); // Extra info
@@ -352,7 +352,7 @@ void WorldSession::SendLfgUpdateParty(const LfgUpdateData& updateData)
uint64 guid = GetPlayer()->GetGUID();
uint8 size = uint8(updateData.dungeons.size());
- sLog.outDebug("SMSG_LFG_UPDATE_PARTY [" UI64FMTD "] updatetype: %u", guid, updateData.updateType);
+ sLog->outDebug("SMSG_LFG_UPDATE_PARTY [" UI64FMTD "] updatetype: %u", guid, updateData.updateType);
WorldPacket data(SMSG_LFG_UPDATE_PARTY, 1 + 1 + (extrainfo ? 1 : 0) * (1 + 1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
data << uint8(extrainfo); // Extra info
@@ -376,7 +376,7 @@ void WorldSession::SendLfgUpdateParty(const LfgUpdateData& updateData)
void WorldSession::SendLfgRoleChosen(uint64 guid, uint8 roles)
{
- sLog.outDebug("SMSG_LFG_ROLE_CHOSEN [" UI64FMTD "] guid: [" UI64FMTD "] roles: %u", GetPlayer()->GetGUID(), guid, roles);
+ sLog->outDebug("SMSG_LFG_ROLE_CHOSEN [" UI64FMTD "] guid: [" UI64FMTD "] roles: %u", GetPlayer()->GetGUID(), guid, roles);
WorldPacket data(SMSG_LFG_ROLE_CHOSEN, 8 + 1 + 4);
data << uint64(guid); // Guid
@@ -394,7 +394,7 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck* pRoleCheck)
else
dungeons = pRoleCheck->dungeons;
- sLog.outDebug("SMSG_LFG_ROLE_CHECK_UPDATE [" UI64FMTD "]", GetPlayer()->GetGUID());
+ sLog->outDebug("SMSG_LFG_ROLE_CHECK_UPDATE [" UI64FMTD "]", GetPlayer()->GetGUID());
WorldPacket data(SMSG_LFG_ROLE_CHECK_UPDATE, 4 + 1 + 1 + dungeons.size() * 4 + 1 + pRoleCheck->roles.size() * (8 + 1 + 4 + 1));
data << uint32(pRoleCheck->state); // Check result
@@ -444,7 +444,7 @@ void WorldSession::SendLfgJoinResult(const LfgJoinResultData& joinData)
for (LfgLockPartyMap::const_iterator it = joinData.lockmap.begin(); it != joinData.lockmap.end(); ++it)
size += 8 + 4 + uint32(it->second.size()) * (4 + 4);
- sLog.outDebug("SMSG_LFG_JOIN_RESULT [" UI64FMTD "] checkResult: %u checkValue: %u", GetPlayer()->GetGUID(), joinData.result, joinData.state);
+ sLog->outDebug("SMSG_LFG_JOIN_RESULT [" UI64FMTD "] checkResult: %u checkValue: %u", GetPlayer()->GetGUID(), joinData.result, joinData.state);
WorldPacket data(SMSG_LFG_JOIN_RESULT, 4 + 4 + size);
data << uint32(joinData.result); // Check Result
data << uint32(joinData.state); // Check Value
@@ -455,7 +455,7 @@ void WorldSession::SendLfgJoinResult(const LfgJoinResultData& joinData)
void WorldSession::SendLfgQueueStatus(uint32 dungeon, int32 waitTime, int32 avgWaitTime, int32 waitTimeTanks, int32 waitTimeHealer, int32 waitTimeDps, uint32 queuedTime, uint8 tanks, uint8 healers, uint8 dps)
{
- sLog.outDebug("SMSG_LFG_QUEUE_STATUS [" UI64FMTD "] dungeon: %u - waitTime: %d - avgWaitTime: %d - waitTimeTanks: %d - waitTimeHealer: %d - waitTimeDps: %d - queuedTime: %u - tanks: %u - healers: %u - dps: %u", GetPlayer()->GetGUID(), dungeon, waitTime, avgWaitTime, waitTimeTanks, waitTimeHealer, waitTimeDps, queuedTime, tanks, healers, dps);
+ sLog->outDebug("SMSG_LFG_QUEUE_STATUS [" UI64FMTD "] dungeon: %u - waitTime: %d - avgWaitTime: %d - waitTimeTanks: %d - waitTimeHealer: %d - waitTimeDps: %d - queuedTime: %u - tanks: %u - healers: %u - dps: %u", GetPlayer()->GetGUID(), dungeon, waitTime, avgWaitTime, waitTimeTanks, waitTimeHealer, waitTimeDps, queuedTime, tanks, healers, dps);
WorldPacket data(SMSG_LFG_QUEUE_STATUS, 4 + 4 + 4 + 4 + 4 +4 + 1 + 1 + 1 + 4);
data << uint32(dungeon); // Dungeon
@@ -478,7 +478,7 @@ void WorldSession::SendLfgPlayerReward(uint32 rdungeonEntry, uint32 sdungeonEntr
uint8 itemNum = uint8(qRew ? qRew->GetRewItemsCount() : 0);
- sLog.outDebug("SMSG_LFG_PLAYER_REWARD [" UI64FMTD "] rdungeonEntry: %u - sdungeonEntry: %u - done: %u", GetPlayer()->GetGUID(), rdungeonEntry, sdungeonEntry, done);
+ sLog->outDebug("SMSG_LFG_PLAYER_REWARD [" UI64FMTD "] rdungeonEntry: %u - sdungeonEntry: %u - done: %u", GetPlayer()->GetGUID(), rdungeonEntry, sdungeonEntry, done);
WorldPacket data(SMSG_LFG_PLAYER_REWARD, 4 + 4 + 1 + 4 + 4 + 4 + 4 + 4 + 1 + itemNum * (4 + 4 + 4));
data << uint32(rdungeonEntry); // Random Dungeon Finished
data << uint32(sdungeonEntry); // Dungeon Finished
@@ -523,7 +523,7 @@ void WorldSession::SendLfgBootPlayer(const LfgPlayerBoot* pBoot)
++agreeNum;
}
}
- sLog.outDebug("SMSG_LFG_BOOT_PLAYER [" UI64FMTD "] inProgress: %u - didVote: %u - agree: %u - victim: [" UI64FMTD "] votes: %u - agrees: %u - left: %u - needed: %u - reason %s",
+ sLog->outDebug("SMSG_LFG_BOOT_PLAYER [" UI64FMTD "] inProgress: %u - didVote: %u - agree: %u - victim: [" UI64FMTD "] votes: %u - agrees: %u - left: %u - needed: %u - reason %s",
guid, uint8(pBoot->inProgress), uint8(playerVote != LFG_ANSWER_PENDING), uint8(playerVote == LFG_ANSWER_AGREE), pBoot->victim, votesNum, agreeNum, secsleft, pBoot->votedNeeded, pBoot->reason.c_str());
WorldPacket data(SMSG_LFG_BOOT_PLAYER, 1 + 1 + 1 + 8 + 4 + 4 + 4 + 4 + pBoot->reason.length());
data << uint8(pBoot->inProgress); // Vote in progress
@@ -562,7 +562,7 @@ void WorldSession::SendLfgUpdateProposal(uint32 proposalId, const LfgProposal* p
isSameDungeon = GetPlayer()->GetGroup() == grp && isContinue;
}
- sLog.outDebug("SMSG_LFG_PROPOSAL_UPDATE [" UI64FMTD "] state: %u", GetPlayer()->GetGUID(), pProp->state);
+ sLog->outDebug("SMSG_LFG_PROPOSAL_UPDATE [" UI64FMTD "] state: %u", GetPlayer()->GetGUID(), pProp->state);
WorldPacket data(SMSG_LFG_PROPOSAL_UPDATE, 4 + 1 + 4 + 4 + 1 + 1 + pProp->players.size() * (4 + 1 + 1 + 1 + 1 +1));
if (!isContinue) // Only show proposal dungeon if it's continue
@@ -603,7 +603,7 @@ void WorldSession::SendLfgUpdateProposal(uint32 proposalId, const LfgProposal* p
void WorldSession::SendLfgUpdateSearch(bool update)
{
- sLog.outDebug("SMSG_LFG_UPDATE_SEARCH [" UI64FMTD "] update: %u", GetPlayer()->GetGUID(), update ? 1 : 0);
+ sLog->outDebug("SMSG_LFG_UPDATE_SEARCH [" UI64FMTD "] update: %u", GetPlayer()->GetGUID(), update ? 1 : 0);
WorldPacket data(SMSG_LFG_UPDATE_SEARCH, 1);
data << uint8(update); // In Lfg Queue?
SendPacket(&data);
@@ -611,14 +611,14 @@ void WorldSession::SendLfgUpdateSearch(bool update)
void WorldSession::SendLfgDisabled()
{
- sLog.outDebug("SMSG_LFG_DISABLED [" UI64FMTD "]", GetPlayer()->GetGUID());
+ sLog->outDebug("SMSG_LFG_DISABLED [" UI64FMTD "]", GetPlayer()->GetGUID());
WorldPacket data(SMSG_LFG_DISABLED, 0);
SendPacket(&data);
}
void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry)
{
- sLog.outDebug("SMSG_LFG_OFFER_CONTINUE [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), dungeonEntry);
+ sLog->outDebug("SMSG_LFG_OFFER_CONTINUE [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), dungeonEntry);
WorldPacket data(SMSG_LFG_OFFER_CONTINUE, 4);
data << uint32(dungeonEntry);
SendPacket(&data);
@@ -626,7 +626,7 @@ void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry)
void WorldSession::SendLfgTeleportError(uint8 err)
{
- sLog.outDebug("SMSG_LFG_TELEPORT_DENIED [" UI64FMTD "] reason: %u", GetPlayer()->GetGUID(), err);
+ sLog->outDebug("SMSG_LFG_TELEPORT_DENIED [" UI64FMTD "] reason: %u", GetPlayer()->GetGUID(), err);
WorldPacket data(SMSG_LFG_TELEPORT_DENIED, 4);
data << uint32(err); // Error
SendPacket(&data);
@@ -635,7 +635,7 @@ void WorldSession::SendLfgTeleportError(uint8 err)
/*
void WorldSession::SendLfrUpdateListOpcode(uint32 dungeonEntry)
{
- sLog.outDebug("SMSG_UPDATE_LFG_LIST [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), dungeonEntry);
+ sLog->outDebug("SMSG_UPDATE_LFG_LIST [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), dungeonEntry);
WorldPacket data(SMSG_UPDATE_LFG_LIST);
SendPacket(&data);
}
diff --git a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp
index ac9ec8e5b82..2eb954228aa 100755
--- a/src/server/game/Server/Protocol/Handlers/LootHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/LootHandler.cpp
@@ -32,7 +32,7 @@
void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_AUTOSTORE_LOOT_ITEM");
+ sLog->outDebug("WORLD: CMSG_AUTOSTORE_LOOT_ITEM");
Player* player = GetPlayer();
uint64 lguid = player->GetLootGUID();
Loot* loot = NULL;
@@ -96,7 +96,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket & recv_data)
void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/)
{
- sLog.outDebug("WORLD: CMSG_LOOT_MONEY");
+ sLog->outDebug("WORLD: CMSG_LOOT_MONEY");
Player *player = GetPlayer();
uint64 guid = player->GetLootGUID();
@@ -159,7 +159,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/)
Player* playerGroup = itr->getSource();
if (!playerGroup)
continue;
- if (player->IsWithinDistInMap(playerGroup,sWorld.getFloatConfig(CONFIG_GROUP_XP_DISTANCE),false))
+ if (player->IsWithinDistInMap(playerGroup,sWorld->getFloatConfig(CONFIG_GROUP_XP_DISTANCE),false))
playersNear.push_back(playerGroup);
}
@@ -187,7 +187,7 @@ void WorldSession::HandleLootMoneyOpcode(WorldPacket & /*recv_data*/)
void WorldSession::HandleLootOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_LOOT");
+ sLog->outDebug("WORLD: CMSG_LOOT");
uint64 guid;
recv_data >> guid;
@@ -205,7 +205,7 @@ void WorldSession::HandleLootOpcode(WorldPacket & recv_data)
void WorldSession::HandleLootReleaseOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_LOOT_RELEASE");
+ sLog->outDebug("WORLD: CMSG_LOOT_RELEASE");
// cheaters can modify lguid to prevent correct apply loot release code and re-loot
// use internal stored guid
@@ -254,7 +254,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
// only vein pass this check
if (go_min != 0 && go_max > go_min)
{
- float amount_rate = sWorld.getRate(RATE_MINING_AMOUNT);
+ float amount_rate = sWorld->getRate(RATE_MINING_AMOUNT);
float min_amount = go_min*amount_rate;
float max_amount = go_max*amount_rate;
@@ -265,7 +265,7 @@ void WorldSession::DoLootRelease(uint64 lguid)
{
if (uses >= min_amount)
{
- float chance_rate = sWorld.getRate(RATE_MINING_NEXT);
+ float chance_rate = sWorld->getRate(RATE_MINING_NEXT);
int32 ReqValue = 175;
LockEntry const *lockInfo = sLockStore.LookupEntry(go->GetGOInfo()->chest.lockId);
@@ -426,7 +426,7 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recv_data)
if (!target)
return;
- sLog.outDebug("WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = [%s].", target->GetName());
+ sLog->outDebug("WorldSession::HandleLootMasterGiveOpcode (CMSG_LOOT_MASTER_GIVE, 0x02A3) Target = [%s].", target->GetName());
if (_player->GetLootGUID() != lootguid)
return;
@@ -455,7 +455,7 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPacket & recv_data)
if (slotid > pLoot->items.size())
{
- sLog.outDebug("MasterLootItem: Player %s might be using a hack! (slot %d, size %lu)",GetPlayer()->GetName(), slotid, (unsigned long)pLoot->items.size());
+ sLog->outDebug("MasterLootItem: Player %s might be using a hack! (slot %d, size %lu)",GetPlayer()->GetName(), slotid, (unsigned long)pLoot->items.size());
return;
}
diff --git a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp b/src/server/game/Server/Protocol/Handlers/MailHandler.cpp
index f9718b8a4d4..986de94dd98 100755
--- a/src/server/game/Server/Protocol/Handlers/MailHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MailHandler.cpp
@@ -76,9 +76,9 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
Player* pl = _player;
- if (pl->getLevel() < sWorld.getIntConfig(CONFIG_MAIL_LEVEL_REQ))
+ if (pl->getLevel() < sWorld->getIntConfig(CONFIG_MAIL_LEVEL_REQ))
{
- SendNotification(GetTrinityString(LANG_MAIL_SENDER_REQ), sWorld.getIntConfig(CONFIG_MAIL_LEVEL_REQ));
+ SendNotification(GetTrinityString(LANG_MAIL_SENDER_REQ), sWorld->getIntConfig(CONFIG_MAIL_LEVEL_REQ));
return;
}
@@ -88,13 +88,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",
+ 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",
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);
+ 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);
if (pl->GetGUID() == rc)
{
@@ -160,15 +160,15 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
}
}
- if (!accountBound && !sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL) && pl->GetTeam() != rc_team && GetSecurity() == SEC_PLAYER)
+ if (!accountBound && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL) && pl->GetTeam() != rc_team && GetSecurity() == SEC_PLAYER)
{
pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_NOT_YOUR_TEAM);
return;
}
- if (receiveLevel < sWorld.getIntConfig(CONFIG_MAIL_LEVEL_REQ))
+ if (receiveLevel < sWorld->getIntConfig(CONFIG_MAIL_LEVEL_REQ))
{
- SendNotification(GetTrinityString(LANG_MAIL_RECEIVER_REQ), sWorld.getIntConfig(CONFIG_MAIL_LEVEL_REQ));
+ SendNotification(GetTrinityString(LANG_MAIL_RECEIVER_REQ), sWorld->getIntConfig(CONFIG_MAIL_LEVEL_REQ));
return;
}
@@ -246,9 +246,9 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
for (uint8 i = 0; i < items_count; ++i)
{
Item* item = items[i];
- if (GetSecurity() > SEC_PLAYER && sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE))
+ if (GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
{
- sLog.outCommand(GetAccountId(), "GM %s (Account: %u) mail item: %s (Entry: %u Count: %u) to player: %s (Account: %u)",
+ sLog->outCommand(GetAccountId(), "GM %s (Account: %u) mail item: %s (Entry: %u Count: %u) to player: %s (Account: %u)",
GetPlayerName(), GetAccountId(), item->GetProto()->Name1, item->GetEntry(), item->GetCount(), receiver.c_str(), rc_account);
}
@@ -270,15 +270,15 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data)
needItemDelay = pl->GetSession()->GetAccountId() != rc_account;
}
- if (money > 0 && GetSecurity() > SEC_PLAYER && sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE))
+ if (money > 0 && GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
{
- sLog.outCommand(GetAccountId(),"GM %s (Account: %u) mail money: %u to player: %s (Account: %u)",
+ sLog->outCommand(GetAccountId(),"GM %s (Account: %u) mail money: %u to player: %s (Account: %u)",
GetPlayerName(), GetAccountId(), money, receiver.c_str(), rc_account);
}
}
// If theres is an item, there is a one hour delivery delay if sent to another account's character.
- uint32 deliver_delay = needItemDelay ? sWorld.getIntConfig(CONFIG_MAIL_DELIVERY_DELAY) : 0;
+ uint32 deliver_delay = needItemDelay ? sWorld->getIntConfig(CONFIG_MAIL_DELIVERY_DELAY) : 0;
// will delete item or place to receiver mail list
draft
@@ -443,7 +443,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data)
uint32 sender_accId = 0;
- if (GetSecurity() > SEC_PLAYER && sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE))
+ if (GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
{
std::string sender_name;
if (receive)
@@ -459,7 +459,7 @@ void WorldSession::HandleMailTakeItem(WorldPacket & recv_data)
if (!sObjectMgr->GetPlayerNameByGUID(sender_guid,sender_name))
sender_name = sObjectMgr->GetTrinityStringForDBCLocale(LANG_UNKNOWN);
}
- sLog.outCommand(GetAccountId(),"GM %s (Account: %u) receive mail item: %s (Entry: %u Count: %u) and send COD money: %u to player: %s (Account: %u)",
+ sLog->outCommand(GetAccountId(),"GM %s (Account: %u) receive mail item: %s (Entry: %u Count: %u) and send COD money: %u to player: %s (Account: %u)",
GetPlayerName(),GetAccountId(),it->GetProto()->Name1,it->GetEntry(),it->GetCount(),m->COD,sender_name.c_str(),sender_accId);
}
else if (!receive)
@@ -694,7 +694,7 @@ void WorldSession::HandleMailCreateTextItem(WorldPacket & recv_data)
bodyItem->SetUInt32Value(ITEM_FIELD_CREATOR, m->sender);
bodyItem->SetFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_MAIL_TEXT_MASK);
- sLog.outDetail("HandleMailCreateTextItem mailid=%u",mailId);
+ sLog->outDetail("HandleMailCreateTextItem mailid=%u",mailId);
ItemPosCountVec dest;
uint8 msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, dest, bodyItem, false);
diff --git a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
index 1b53e009346..f9e0dce2e89 100755
--- a/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MiscHandler.cpp
@@ -52,7 +52,7 @@
void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Recvd CMSG_REPOP_REQUEST Message");
+ sLog->outDebug("WORLD: Recvd CMSG_REPOP_REQUEST Message");
recv_data.read_skip<uint8>();
@@ -66,7 +66,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());
+ sLog->outDebug("HandleRepopRequestOpcode: got request after player %s(%d) was killed and before he was updated", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow());
GetPlayer()->KillPlayer();
}
@@ -78,7 +78,7 @@ void WorldSession::HandleRepopRequestOpcode(WorldPacket & recv_data)
void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_GOSSIP_SELECT_OPTION");
+ sLog->outDebug("WORLD: CMSG_GOSSIP_SELECT_OPTION");
uint32 gossipListId;
uint32 menuId;
@@ -90,9 +90,9 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
if (_player->PlayerTalkClass->GossipOptionCoded(gossipListId))
{
// recheck
- sLog.outBasic("reading string");
+ sLog->outBasic("reading string");
recv_data >> code;
- sLog.outBasic("string read: %s", code.c_str());
+ sLog->outBasic("string read: %s", code.c_str());
}
Creature *unit = NULL;
@@ -102,7 +102,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!unit)
{
- sLog.outDebug("WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
+ sLog->outDebug("WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
}
@@ -111,13 +111,13 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
go = _player->GetMap()->GetGameObject(guid);
if (!go)
{
- sLog.outDebug("WORLD: HandleGossipSelectOptionOpcode - GameObject (GUID: %u) not found.", uint32(GUID_LOPART(guid)));
+ sLog->outDebug("WORLD: HandleGossipSelectOptionOpcode - GameObject (GUID: %u) not found.", uint32(GUID_LOPART(guid)));
return;
}
}
else
{
- sLog.outDebug("WORLD: HandleGossipSelectOptionOpcode - unsupported GUID type for highguid %u. lowpart %u.", uint32(GUID_HIPART(guid)), uint32(GUID_LOPART(guid)));
+ sLog->outDebug("WORLD: HandleGossipSelectOptionOpcode - unsupported GUID type for highguid %u. lowpart %u.", uint32(GUID_HIPART(guid)), uint32(GUID_LOPART(guid)));
return;
}
@@ -127,7 +127,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
if ((unit && unit->GetCreatureInfo()->ScriptID != unit->LastUsedScriptID) || (go && go->GetGOInfo()->ScriptId != go->LastUsedScriptID))
{
- sLog.outDebug("WORLD: HandleGossipSelectOptionOpcode - Script reloaded while in use, ignoring and set new scipt id");
+ sLog->outDebug("WORLD: HandleGossipSelectOptionOpcode - Script reloaded while in use, ignoring and set new scipt id");
if (unit)
unit->LastUsedScriptID = unit->GetCreatureInfo()->ScriptID;
if (go)
@@ -167,7 +167,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Recvd CMSG_WHO Message");
+ sLog->outDebug("WORLD: Recvd CMSG_WHO Message");
//recv_data.hexlike();
uint32 matchcount = 0;
@@ -194,7 +194,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]);
+ sLog->outDebug("Zone %u: %u", i, zoneids[i]);
}
recv_data >> str_count; // user entered strings count, client limit=4 (checked on 2.0.10)
@@ -202,7 +202,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);
+ 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);
std::wstring str[4]; // 4 is client limit
for (uint32 i = 0; i < str_count; ++i)
@@ -215,7 +215,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
wstrToLower(str[i]);
- sLog.outDebug("String %u: %s", i, temp.c_str());
+ sLog->outDebug("String %u: %s", i, temp.c_str());
}
std::wstring wplayer_name;
@@ -232,8 +232,8 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
uint32 team = _player->GetTeam();
uint32 security = GetSecurity();
- bool allowTwoSideWhoList = sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_WHO_LIST);
- uint32 gmLevelInWhoList = sWorld.getIntConfig(CONFIG_GM_LEVEL_IN_WHO_LIST);
+ bool allowTwoSideWhoList = sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_WHO_LIST);
+ uint32 gmLevelInWhoList = sWorld->getIntConfig(CONFIG_GM_LEVEL_IN_WHO_LIST);
uint32 displaycount = 0;
WorldPacket data(SMSG_WHO, 50); // guess size
@@ -241,7 +241,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
data << uint32(displaycount); // placeholder, count of players displayed
ACE_GUARD(ACE_Thread_Mutex, g, *HashMapHolder<Player>::GetLock());
- HashMapHolder<Player>::MapType& m = sObjectAccessor.GetPlayers();
+ HashMapHolder<Player>::MapType& m = sObjectAccessor->GetPlayers();
for (HashMapHolder<Player>::MapType::const_iterator itr = m.begin(); itr != m.end(); ++itr)
{
if (security == SEC_PLAYER)
@@ -337,7 +337,7 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
// 49 is maximum player count sent to client - can be overridden
// through config, but is unstable
- if ((matchcount++) >= sWorld.getIntConfig(CONFIG_MAX_WHO))
+ if ((matchcount++) >= sWorld->getIntConfig(CONFIG_MAX_WHO))
continue;
data << pname; // player name
@@ -355,12 +355,12 @@ void WorldSession::HandleWhoOpcode(WorldPacket & recv_data)
data.put(4, matchcount); // insert right count, count of matches
SendPacket(&data);
- sLog.outDebug("WORLD: Send SMSG_WHO Message");
+ sLog->outDebug("WORLD: Send SMSG_WHO Message");
}
void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/)
{
- sLog.outDebug("WORLD: Recvd CMSG_LOGOUT_REQUEST Message, security - %u", GetSecurity());
+ sLog->outDebug("WORLD: Recvd CMSG_LOGOUT_REQUEST Message, security - %u", GetSecurity());
if (uint64 lguid = GetPlayer()->GetLootGUID())
DoLootRelease(lguid);
@@ -386,7 +386,7 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/)
//instant logout in taverns/cities or on taxi or for admins, gm's, mod's if its enabled in worldserver.conf
if (GetPlayer()->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_RESTING) || GetPlayer()->isInFlight() ||
- GetSecurity() >= AccountTypes(sWorld.getIntConfig(CONFIG_INSTANT_LOGOUT)))
+ GetSecurity() >= AccountTypes(sWorld->getIntConfig(CONFIG_INSTANT_LOGOUT)))
{
WorldPacket data(SMSG_LOGOUT_RESPONSE, 1+4);
data << uint8(0);
@@ -417,12 +417,12 @@ void WorldSession::HandleLogoutRequestOpcode(WorldPacket & /*recv_data*/)
void WorldSession::HandlePlayerLogoutOpcode(WorldPacket & /*recv_data*/)
{
- sLog.outDebug("WORLD: Recvd CMSG_PLAYER_LOGOUT Message");
+ sLog->outDebug("WORLD: Recvd CMSG_PLAYER_LOGOUT Message");
}
void WorldSession::HandleLogoutCancelOpcode(WorldPacket & /*recv_data*/)
{
- sLog.outDebug("WORLD: Recvd CMSG_LOGOUT_CANCEL Message");
+ sLog->outDebug("WORLD: Recvd CMSG_LOGOUT_CANCEL Message");
LogoutRequest(0);
@@ -445,7 +445,7 @@ void WorldSession::HandleLogoutCancelOpcode(WorldPacket & /*recv_data*/)
GetPlayer()->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
}
- sLog.outDebug("WORLD: sent SMSG_LOGOUT_CANCEL_ACK Message");
+ sLog->outDebug("WORLD: sent SMSG_LOGOUT_CANCEL_ACK Message");
}
void WorldSession::HandleTogglePvP(WorldPacket & recv_data)
@@ -484,7 +484,7 @@ void WorldSession::HandleZoneUpdateOpcode(WorldPacket & recv_data)
uint32 newZone;
recv_data >> newZone;
- sLog.outDetail("WORLD: Recvd ZONE_UPDATE: %u", newZone);
+ sLog->outDetail("WORLD: Recvd ZONE_UPDATE: %u", newZone);
// use server size data
uint32 newzone, newarea;
@@ -527,7 +527,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
+ // sLog->outDebug("WORLD: Received CMSG_STANDSTATECHANGE"); -- too many spam in log at lags/debug stop
uint32 animstate;
recv_data >> animstate;
@@ -536,16 +536,16 @@ void WorldSession::HandleStandStateChangeOpcode(WorldPacket & recv_data)
void WorldSession::HandleContactListOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_CONTACT_LIST");
+ sLog->outDebug("WORLD: Received CMSG_CONTACT_LIST");
uint32 unk;
recv_data >> unk;
- sLog.outDebug("unk value is %u", unk);
+ sLog->outDebug("unk value is %u", unk);
_player->GetSocial()->SendSocialList(_player);
}
void WorldSession::HandleAddFriendOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_ADD_FRIEND");
+ sLog->outDebug("WORLD: Received CMSG_ADD_FRIEND");
std::string friendName = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN);
std::string friendNote;
@@ -559,7 +559,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'",
+ sLog->outDebug("WORLD: %s asked to add friend : '%s'",
GetPlayer()->GetName(), friendName.c_str());
m_addFriendCallback.SetParam(friendNote);
@@ -587,13 +587,13 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult result, std::string
team = Player::TeamForRace((*result)[1].GetUInt8());
friendAcctid = (*result)[2].GetUInt32();
- if (GetSecurity() >= SEC_MODERATOR || sWorld.getBoolConfig(CONFIG_ALLOW_GM_FRIEND) || sAccountMgr->GetSecurity(friendAcctid) < SEC_MODERATOR)
+ if (GetSecurity() >= SEC_MODERATOR || sWorld->getBoolConfig(CONFIG_ALLOW_GM_FRIEND) || sAccountMgr->GetSecurity(friendAcctid) < SEC_MODERATOR)
{
if (friendGuid)
{
if (friendGuid == GetPlayer()->GetGUID())
friendResult = FRIEND_SELF;
- else if (GetPlayer()->GetTeam() != team && !sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND) && GetSecurity() < SEC_MODERATOR)
+ else if (GetPlayer()->GetTeam() != team && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND) && GetSecurity() < SEC_MODERATOR)
friendResult = FRIEND_ENEMY;
else if (GetPlayer()->GetSocial()->HasFriend(GUID_LOPART(friendGuid)))
friendResult = FRIEND_ALREADY;
@@ -607,7 +607,7 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult result, std::string
if (!GetPlayer()->GetSocial()->AddToSocialList(GUID_LOPART(friendGuid), false))
{
friendResult = FRIEND_LIST_FULL;
- sLog.outDebug("WORLD: %s's friend list is full.", GetPlayer()->GetName());
+ sLog->outDebug("WORLD: %s's friend list is full.", GetPlayer()->GetName());
}
}
GetPlayer()->GetSocial()->SetFriendNote(GUID_LOPART(friendGuid), friendNote);
@@ -617,14 +617,14 @@ void WorldSession::HandleAddFriendOpcodeCallBack(QueryResult result, std::string
sSocialMgr->SendFriendStatus(GetPlayer(), friendResult, GUID_LOPART(friendGuid), false);
- sLog.outDebug("WORLD: Sent (SMSG_FRIEND_STATUS)");
+ sLog->outDebug("WORLD: Sent (SMSG_FRIEND_STATUS)");
}
void WorldSession::HandleDelFriendOpcode(WorldPacket & recv_data)
{
uint64 FriendGUID;
- sLog.outDebug("WORLD: Received CMSG_DEL_FRIEND");
+ sLog->outDebug("WORLD: Received CMSG_DEL_FRIEND");
recv_data >> FriendGUID;
@@ -632,12 +632,12 @@ void WorldSession::HandleDelFriendOpcode(WorldPacket & recv_data)
sSocialMgr->SendFriendStatus(GetPlayer(), FRIEND_REMOVED, GUID_LOPART(FriendGUID), false);
- sLog.outDebug("WORLD: Sent motd (SMSG_FRIEND_STATUS)");
+ sLog->outDebug("WORLD: Sent motd (SMSG_FRIEND_STATUS)");
}
void WorldSession::HandleAddIgnoreOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_ADD_IGNORE");
+ sLog->outDebug("WORLD: Received CMSG_ADD_IGNORE");
std::string IgnoreName = GetTrinityString(LANG_FRIEND_IGNORE_UNKNOWN);
@@ -648,7 +648,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'",
+ sLog->outDebug("WORLD: %s asked to Ignore: '%s'",
GetPlayer()->GetName(), IgnoreName.c_str());
m_addIgnoreCallback = CharacterDatabase.AsyncPQuery("SELECT guid FROM characters WHERE name = '%s'", IgnoreName.c_str());
@@ -688,14 +688,14 @@ void WorldSession::HandleAddIgnoreOpcodeCallBack(QueryResult result)
sSocialMgr->SendFriendStatus(GetPlayer(), ignoreResult, GUID_LOPART(IgnoreGuid), false);
- sLog.outDebug("WORLD: Sent (SMSG_FRIEND_STATUS)");
+ sLog->outDebug("WORLD: Sent (SMSG_FRIEND_STATUS)");
}
void WorldSession::HandleDelIgnoreOpcode(WorldPacket & recv_data)
{
uint64 IgnoreGUID;
- sLog.outDebug("WORLD: Received CMSG_DEL_IGNORE");
+ sLog->outDebug("WORLD: Received CMSG_DEL_IGNORE");
recv_data >> IgnoreGUID;
@@ -703,12 +703,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)");
+ sLog->outDebug("WORLD: Sent motd (SMSG_FRIEND_STATUS)");
}
void WorldSession::HandleSetContactNotesOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("CMSG_SET_CONTACT_NOTES");
+ sLog->outDebug("CMSG_SET_CONTACT_NOTES");
uint64 guid;
std::string note;
recv_data >> guid >> note;
@@ -725,12 +725,12 @@ void WorldSession::HandleBugOpcode(WorldPacket & recv_data)
recv_data >> typelen >> type;
if (suggestion == 0)
- sLog.outDebug("WORLD: Received CMSG_BUG [Bug Report]");
+ sLog->outDebug("WORLD: Received CMSG_BUG [Bug Report]");
else
- sLog.outDebug("WORLD: Received CMSG_BUG [Suggestion]");
+ sLog->outDebug("WORLD: Received CMSG_BUG [Suggestion]");
- sLog.outDebug("%s", type.c_str());
- sLog.outDebug("%s", content.c_str());
+ sLog->outDebug("%s", type.c_str());
+ sLog->outDebug("%s", content.c_str());
CharacterDatabase.escape_string(type);
CharacterDatabase.escape_string(content);
@@ -739,7 +739,7 @@ void WorldSession::HandleBugOpcode(WorldPacket & recv_data)
void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data)
{
- sLog.outDetail("WORLD: Received CMSG_RECLAIM_CORPSE");
+ sLog->outDetail("WORLD: Received CMSG_RECLAIM_CORPSE");
uint64 guid;
recv_data >> guid;
@@ -776,7 +776,7 @@ void WorldSession::HandleReclaimCorpseOpcode(WorldPacket &recv_data)
void WorldSession::HandleResurrectResponseOpcode(WorldPacket & recv_data)
{
- sLog.outDetail("WORLD: Received CMSG_RESURRECT_RESPONSE");
+ sLog->outDetail("WORLD: Received CMSG_RESURRECT_RESPONSE");
uint64 guid;
uint8 status;
@@ -817,29 +817,29 @@ void WorldSession::SendAreaTriggerMessage(const char* Text, ...)
void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_AREATRIGGER");
+ sLog->outDebug("WORLD: Received CMSG_AREATRIGGER");
uint32 Trigger_ID;
recv_data >> Trigger_ID;
- sLog.outDebug("Trigger ID:%u",Trigger_ID);
+ sLog->outDebug("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);
+ sLog->outDebug("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);
+ sLog->outDebug("Player '%s' (GUID: %u) send unknown (by DBC) Area Trigger ID:%u",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow(), Trigger_ID);
return;
}
if (GetPlayer()->GetMapId() != atEntry->mapid)
{
- sLog.outDebug("Player '%s' (GUID: %u) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u", GetPlayer()->GetName(), atEntry->mapid, GetPlayer()->GetMapId(), GetPlayer()->GetGUIDLow(), Trigger_ID);
+ sLog->outDebug("Player '%s' (GUID: %u) too far (trigger map: %u player map: %u), ignore Area Trigger ID: %u", GetPlayer()->GetName(), atEntry->mapid, GetPlayer()->GetMapId(), GetPlayer()->GetGUIDLow(), Trigger_ID);
return;
}
@@ -854,7 +854,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
float dist = pl->GetDistance(atEntry->x,atEntry->y,atEntry->z);
if (dist > atEntry->radius + delta)
{
- sLog.outDebug("Player '%s' (GUID: %u) too far (radius: %f distance: %f), ignore Area Trigger ID: %u",
+ sLog->outDebug("Player '%s' (GUID: %u) too far (radius: %f distance: %f), ignore Area Trigger ID: %u",
pl->GetName(), pl->GetGUIDLow(), atEntry->radius, dist, Trigger_ID);
return;
}
@@ -885,7 +885,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
(fabs(dy) > atEntry->box_y/2 + delta) ||
(fabs(dz) > atEntry->box_z/2 + delta))
{
- sLog.outDebug("Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %f 1/2 box Z: %f rotatedPlayerX: %f rotatedPlayerY: %f dZ:%f), ignore Area Trigger ID: %u",
+ sLog->outDebug("Player '%s' (GUID: %u) too far (1/2 box X: %f 1/2 box Y: %f 1/2 box Z: %f rotatedPlayerX: %f rotatedPlayerY: %f dZ:%f), ignore Area Trigger ID: %u",
pl->GetName(), pl->GetGUIDLow(), atEntry->box_x/2, atEntry->box_y/2, atEntry->box_z/2, rotPlayerX, rotPlayerY, dz, Trigger_ID);
return;
}
@@ -915,7 +915,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
GetPlayer()->InnEnter(time(NULL), atEntry->mapid, atEntry->x, atEntry->y, atEntry->z);
GetPlayer()->SetRestType(REST_TYPE_IN_TAVERN);
- if (sWorld.IsFFAPvPRealm())
+ if (sWorld->IsFFAPvPRealm())
GetPlayer()->RemoveByteFlag(UNIT_FIELD_BYTES_2, 1, UNIT_BYTE2_FLAG_FFA_PVP);
return;
@@ -956,12 +956,12 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket & recv_data)
void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data)
{
- sLog.outDetail("WORLD: Received CMSG_UPDATE_ACCOUNT_DATA");
+ sLog->outDetail("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);
+ sLog->outDebug("UAD: type %u, time %u, decompressedSize %u", type, timestamp, decompressedSize);
if (type > NUM_ACCOUNT_DATA_TYPES)
return;
@@ -981,7 +981,7 @@ void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data)
if (decompressedSize > 0xFFFF)
{
recv_data.rpos(recv_data.wpos()); // unnneded warning spam in this case
- sLog.outError("UAD: Account data packet too big, size %u", decompressedSize);
+ sLog->outError("UAD: Account data packet too big, size %u", decompressedSize);
return;
}
@@ -992,7 +992,7 @@ void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data)
if (uncompress(const_cast<uint8*>(dest.contents()), &realSize, const_cast<uint8*>(recv_data.contents() + recv_data.rpos()), recv_data.size() - recv_data.rpos()) != Z_OK)
{
recv_data.rpos(recv_data.wpos()); // unnneded warning spam in this case
- sLog.outError("UAD: Failed to decompress account data");
+ sLog->outError("UAD: Failed to decompress account data");
return;
}
@@ -1011,12 +1011,12 @@ void WorldSession::HandleUpdateAccountData(WorldPacket &recv_data)
void WorldSession::HandleRequestAccountData(WorldPacket& recv_data)
{
- sLog.outDetail("WORLD: Received CMSG_REQUEST_ACCOUNT_DATA");
+ sLog->outDetail("WORLD: Received CMSG_REQUEST_ACCOUNT_DATA");
uint32 type;
recv_data >> type;
- sLog.outDebug("RAD: type %u", type);
+ sLog->outDebug("RAD: type %u", type);
if (type > NUM_ACCOUNT_DATA_TYPES)
return;
@@ -1032,7 +1032,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");
+ sLog->outDebug("RAD: Failed to compress account data");
return;
}
@@ -1049,7 +1049,7 @@ void WorldSession::HandleRequestAccountData(WorldPacket& recv_data)
void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_SET_ACTION_BUTTON");
+ sLog->outDebug("WORLD: Received CMSG_SET_ACTION_BUTTON");
uint8 button;
uint32 packetData;
recv_data >> button >> packetData;
@@ -1057,10 +1057,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);
+ sLog->outDetail("BUTTON: %u ACTION: %u TYPE: %u", button, action, type);
if (!packetData)
{
- sLog.outDetail("MISC: Remove action from button %u", button);
+ sLog->outDetail("MISC: Remove action from button %u", button);
GetPlayer()->removeActionButton(button);
}
else
@@ -1069,19 +1069,19 @@ 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);
+ sLog->outDetail("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);
+ sLog->outDetail("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);
+ sLog->outDetail("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);
+ sLog->outDetail("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);
+ sLog->outError("MISC: Unknown action button type %u for action %u into button %u", type, action, button);
return;
}
GetPlayer()->addActionButton(button, action, type);
@@ -1090,18 +1090,18 @@ void WorldSession::HandleSetActionButtonOpcode(WorldPacket& recv_data)
void WorldSession::HandleCompleteCinematic(WorldPacket & /*recv_data*/)
{
- sLog.outStaticDebug("WORLD: Player is watching cinema");
+ sLog->outStaticDebug("WORLD: Player is watching cinema");
}
void WorldSession::HandleNextCinematicCamera(WorldPacket & /*recv_data*/)
{
- sLog.outStaticDebug("WORLD: Which movie to play");
+ sLog->outStaticDebug("WORLD: Which movie to play");
}
void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket & recv_data)
{
/* WorldSession::Update(getMSTime());*/
- sLog.outStaticDebug("WORLD: Time Lag/Synchronization Resent/Update");
+ sLog->outStaticDebug("WORLD: Time Lag/Synchronization Resent/Update");
uint64 guid;
recv_data.readPackGUID(guid);
@@ -1111,7 +1111,7 @@ void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket & recv_data)
uint32 time_skipped;
recv_data >> guid;
recv_data >> time_skipped;
- sLog.outDebug("WORLD: CMSG_MOVE_TIME_SKIPPED");
+ sLog->outDebug("WORLD: CMSG_MOVE_TIME_SKIPPED");
/// TODO
must be need use in Trinity
@@ -1123,7 +1123,7 @@ void WorldSession::HandleMoveTimeSkippedOpcode(WorldPacket & recv_data)
void WorldSession::HandleFeatherFallAck(WorldPacket &recv_data)
{
- sLog.outStaticDebug("WORLD: CMSG_MOVE_FEATHER_FALL_ACK");
+ sLog->outStaticDebug("WORLD: CMSG_MOVE_FEATHER_FALL_ACK");
// no used
recv_data.rpos(recv_data.wpos()); // prevent warnings spam
@@ -1144,7 +1144,7 @@ void WorldSession::HandleMoveUnRootAck(WorldPacket& recv_data)
return;
}
- sLog.outDebug("WORLD: CMSG_FORCE_MOVE_UNROOT_ACK");
+ sLog->outDebug("WORLD: CMSG_FORCE_MOVE_UNROOT_ACK");
recv_data.read_skip<uint32>(); // unk
@@ -1170,7 +1170,7 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recv_data)
return;
}
- sLog.outDebug("WORLD: CMSG_FORCE_MOVE_ROOT_ACK");
+ sLog->outDebug("WORLD: CMSG_FORCE_MOVE_ROOT_ACK");
recv_data.read_skip<uint32>(); // unk
@@ -1188,7 +1188,7 @@ void WorldSession::HandleSetActionBarToggles(WorldPacket& recv_data)
if (!GetPlayer()) // ignore until not logged (check needed because STATUS_AUTHED)
{
if (ActionBar != 0)
- sLog.outError("WorldSession::HandleSetActionBarToggles in not logged state with value: %u, ignored",uint32(ActionBar));
+ sLog->outError("WorldSession::HandleSetActionBarToggles in not logged state with value: %u, ignored",uint32(ActionBar));
return;
}
@@ -1201,7 +1201,7 @@ void WorldSession::HandleWardenDataOpcode(WorldPacket& recv_data)
/*
uint8 tmp;
recv_data >> tmp;
- sLog.outDebug("Received opcode CMSG_WARDEN_DATA, not resolve.uint8 = %u",tmp);
+ sLog->outDebug("Received opcode CMSG_WARDEN_DATA, not resolve.uint8 = %u",tmp);
*/
}
@@ -1221,7 +1221,7 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
{
uint64 guid;
recv_data >> guid;
- sLog.outStaticDebug("Inspected guid is " UI64FMTD, guid);
+ sLog->outStaticDebug("Inspected guid is " UI64FMTD, guid);
_player->SetSelection(guid);
@@ -1234,7 +1234,7 @@ void WorldSession::HandleInspectOpcode(WorldPacket& recv_data)
WorldPacket data(SMSG_INSPECT_TALENT, guid_size+4+talent_points);
data.append(plr->GetPackGUID());
- if (sWorld.getBoolConfig(CONFIG_TALENTS_INSPECTING) || _player->isGameMaster())
+ if (sWorld->getBoolConfig(CONFIG_TALENTS_INSPECTING) || _player->isGameMaster())
{
plr->BuildPlayerTalentsInfoData(&data);
}
@@ -1258,7 +1258,7 @@ void WorldSession::HandleInspectHonorStatsOpcode(WorldPacket& recv_data)
if (!player)
{
- sLog.outError("InspectHonorStats: WTF, player not found...");
+ sLog->outError("InspectHonorStats: WTF, player not found...");
return;
}
@@ -1292,25 +1292,25 @@ void WorldSession::HandleWorldTeleportOpcode(WorldPacket& recv_data)
recv_data >> PositionZ;
recv_data >> Orientation; // o (3.141593 = 180 degrees)
- //sLog.outDebug("Received opcode CMSG_WORLD_TELEPORT");
+ //sLog->outDebug("Received opcode CMSG_WORLD_TELEPORT");
if (GetPlayer()->isInFlight())
{
- sLog.outDebug("Player '%s' (GUID: %u) in flight, ignore worldport command.",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow());
+ sLog->outDebug("Player '%s' (GUID: %u) in flight, ignore worldport command.",GetPlayer()->GetName(),GetPlayer()->GetGUIDLow());
return;
}
- sLog.outStaticDebug("Time %u sec, map=%u, x=%f, y=%f, z=%f, orient=%f", time/1000, mapid, PositionX, PositionY, PositionZ, Orientation);
+ sLog->outStaticDebug("Time %u sec, map=%u, x=%f, y=%f, z=%f, orient=%f", time/1000, mapid, PositionX, PositionY, PositionZ, Orientation);
if (GetSecurity() >= SEC_ADMINISTRATOR)
GetPlayer()->TeleportTo(mapid,PositionX,PositionY,PositionZ,Orientation);
else
SendNotification(LANG_YOU_NOT_HAVE_PERMISSION);
- sLog.outDebug("Received worldport command from player %s", GetPlayer()->GetName());
+ sLog->outDebug("Received worldport command from player %s", GetPlayer()->GetName());
}
void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
{
- sLog.outDebug("Received opcode CMSG_WHOIS");
+ sLog->outDebug("Received opcode CMSG_WHOIS");
std::string charname;
recv_data >> charname;
@@ -1360,12 +1360,12 @@ void WorldSession::HandleWhoisOpcode(WorldPacket& recv_data)
data << msg;
_player->GetSession()->SendPacket(&data);
- sLog.outDebug("Received whois command from player %s for character %s", GetPlayer()->GetName(), charname.c_str());
+ sLog->outDebug("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");
+ sLog->outDebug("WORLD: CMSG_COMPLAIN");
recv_data.hexlike();
uint8 spam_type; // 0 - mail, 1 - chat
@@ -1401,12 +1401,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());
+ 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());
}
void WorldSession::HandleRealmSplitOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("CMSG_REALM_SPLIT");
+ sLog->outDebug("CMSG_REALM_SPLIT");
uint32 unk;
std::string split_date = "01/01/01";
@@ -1421,12 +1421,12 @@ void WorldSession::HandleRealmSplitOpcode(WorldPacket & recv_data)
// 0x2 realm split pending
data << split_date;
SendPacket(&data);
- //sLog.outDebug("response sent %u", unk);
+ //sLog->outDebug("response sent %u", unk);
}
void WorldSession::HandleFarSightOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_FAR_SIGHT");
+ sLog->outDebug("WORLD: CMSG_FAR_SIGHT");
//recv_data.hexlike();
uint8 apply;
@@ -1435,18 +1435,18 @@ void WorldSession::HandleFarSightOpcode(WorldPacket & recv_data)
switch(apply)
{
case 0:
- sLog.outDebug("Player %u set vision to self", _player->GetGUIDLow());
+ sLog->outDebug("Player %u set vision to self", _player->GetGUIDLow());
_player->SetSeer(_player);
break;
case 1:
- sLog.outDebug("Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow());
+ sLog->outDebug("Added FarSight " UI64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow());
if (WorldObject *target = _player->GetViewpoint())
_player->SetSeer(target);
else
- sLog.outError("Player %s requests non-existing seer", _player->GetName());
+ sLog->outError("Player %s requests non-existing seer", _player->GetName());
break;
default:
- sLog.outDebug("Unhandled mode in CMSG_FAR_SIGHT: %u", apply);
+ sLog->outDebug("Unhandled mode in CMSG_FAR_SIGHT: %u", apply);
return;
}
@@ -1455,7 +1455,7 @@ void WorldSession::HandleFarSightOpcode(WorldPacket & recv_data)
void WorldSession::HandleSetTitleOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("CMSG_SET_TITLE");
+ sLog->outDebug("CMSG_SET_TITLE");
int32 title;
recv_data >> title;
@@ -1474,27 +1474,27 @@ void WorldSession::HandleSetTitleOpcode(WorldPacket & recv_data)
void WorldSession::HandleTimeSyncResp(WorldPacket & recv_data)
{
- sLog.outDebug("CMSG_TIME_SYNC_RESP");
+ sLog->outDebug("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());
+ sLog->outDebug("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);
+ sLog->outDebug("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());
+ sLog->outDebug("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");
+ sLog->outDebug("WORLD: CMSG_RESET_INSTANCES");
Group *pGroup = _player->GetGroup();
if (pGroup)
{
@@ -1513,14 +1513,14 @@ void WorldSession::HandleResetInstancesOpcode(WorldPacket & /*recv_data*/)
void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("MSG_SET_DUNGEON_DIFFICULTY");
+ sLog->outDebug("MSG_SET_DUNGEON_DIFFICULTY");
uint32 mode;
recv_data >> mode;
if (mode >= MAX_DUNGEON_DIFFICULTY)
{
- sLog.outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode);
+ sLog->outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode);
return;
}
@@ -1531,7 +1531,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
Map *map = _player->GetMap();
if (map && map->IsDungeon())
{
- sLog.outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
+ sLog->outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
return;
}
@@ -1555,7 +1555,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
map = pGroupGuy->GetMap();
if (map && map->IsNonRaidDungeon())
{
- sLog.outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
+ sLog->outError("WorldSession::HandleSetDungeonDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
return;
}
}
@@ -1574,14 +1574,14 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket & recv_data)
void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("MSG_SET_RAID_DIFFICULTY");
+ sLog->outDebug("MSG_SET_RAID_DIFFICULTY");
uint32 mode;
recv_data >> mode;
if (mode >= MAX_RAID_DIFFICULTY)
{
- sLog.outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode);
+ sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d sent an invalid instance mode %d!", _player->GetGUIDLow(), mode);
return;
}
@@ -1589,7 +1589,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
Map *map = _player->GetMap();
if (map && map->IsDungeon())
{
- sLog.outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
+ sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
return;
}
@@ -1616,7 +1616,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
map = pGroupGuy->GetMap();
if (map && map->IsRaid())
{
- sLog.outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
+ sLog->outError("WorldSession::HandleSetRaidDifficultyOpcode: player %d tried to reset the instance while inside!", _player->GetGUIDLow());
return;
}
}
@@ -1635,7 +1635,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket & recv_data)
void WorldSession::HandleCancelMountAuraOpcode(WorldPacket & /*recv_data*/)
{
- sLog.outDebug("WORLD: CMSG_CANCEL_MOUNT_AURA");
+ sLog->outDebug("WORLD: CMSG_CANCEL_MOUNT_AURA");
//If player is not mounted, so go out :)
if (!_player->IsMounted()) // not blizz like; no any messages on blizz
@@ -1657,7 +1657,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");
+ sLog->outDebug("WORLD: CMSG_MOVE_SET_CAN_FLY_ACK");
//recv_data.hexlike();
uint64 guid; // guid - unused
@@ -1678,7 +1678,7 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket & recv_data)
void WorldSession::HandleRequestPetInfoOpcode(WorldPacket & /*recv_data */)
{
/*
- sLog.outDebug("WORLD: CMSG_REQUEST_PET_INFO");
+ sLog->outDebug("WORLD: CMSG_REQUEST_PET_INFO");
recv_data.hexlike();
*/
}
@@ -1688,7 +1688,7 @@ void WorldSession::HandleSetTaxiBenchmarkOpcode(WorldPacket & recv_data)
uint8 mode;
recv_data >> mode;
- sLog.outDebug("Client used \"/timetest %d\" command", mode);
+ sLog->outDebug("Client used \"/timetest %d\" command", mode);
}
void WorldSession::HandleQueryInspectAchievements(WorldPacket & recv_data)
@@ -1706,7 +1706,7 @@ void WorldSession::HandleQueryInspectAchievements(WorldPacket & recv_data)
void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recv_data*/)
{
// empty opcode
- sLog.outDebug("WORLD: CMSG_WORLD_STATE_UI_TIMER_UPDATE");
+ sLog->outDebug("WORLD: CMSG_WORLD_STATE_UI_TIMER_UPDATE");
WorldPacket data(SMSG_WORLD_STATE_UI_TIMER_UPDATE, 4);
data << uint32(time(NULL));
@@ -1716,7 +1716,7 @@ void WorldSession::HandleWorldStateUITimerUpdate(WorldPacket& /*recv_data*/)
void WorldSession::HandleReadyForAccountDataTimes(WorldPacket& /*recv_data*/)
{
// empty opcode
- sLog.outDebug("WORLD: CMSG_READY_FOR_ACCOUNT_DATA_TIMES");
+ sLog->outDebug("WORLD: CMSG_READY_FOR_ACCOUNT_DATA_TIMES");
SendAccountDataTimes(GLOBAL_CACHE_MASK);
}
diff --git a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
index dc66f0399d8..08828f541d1 100755
--- a/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/MovementHandler.cpp
@@ -34,7 +34,7 @@
void WorldSession::HandleMoveWorldportAckOpcode(WorldPacket & /*recv_data*/)
{
- sLog.outDebug("WORLD: got MSG_MOVE_WORLDPORT_ACK.");
+ sLog->outDebug("WORLD: got MSG_MOVE_WORLDPORT_ACK.");
HandleMoveWorldportAckOpcode();
}
@@ -68,7 +68,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
ASSERT(oldMap);
if (GetPlayer()->IsInWorld())
{
- sLog.outCrash("Player is still in world when teleported from map %u! to new map %u", oldMap->GetId(), loc.GetMapId());
+ sLog->outCrash("Player is still in world when teleported from map %u! to new map %u", oldMap->GetId(), loc.GetMapId());
oldMap->Remove(GetPlayer(), false);
}
@@ -78,7 +78,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
// while the player is in transit, for example the map may get full
if (!newMap || !newMap->CanEnter(GetPlayer()))
{
- sLog.outError("Map %d could not be created for player %d, porting player to homebind", loc.GetMapId(), GetPlayer()->GetGUIDLow());
+ sLog->outError("Map %d could not be created for player %d, porting player to homebind", loc.GetMapId(), GetPlayer()->GetGUIDLow());
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation());
return;
}
@@ -91,7 +91,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
GetPlayer()->SendInitialPacketsBeforeAddToMap();
if (!GetPlayer()->GetMap()->Add(GetPlayer()))
{
- sLog.outError("WORLD: failed to teleport player %s (%d) to map %d because of unknown reason!", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), loc.GetMapId());
+ sLog->outError("WORLD: failed to teleport player %s (%d) to map %d because of unknown reason!", GetPlayer()->GetName(), GetPlayer()->GetGUIDLow(), loc.GetMapId());
GetPlayer()->ResetMap();
GetPlayer()->SetMap(oldMap);
GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation());
@@ -191,15 +191,15 @@ void WorldSession::HandleMoveWorldportAckOpcode()
void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
{
- sLog.outDebug("MSG_MOVE_TELEPORT_ACK");
+ sLog->outDebug("MSG_MOVE_TELEPORT_ACK");
uint64 guid;
recv_data.readPackGUID(guid);
uint32 flags, time;
recv_data >> flags >> time;
- sLog.outStaticDebug("Guid " UI64FMTD, guid);
- sLog.outStaticDebug("Flags %u, time %u", flags, time/IN_MILLISECONDS);
+ sLog->outStaticDebug("Guid " UI64FMTD, guid);
+ sLog->outStaticDebug("Flags %u, time %u", flags, time/IN_MILLISECONDS);
Unit *mover = _player->m_mover;
Player *plMover = mover->GetTypeId() == TYPEID_PLAYER ? (Player*)mover : NULL;
@@ -395,7 +395,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);
+ sLog->outDebug("WORLD: Recvd %s (%u, 0x%X) opcode", LookupOpcodeName(opcode), opcode, opcode);
/* extract packet */
uint64 guid;
@@ -441,7 +441,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
case CMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE_ACK: move_type = MOVE_FLIGHT_BACK; force_move_type = MOVE_FLIGHT_BACK; break;
case CMSG_FORCE_PITCH_RATE_CHANGE_ACK: move_type = MOVE_PITCH_RATE; force_move_type = MOVE_PITCH_RATE; break;
default:
- sLog.outError("WorldSession::HandleForceSpeedChangeAck: Unknown move type opcode: %u", opcode);
+ sLog->outError("WorldSession::HandleForceSpeedChangeAck: Unknown move type opcode: %u", opcode);
return;
}
@@ -458,13 +458,13 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
{
if (_player->GetSpeed(move_type) > newspeed) // must be greater - just correct
{
- sLog.outError("%sSpeedChange player %s is NOT correct (must be %f instead %f), force set to correct value",
+ sLog->outError("%sSpeedChange player %s is NOT correct (must be %f instead %f), force set to correct value",
move_type_name[move_type], _player->GetName(), _player->GetSpeed(move_type), newspeed);
_player->SetSpeed(move_type,_player->GetSpeedRate(move_type),true);
}
else // must be lesser - cheating
{
- sLog.outBasic("Player %s from account id %u kicked for incorrect speed (must be %f instead %f)",
+ sLog->outBasic("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();
}
@@ -473,7 +473,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: Recvd CMSG_SET_ACTIVE_MOVER");
+ sLog->outDebug("WORLD: Recvd CMSG_SET_ACTIVE_MOVER");
uint64 guid;
recv_data >> guid;
@@ -493,7 +493,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
}
else
{
- sLog.outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " and should be " UI64FMTD, guid, _player->m_mover->GetGUID());
+ sLog->outError("HandleSetActiveMoverOpcode: incorrect mover guid: mover is " UI64FMTD " and should be " UI64FMTD, guid, _player->m_mover->GetGUID());
GetPlayer()->SetMover(GetPlayer());
}
}
@@ -501,7 +501,7 @@ void WorldSession::HandleSetActiveMoverOpcode(WorldPacket &recv_data)
void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: Recvd CMSG_MOVE_NOT_ACTIVE_MOVER");
+ sLog->outDebug("WORLD: Recvd CMSG_MOVE_NOT_ACTIVE_MOVER");
uint64 old_mover_guid;
recv_data.readPackGUID(old_mover_guid);
@@ -515,7 +515,7 @@ void WorldSession::HandleMoveNotActiveMover(WorldPacket &recv_data)
void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: Recvd CMSG_DISMISS_CONTROLLED_VEHICLE");
+ sLog->outDebug("WORLD: Recvd CMSG_DISMISS_CONTROLLED_VEHICLE");
recv_data.hexlike();
uint64 vehicleGUID = _player->GetCharmGUID();
@@ -541,7 +541,7 @@ void WorldSession::HandleDismissControlledVehicle(WorldPacket &recv_data)
void WorldSession::HandleChangeSeatsOnControlledVehicle(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: Recvd CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE");
+ sLog->outDebug("WORLD: Recvd CMSG_CHANGE_SEATS_ON_CONTROLLED_VEHICLE");
recv_data.hexlike();
Unit* vehicle_base = GetPlayer()->GetVehicleBase();
@@ -639,7 +639,7 @@ void WorldSession::HandleEjectPassenger(WorldPacket &data)
void WorldSession::HandleRequestVehicleExit(WorldPacket &recv_data)
{
- sLog.outDebug("WORLD: Recvd CMSG_REQUEST_VEHICLE_EXIT");
+ sLog->outDebug("WORLD: Recvd CMSG_REQUEST_VEHICLE_EXIT");
recv_data.hexlike();
GetPlayer()->ExitVehicle();
}
@@ -654,7 +654,7 @@ void WorldSession::HandleMountSpecialAnimOpcode(WorldPacket& /*recv_data*/)
void WorldSession::HandleMoveKnockBackAck(WorldPacket & recv_data)
{
- sLog.outDebug("CMSG_MOVE_KNOCK_BACK_ACK");
+ sLog->outDebug("CMSG_MOVE_KNOCK_BACK_ACK");
uint64 guid; // guid - unused
recv_data.readPackGUID(guid);
@@ -667,7 +667,7 @@ void WorldSession::HandleMoveKnockBackAck(WorldPacket & recv_data)
void WorldSession::HandleMoveHoverAck(WorldPacket& recv_data)
{
- sLog.outDebug("CMSG_MOVE_HOVER_ACK");
+ sLog->outDebug("CMSG_MOVE_HOVER_ACK");
uint64 guid; // guid - unused
recv_data.readPackGUID(guid);
@@ -682,7 +682,7 @@ void WorldSession::HandleMoveHoverAck(WorldPacket& recv_data)
void WorldSession::HandleMoveWaterWalkAck(WorldPacket& recv_data)
{
- sLog.outDebug("CMSG_MOVE_WATER_WALK_ACK");
+ sLog->outDebug("CMSG_MOVE_WATER_WALK_ACK");
uint64 guid; // guid - unused
recv_data.readPackGUID(guid);
diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
index cc1f1ea6d78..33555f7ea35 100755
--- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp
@@ -54,7 +54,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 not interact with him.", uint32(GUID_LOPART(guid)));
+ sLog->outDebug("WORLD: HandleTabardVendorActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -76,14 +76,14 @@ void WorldSession::HandleBankerActivateOpcode(WorldPacket & recv_data)
{
uint64 guid;
- sLog.outDebug("WORLD: Received CMSG_BANKER_ACTIVATE");
+ sLog->outDebug("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 not interact with him.", uint32(GUID_LOPART(guid)));
+ sLog->outDebug("WORLD: HandleBankerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -117,12 +117,12 @@ void WorldSession::SendTrainerList(uint64 guid)
void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
{
- sLog.outDebug("WORLD: SendTrainerList");
+ sLog->outDebug("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 not interact with him.", uint32(GUID_LOPART(guid)));
+ sLog->outDebug("WORLD: SendTrainerList - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -138,14 +138,14 @@ void WorldSession::SendTrainerList(uint64 guid, const std::string& strTitle)
if (!ci)
{
- sLog.outDebug("WORLD: SendTrainerList - (GUID: %u) NO CREATUREINFO!",GUID_LOPART(guid));
+ sLog->outDebug("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)",
+ sLog->outDebug("WORLD: SendTrainerList - Training spells not found for creature (GUID: %u Entry: %u)",
GUID_LOPART(guid), unit->GetEntry());
return;
}
@@ -241,12 +241,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);
+ sLog->outDebug("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 not interact with him.", uint32(GUID_LOPART(guid)));
+ sLog->outDebug("WORLD: HandleTrainerBuySpellOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -304,7 +304,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket & recv_data)
void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_GOSSIP_HELLO");
+ sLog->outDebug("WORLD: Received CMSG_GOSSIP_HELLO");
uint64 guid;
recv_data >> guid;
@@ -312,7 +312,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!unit)
{
- sLog.outDebug("WORLD: HandleGossipHelloOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
+ sLog->outDebug("WORLD: HandleGossipHelloOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -349,7 +349,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
/*void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_GOSSIP_SELECT_OPTION");
+ sLog->outDebug("WORLD: CMSG_GOSSIP_SELECT_OPTION");
uint32 option;
uint32 unk;
@@ -360,15 +360,15 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
if (_player->PlayerTalkClass->GossipOptionCoded(option))
{
- sLog.outDebug("reading string");
+ sLog->outDebug("reading string");
recv_data >> code;
- sLog.outDebug("string read: %s", code.c_str());
+ sLog->outDebug("string read: %s", code.c_str());
}
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
if (!unit)
{
- sLog.outDebug("WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
+ sLog->outDebug("WORLD: HandleGossipSelectOptionOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -390,7 +390,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket & recv_data)
void WorldSession::HandleSpiritHealerActivateOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_SPIRIT_HEALER_ACTIVATE");
+ sLog->outDebug("WORLD: CMSG_SPIRIT_HEALER_ACTIVATE");
uint64 guid;
@@ -399,7 +399,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 not interact with him.", uint32(GUID_LOPART(guid)));
+ sLog->outDebug("WORLD: HandleSpiritHealerActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -454,7 +454,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 not interact with him.", uint32(GUID_LOPART(npcGUID)));
+ sLog->outDebug("WORLD: HandleBinderActivateOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(npcGUID)));
return;
}
@@ -495,7 +495,7 @@ void WorldSession::SendBindPoint(Creature *npc)
void WorldSession::HandleListStabledPetsOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Recv MSG_LIST_STABLED_PETS");
+ sLog->outDebug("WORLD: Recv MSG_LIST_STABLED_PETS");
uint64 npcGUID;
recv_data >> npcGUID;
@@ -528,7 +528,7 @@ void WorldSession::SendStablePetCallback(QueryResult result, uint64 guid)
if (!GetPlayer())
return;
- sLog.outDebug("WORLD: Recv MSG_LIST_STABLED_PETS Send.");
+ sLog->outDebug("WORLD: Recv MSG_LIST_STABLED_PETS Send.");
WorldPacket data(MSG_LIST_STABLED_PETS, 200); // guess size
@@ -585,7 +585,7 @@ void WorldSession::SendStableResult(uint8 res)
void WorldSession::HandleStablePet(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Recv CMSG_STABLE_PET");
+ sLog->outDebug("WORLD: Recv CMSG_STABLE_PET");
uint64 npcGUID;
recv_data >> npcGUID;
@@ -656,7 +656,7 @@ void WorldSession::HandleStablePetCallback(QueryResult result)
void WorldSession::HandleUnstablePet(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Recv CMSG_UNSTABLE_PET.");
+ sLog->outDebug("WORLD: Recv CMSG_UNSTABLE_PET.");
uint64 npcGUID;
uint32 petnumber;
@@ -733,7 +733,7 @@ void WorldSession::HandleUnstablePetCallback(QueryResult result, uint32 petnumbe
void WorldSession::HandleBuyStableSlot(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Recv CMSG_BUY_STABLE_SLOT.");
+ sLog->outDebug("WORLD: Recv CMSG_BUY_STABLE_SLOT.");
uint64 npcGUID;
recv_data >> npcGUID;
@@ -766,12 +766,12 @@ void WorldSession::HandleBuyStableSlot(WorldPacket & recv_data)
void WorldSession::HandleStableRevivePet(WorldPacket &/* recv_data */)
{
- sLog.outDebug("HandleStableRevivePet: Not implemented");
+ sLog->outDebug("HandleStableRevivePet: Not implemented");
}
void WorldSession::HandleStableSwapPet(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Recv CMSG_STABLE_SWAP_PET.");
+ sLog->outDebug("WORLD: Recv CMSG_STABLE_SWAP_PET.");
uint64 npcGUID;
uint32 pet_number;
@@ -854,7 +854,7 @@ void WorldSession::HandleStableSwapPetCallback(QueryResult result, uint32 petnum
void WorldSession::HandleRepairItemOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_REPAIR_ITEM");
+ sLog->outDebug("WORLD: CMSG_REPAIR_ITEM");
uint64 npcGUID, itemGUID;
uint8 guildBank; // new in 2.3.2, bool that means from guild bank money
@@ -864,7 +864,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 not interact with him.", uint32(GUID_LOPART(npcGUID)));
+ sLog->outDebug("WORLD: HandleRepairItemOpcode - Unit (GUID: %u) not found or you can not interact with him.", uint32(GUID_LOPART(npcGUID)));
return;
}
@@ -878,7 +878,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));
+ sLog->outDebug("ITEM: Repair item, itemGUID = %u, npcGUID = %u", GUID_LOPART(itemGUID), GUID_LOPART(npcGUID));
Item* item = _player->GetItemByGuid(itemGUID);
if (item)
@@ -886,7 +886,7 @@ void WorldSession::HandleRepairItemOpcode(WorldPacket & recv_data)
}
else
{
- sLog.outDebug("ITEM: Repair all items, npcGUID = %u", GUID_LOPART(npcGUID));
+ sLog->outDebug("ITEM: Repair all items, npcGUID = %u", GUID_LOPART(npcGUID));
TotalCost = _player->DurabilityRepairAll(true, discountMod, guildBank);
}
}
diff --git a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp
index f099cd9c51d..a4ea46d071e 100755
--- a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp
@@ -36,13 +36,13 @@ void WorldSession::HandleDismissCritter(WorldPacket &recv_data)
uint64 guid;
recv_data >> guid;
- sLog.outDebug("WORLD: Received CMSG_DISMISS_CRITTER for GUID " UI64FMTD "", guid);
+ sLog->outDebug("WORLD: Received CMSG_DISMISS_CRITTER for GUID " UI64FMTD "", guid);
Unit* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (!pet)
{
- sLog.outError("Vanitypet %u does not exist", uint32(GUID_LOPART(guid)));
+ sLog->outError("Vanitypet %u does not exist", uint32(GUID_LOPART(guid)));
return;
}
@@ -67,16 +67,16 @@ 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)));
+ sLog->outDetail("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)));
+ sLog->outError("Pet %u not exist.", uint32(GUID_LOPART(guid1)));
return;
}
if (pet != GetPlayer()->GetFirstControlled())
{
- sLog.outError("HandlePetAction.Pet %u isn't pet of player %s.", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName());
+ sLog->outError("HandlePetAction.Pet %u isn't pet of player %s.", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName());
return;
}
@@ -112,19 +112,19 @@ void WorldSession::HandlePetStopAttack(WorldPacket &recv_data)
uint64 guid;
recv_data >> guid;
- sLog.outDebug("WORLD: Received CMSG_PET_STOP_ATTACK for GUID " UI64FMTD "", guid);
+ sLog->outDebug("WORLD: Received CMSG_PET_STOP_ATTACK for GUID " UI64FMTD "", guid);
Unit* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (!pet)
{
- sLog.outError("HandlePetStopAttack: Pet %u does not exist", uint32(GUID_LOPART(guid)));
+ sLog->outError("HandlePetStopAttack: Pet %u does not exist", uint32(GUID_LOPART(guid)));
return;
}
if (pet != GetPlayer()->GetPet() && pet != GetPlayer()->GetCharm())
{
- sLog.outError("HandlePetStopAttack: Pet GUID %u isn't a pet or charmed creature of player %s", uint32(GUID_LOPART(guid)), GetPlayer()->GetName());
+ sLog->outError("HandlePetStopAttack: Pet GUID %u isn't a pet or charmed creature of player %s", uint32(GUID_LOPART(guid)), GetPlayer()->GetName());
return;
}
@@ -139,7 +139,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
CharmInfo *charmInfo = pet->GetCharmInfo();
if (!charmInfo)
{
- sLog.outError("WorldSession::HandlePetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
+ sLog->outError("WorldSession::HandlePetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
return;
}
@@ -191,7 +191,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
return;
// Not let attack through obstructions
- if (sWorld.getBoolConfig(CONFIG_PET_LOS))
+ if (sWorld->getBoolConfig(CONFIG_PET_LOS))
{
if (!pet->IsWithinLOSInMap(TargetUnit))
return;
@@ -259,7 +259,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
}
break;
default:
- sLog.outError("WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid);
+ sLog->outError("WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid);
}
break;
case ACT_REACTION: // 0x6
@@ -288,7 +288,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellid);
if (!spellInfo)
{
- sLog.outError("WORLD: unknown PET spell id %i", spellid);
+ sLog->outError("WORLD: unknown PET spell id %i", spellid);
return;
}
@@ -391,13 +391,13 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
break;
}
default:
- sLog.outError("WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid);
+ sLog->outError("WORLD: unknown PET flag Action %i and spellid %i.", uint32(flag), spellid);
}
}
void WorldSession::HandlePetNameQuery(WorldPacket & recv_data)
{
- sLog.outDetail("HandlePetNameQuery. CMSG_PET_NAME_QUERY");
+ sLog->outDetail("HandlePetNameQuery. CMSG_PET_NAME_QUERY");
uint32 petnumber;
uint64 petguid;
@@ -448,7 +448,7 @@ bool WorldSession::CheckStableMaster(uint64 guid)
{
if (!GetPlayer()->isGameMaster() && !GetPlayer()->HasAuraType(SPELL_AURA_OPEN_STABLE))
{
- sLog.outStaticDebug("Player (GUID:%u) attempt open stable in cheating way.", GUID_LOPART(guid));
+ sLog->outStaticDebug("Player (GUID:%u) attempt open stable in cheating way.", GUID_LOPART(guid));
return false;
}
}
@@ -457,7 +457,7 @@ bool WorldSession::CheckStableMaster(uint64 guid)
{
if (!GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_STABLEMASTER))
{
- sLog.outStaticDebug("Stablemaster (GUID:%u) not found or you can't interact with him.", GUID_LOPART(guid));
+ sLog->outStaticDebug("Stablemaster (GUID:%u) not found or you can't interact with him.", GUID_LOPART(guid));
return false;
}
}
@@ -466,7 +466,7 @@ bool WorldSession::CheckStableMaster(uint64 guid)
void WorldSession::HandlePetSetAction(WorldPacket & recv_data)
{
- sLog.outDetail("HandlePetSetAction. CMSG_PET_SET_ACTION");
+ sLog->outDetail("HandlePetSetAction. CMSG_PET_SET_ACTION");
uint64 petguid;
uint8 count;
@@ -477,14 +477,14 @@ void WorldSession::HandlePetSetAction(WorldPacket & recv_data)
if (!pet || pet != _player->GetFirstControlled())
{
- sLog.outError("HandlePetSetAction: Unknown pet or pet owner.");
+ sLog->outError("HandlePetSetAction: Unknown pet or pet owner.");
return;
}
CharmInfo *charmInfo = pet->GetCharmInfo();
if (!charmInfo)
{
- sLog.outError("WorldSession::HandlePetSetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
+ sLog->outError("WorldSession::HandlePetSetAction: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
return;
}
@@ -546,7 +546,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));
+ 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));
//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)))
@@ -576,7 +576,7 @@ void WorldSession::HandlePetSetAction(WorldPacket & recv_data)
void WorldSession::HandlePetRename(WorldPacket & recv_data)
{
- sLog.outDetail("HandlePetRename. CMSG_PET_RENAME");
+ sLog->outDetail("HandlePetRename. CMSG_PET_RENAME");
uint64 petguid;
uint8 isdeclined;
@@ -653,7 +653,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));
+ sLog->outDetail("HandlePetAbandon. CMSG_PET_ABANDON pet guid is %u", GUID_LOPART(guid));
if (!_player->IsInWorld())
return;
@@ -679,7 +679,7 @@ void WorldSession::HandlePetAbandon(WorldPacket & recv_data)
void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
{
- sLog.outDetail("CMSG_PET_SPELL_AUTOCAST");
+ sLog->outDetail("CMSG_PET_SPELL_AUTOCAST");
uint64 guid;
uint32 spellid;
uint8 state; //1 for on, 0 for off
@@ -695,7 +695,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
if (!pet || (pet != _player->GetGuardianPet() && pet != _player->GetCharm()))
{
- sLog.outError("HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName());
+ sLog->outError("HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName());
return;
}
@@ -706,7 +706,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
CharmInfo *charmInfo = pet->GetCharmInfo();
if (!charmInfo)
{
- sLog.outError("WorldSession::HandlePetSpellAutocastOpcod: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
+ sLog->outError("WorldSession::HandlePetSpellAutocastOpcod: object (GUID: %u TypeId: %u) is considered pet-like but doesn't have a charminfo!", pet->GetGUIDLow(), pet->GetTypeId());
return;
}
@@ -720,7 +720,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
{
- sLog.outDetail("WORLD: CMSG_PET_CAST_SPELL");
+ sLog->outDetail("WORLD: CMSG_PET_CAST_SPELL");
uint64 guid;
uint8 castCount;
@@ -729,7 +729,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
recvPacket >> guid >> castCount >> spellId >> castFlags;
- sLog.outDebug("WORLD: CMSG_PET_CAST_SPELL, guid: " UI64FMTD ", castCount: %u, spellId %u, castFlags %u", guid, castCount, spellId, castFlags);
+ sLog->outDebug("WORLD: CMSG_PET_CAST_SPELL, guid: " UI64FMTD ", castCount: %u, spellId %u, castFlags %u", guid, castCount, spellId, castFlags);
// This opcode is also sent from charmed and possessed units (players and creatures)
if (!_player->GetGuardianPet() && !_player->GetCharm())
@@ -739,14 +739,14 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
if (!caster || (caster != _player->GetGuardianPet() && caster != _player->GetCharm()))
{
- sLog.outError("HandlePetCastSpellOpcode: Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName());
+ sLog->outError("HandlePetCastSpellOpcode: Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName());
return;
}
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
if (!spellInfo)
{
- sLog.outError("WORLD: unknown PET spell id %i", spellId);
+ sLog->outError("WORLD: unknown PET spell id %i", spellId);
return;
}
@@ -834,7 +834,7 @@ void WorldSession::SendPetNameInvalid(uint32 error, const std::string& name, Dec
void WorldSession::HandlePetLearnTalent(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_PET_LEARN_TALENT");
+ sLog->outDebug("WORLD: CMSG_PET_LEARN_TALENT");
uint64 guid;
uint32 talent_id, requested_rank;
@@ -846,7 +846,7 @@ void WorldSession::HandlePetLearnTalent(WorldPacket & recv_data)
void WorldSession::HandleLearnPreviewTalentsPet(WorldPacket & recv_data)
{
- sLog.outDebug("CMSG_LEARN_PREVIEW_TALENTS_PET");
+ sLog->outDebug("CMSG_LEARN_PREVIEW_TALENTS_PET");
uint64 guid;
recv_data >> guid;
diff --git a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp
index 01421e34a66..a6a4321ab58 100755
--- a/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/PetitionsHandler.cpp
@@ -56,7 +56,7 @@ enum CharterCosts
void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("Received opcode CMSG_PETITION_BUY");
+ sLog->outDebug("Received opcode CMSG_PETITION_BUY");
recv_data.hexlike();
uint64 guidNPC;
@@ -86,13 +86,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());
+ sLog->outDebug("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));
+ sLog->outDebug("WORLD: HandlePetitionBuyOpcode - Unit (GUID: %u) not found or you can't interact with him.", GUID_LOPART(guidNPC));
return;
}
@@ -117,9 +117,9 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
else
{
// TODO: find correct opcode
- if (_player->getLevel() < sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ if (_player->getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
- SendNotification(LANG_ARENA_ONE_TOOLOW, sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
+ SendNotification(LANG_ARENA_ONE_TOOLOW, sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL));
return;
}
@@ -141,7 +141,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
type = ARENA_TEAM_CHARTER_5v5_TYPE;
break;
default:
- sLog.outDebug("unknown selection at buy arena petition: %u", clientIndex);
+ sLog->outDebug("unknown selection at buy arena petition: %u", clientIndex);
return;
}
@@ -230,7 +230,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());
+ sLog->outDebug("Invalid petition GUIDs: %s", ssInvalidPetitionGUIDs.str().c_str());
CharacterDatabase.escape_string(name);
SQLTransaction trans = CharacterDatabase.BeginTransaction();
trans->PAppend("DELETE FROM petition WHERE petitionguid IN (%s)", ssInvalidPetitionGUIDs.str().c_str());
@@ -243,7 +243,7 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket & recv_data)
void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
{
// ok
- sLog.outDebug("Received opcode CMSG_PETITION_SHOW_SIGNATURES");
+ sLog->outDebug("Received opcode CMSG_PETITION_SHOW_SIGNATURES");
//recv_data.hexlike();
uint8 signs = 0;
@@ -256,7 +256,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
QueryResult result = CharacterDatabase.PQuery("SELECT type FROM petition WHERE petitionguid = '%u'", petitionguid_low);
if (!result)
{
- sLog.outError("Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName());
+ sLog->outError("Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName());
return;
}
Field *fields = result->Fetch();
@@ -272,7 +272,7 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
if (result)
signs = uint8(result->GetRowCount());
- sLog.outDebug("CMSG_PETITION_SHOW_SIGNATURES petition entry: '%u'", petitionguid_low);
+ sLog->outDebug("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
@@ -295,14 +295,14 @@ void WorldSession::HandlePetitionShowSignOpcode(WorldPacket & recv_data)
void WorldSession::HandlePetitionQueryOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("Received opcode CMSG_PETITION_QUERY"); // ok
+ sLog->outDebug("Received opcode CMSG_PETITION_QUERY"); // ok
//recv_data.hexlike();
uint32 guildguid;
uint64 petitionguid;
recv_data >> guildguid; // in Trinity 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);
+ sLog->outDebug("CMSG_PETITION_QUERY Petition GUID %u Guild GUID %u", GUID_LOPART(petitionguid), guildguid);
SendPetitionQueryOpcode(petitionguid);
}
@@ -330,7 +330,7 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
}
else
{
- sLog.outDebug("CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
+ sLog->outDebug("CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
return;
}
@@ -375,7 +375,7 @@ void WorldSession::SendPetitionQueryOpcode(uint64 petitionguid)
void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("Received opcode MSG_PETITION_RENAME"); // ok
+ sLog->outDebug("Received opcode MSG_PETITION_RENAME"); // ok
//recv_data.hexlike();
uint64 petitionguid;
@@ -398,7 +398,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
}
else
{
- sLog.outDebug("CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
+ sLog->outDebug("CMSG_PETITION_QUERY failed for petition (GUID: %u)", GUID_LOPART(petitionguid));
return;
}
@@ -434,7 +434,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());
+ sLog->outDebug("Petition (GUID: %u) renamed to '%s'", GUID_LOPART(petitionguid), newname.c_str());
WorldPacket data(MSG_PETITION_RENAME, (8+newname.size()+1));
data << uint64(petitionguid);
data << newname;
@@ -443,7 +443,7 @@ void WorldSession::HandlePetitionRenameOpcode(WorldPacket & recv_data)
void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("Received opcode CMSG_PETITION_SIGN"); // ok
+ sLog->outDebug("Received opcode CMSG_PETITION_SIGN"); // ok
//recv_data.hexlike();
Field *fields;
@@ -460,7 +460,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
if (!result)
{
- sLog.outError("Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName());
+ sLog->outError("Petition %u is not found for player %u %s", GUID_LOPART(petitionguid), GetPlayer()->GetGUIDLow(), GetPlayer()->GetName());
return;
}
@@ -474,7 +474,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
return;
// not let enemies sign guild charter
- if (!sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != sObjectMgr->GetPlayerTeamByGUID(ownerguid))
+ if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != sObjectMgr->GetPlayerTeamByGUID(ownerguid))
{
if (type != GUILD_CHARTER_TYPE)
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
@@ -485,7 +485,7 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
if (type != GUILD_CHARTER_TYPE)
{
- if (_player->getLevel() < sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ if (_player->getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, "", _player->GetName(), ERR_ARENA_TEAM_TARGET_TOO_LOW_S);
return;
@@ -546,7 +546,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());
+ sLog->outDebug("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);
@@ -568,13 +568,13 @@ void WorldSession::HandlePetitionSignOpcode(WorldPacket & recv_data)
void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("Received opcode MSG_PETITION_DECLINE"); // ok
+ sLog->outDebug("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());
+ sLog->outDebug("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)
@@ -594,7 +594,7 @@ void WorldSession::HandlePetitionDeclineOpcode(WorldPacket & recv_data)
void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("Received opcode CMSG_OFFER_PETITION"); // ok
+ sLog->outDebug("Received opcode CMSG_OFFER_PETITION"); // ok
//recv_data.hexlike();
uint8 signs = 0;
@@ -616,9 +616,9 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
Field *fields = result->Fetch();
type = fields[0].GetUInt32();
- sLog.outDebug("OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid));
+ sLog->outDebug("OFFER PETITION: type %u, GUID1 %u, to player id: %u", type, GUID_LOPART(petitionguid), GUID_LOPART(plguid));
- if (!sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != player->GetTeam())
+ if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD) && GetPlayer()->GetTeam() != player->GetTeam())
{
if (type != GUILD_CHARTER_TYPE)
SendArenaTeamCommandResult(ERR_ARENA_TEAM_INVITE_SS, "", "", ERR_ARENA_TEAM_NOT_ALLIED);
@@ -629,7 +629,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
if (type != GUILD_CHARTER_TYPE)
{
- if (player->getLevel() < sWorld.getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
+ if (player->getLevel() < sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
// player is too low level to join an arena team
SendArenaTeamCommandResult(ERR_ARENA_TEAM_CREATE_S, player->GetName(), "", ERR_ARENA_TEAM_TARGET_TOO_LOW_S);
@@ -695,7 +695,7 @@ void WorldSession::HandleOfferPetitionOpcode(WorldPacket & recv_data)
void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("Received opcode CMSG_TURN_IN_PETITION"); // ok
+ sLog->outDebug("Received opcode CMSG_TURN_IN_PETITION"); // ok
//recv_data.hexlike();
WorldPacket data;
@@ -707,7 +707,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
recv_data >> petitionguid;
- sLog.outDebug("Petition %u turned in by %u", GUID_LOPART(petitionguid), _player->GetGUIDLow());
+ sLog->outDebug("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));
@@ -720,7 +720,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
}
else
{
- sLog.outError("petition table has broken data!");
+ sLog->outError("petition table has broken data!");
return;
}
@@ -762,9 +762,9 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
signs = 0;
uint32 count;
- //if (signs < sWorld.getIntConfig(CONFIG_MIN_PETITION_SIGNS))
+ //if (signs < sWorld->getIntConfig(CONFIG_MIN_PETITION_SIGNS))
if (type == GUILD_CHARTER_TYPE)
- count = sWorld.getIntConfig(CONFIG_MIN_PETITION_SIGNS);
+ count = sWorld->getIntConfig(CONFIG_MIN_PETITION_SIGNS);
else
count = type-1;
if (signs < count)
@@ -827,7 +827,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
ArenaTeam* at = new ArenaTeam;
if (!at->Create(_player->GetGUID(), type, name))
{
- sLog.outError("PetitionsHandler: arena team create failed.");
+ sLog->outError("PetitionsHandler: arena team create failed.");
delete at;
return;
}
@@ -839,14 +839,14 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
// register team and add captain
sObjectMgr->AddArenaTeam(at);
- sLog.outDebug("PetitonsHandler: arena team added to objmrg");
+ sLog->outDebug("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));
+ sLog->outDebug("PetitionsHandler: adding arena member %u", GUID_LOPART(memberGUID));
at->AddMember(memberGUID);
result->NextRow();
}
@@ -858,7 +858,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
CharacterDatabase.CommitTransaction(trans);
// created
- sLog.outDebug("TURN IN PETITION GUID %u", GUID_LOPART(petitionguid));
+ sLog->outDebug("TURN IN PETITION GUID %u", GUID_LOPART(petitionguid));
data.Initialize(SMSG_TURN_IN_PETITION_RESULTS, 4);
data << (uint32)PETITION_TURN_OK;
@@ -867,7 +867,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
void WorldSession::HandlePetitionShowListOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("Received CMSG_PETITION_SHOWLIST"); // ok
+ sLog->outDebug("Received CMSG_PETITION_SHOWLIST"); // ok
//recv_data.hexlike();
uint64 guid;
@@ -881,7 +881,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)));
+ sLog->outDebug("WORLD: HandlePetitionShowListOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -941,5 +941,5 @@ void WorldSession::SendPetitionShowList(uint64 guid)
// data << uint32(9); // required signs?
//}
SendPacket(&data);
- sLog.outDebug("Sent SMSG_PETITION_SHOWLIST");
+ sLog->outDebug("Sent SMSG_PETITION_SHOWLIST");
}
diff --git a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
index 5e2ac1e0ccc..4ac24c843df 100755
--- a/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/QueryHandler.cpp
@@ -60,7 +60,7 @@ void WorldSession::SendNameQueryOpcodeFromDB(uint64 guid)
{
ACE_Future<QueryResult> lFutureResult =
CharacterDatabase.AsyncPQuery(
- !sWorld.getBoolConfig(CONFIG_DECLINED_NAMES_USED) ?
+ !sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED) ?
// ------- Query Without Declined Names --------
// 0 1 2 3 4
"SELECT guid, name, race, gender, class "
@@ -108,7 +108,7 @@ void WorldSession::SendNameQueryOpcodeFromDBCallBack(QueryResult result)
data << uint8(pClass); // class
// if the first declined name field (5) is empty, the rest must be too
- if (sWorld.getBoolConfig(CONFIG_DECLINED_NAMES_USED) && fields[5].GetString() != "")
+ if (sWorld->getBoolConfig(CONFIG_DECLINED_NAMES_USED) && fields[5].GetString() != "")
{
data << uint8(1); // is declined
for (int i = 5; i < MAX_DECLINED_NAME_CASES+5; ++i)
@@ -143,7 +143,7 @@ void WorldSession::SendQueryTimeResponse()
{
WorldPacket data(SMSG_QUERY_TIME_RESPONSE, 4+4);
data << uint32(time(NULL));
- data << uint32(sWorld.GetNextDailyQuestsResetTime() - time(NULL));
+ data << uint32(sWorld->GetNextDailyQuestsResetTime() - time(NULL));
SendPacket(&data);
}
@@ -172,7 +172,7 @@ void WorldSession::HandleCreatureQueryOpcode(WorldPacket & recv_data)
sObjectMgr->GetLocaleString(cl->SubName, loc_idx, SubName);
}
}
- sLog.outDetail("WORLD: CMSG_CREATURE_QUERY '%s' - Entry: %u.", ci->Name, entry);
+ sLog->outDetail("WORLD: CMSG_CREATURE_QUERY '%s' - Entry: %u.", ci->Name, entry);
// guess size
WorldPacket data(SMSG_CREATURE_QUERY_RESPONSE, 100);
data << uint32(entry); // creature entry
@@ -197,16 +197,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");
+ sLog->outDebug("WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE");
}
else
{
- sLog.outDebug("WORLD: CMSG_CREATURE_QUERY - NO CREATURE INFO! (GUID: %u, ENTRY: %u)",
+ sLog->outDebug("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");
+ sLog->outDebug("WORLD: Sent SMSG_CREATURE_QUERY_RESPONSE");
}
}
@@ -238,7 +238,7 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
sObjectMgr->GetLocaleString(gl->CastBarCaption, loc_idx, CastBarCaption);
}
}
- sLog.outDetail("WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->name, entryID);
+ sLog->outDetail("WORLD: CMSG_GAMEOBJECT_QUERY '%s' - Entry: %u. ", info->name, entryID);
WorldPacket data (SMSG_GAMEOBJECT_QUERY_RESPONSE, 150);
data << uint32(entryID);
data << uint32(info->type);
@@ -253,22 +253,22 @@ void WorldSession::HandleGameObjectQueryOpcode(WorldPacket & recv_data)
for (uint32 i = 0; i < MAX_GAMEOBJECT_QUEST_ITEMS; ++i)
data << uint32(info->questItems[i]); // itemId[6], quest drop
SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
+ sLog->outDebug("WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
}
else
{
- sLog.outDebug("WORLD: CMSG_GAMEOBJECT_QUERY - Missing gameobject info for (GUID: %u, ENTRY: %u)",
+ sLog->outDebug("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");
+ sLog->outDebug("WORLD: Sent SMSG_GAMEOBJECT_QUERY_RESPONSE");
}
}
void WorldSession::HandleCorpseQueryOpcode(WorldPacket & /*recv_data*/)
{
- sLog.outDetail("WORLD: Received MSG_CORPSE_QUERY");
+ sLog->outDetail("WORLD: Received MSG_CORPSE_QUERY");
Corpse *corpse = GetPlayer()->GetCorpse();
@@ -323,7 +323,7 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> textID;
- sLog.outDetail("WORLD: CMSG_NPC_TEXT_QUERY ID '%u'", textID);
+ sLog->outDetail("WORLD: CMSG_NPC_TEXT_QUERY ID '%u'", textID);
recv_data >> guid;
GetPlayer()->SetUInt64Value(UNIT_FIELD_TARGET, guid);
@@ -397,12 +397,12 @@ void WorldSession::HandleNpcTextQueryOpcode(WorldPacket & recv_data)
SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_NPC_TEXT_UPDATE");
+ sLog->outDebug("WORLD: Sent SMSG_NPC_TEXT_UPDATE");
}
void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data)
{
- sLog.outDetail("WORLD: Received CMSG_PAGE_TEXT_QUERY");
+ sLog->outDetail("WORLD: Received CMSG_PAGE_TEXT_QUERY");
recv_data.hexlike();
uint32 pageID;
@@ -437,13 +437,13 @@ void WorldSession::HandlePageTextQueryOpcode(WorldPacket & recv_data)
}
SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE");
+ sLog->outDebug("WORLD: Sent SMSG_PAGE_TEXT_QUERY_RESPONSE");
}
}
void WorldSession::HandleCorpseMapPositionQuery(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY");
+ sLog->outDebug("WORLD: Recv CMSG_CORPSE_MAP_POSITION_QUERY");
uint32 unk;
recv_data >> unk;
diff --git a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
index be73fd32003..d55d1ba4293 100755
--- a/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/QuestHandler.cpp
@@ -46,7 +46,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data)
Object* questgiver = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_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));
+ sLog->outDetail("Error in CMSG_QUESTGIVER_STATUS_QUERY, called for not found questgiver (Typeid: %u GUID: %u)",GuidHigh2TypeId(GUID_HIPART(guid)),GUID_LOPART(guid));
return;
}
@@ -54,7 +54,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)));
+ sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for npc, guid = %u",uint32(GUID_LOPART(guid)));
Creature* cr_questgiver=questgiver->ToCreature();
if (!cr_questgiver->IsHostileTo(_player)) // not show quest status to enemies
{
@@ -66,7 +66,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)));
+ sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_STATUS_QUERY for GameObject guid = %u",uint32(GUID_LOPART(guid)));
GameObject* go_questgiver=(GameObject*)questgiver;
questStatus = sScriptMgr->GetDialogStatus(_player, go_questgiver);
if (questStatus > 6)
@@ -74,7 +74,7 @@ void WorldSession::HandleQuestgiverStatusQueryOpcode(WorldPacket & recv_data)
break;
}
default:
- sLog.outError("QuestGiver called for unexpected type %u", questgiver->GetTypeId());
+ sLog->outError("QuestGiver called for unexpected type %u", questgiver->GetTypeId());
break;
}
@@ -87,12 +87,12 @@ void WorldSession::HandleQuestgiverHelloOpcode(WorldPacket & recv_data)
uint64 guid;
recv_data >> guid;
- sLog.outDebug ("WORLD: Received CMSG_QUESTGIVER_HELLO npc = %u", GUID_LOPART(guid));
+ sLog->outDebug ("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.",
+ sLog->outDebug ("WORLD: HandleQuestgiverHelloOpcode - Unit (GUID: %u) not found or you can't interact with him.",
GUID_LOPART(guid));
return;
}
@@ -122,7 +122,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);
+ sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_ACCEPT_QUEST npc = %u, quest = %u, unk1 = %u", uint32(GUID_LOPART(guid)), quest, unk1);
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM|TYPEMASK_PLAYER);
@@ -239,7 +239,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);
+ sLog->outDebug("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 = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT|TYPEMASK_ITEM);
@@ -273,7 +273,7 @@ void WorldSession::HandleQuestQueryOpcode(WorldPacket & recv_data)
uint32 quest;
recv_data >> quest;
- sLog.outDebug("WORLD: Received CMSG_QUEST_QUERY quest = %u",quest);
+ sLog->outDebug("WORLD: Received CMSG_QUEST_QUERY quest = %u",quest);
Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest);
if (pQuest)
@@ -290,14 +290,14 @@ void WorldSession::HandleQuestgiverChooseRewardOpcode(WorldPacket & recv_data)
if (reward >= QUEST_REWARD_CHOICES_COUNT)
{
- sLog.outError("Error in CMSG_QUESTGIVER_CHOOSE_REWARD: player %s (guid %d) tried to get invalid reward (%u) (probably packet hacking)", _player->GetName(), _player->GetGUIDLow(), reward);
+ sLog->outError("Error in CMSG_QUESTGIVER_CHOOSE_REWARD: player %s (guid %d) tried to get invalid reward (%u) (probably packet hacking)", _player->GetName(), _player->GetGUIDLow(), reward);
return;
}
if (!GetPlayer()->isAlive())
return;
- sLog.outDebug("WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc = %u, quest = %u, reward = %u",uint32(GUID_LOPART(guid)),quest,reward);
+ sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_CHOOSE_REWARD npc = %u, quest = %u, reward = %u",uint32(GUID_LOPART(guid)),quest,reward);
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
if (!pObject)
@@ -352,7 +352,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);
+ sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_REQUEST_REWARD npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest);
Object* pObject = ObjectAccessor::GetObjectByTypeMask(*_player, guid,TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
if (!pObject||!pObject->hasInvolvedQuest(quest))
@@ -370,7 +370,7 @@ void WorldSession::HandleQuestgiverRequestRewardOpcode(WorldPacket & recv_data)
void WorldSession::HandleQuestgiverCancel(WorldPacket& /*recv_data*/)
{
- sLog.outDebug("WORLD: Received CMSG_QUESTGIVER_CANCEL");
+ sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_CANCEL");
_player->PlayerTalkClass->CloseGossip();
}
@@ -383,7 +383,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);
+ sLog->outDebug("WORLD: Received CMSG_QUESTLOG_SWAP_QUEST slot 1 = %u, slot 2 = %u", slot1, slot2);
GetPlayer()->SwapQuestSlot(slot1,slot2);
}
@@ -393,7 +393,7 @@ void WorldSession::HandleQuestLogRemoveQuest(WorldPacket& recv_data)
uint8 slot;
recv_data >> slot;
- sLog.outDebug("WORLD: Received CMSG_QUESTLOG_REMOVE_QUEST slot = %u",slot);
+ sLog->outDebug("WORLD: Received CMSG_QUESTLOG_REMOVE_QUEST slot = %u",slot);
if (slot < MAX_QUEST_LOG_SIZE)
{
@@ -424,7 +424,7 @@ void WorldSession::HandleQuestConfirmAccept(WorldPacket& recv_data)
uint32 quest;
recv_data >> quest;
- sLog.outDebug("WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u", quest);
+ sLog->outDebug("WORLD: Received CMSG_QUEST_CONFIRM_ACCEPT quest = %u", quest);
if (const Quest* pQuest = sObjectMgr->GetQuestTemplate(quest))
{
@@ -463,14 +463,14 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data)
if (!_player->isAlive())
return;
- sLog.outDebug("WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest);
+ sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_COMPLETE_QUEST npc = %u, quest = %u",uint32(GUID_LOPART(guid)),quest);
Quest const *pQuest = sObjectMgr->GetQuestTemplate(quest);
if (pQuest)
{
if (!_player->CanSeeStartQuest(pQuest) && _player->GetQuestStatus(quest)==QUEST_STATUS_NONE)
{
- sLog.outError("Possible hacking attempt: Player %s [guid: %u] tried to complete quest [entry: %u] without being in possession of the quest!",
+ sLog->outError("Possible hacking attempt: Player %s [guid: %u] tried to complete quest [entry: %u] without being in possession of the quest!",
_player->GetName(), _player->GetGUIDLow(), quest);
return;
}
@@ -499,7 +499,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recv_data)
void WorldSession::HandleQuestgiverQuestAutoLaunch(WorldPacket& /*recvPacket*/)
{
- sLog.outDebug("WORLD: Received CMSG_QUESTGIVER_QUEST_AUTOLAUNCH");
+ sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_QUEST_AUTOLAUNCH");
}
void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
@@ -507,7 +507,7 @@ void WorldSession::HandlePushQuestToParty(WorldPacket& recvPacket)
uint32 questId;
recvPacket >> questId;
- sLog.outDebug("WORLD: Received CMSG_PUSHQUESTTOPARTY quest = %u", questId);
+ sLog->outDebug("WORLD: Received CMSG_PUSHQUESTTOPARTY quest = %u", questId);
if (Quest const *pQuest = sObjectMgr->GetQuestTemplate(questId))
{
@@ -565,7 +565,7 @@ void WorldSession::HandleQuestPushResult(WorldPacket& recvPacket)
uint8 msg;
recvPacket >> guid >> msg;
- sLog.outDebug("WORLD: Received MSG_QUEST_PUSH_RESULT");
+ sLog->outDebug("WORLD: Received MSG_QUEST_PUSH_RESULT");
if (_player->GetDivider() != 0)
{
@@ -604,7 +604,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
}
default:
//its imposible, but check ^)
- sLog.outError("Warning: GetDialogStatus called for unexpected type %u", questgiver->GetTypeId());
+ sLog->outError("Warning: GetDialogStatus called for unexpected type %u", questgiver->GetTypeId());
return DIALOG_STATUS_NONE;
}
@@ -656,7 +656,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
{
if (pQuest->IsAutoComplete() || (pQuest->IsRepeatable() && pPlayer->getQuestStatusMap()[quest_id].m_rewarded))
result2 = DIALOG_STATUS_REWARD_REP;
- else if (pPlayer->getLevel() <= ((pPlayer->GetQuestLevel(pQuest) == -1) ? pPlayer->getLevel() : pPlayer->GetQuestLevel(pQuest) + sWorld.getIntConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF)))
+ else if (pPlayer->getLevel() <= ((pPlayer->GetQuestLevel(pQuest) == -1) ? pPlayer->getLevel() : pPlayer->GetQuestLevel(pQuest) + sWorld->getIntConfig(CONFIG_QUEST_LOW_LEVEL_HIDE_DIFF)))
{
if (pQuest->HasFlag(QUEST_FLAGS_DAILY) || pQuest->HasFlag(QUEST_FLAGS_WEEKLY))
result2 = DIALOG_STATUS_AVAILABLE_REP;
@@ -680,7 +680,7 @@ uint32 WorldSession::getDialogStatus(Player *pPlayer, Object* questgiver, uint32
void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket*/)
{
- sLog.outDebug("WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY");
+ sLog->outDebug("WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY");
uint32 count = 0;
diff --git a/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp b/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp
index 9f4780a6aa7..ba8ea70ab45 100755
--- a/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/SkillHandler.cpp
@@ -37,7 +37,7 @@ void WorldSession::HandleLearnTalentOpcode(WorldPacket & recv_data)
void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
{
- sLog.outDebug("CMSG_LEARN_PREVIEW_TALENTS");
+ sLog->outDebug("CMSG_LEARN_PREVIEW_TALENTS");
uint32 talentsCount;
recvPacket >> talentsCount;
@@ -56,14 +56,14 @@ void WorldSession::HandleLearnPreviewTalents(WorldPacket& recvPacket)
void WorldSession::HandleTalentWipeConfirmOpcode(WorldPacket & recv_data)
{
- sLog.outDetail("MSG_TALENT_WIPE_CONFIRM");
+ sLog->outDetail("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)));
+ sLog->outDebug("WORLD: HandleTalentWipeConfirmOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
diff --git a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
index b84ee549fdc..ec4da619a4f 100755
--- a/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/SpellHandler.cpp
@@ -93,7 +93,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
return;
}
- sLog.outDetail("WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, castCount: %u, spellId: %u, Item: %u, glyphIndex: %u, data length = %i", bagIndex, slot, castCount, spellId, pItem->GetEntry(), glyphIndex, (uint32)recvPacket.size());
+ sLog->outDetail("WORLD: CMSG_USE_ITEM packet, bagIndex: %u, slot: %u, castCount: %u, spellId: %u, Item: %u, glyphIndex: %u, data length = %i", bagIndex, slot, castCount, spellId, pItem->GetEntry(), glyphIndex, (uint32)recvPacket.size());
ItemPrototype const *proto = pItem->GetProto();
if (!proto)
@@ -193,7 +193,7 @@ void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
{
- sLog.outDetail("WORLD: CMSG_OPEN_ITEM packet, data length = %i",(uint32)recvPacket.size());
+ sLog->outDetail("WORLD: CMSG_OPEN_ITEM packet, data length = %i",(uint32)recvPacket.size());
Player* pUser = _player;
@@ -205,7 +205,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
recvPacket >> bagIndex >> slot;
- sLog.outDetail("bagIndex: %u, slot: %u",bagIndex,slot);
+ sLog->outDetail("bagIndex: %u, slot: %u",bagIndex,slot);
Item *pItem = pUser->GetItemByPos(bagIndex, slot);
if (!pItem)
@@ -225,7 +225,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
if(!(proto->Flags & ITEM_PROTO_FLAG_OPENABLE) && !pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAG_WRAPPED))
{
pUser->SendEquipError(EQUIP_ERR_CANT_DO_RIGHT_NOW, pItem, NULL);
- sLog.outError("Possible hacking attempt: Player %s [guid: %u] tried to open item [guid: %u, entry: %u] which is not openable!",
+ sLog->outError("Possible hacking attempt: Player %s [guid: %u] tried to open item [guid: %u, entry: %u] which is not openable!",
pUser->GetName(), pUser->GetGUIDLow(), pItem->GetGUIDLow(), proto->ItemId);
return;
}
@@ -239,7 +239,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
if (!lockInfo)
{
pUser->SendEquipError(EQUIP_ERR_ITEM_LOCKED, pItem, NULL);
- sLog.outError("WORLD::OpenItem: item [guid = %u] has an unknown lockId: %u!", pItem->GetGUIDLow(), lockId);
+ sLog->outError("WORLD::OpenItem: item [guid = %u] has an unknown lockId: %u!", pItem->GetGUIDLow(), lockId);
return;
}
@@ -267,7 +267,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
}
else
{
- sLog.outError("Wrapped item %u don't have record in character_gifts table and will deleted", pItem->GetGUIDLow());
+ sLog->outError("Wrapped item %u don't have record in character_gifts table and will deleted", pItem->GetGUIDLow());
pUser->DestroyItem(pItem->GetBagSlot(), pItem->GetSlot(), true);
return;
}
@@ -283,7 +283,7 @@ void WorldSession::HandleGameObjectUseOpcode(WorldPacket & recv_data)
recv_data >> guid;
- sLog.outDebug("WORLD: Recvd CMSG_GAMEOBJ_USE Message [guid=%u]", GUID_LOPART(guid));
+ sLog->outDebug("WORLD: Recvd CMSG_GAMEOBJ_USE Message [guid=%u]", GUID_LOPART(guid));
// ignore for remote control state
if (_player->m_mover != _player)
@@ -307,7 +307,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));
+ sLog->outDebug("WORLD: Recvd CMSG_GAMEOBJ_REPORT_USE Message [in game guid: %u]", GUID_LOPART(guid));
// ignore for remote control state
if (_player->m_mover != _player)
@@ -331,7 +331,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
uint8 castCount, castFlags;
recvPacket >> castCount >> spellId >> castFlags;
- sLog.outDebug("WORLD: got cast spell packet, castCount: %u, spellId: %u, castFlags: %u, data length = %u", castCount, spellId, castFlags, (uint32)recvPacket.size());
+ sLog->outDebug("WORLD: got cast spell packet, castCount: %u, spellId: %u, castFlags: %u, data length = %u", castCount, spellId, castFlags, (uint32)recvPacket.size());
// ignore for remote control state (for player case)
Unit* mover = _player->m_mover;
@@ -345,7 +345,7 @@ void WorldSession::HandleCastSpellOpcode(WorldPacket& recvPacket)
if (!spellInfo)
{
- sLog.outError("WORLD: unknown spell id %u", spellId);
+ sLog->outError("WORLD: unknown spell id %u", spellId);
recvPacket.rfinish(); // prevent spam at ignore packet
return;
}
@@ -460,7 +460,7 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
if (!spellInfo)
{
- sLog.outError("WORLD: unknown PET spell id %u", spellId);
+ sLog->outError("WORLD: unknown PET spell id %u", spellId);
return;
}
@@ -468,13 +468,13 @@ void WorldSession::HandlePetCancelAuraOpcode(WorldPacket& recvPacket)
if (!pet)
{
- sLog.outError("Pet %u not exist.", uint32(GUID_LOPART(guid)));
+ sLog->outError("Pet %u not exist.", uint32(GUID_LOPART(guid)));
return;
}
if (pet != GetPlayer()->GetGuardianPet() && pet != GetPlayer()->GetCharm())
{
- sLog.outError("HandlePetCancelAura.Pet %u isn't pet of player %s", uint32(GUID_LOPART(guid)),GetPlayer()->GetName());
+ sLog->outError("HandlePetCancelAura.Pet %u isn't pet of player %s", uint32(GUID_LOPART(guid)),GetPlayer()->GetName());
return;
}
@@ -537,7 +537,7 @@ void WorldSession::HandleTotemDestroyed(WorldPacket& recvPacket)
void WorldSession::HandleSelfResOpcode(WorldPacket & /*recv_data*/)
{
- sLog.outDebug("WORLD: CMSG_SELF_RES"); // empty opcode
+ sLog->outDebug("WORLD: CMSG_SELF_RES"); // empty opcode
if (_player->GetUInt32Value(PLAYER_SELF_RES_SPELL))
{
@@ -587,7 +587,7 @@ void WorldSession::HandleSpellClick(WorldPacket & recv_data)
void WorldSession::HandleMirrrorImageDataRequest(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_GET_MIRRORIMAGE_DATA");
+ sLog->outDebug("WORLD: CMSG_GET_MIRRORIMAGE_DATA");
uint64 guid;
recv_data >> guid;
diff --git a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp
index cbf980e3245..7b7c42a3ef5 100755
--- a/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/TaxiHandler.cpp
@@ -31,7 +31,7 @@
void WorldSession::HandleTaxiNodeStatusQueryOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_TAXINODE_STATUS_QUERY");
+ sLog->outDebug("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)));
+ sLog->outDebug("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);
+ sLog->outDebug("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");
+ sLog->outDebug("WORLD: Sent SMSG_TAXINODE_STATUS");
}
void WorldSession::HandleTaxiQueryAvailableNodes(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_TAXIQUERYAVAILABLENODES");
+ sLog->outDebug("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)));
+ sLog->outDebug("WORLD: HandleTaxiQueryAvailableNodes - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)));
return;
}
@@ -102,7 +102,7 @@ void WorldSession::SendTaxiMenu(Creature* unit)
bool lastTaxiCheaterState = GetPlayer()->isTaxiCheater();
if (unit->GetEntry() == 29480) GetPlayer()->SetTaxiCheater(true); // Grimwing in Ebon Hold, special case. NOTE: Not perfect, Zul'Aman should not be included according to WoWhead, and I think taxicheat includes it.
- sLog.outDebug("WORLD: CMSG_TAXINODE_STATUS_QUERY %u ",curloc);
+ sLog->outDebug("WORLD: CMSG_TAXINODE_STATUS_QUERY %u ",curloc);
WorldPacket data(SMSG_SHOWTAXINODES, (4+8+4+8*4));
data << uint32(1);
@@ -111,7 +111,7 @@ void WorldSession::SendTaxiMenu(Creature* unit)
GetPlayer()->m_taxi.AppendTaximaskTo(data,GetPlayer()->isTaxiCheater());
SendPacket(&data);
- sLog.outDebug("WORLD: Sent SMSG_SHOWTAXINODES");
+ sLog->outDebug("WORLD: Sent SMSG_SHOWTAXINODES");
GetPlayer()->SetTaxiCheater(lastTaxiCheaterState);
}
@@ -166,7 +166,7 @@ void WorldSession::SendDiscoverNewTaxiNode(uint32 nodeid)
void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_ACTIVATETAXIEXPRESS");
+ sLog->outDebug("WORLD: Received CMSG_ACTIVATETAXIEXPRESS");
uint64 guid;
uint32 node_count;
@@ -176,7 +176,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)));
+ sLog->outDebug("WORLD: HandleActivateTaxiExpressOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)));
return;
}
std::vector<uint32> nodes;
@@ -191,14 +191,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());
+ sLog->outDebug("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");
+ sLog->outDebug("WORLD: Received CMSG_MOVE_SPLINE_DONE");
uint64 guid; // used only for proper packet read
recv_data.readPackGUID(guid);
@@ -252,7 +252,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
}
}
- sLog.outDebug("WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode);
+ sLog->outDebug("WORLD: Taxi has to go from %u to %u", sourcenode, destinationnode);
uint32 mountDisplayId = sObjectMgr->GetTaxiMountDisplayId(sourcenode, GetPlayer()->GetTeam());
@@ -276,18 +276,18 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
void WorldSession::HandleActivateTaxiOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: Received CMSG_ACTIVATETAXI");
+ sLog->outDebug("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]);
+ sLog->outDebug("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)));
+ sLog->outDebug("WORLD: HandleActivateTaxiOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)));
return;
}
diff --git a/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp b/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp
index 4ece09a7588..372b5ae0672 100755
--- a/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/TicketHandler.cpp
@@ -32,9 +32,9 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
if (sTicketMgr->GetStatus() == GMTICKET_QUEUE_STATUS_DISABLED)
return;
- if (GetPlayer()->getLevel() < sWorld.getIntConfig(CONFIG_TICKET_LEVEL_REQ))
+ if (GetPlayer()->getLevel() < sWorld->getIntConfig(CONFIG_TICKET_LEVEL_REQ))
{
- SendNotification(GetTrinityString(LANG_TICKET_REQ), sWorld.getIntConfig(CONFIG_TICKET_LEVEL_REQ));
+ SendNotification(GetTrinityString(LANG_TICKET_REQ), sWorld->getIntConfig(CONFIG_TICKET_LEVEL_REQ));
return;
}
@@ -85,7 +85,7 @@ void WorldSession::HandleGMTicketCreateOpcode(WorldPacket & recv_data)
data << uint32(GMTICKET_RESPONSE_SUCCESS);
SendPacket(&data);
- sWorld.SendGMText(LANG_COMMAND_TICKETNEW, GetPlayer()->GetName(), ticket->guid);
+ sWorld->SendGMText(LANG_COMMAND_TICKETNEW, GetPlayer()->GetName(), ticket->guid);
}
void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recv_data)
@@ -111,7 +111,7 @@ void WorldSession::HandleGMTicketUpdateOpcode(WorldPacket & recv_data)
data << uint32(GMTICKET_RESPONSE_SUCCESS);
SendPacket(&data);
- sWorld.SendGMText(LANG_COMMAND_TICKETUPDATED, GetPlayer()->GetName(), ticket->guid);
+ sWorld->SendGMText(LANG_COMMAND_TICKETUPDATED, GetPlayer()->GetName(), ticket->guid);
}
void WorldSession::HandleGMTicketDeleteOpcode(WorldPacket & /*recv_data*/)
@@ -124,7 +124,7 @@ void WorldSession::HandleGMTicketDeleteOpcode(WorldPacket & /*recv_data*/)
data << uint32(GMTICKET_RESPONSE_TICKET_DELETED);
SendPacket(&data);
- sWorld.SendGMText(LANG_COMMAND_TICKETPLAYERABANDON, GetPlayer()->GetName(), ticket->guid);
+ sWorld->SendGMText(LANG_COMMAND_TICKETPLAYERABANDON, GetPlayer()->GetName(), ticket->guid);
sTicketMgr->RemoveGMTicket(ticket, GetPlayer()->GetGUID(), false);
SendGMTicketGetTicket(GMTICKET_STATUS_DEFAULT, NULL);
}
@@ -302,7 +302,7 @@ void WorldSession::HandleGMResponseResolve(WorldPacket& /*recvPacket*/)
if (ticket)
{
uint8 getSurvey = 0;
- if ((float)rand_chance() < sWorld.getFloatConfig(CONFIG_CHANCE_OF_GM_SURVEY))
+ if ((float)rand_chance() < sWorld->getFloatConfig(CONFIG_CHANCE_OF_GM_SURVEY))
getSurvey = 1;
WorldPacket data(SMSG_GMRESPONSE_STATUS_UPDATE, 4);
diff --git a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp b/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp
index 19e59978d8e..bba7a404993 100755
--- a/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/TradeHandler.cpp
@@ -69,13 +69,13 @@ void WorldSession::SendTradeStatus(TradeStatus status)
void WorldSession::HandleIgnoreTradeOpcode(WorldPacket& /*recvPacket*/)
{
- sLog.outDebug("WORLD: Ignore Trade %u",_player->GetGUIDLow());
+ sLog->outDebug("WORLD: Ignore Trade %u",_player->GetGUIDLow());
// recvPacket.print_storage();
}
void WorldSession::HandleBusyTradeOpcode(WorldPacket& /*recvPacket*/)
{
- sLog.outDebug("WORLD: Busy Trade %u",_player->GetGUIDLow());
+ sLog->outDebug("WORLD: Busy Trade %u",_player->GetGUIDLow());
// recvPacket.print_storage();
}
@@ -150,10 +150,10 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if (myItems[i])
{
// logging
- sLog.outDebug("partner storing: %u",myItems[i]->GetGUIDLow());
- if (_player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE))
+ sLog->outDebug("partner storing: %u",myItems[i]->GetGUIDLow());
+ if (_player->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
{
- sLog.outCommand(_player->GetSession()->GetAccountId(), "GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
+ sLog->outCommand(_player->GetSession()->GetAccountId(), "GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
_player->GetName(), _player->GetSession()->GetAccountId(),
myItems[i]->GetProto()->Name1, myItems[i]->GetEntry(), myItems[i]->GetCount(),
trader->GetName(), trader->GetSession()->GetAccountId());
@@ -168,10 +168,10 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if (hisItems[i])
{
// logging
- sLog.outDebug("player storing: %u",hisItems[i]->GetGUIDLow());
- if (trader->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE))
+ sLog->outDebug("player storing: %u",hisItems[i]->GetGUIDLow());
+ if (trader->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
{
- sLog.outCommand(trader->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
+ sLog->outCommand(trader->GetSession()->GetAccountId(),"GM %s (Account: %u) trade: %s (Entry: %d Count: %u) to player: %s (Account: %u)",
trader->GetName(), trader->GetSession()->GetAccountId(),
hisItems[i]->GetProto()->Name1, hisItems[i]->GetEntry(), hisItems[i]->GetCount(),
_player->GetName(), _player->GetSession()->GetAccountId());
@@ -191,21 +191,21 @@ void WorldSession::moveItems(Item* myItems[], Item* hisItems[])
if (myItems[i])
{
if (!traderCanTrade)
- sLog.outError("trader can't store item: %u",myItems[i]->GetGUIDLow());
+ sLog->outError("trader can't store item: %u",myItems[i]->GetGUIDLow());
if (_player->CanStoreItem(NULL_BAG, NULL_SLOT, playerDst, myItems[i], false) == EQUIP_ERR_OK)
_player->MoveItemToInventory(playerDst, myItems[i], true, true);
else
- sLog.outError("player can't take item back: %u",myItems[i]->GetGUIDLow());
+ sLog->outError("player can't take item back: %u",myItems[i]->GetGUIDLow());
}
// return the already removed items to the original owner
if (hisItems[i])
{
if (!playerCanTrade)
- sLog.outError("player can't store item: %u",hisItems[i]->GetGUIDLow());
+ sLog->outError("player can't store item: %u",hisItems[i]->GetGUIDLow());
if (trader->CanStoreItem(NULL_BAG, NULL_SLOT, traderDst, hisItems[i], false) == EQUIP_ERR_OK)
trader->MoveItemToInventory(traderDst, hisItems[i], true, true);
else
- sLog.outError("trader can't take item back: %u",hisItems[i]->GetGUIDLow());
+ sLog->outError("trader can't take item back: %u",hisItems[i]->GetGUIDLow());
}
}
}
@@ -223,7 +223,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item **m
{
if (Item* item = myTrade->GetItem(TradeSlots(i)))
{
- sLog.outStaticDebug("player trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
+ sLog->outStaticDebug("player trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
//Can return NULL
myItems[i] = item;
myItems[i]->SetInTrade();
@@ -231,7 +231,7 @@ static void setAcceptTradeMode(TradeData* myTrade, TradeData* hisTrade, Item **m
if (Item* item = hisTrade->GetItem(TradeSlots(i)))
{
- sLog.outStaticDebug("partner trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
+ sLog->outStaticDebug("partner trade item %u bag: %u slot: %u", item->GetGUIDLow(), item->GetBagSlot(), item->GetSlot());
hisItems[i] = item;
hisItems[i]->SetInTrade();
}
@@ -457,18 +457,18 @@ void WorldSession::HandleAcceptTradeOpcode(WorldPacket& /*recvPacket*/)
moveItems(myItems, hisItems);
// logging money
- if (sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE))
+ if (sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE))
{
if (_player->GetSession()->GetSecurity() > SEC_PLAYER && my_trade->GetMoney() > 0)
{
- sLog.outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
+ sLog->outCommand(_player->GetSession()->GetAccountId(),"GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
_player->GetName(), _player->GetSession()->GetAccountId(),
my_trade->GetMoney(),
trader->GetName(), trader->GetSession()->GetAccountId());
}
if (trader->GetSession()->GetSecurity() > SEC_PLAYER && his_trade->GetMoney() > 0)
{
- sLog.outCommand(trader->GetSession()->GetAccountId(),"GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
+ sLog->outCommand(trader->GetSession()->GetAccountId(),"GM %s (Account: %u) give money (Amount: %u) to player: %s (Account: %u)",
trader->GetName(), trader->GetSession()->GetAccountId(),
his_trade->GetMoney(),
_player->GetName(), _player->GetSession()->GetAccountId());
@@ -574,9 +574,9 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
return;
}
- if (GetPlayer()->getLevel() < sWorld.getIntConfig(CONFIG_TRADE_LEVEL_REQ))
+ if (GetPlayer()->getLevel() < sWorld->getIntConfig(CONFIG_TRADE_LEVEL_REQ))
{
- SendNotification(GetTrinityString(LANG_TRADE_REQ), sWorld.getIntConfig(CONFIG_TRADE_LEVEL_REQ));
+ SendNotification(GetTrinityString(LANG_TRADE_REQ), sWorld->getIntConfig(CONFIG_TRADE_LEVEL_REQ));
return;
}
@@ -626,7 +626,7 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
return;
}
- if (!sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_TRADE) && pOther->GetTeam() !=_player->GetTeam())
+ if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_TRADE) && pOther->GetTeam() !=_player->GetTeam())
{
SendTradeStatus(TRADE_STATUS_WRONG_FACTION);
return;
@@ -638,9 +638,9 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket)
return;
}
- if (pOther->getLevel() < sWorld.getIntConfig(CONFIG_TRADE_LEVEL_REQ))
+ if (pOther->getLevel() < sWorld->getIntConfig(CONFIG_TRADE_LEVEL_REQ))
{
- SendNotification(GetTrinityString(LANG_TRADE_OTHER_REQ), sWorld.getIntConfig(CONFIG_TRADE_LEVEL_REQ));
+ SendNotification(GetTrinityString(LANG_TRADE_OTHER_REQ), sWorld->getIntConfig(CONFIG_TRADE_LEVEL_REQ));
return;
}
diff --git a/src/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp b/src/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp
index 0abc7148d58..db8e5ae96d1 100755
--- a/src/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/VoiceChatHandler.cpp
@@ -24,7 +24,7 @@
void WorldSession::HandleVoiceSessionEnableOpcode(WorldPacket & recv_data)
{
- sLog.outDebug("WORLD: CMSG_VOICE_SESSION_ENABLE");
+ sLog->outDebug("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");
+ sLog->outDebug("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");
+ sLog->outDebug("WORLD: CMSG_SET_ACTIVE_VOICE_CHANNEL");
recv_data.read_skip<uint32>();
recv_data.read_skip<char*>();
recv_data.hexlike();
diff --git a/src/server/game/Server/Protocol/WorldLog.cpp b/src/server/game/Server/Protocol/WorldLog.cpp
index 63ab829c8c4..45c4fd79eed 100755
--- a/src/server/game/Server/Protocol/WorldLog.cpp
+++ b/src/server/game/Server/Protocol/WorldLog.cpp
@@ -40,7 +40,7 @@ WorldLog::~WorldLog()
/// Open the log file (if specified so in the configuration file)
void WorldLog::Initialize()
{
- std::string logsDir = sConfig.GetStringDefault("LogsDir","");
+ std::string logsDir = sConfig->GetStringDefault("LogsDir","");
if (!logsDir.empty())
{
@@ -48,13 +48,13 @@ void WorldLog::Initialize()
logsDir.append("/");
}
- std::string logname = sConfig.GetStringDefault("WorldLogFile", "");
+ std::string logname = sConfig->GetStringDefault("WorldLogFile", "");
if (!logname.empty())
{
i_file = fopen((logsDir+logname).c_str(), "w");
}
- m_dbWorld = sConfig.GetBoolDefault("LogDB.World", false); // can be VERY heavy if enabled
+ m_dbWorld = sConfig->GetBoolDefault("LogDB.World", false); // can be VERY heavy if enabled
}
void WorldLog::outTimestampLog(char const *fmt, ...)
@@ -74,13 +74,13 @@ void WorldLog::outTimestampLog(char const *fmt, ...)
fflush(i_file);
}
- if (sLog.GetLogDB() && m_dbWorld)
+ if (sLog->GetLogDB() && m_dbWorld)
{
va_list ap2;
va_start(ap2, fmt);
char nnew_str[MAX_QUERY_LEN];
vsnprintf(nnew_str, MAX_QUERY_LEN, fmt, ap2);
- sLog.outDB(LOG_TYPE_WORLD, nnew_str);
+ sLog->outDB(LOG_TYPE_WORLD, nnew_str);
va_end(ap2);
}
}
@@ -101,13 +101,13 @@ void WorldLog::outLog(char const *fmt, ...)
fflush(i_file);
}
- if (sLog.GetLogDB() && m_dbWorld)
+ if (sLog->GetLogDB() && m_dbWorld)
{
va_list ap2;
va_start(ap2, fmt);
char nnew_str[MAX_QUERY_LEN];
vsnprintf(nnew_str, MAX_QUERY_LEN, fmt, ap2);
- sLog.outDB(LOG_TYPE_WORLD, nnew_str);
+ sLog->outDB(LOG_TYPE_WORLD, nnew_str);
va_end(ap2);
}
}
diff --git a/src/server/game/Server/Protocol/WorldLog.h b/src/server/game/Server/Protocol/WorldLog.h
index e4c0ee7cbc9..92f43d3252a 100755
--- a/src/server/game/Server/Protocol/WorldLog.h
+++ b/src/server/game/Server/Protocol/WorldLog.h
@@ -55,7 +55,7 @@ class WorldLog
bool m_dbWorld;
};
-#define sWorldLog (*ACE_Singleton<WorldLog, ACE_Thread_Mutex>::instance())
+#define sWorldLog ACE_Singleton<WorldLog, ACE_Thread_Mutex>::instance()
#endif
/// @}
diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp
index 81e9f5c7ed7..f76f67b7c08 100755
--- a/src/server/game/Server/WorldSession.cpp
+++ b/src/server/game/Server/WorldSession.cpp
@@ -89,7 +89,7 @@ m_muteTime(mute_time), m_timeOutTime(0), _player(NULL), m_Socket(sock),
_security(sec), _accountId(id), m_expansion(expansion), _logoutTime(0),
m_inQueue(false), m_playerLoading(false), m_playerLogout(false),
m_playerRecentlyLogout(false), m_playerSave(false),
-m_sessionDbcLocale(sWorld.GetAvailableDbcLocale(locale)),
+m_sessionDbcLocale(sWorld->GetAvailableDbcLocale(locale)),
m_sessionDbLocaleIndex(locale),
m_latency(0), m_TutorialsChanged(false), recruiterId(recruiter)
{
@@ -127,7 +127,7 @@ WorldSession::~WorldSession()
void WorldSession::SizeError(WorldPacket const& packet, uint32 size) const
{
- sLog.outError("Client (account %u) send packet %s (%u) with size " SIZEFMTD " but expected %u (attempt crash server?), skipped",
+ sLog->outError("Client (account %u) send packet %s (%u) with size " SIZEFMTD " but expected %u (attempt crash server?), skipped",
GetAccountId(),LookupOpcodeName(packet.GetOpcode()),packet.GetOpcode(),packet.size(),size);
}
@@ -169,8 +169,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);
+ 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);
lastTime = cur_time;
sendLastPacketCount = 1;
@@ -192,7 +192,7 @@ void WorldSession::QueuePacket(WorldPacket* new_packet)
/// Logging helper for unexpected opcodes
void WorldSession::LogUnexpectedOpcode(WorldPacket* packet, const char *reason)
{
- sLog.outError("SESSION: received unexpected opcode %s (0x%.4X) %s",
+ sLog->outError("SESSION: received unexpected opcode %s (0x%.4X) %s",
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode(),
reason);
@@ -201,7 +201,7 @@ void WorldSession::LogUnexpectedOpcode(WorldPacket* packet, const char *reason)
/// Logging helper for unexpected opcodes
void WorldSession::LogUnprocessedTail(WorldPacket *packet)
{
- sLog.outError("SESSION: opcode %s (0x%.4X) have unprocessed tail data (read stop at %u from %u)",
+ sLog->outError("SESSION: opcode %s (0x%.4X) have unprocessed tail data (read stop at %u from %u)",
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode(),
uint32(packet->rpos()), uint32(packet->wpos()));
@@ -226,14 +226,14 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
while (m_Socket && !m_Socket->IsClosed() && _recvQueue.next(packet, updater))
{
/*#if 1
- sLog.outError("MOEP: %s (0x%.4X)",
+ sLog->outError("MOEP: %s (0x%.4X)",
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode());
#endif*/
if (packet->GetOpcode() >= NUM_MSG_TYPES)
{
- sLog.outError("SESSION: received non-existed opcode %s (0x%.4X)",
+ sLog->outError("SESSION: received non-existed opcode %s (0x%.4X)",
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode());
@@ -257,7 +257,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
{
sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet));
(this->*opHandle.handler)(*packet);
- if (sLog.IsOutDebug() && packet->rpos() < packet->wpos())
+ if (sLog->IsOutDebug() && packet->rpos() < packet->wpos())
LogUnprocessedTail(packet);
}
// lag can cause STATUS_LOGGEDIN opcodes to arrive after the player started a transfer
@@ -270,7 +270,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
// not expected _player or must checked in packet hanlder
sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet));
(this->*opHandle.handler)(*packet);
- if (sLog.IsOutDebug() && packet->rpos() < packet->wpos())
+ if (sLog->IsOutDebug() && packet->rpos() < packet->wpos())
LogUnprocessedTail(packet);
}
break;
@@ -283,7 +283,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
{
sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet));
(this->*opHandle.handler)(*packet);
- if (sLog.IsOutDebug() && packet->rpos() < packet->wpos())
+ if (sLog->IsOutDebug() && packet->rpos() < packet->wpos())
LogUnprocessedTail(packet);
}
break;
@@ -302,16 +302,16 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
sScriptMgr->OnPacketReceive(m_Socket, WorldPacket(*packet));
(this->*opHandle.handler)(*packet);
- if (sLog.IsOutDebug() && packet->rpos() < packet->wpos())
+ if (sLog->IsOutDebug() && packet->rpos() < packet->wpos())
LogUnprocessedTail(packet);
break;
case STATUS_NEVER:
- sLog.outError("SESSION: received not allowed opcode %s (0x%.4X)",
+ sLog->outError("SESSION: received not allowed opcode %s (0x%.4X)",
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode());
break;
case STATUS_UNHANDLED:
- sLog.outDebug("SESSION: received not handled opcode %s (0x%.4X)",
+ sLog->outDebug("SESSION: received not handled opcode %s (0x%.4X)",
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode());
break;
@@ -319,11 +319,11 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
}
catch(ByteBufferException &)
{
- sLog.outError("WorldSession::Update ByteBufferException occured while parsing a packet (opcode: %u) from client %s, accountid=%i. Skipped packet.",
+ sLog->outError("WorldSession::Update ByteBufferException occured while parsing a packet (opcode: %u) from client %s, accountid=%i. Skipped packet.",
packet->GetOpcode(), GetRemoteAddress().c_str(), GetAccountId());
- if (sLog.IsOutDebug())
+ if (sLog->IsOutDebug())
{
- sLog.outDebug("Dumping error causing packet:");
+ sLog->outDebug("Dumping error causing packet:");
packet->hexlike();
}
}
@@ -500,7 +500,7 @@ void WorldSession::LogoutPlayer(bool Save)
// e.g if he got disconnected during a transfer to another map
// calls to GetMap in this case may cause crashes
_player->CleanupsBeforeDelete();
- sLog.outChar("Account: %d (IP: %s) Logout Character:[%s] (GUID: %u)", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName() ,_player->GetGUIDLow());
+ sLog->outChar("Account: %d (IP: %s) Logout Character:[%s] (GUID: %u)", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName() ,_player->GetGUIDLow());
Map* _map = _player->GetMap();
_map->Remove(_player, true);
SetPlayer(NULL); // deleted in Remove call
@@ -513,7 +513,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");
+ sLog->outDebug("SESSION: Sent SMSG_LOGOUT_COMPLETE Message");
}
m_playerLogout = false;
@@ -571,28 +571,28 @@ const char * WorldSession::GetTrinityString(int32 entry) const
void WorldSession::Handle_NULL(WorldPacket& recvPacket)
{
- sLog.outError("SESSION: received unhandled opcode %s (0x%.4X)",
+ sLog->outError("SESSION: received unhandled opcode %s (0x%.4X)",
LookupOpcodeName(recvPacket.GetOpcode()),
recvPacket.GetOpcode());
}
void WorldSession::Handle_EarlyProccess(WorldPacket& recvPacket)
{
- sLog.outError("SESSION: received opcode %s (0x%.4X) that must be processed in WorldSocket::OnRead",
+ sLog->outError("SESSION: received opcode %s (0x%.4X) that must be processed in WorldSocket::OnRead",
LookupOpcodeName(recvPacket.GetOpcode()),
recvPacket.GetOpcode());
}
void WorldSession::Handle_ServerSide(WorldPacket& recvPacket)
{
- sLog.outError("SESSION: received server-side opcode %s (0x%.4X)",
+ sLog->outError("SESSION: received server-side opcode %s (0x%.4X)",
LookupOpcodeName(recvPacket.GetOpcode()),
recvPacket.GetOpcode());
}
void WorldSession::Handle_Deprecated(WorldPacket& recvPacket)
{
- sLog.outError("SESSION: received deprecated opcode %s (0x%.4X)",
+ sLog->outError("SESSION: received deprecated opcode %s (0x%.4X)",
LookupOpcodeName(recvPacket.GetOpcode()),
recvPacket.GetOpcode());
}
@@ -637,14 +637,14 @@ void WorldSession::LoadAccountData(PreparedQueryResult result, uint32 mask)
uint32 type = fields[0].GetUInt32();
if (type >= NUM_ACCOUNT_DATA_TYPES)
{
- sLog.outError("Table `%s` have invalid account data type (%u), ignore.",
+ sLog->outError("Table `%s` have invalid account data type (%u), ignore.",
mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data", type);
continue;
}
if ((mask & (1 << type)) == 0)
{
- sLog.outError("Table `%s` have non appropriate for table account data type (%u), ignore.",
+ sLog->outError("Table `%s` have non appropriate for table account data type (%u), ignore.",
mask == GLOBAL_CACHE_MASK ? "account_data" : "character_account_data", type);
continue;
}
@@ -843,7 +843,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
if (size > 0xFFFFF)
{
- sLog.outError("WorldSession::ReadAddonsInfo addon info too big, size %u", size);
+ sLog->outError("WorldSession::ReadAddonsInfo addon info too big, size %u", size);
return;
}
@@ -873,7 +873,7 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
addonInfo >> enabled >> crc >> unk1;
- sLog.outDetail("ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1);
+ sLog->outDetail("ADDON: Name: %s, Enabled: 0x%x, CRC: 0x%x, Unknown2: 0x%x", addonName.c_str(), enabled, crc, unk1);
AddonInfo addon(addonName, enabled, crc, 2, true);
@@ -886,15 +886,15 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
match = false;
if (!match)
- sLog.outDetail("ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC);
+ sLog->outDetail("ADDON: %s was known, but didn't match known CRC (0x%x)!", addon.Name.c_str(), savedAddon->CRC);
else
- sLog.outDetail("ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC);
+ sLog->outDetail("ADDON: %s was known, CRC is correct (0x%x)", addon.Name.c_str(), savedAddon->CRC);
}
else
{
sAddonMgr->SaveAddon(addon);
- sLog.outDetail("ADDON: %s (0x%x) was not known, saving...", addon.Name.c_str(), addon.CRC);
+ sLog->outDetail("ADDON: %s (0x%x) was not known, saving...", addon.Name.c_str(), addon.CRC);
}
// TODO: Find out when to not use CRC/pubkey, and other possible states.
@@ -903,13 +903,13 @@ void WorldSession::ReadAddonsInfo(WorldPacket &data)
uint32 currentTime;
addonInfo >> currentTime;
- sLog.outDebug("ADDON: CurrentTime: %u", currentTime);
+ sLog->outDebug("ADDON: CurrentTime: %u", currentTime);
if (addonInfo.rpos() != addonInfo.size())
- sLog.outDebug("packet under-read!");
+ sLog->outDebug("packet under-read!");
}
else
- sLog.outError("Addon packet uncompress error!");
+ sLog->outError("Addon packet uncompress error!");
}
void WorldSession::SendAddonsInfo()
@@ -948,7 +948,7 @@ void WorldSession::SendAddonsInfo()
data << uint8(usepk);
if (usepk) // if CRC is wrong, add public key (client need it)
{
- sLog.outDetail("ADDON: CRC (0x%x) for addon %s is wrong (does not match expected 0x%x), sending pubkey",
+ sLog->outDetail("ADDON: CRC (0x%x) for addon %s is wrong (does not match expected 0x%x), sending pubkey",
itr->CRC, itr->Name.c_str(), STANDARD_ADDON_CRC);
data.append(addonPublicKey, sizeof(addonPublicKey));
diff --git a/src/server/game/Server/WorldSession.h b/src/server/game/Server/WorldSession.h
index 809d48e5a6b..3a631ac5bcb 100755
--- a/src/server/game/Server/WorldSession.h
+++ b/src/server/game/Server/WorldSession.h
@@ -348,7 +348,7 @@ class WorldSession
}
void ResetTimeOutTime()
{
- m_timeOutTime = sWorld.getIntConfig(CONFIG_SOCKET_TIMEOUTTIME);
+ m_timeOutTime = sWorld->getIntConfig(CONFIG_SOCKET_TIMEOUTTIME);
}
bool IsConnectionIdle() const
{
diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp
index 986a8c74d12..341f2b51f59 100755
--- a/src/server/game/Server/WorldSocket.cpp
+++ b/src/server/game/Server/WorldSocket.cpp
@@ -61,7 +61,7 @@ struct ServerPktHeader
uint8 headerIndex=0;
if (isLargePacket())
{
- sLog.outDebug("initializing large server to client packet. Size: %u, cmd: %u", size, cmd);
+ sLog->outDebug("initializing large server to client packet. Size: %u, cmd: %u", size, cmd);
header[headerIndex++] = 0x80|(0xFF &(size>>16));
}
header[headerIndex++] = 0xFF &(size>>8);
@@ -159,9 +159,9 @@ int WorldSocket::SendPacket (const WorldPacket& pct)
return -1;
// Dump outgoing packet.
- if (sWorldLog.LogWorld())
+ if (sWorldLog->LogWorld())
{
- sWorldLog.outTimestampLog ("SERVER:\nSOCKET: %u\nLENGTH: %u\nOPCODE: %s (0x%.4X)\nDATA:\n",
+ sWorldLog->outTimestampLog ("SERVER:\nSOCKET: %u\nLENGTH: %u\nOPCODE: %s (0x%.4X)\nDATA:\n",
(uint32) get_handle(),
pct.size(),
LookupOpcodeName (pct.GetOpcode()),
@@ -171,11 +171,11 @@ int WorldSocket::SendPacket (const WorldPacket& pct)
while (p < pct.size())
{
for (uint32 j = 0; j < 16 && p < pct.size(); j++)
- sWorldLog.outLog("%.2X ", const_cast<WorldPacket&>(pct)[p++]);
+ sWorldLog->outLog("%.2X ", const_cast<WorldPacket&>(pct)[p++]);
- sWorldLog.outLog("\n");
+ sWorldLog->outLog("\n");
}
- sWorldLog.outLog("\n");
+ sWorldLog->outLog("\n");
}
// Create a copy of the original packet; this is to avoid issues if a hook modifies it.
@@ -208,7 +208,7 @@ int WorldSocket::SendPacket (const WorldPacket& pct)
if (msg_queue()->enqueue_tail(mb,(ACE_Time_Value*)&ACE_Time_Value::zero) == -1)
{
- sLog.outError("WorldSocket::SendPacket enqueue_tail failed");
+ sLog->outError("WorldSocket::SendPacket enqueue_tail failed");
mb->release();
return -1;
}
@@ -251,7 +251,7 @@ int WorldSocket::open (void *a)
if (peer().get_remote_addr(remote_addr) == -1)
{
- sLog.outError ("WorldSocket::open: peer().get_remote_addr errno = %s", ACE_OS::strerror (errno));
+ sLog->outError ("WorldSocket::open: peer().get_remote_addr errno = %s", ACE_OS::strerror (errno));
return -1;
}
@@ -276,7 +276,7 @@ int WorldSocket::open (void *a)
// Register with ACE Reactor
if (reactor()->register_handler(this, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::WRITE_MASK) == -1)
{
- sLog.outError ("WorldSocket::open: unable to register client handler errno = %s", ACE_OS::strerror (errno));
+ sLog->outError ("WorldSocket::open: unable to register client handler errno = %s", ACE_OS::strerror (errno));
return -1;
}
@@ -312,14 +312,14 @@ int WorldSocket::handle_input (ACE_HANDLE)
return Update(); // interesting line ,isn't it ?
}
- sLog.outStaticDebug("WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno));
+ sLog->outStaticDebug("WorldSocket::handle_input: Peer error closing connection errno = %s", ACE_OS::strerror (errno));
errno = ECONNRESET;
return -1;
}
case 0:
{
- sLog.outStaticDebug("WorldSocket::handle_input: Peer has closed connection");
+ sLog->outStaticDebug("WorldSocket::handle_input: Peer has closed connection");
errno = ECONNRESET;
return -1;
@@ -388,7 +388,7 @@ int WorldSocket::handle_output_queue (GuardType& g)
if (msg_queue()->dequeue_head(mblk, (ACE_Time_Value*)&ACE_Time_Value::zero) == -1)
{
- sLog.outError("WorldSocket::handle_output_queue dequeue_head");
+ sLog->outError("WorldSocket::handle_output_queue dequeue_head");
return -1;
}
@@ -423,7 +423,7 @@ int WorldSocket::handle_output_queue (GuardType& g)
if (msg_queue()->enqueue_head(mblk, (ACE_Time_Value*) &ACE_Time_Value::zero) == -1)
{
- sLog.outError("WorldSocket::handle_output_queue enqueue_head");
+ sLog->outError("WorldSocket::handle_output_queue enqueue_head");
mblk->release();
return -1;
}
@@ -493,7 +493,7 @@ int WorldSocket::handle_input_header (void)
if ((header.size < 4) || (header.size > 10240) || (header.cmd > 10240))
{
- sLog.outError ("WorldSocket::handle_input_header: client sent malformed packet size = %d , cmd = %d",
+ sLog->outError ("WorldSocket::handle_input_header: client sent malformed packet size = %d , cmd = %d",
header.size, header.cmd);
errno = EINVAL;
@@ -596,7 +596,7 @@ int WorldSocket::handle_input_missing_data (void)
// hope this is not hack ,as proper m_RecvWPct is asserted around
if (!m_RecvWPct)
{
- sLog.outError ("Forcing close on input m_RecvWPct = NULL");
+ sLog->outError ("Forcing close on input m_RecvWPct = NULL");
errno = EINVAL;
return -1;
}
@@ -642,7 +642,7 @@ int WorldSocket::cancel_wakeup_output (GuardType& g)
(this, ACE_Event_Handler::WRITE_MASK) == -1)
{
// would be good to store errno from reactor with errno guard
- sLog.outError ("WorldSocket::cancel_wakeup_output");
+ sLog->outError ("WorldSocket::cancel_wakeup_output");
return -1;
}
@@ -661,7 +661,7 @@ int WorldSocket::schedule_wakeup_output (GuardType& g)
if (reactor()->schedule_wakeup
(this, ACE_Event_Handler::WRITE_MASK) == -1)
{
- sLog.outError ("WorldSocket::schedule_wakeup_output");
+ sLog->outError ("WorldSocket::schedule_wakeup_output");
return -1;
}
@@ -681,9 +681,9 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
return -1;
// Dump received packet.
- if (sWorldLog.LogWorld())
+ if (sWorldLog->LogWorld())
{
- sWorldLog.outTimestampLog ("CLIENT:\nSOCKET: %u\nLENGTH: %u\nOPCODE: %s (0x%.4X)\nDATA:\n",
+ sWorldLog->outTimestampLog ("CLIENT:\nSOCKET: %u\nLENGTH: %u\nOPCODE: %s (0x%.4X)\nDATA:\n",
(uint32) get_handle(),
new_pct->size(),
LookupOpcodeName (new_pct->GetOpcode()),
@@ -693,11 +693,11 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
while (p < new_pct->size())
{
for (uint32 j = 0; j < 16 && p < new_pct->size(); j++)
- sWorldLog.outLog ("%.2X ", (*new_pct)[p++]);
+ sWorldLog->outLog ("%.2X ", (*new_pct)[p++]);
- sWorldLog.outLog ("\n");
+ sWorldLog->outLog ("\n");
}
- sWorldLog.outLog ("\n");
+ sWorldLog->outLog ("\n");
}
try
@@ -709,14 +709,14 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
case CMSG_AUTH_SESSION:
if (m_Session)
{
- sLog.outError ("WorldSocket::ProcessIncoming: Player send CMSG_AUTH_SESSION again");
+ sLog->outError ("WorldSocket::ProcessIncoming: Player send CMSG_AUTH_SESSION again");
return -1;
}
sScriptMgr->OnPacketReceive(this, WorldPacket(*new_pct));
return HandleAuthSession (*new_pct);
case CMSG_KEEP_ALIVE:
- sLog.outStaticDebug ("CMSG_KEEP_ALIVE ,size: " UI64FMTD, uint64(new_pct->size()));
+ sLog->outStaticDebug ("CMSG_KEEP_ALIVE ,size: " UI64FMTD, uint64(new_pct->size()));
sScriptMgr->OnPacketReceive(this, WorldPacket(*new_pct));
return 0;
default:
@@ -738,7 +738,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
}
else
{
- sLog.outError ("WorldSocket::ProcessIncoming: Client not authed opcode = %u", uint32(opcode));
+ sLog->outError ("WorldSocket::ProcessIncoming: Client not authed opcode = %u", uint32(opcode));
return -1;
}
}
@@ -746,11 +746,11 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct)
}
catch (ByteBufferException &)
{
- sLog.outError("WorldSocket::ProcessIncoming ByteBufferException occured while parsing an instant handled packet (opcode: %u) from client %s, accountid=%i. Disconnected client.",
+ sLog->outError("WorldSocket::ProcessIncoming ByteBufferException occured while parsing an instant handled packet (opcode: %u) from client %s, accountid=%i. Disconnected client.",
opcode, GetRemoteAddress().c_str(), m_Session?m_Session->GetAccountId():-1);
- if (sLog.IsOutDebug())
+ if (sLog->IsOutDebug())
{
- sLog.outDebug("Dumping error causing packet:");
+ sLog->outDebug("Dumping error causing packet:");
new_pct->hexlike();
}
@@ -778,13 +778,13 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
BigNumber K;
- if (sWorld.IsClosed())
+ if (sWorld->IsClosed())
{
packet.Initialize(SMSG_AUTH_RESPONSE, 1);
packet << uint8(AUTH_REJECT);
SendPacket (packet);
- sLog.outError ("WorldSocket::HandleAuthSession: World closed, denying client (%s).", GetRemoteAddress().c_str());
+ sLog->outError ("WorldSocket::HandleAuthSession: World closed, denying client (%s).", GetRemoteAddress().c_str());
return -1;
}
@@ -798,7 +798,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
recvPacket >> unk4;
recvPacket.read (digest, 20);
- sLog.outStaticDebug ("WorldSocket::HandleAuthSession: client %u, unk2 %u, account %s, unk3 %u, clientseed %u",
+ sLog->outStaticDebug ("WorldSocket::HandleAuthSession: client %u, unk2 %u, account %s, unk3 %u, clientseed %u",
BuiltNumberClient,
unk2,
account.c_str(),
@@ -834,17 +834,17 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
SendPacket (packet);
- sLog.outError ("WorldSocket::HandleAuthSession: Sent Auth Response (unknown account).");
+ sLog->outError ("WorldSocket::HandleAuthSession: Sent Auth Response (unknown account).");
return -1;
}
Field* fields = result->Fetch();
uint8 expansion = fields[6].GetUInt8();
- uint32 world_expansion = sWorld.getIntConfig(CONFIG_EXPANSION);
+ uint32 world_expansion = sWorld->getIntConfig(CONFIG_EXPANSION);
if (expansion > world_expansion)
expansion = world_expansion;
- //expansion = ((sWorld.getIntConfig(CONFIG_EXPANSION) > fields[6].GetUInt8()) ? fields[6].GetUInt8() : sWorld.getIntConfig(CONFIG_EXPANSION));
+ //expansion = ((sWorld->getIntConfig(CONFIG_EXPANSION) > fields[6].GetUInt8()) ? fields[6].GetUInt8() : sWorld->getIntConfig(CONFIG_EXPANSION));
N.SetHexStr ("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7");
g.SetDword (7);
@@ -855,7 +855,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
const char* sStr = s.AsHexStr(); //Must be freed by OPENSSL_free()
const char* vStr = v.AsHexStr(); //Must be freed by OPENSSL_free()
- sLog.outStaticDebug ("WorldSocket::HandleAuthSession: (s,v) check s: %s v: %s",
+ sLog->outStaticDebug ("WorldSocket::HandleAuthSession: (s,v) check s: %s v: %s",
sStr,
vStr);
@@ -871,7 +871,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
packet << uint8 (AUTH_FAILED);
SendPacket (packet);
- sLog.outBasic ("WorldSocket::HandleAuthSession: Sent Auth Response (Account IP differs).");
+ sLog->outBasic ("WorldSocket::HandleAuthSession: Sent Auth Response (Account IP differs).");
return -1;
}
}
@@ -923,13 +923,13 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
packet << uint8 (AUTH_BANNED);
SendPacket (packet);
- sLog.outError ("WorldSocket::HandleAuthSession: Sent Auth Response (Account banned).");
+ sLog->outError ("WorldSocket::HandleAuthSession: Sent Auth Response (Account banned).");
return -1;
}
// Check locked state for server
- AccountTypes allowedAccountType = sWorld.GetPlayerSecurityLimit();
- sLog.outDebug("Allowed Level: %u Player Level %u", allowedAccountType, AccountTypes(security));
+ AccountTypes allowedAccountType = sWorld->GetPlayerSecurityLimit();
+ sLog->outDebug("Allowed Level: %u Player Level %u", allowedAccountType, AccountTypes(security));
if (allowedAccountType > SEC_PLAYER && AccountTypes(security) < allowedAccountType)
{
WorldPacket Packet (SMSG_AUTH_RESPONSE, 1);
@@ -937,7 +937,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
SendPacket (packet);
- sLog.outDetail ("WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
+ sLog->outDetail ("WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
return -1;
}
@@ -961,13 +961,13 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
SendPacket (packet);
- sLog.outError ("WorldSocket::HandleAuthSession: Sent Auth Response (authentification failed).");
+ sLog->outError ("WorldSocket::HandleAuthSession: Sent Auth Response (authentification failed).");
return -1;
}
std::string address = GetRemoteAddress();
- sLog.outStaticDebug ("WorldSocket::HandleAuthSession: Client '%s' authenticated successfully from %s.",
+ sLog->outStaticDebug ("WorldSocket::HandleAuthSession: Client '%s' authenticated successfully from %s.",
account.c_str(),
address.c_str());
@@ -991,10 +991,10 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
m_Session->ReadAddonsInfo(recvPacket);
// Sleep this Network thread for
- uint32 sleepTime = sWorld.getIntConfig(CONFIG_SESSION_ADD_DELAY);
+ uint32 sleepTime = sWorld->getIntConfig(CONFIG_SESSION_ADD_DELAY);
ACE_OS::sleep (ACE_Time_Value (0, sleepTime));
- sWorld.AddSession (m_Session);
+ sWorld->AddSession (m_Session);
return 0;
}
@@ -1021,7 +1021,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
{
++m_OverSpeedPings;
- uint32 max_count = sWorld.getIntConfig (CONFIG_MAX_OVERSPEED_PINGS);
+ uint32 max_count = sWorld->getIntConfig (CONFIG_MAX_OVERSPEED_PINGS);
if (max_count && m_OverSpeedPings > max_count)
{
@@ -1029,7 +1029,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
if (m_Session && m_Session->GetSecurity() == SEC_PLAYER)
{
- sLog.outError ("WorldSocket::HandlePing: Player kicked for "
+ sLog->outError ("WorldSocket::HandlePing: Player kicked for "
"over-speed pings address = %s",
GetRemoteAddress().c_str());
@@ -1049,7 +1049,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
m_Session->SetLatency (latency);
else
{
- sLog.outError ("WorldSocket::HandlePing: peer sent CMSG_PING, "
+ sLog->outError ("WorldSocket::HandlePing: peer sent CMSG_PING, "
"but is not authenticated or got recently kicked,"
" address = %s",
GetRemoteAddress().c_str());
diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp
index 33dd8f7b8d2..3445ecb54b4 100755
--- a/src/server/game/Server/WorldSocketMgr.cpp
+++ b/src/server/game/Server/WorldSocketMgr.cpp
@@ -154,7 +154,7 @@ class ReactorRunnable : protected ACE_Task_Base
virtual int svc()
{
- sLog.outStaticDebug ("Network Thread Starting");
+ sLog->outStaticDebug ("Network Thread Starting");
ACE_ASSERT (m_Reactor);
@@ -191,7 +191,7 @@ class ReactorRunnable : protected ACE_Task_Base
}
}
- sLog.outStaticDebug ("Network Thread Exitting");
+ sLog->outStaticDebug ("Network Thread Exitting");
return 0;
}
@@ -229,13 +229,13 @@ WorldSocketMgr::~WorldSocketMgr()
int
WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
{
- m_UseNoDelay = sConfig.GetBoolDefault ("Network.TcpNodelay", true);
+ m_UseNoDelay = sConfig->GetBoolDefault ("Network.TcpNodelay", true);
- int num_threads = sConfig.GetIntDefault ("Network.Threads", 1);
+ int num_threads = sConfig->GetIntDefault ("Network.Threads", 1);
if (num_threads <= 0)
{
- sLog.outError ("Network.Threads is wrong in your config file");
+ sLog->outError ("Network.Threads is wrong in your config file");
return -1;
}
@@ -243,16 +243,16 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
m_NetThreads = new ReactorRunnable[m_NetThreadsCount];
- sLog.outBasic ("Max allowed socket connections %d", ACE::max_handles());
+ sLog->outBasic ("Max allowed socket connections %d", ACE::max_handles());
// -1 means use default
- m_SockOutKBuff = sConfig.GetIntDefault ("Network.OutKBuff", -1);
+ m_SockOutKBuff = sConfig->GetIntDefault ("Network.OutKBuff", -1);
- m_SockOutUBuff = sConfig.GetIntDefault ("Network.OutUBuff", 65536);
+ m_SockOutUBuff = sConfig->GetIntDefault ("Network.OutUBuff", 65536);
if (m_SockOutUBuff <= 0)
{
- sLog.outError ("Network.OutUBuff is wrong in your config file");
+ sLog->outError ("Network.OutUBuff is wrong in your config file");
return -1;
}
@@ -263,7 +263,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
if (acc->open(listen_addr, m_NetThreads[0].GetReactor(), ACE_NONBLOCK) == -1)
{
- sLog.outError ("Failed to open acceptor ,check if the port is free");
+ sLog->outError ("Failed to open acceptor ,check if the port is free");
return -1;
}
@@ -276,7 +276,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address)
int
WorldSocketMgr::StartNetwork (ACE_UINT16 port, const char* address)
{
- if (!sLog.IsOutDebug())
+ if (!sLog->IsOutDebug())
ACE_Log_Msg::instance()->priority_mask (LM_ERROR, ACE_Log_Msg::PROCESS);
if (StartReactiveIO(port, address) == -1)
@@ -330,7 +330,7 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock)
(void*) & m_SockOutKBuff,
sizeof (int)) == -1 && errno != ENOTSUP)
{
- sLog.outError ("WorldSocketMgr::OnSocketOpen set_option SO_SNDBUF");
+ sLog->outError ("WorldSocketMgr::OnSocketOpen set_option SO_SNDBUF");
return -1;
}
}
@@ -345,7 +345,7 @@ WorldSocketMgr::OnSocketOpen (WorldSocket* sock)
(void*)&ndoption,
sizeof (int)) == -1)
{
- sLog.outError ("WorldSocketMgr::OnSocketOpen: peer().set_option TCP_NODELAY errno = %s", ACE_OS::strerror (errno));
+ sLog->outError ("WorldSocketMgr::OnSocketOpen: peer().set_option TCP_NODELAY errno = %s", ACE_OS::strerror (errno));
return -1;
}
}