mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 16:10:49 +01:00
Core: Yet more cleanups in codestyle...
This commit is contained in:
@@ -560,14 +560,14 @@ void Battleground::SetTeamStartLoc(uint32 TeamID, float X, float Y, float Z, flo
|
||||
m_TeamStartLocO[idx] = O;
|
||||
}
|
||||
|
||||
void Battleground::SendPacketToAll(WorldPacket *packet)
|
||||
void Battleground::SendPacketToAll(WorldPacket* packet)
|
||||
{
|
||||
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||
if (Player* player = _GetPlayer(itr, "SendPacketToAll"))
|
||||
player->GetSession()->SendPacket(packet);
|
||||
}
|
||||
|
||||
void Battleground::SendPacketToTeam(uint32 TeamID, WorldPacket *packet, Player *sender, bool self)
|
||||
void Battleground::SendPacketToTeam(uint32 TeamID, WorldPacket* packet, Player *sender, bool self)
|
||||
{
|
||||
for (BattlegroundPlayerMap::const_iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||
if (Player* player = _GetPlayerForTeam(TeamID, itr, "SendPacketToTeam"))
|
||||
|
||||
@@ -101,7 +101,7 @@ void UpdateData::Compress(void* dst, uint32 *dst_size, void* src, int src_size)
|
||||
*dst_size = c_stream.total_out;
|
||||
}
|
||||
|
||||
bool UpdateData::BuildPacket(WorldPacket *packet)
|
||||
bool UpdateData::BuildPacket(WorldPacket* packet)
|
||||
{
|
||||
ASSERT(packet->empty()); // shouldn't happen
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class UpdateData
|
||||
void AddOutOfRangeGUID(std::set<uint64>& guids);
|
||||
void AddOutOfRangeGUID(const uint64 &guid);
|
||||
void AddUpdateBlock(const ByteBuffer &block);
|
||||
bool BuildPacket(WorldPacket *packet);
|
||||
bool BuildPacket(WorldPacket* packet);
|
||||
bool HasData() { return m_blockCount > 0 || !m_outOfRangeGUIDs.empty(); }
|
||||
void Clear();
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@ void SocialMgr::SendFriendStatus(Player* player, FriendsResult result, uint32 fr
|
||||
player->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void SocialMgr::BroadcastToFriendListers(Player* player, WorldPacket *packet)
|
||||
void SocialMgr::BroadcastToFriendListers(Player* player, WorldPacket* packet)
|
||||
{
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
@@ -149,7 +149,7 @@ class SocialMgr
|
||||
// Packet management
|
||||
void MakeFriendStatusPacket(FriendsResult result, uint32 friend_guid, WorldPacket *data);
|
||||
void SendFriendStatus(Player* player, FriendsResult result, uint32 friend_guid, bool broadcast);
|
||||
void BroadcastToFriendListers(Player* player, WorldPacket *packet);
|
||||
void BroadcastToFriendListers(Player* player, WorldPacket* packet);
|
||||
// Loading
|
||||
PlayerSocial *LoadFromDB(PreparedQueryResult result, uint32 guid);
|
||||
private:
|
||||
|
||||
@@ -1256,7 +1256,7 @@ void Group::UpdatePlayerOutOfRange(Player* pPlayer)
|
||||
}
|
||||
}
|
||||
|
||||
void Group::BroadcastPacket(WorldPacket *packet, bool ignorePlayersInBGRaid, int group, uint64 ignore)
|
||||
void Group::BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int group, uint64 ignore)
|
||||
{
|
||||
for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
@@ -1269,7 +1269,7 @@ void Group::BroadcastPacket(WorldPacket *packet, bool ignorePlayersInBGRaid, int
|
||||
}
|
||||
}
|
||||
|
||||
void Group::BroadcastReadyCheck(WorldPacket *packet)
|
||||
void Group::BroadcastReadyCheck(WorldPacket* packet)
|
||||
{
|
||||
for (GroupReference *itr = GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
|
||||
@@ -262,8 +262,8 @@ class Group
|
||||
void SendUpdate();
|
||||
void UpdatePlayerOutOfRange(Player* pPlayer);
|
||||
// ignore: GUID of player that will be ignored
|
||||
void BroadcastPacket(WorldPacket *packet, bool ignorePlayersInBGRaid, int group=-1, uint64 ignore=0);
|
||||
void BroadcastReadyCheck(WorldPacket *packet);
|
||||
void BroadcastPacket(WorldPacket* packet, bool ignorePlayersInBGRaid, int group=-1, uint64 ignore=0);
|
||||
void BroadcastReadyCheck(WorldPacket* packet);
|
||||
void OfflineReadyCheck();
|
||||
|
||||
/*********************************************************/
|
||||
|
||||
@@ -2046,7 +2046,7 @@ void Guild::BroadcastToGuild(WorldSession *session, bool officerOnly, const std:
|
||||
}
|
||||
}
|
||||
|
||||
void Guild::BroadcastPacketToRank(WorldPacket *packet, uint8 rankId) const
|
||||
void Guild::BroadcastPacketToRank(WorldPacket* packet, uint8 rankId) const
|
||||
{
|
||||
for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
|
||||
if (itr->second->IsRank(rankId))
|
||||
@@ -2054,7 +2054,7 @@ void Guild::BroadcastPacketToRank(WorldPacket *packet, uint8 rankId) const
|
||||
player->GetSession()->SendPacket(packet);
|
||||
}
|
||||
|
||||
void Guild::BroadcastPacket(WorldPacket *packet) const
|
||||
void Guild::BroadcastPacket(WorldPacket* packet) const
|
||||
{
|
||||
for (Members::const_iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
|
||||
if (Player* player = itr->second->FindPlayer())
|
||||
|
||||
@@ -642,8 +642,8 @@ public:
|
||||
|
||||
// Broadcasts
|
||||
void BroadcastToGuild(WorldSession *session, bool officerOnly, const std::string& msg, uint32 language = LANG_UNIVERSAL) const;
|
||||
void BroadcastPacketToRank(WorldPacket *packet, uint8 rankId) const;
|
||||
void BroadcastPacket(WorldPacket *packet) const;
|
||||
void BroadcastPacketToRank(WorldPacket* packet, uint8 rankId) const;
|
||||
void BroadcastPacket(WorldPacket* packet) const;
|
||||
|
||||
template<class Do>
|
||||
void BroadcastWorker(Do& _do, Player* except = NULL)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "Transport.h"
|
||||
|
||||
bool MapSessionFilter::Process(WorldPacket *packet)
|
||||
bool MapSessionFilter::Process(WorldPacket* packet)
|
||||
{
|
||||
OpcodeHandler const &opHandle = opcodeTable[packet->GetOpcode()];
|
||||
|
||||
@@ -65,7 +65,7 @@ bool MapSessionFilter::Process(WorldPacket *packet)
|
||||
|
||||
//we should process ALL packets when player is not in world/logged in
|
||||
//OR packet handler is not thread-safe!
|
||||
bool WorldSessionFilter::Process(WorldPacket *packet)
|
||||
bool WorldSessionFilter::Process(WorldPacket* packet)
|
||||
{
|
||||
OpcodeHandler const &opHandle = opcodeTable[packet->GetOpcode()];
|
||||
//check if packet handler is supposed to be safe
|
||||
@@ -120,7 +120,7 @@ WorldSession::~WorldSession()
|
||||
}
|
||||
|
||||
///- empty incoming packet queue
|
||||
WorldPacket *packet = NULL;
|
||||
WorldPacket* packet = NULL;
|
||||
while (_recvQueue.next(packet))
|
||||
delete packet;
|
||||
|
||||
@@ -190,7 +190,7 @@ void WorldSession::QueuePacket(WorldPacket *new_packet)
|
||||
}
|
||||
|
||||
/// Logging helper for unexpected opcodes
|
||||
void WorldSession::LogUnexpectedOpcode(WorldPacket *packet, const char* status, const char *reason)
|
||||
void WorldSession::LogUnexpectedOpcode(WorldPacket* packet, const char* status, const char *reason)
|
||||
{
|
||||
sLog->outError("SESSION (account: %u, guidlow: %u, char: %s): received unexpected opcode %s (0x%.4X, status: %s) %s",
|
||||
GetAccountId(), m_GUIDLow, _player ? _player->GetName() : "<none>",
|
||||
@@ -198,7 +198,7 @@ void WorldSession::LogUnexpectedOpcode(WorldPacket *packet, const char* status,
|
||||
}
|
||||
|
||||
/// Logging helper for unexpected opcodes
|
||||
void WorldSession::LogUnprocessedTail(WorldPacket *packet)
|
||||
void WorldSession::LogUnprocessedTail(WorldPacket* packet)
|
||||
{
|
||||
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()));
|
||||
@@ -218,7 +218,7 @@ bool WorldSession::Update(uint32 diff, PacketFilter& updater)
|
||||
|
||||
///- Retrieve packets from the receive queue and call the appropriate handlers
|
||||
/// not process packets if socket already closed
|
||||
WorldPacket *packet = NULL;
|
||||
WorldPacket* packet = NULL;
|
||||
while (m_Socket && !m_Socket->IsClosed() && _recvQueue.next(packet, updater))
|
||||
{
|
||||
if (packet->GetOpcode() >= NUM_MSG_TYPES)
|
||||
|
||||
@@ -876,8 +876,8 @@ class WorldSession
|
||||
void moveItems(Item* myItems[], Item* hisItems[]);
|
||||
|
||||
// logging helper
|
||||
void LogUnexpectedOpcode(WorldPacket *packet, const char* status, const char *reason);
|
||||
void LogUnprocessedTail(WorldPacket *packet);
|
||||
void LogUnexpectedOpcode(WorldPacket* packet, const char* status, const char *reason);
|
||||
void LogUnprocessedTail(WorldPacket* packet);
|
||||
|
||||
// EnumData helpers
|
||||
bool CharCanLogin(uint32 lowGUID)
|
||||
|
||||
@@ -2008,7 +2008,7 @@ void World::ForceGameEventUpdate()
|
||||
}
|
||||
|
||||
/// Send a packet to all players (except self if mentioned)
|
||||
void World::SendGlobalMessage(WorldPacket *packet, WorldSession *self, uint32 team)
|
||||
void World::SendGlobalMessage(WorldPacket* packet, WorldSession* self, uint32 team)
|
||||
{
|
||||
SessionMap::const_iterator itr;
|
||||
for (itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
|
||||
@@ -2025,7 +2025,7 @@ void World::SendGlobalMessage(WorldPacket *packet, WorldSession *self, uint32 te
|
||||
}
|
||||
|
||||
/// Send a packet to all GMs (except self if mentioned)
|
||||
void World::SendGlobalGMMessage(WorldPacket *packet, WorldSession *self, uint32 team)
|
||||
void World::SendGlobalGMMessage(WorldPacket* packet, WorldSession* self, uint32 team)
|
||||
{
|
||||
SessionMap::iterator itr;
|
||||
for (itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
|
||||
@@ -2141,7 +2141,7 @@ void World::SendGMText(int32 string_id, ...)
|
||||
}
|
||||
|
||||
/// DEPRECATED, only for debug purpose. Send a System Message to all players (except self if mentioned)
|
||||
void World::SendGlobalText(const char* text, WorldSession *self)
|
||||
void World::SendGlobalText(const char* text, WorldSession* self)
|
||||
{
|
||||
WorldPacket data;
|
||||
|
||||
@@ -2159,7 +2159,7 @@ void World::SendGlobalText(const char* text, WorldSession *self)
|
||||
}
|
||||
|
||||
/// Send a packet to all players (or players selected team) in the zone (except self if mentioned)
|
||||
void World::SendZoneMessage(uint32 zone, WorldPacket *packet, WorldSession *self, uint32 team)
|
||||
void World::SendZoneMessage(uint32 zone, WorldPacket* packet, WorldSession* self, uint32 team)
|
||||
{
|
||||
SessionMap::const_iterator itr;
|
||||
for (itr = m_sessions.begin(); itr != m_sessions.end(); ++itr)
|
||||
@@ -2177,7 +2177,7 @@ void World::SendZoneMessage(uint32 zone, WorldPacket *packet, WorldSession *self
|
||||
}
|
||||
|
||||
/// Send a System Message to all players in the zone (except self if mentioned)
|
||||
void World::SendZoneText(uint32 zone, const char* text, WorldSession *self, uint32 team)
|
||||
void World::SendZoneText(uint32 zone, const char* text, WorldSession* self, uint32 team)
|
||||
{
|
||||
WorldPacket data;
|
||||
ChatHandler::FillMessageData(&data, NULL, CHAT_MSG_SYSTEM, LANG_UNIVERSAL, NULL, 0, text, NULL);
|
||||
|
||||
@@ -616,12 +616,12 @@ class World
|
||||
void LoadConfigSettings(bool reload = false);
|
||||
|
||||
void SendWorldText(int32 string_id, ...);
|
||||
void SendGlobalText(const char* text, WorldSession *self);
|
||||
void SendGlobalText(const char* text, WorldSession* self);
|
||||
void SendGMText(int32 string_id, ...);
|
||||
void SendGlobalMessage(WorldPacket *packet, WorldSession *self = 0, uint32 team = 0);
|
||||
void SendGlobalGMMessage(WorldPacket *packet, WorldSession *self = 0, uint32 team = 0);
|
||||
void SendZoneMessage(uint32 zone, WorldPacket *packet, WorldSession *self = 0, uint32 team = 0);
|
||||
void SendZoneText(uint32 zone, const char *text, WorldSession *self = 0, uint32 team = 0);
|
||||
void SendGlobalMessage(WorldPacket* packet, WorldSession* self = 0, uint32 team = 0);
|
||||
void SendGlobalGMMessage(WorldPacket* packet, WorldSession* self = 0, uint32 team = 0);
|
||||
void SendZoneMessage(uint32 zone, WorldPacket* packet, WorldSession* self = 0, uint32 team = 0);
|
||||
void SendZoneText(uint32 zone, const char *text, WorldSession* self = 0, uint32 team = 0);
|
||||
void SendServerMessage(ServerMessageType type, const char *text = "", Player* player = NULL);
|
||||
|
||||
/// Are we in the middle of a shutdown?
|
||||
|
||||
Reference in New Issue
Block a user