mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 13:16:23 +00:00
refactor(Core/Game): restyle game lib with astyle (#3466)
This commit is contained in:
@@ -846,9 +846,9 @@ enum Opcodes
|
||||
SMSG_INSTANCE_DIFFICULTY = 0x33B,
|
||||
MSG_GM_RESETINSTANCELIMIT = 0x33C,
|
||||
SMSG_MOTD = 0x33D,
|
||||
SMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY= 0x33E,
|
||||
SMSG_MOVE_UNSET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY= 0x33F,
|
||||
CMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY_ACK= 0x340,
|
||||
SMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY = 0x33E,
|
||||
SMSG_MOVE_UNSET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY = 0x33F,
|
||||
CMSG_MOVE_SET_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY_ACK = 0x340,
|
||||
MSG_MOVE_START_SWIM_CHEAT = 0x341,
|
||||
MSG_MOVE_STOP_SWIM_CHEAT = 0x342,
|
||||
SMSG_MOVE_SET_CAN_FLY = 0x343,
|
||||
@@ -858,7 +858,7 @@ enum Opcodes
|
||||
CMSG_SOCKET_GEMS = 0x347,
|
||||
CMSG_ARENA_TEAM_CREATE = 0x348,
|
||||
SMSG_ARENA_TEAM_COMMAND_RESULT = 0x349,
|
||||
MSG_MOVE_UPDATE_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY= 0x34A,
|
||||
MSG_MOVE_UPDATE_CAN_TRANSITION_BETWEEN_SWIM_AND_FLY = 0x34A,
|
||||
CMSG_ARENA_TEAM_QUERY = 0x34B,
|
||||
SMSG_ARENA_TEAM_QUERY_RESPONSE = 0x34C,
|
||||
CMSG_ARENA_TEAM_ROSTER = 0x34D,
|
||||
@@ -1274,7 +1274,7 @@ enum Opcodes
|
||||
CMSG_BATTLEFIELD_MGR_EXIT_REQUEST = 0x4E7,
|
||||
SMSG_BATTLEFIELD_MGR_STATE_CHANGE = 0x4E8, // uint32, uint32
|
||||
CMSG_BATTLEFIELD_MANAGER_ADVANCE_STATE = 0x4E9,
|
||||
CMSG_BATTLEFIELD_MANAGER_SET_NEXT_TRANSITION_TIME= 0x4EA,
|
||||
CMSG_BATTLEFIELD_MANAGER_SET_NEXT_TRANSITION_TIME = 0x4EA,
|
||||
MSG_SET_RAID_DIFFICULTY = 0x4EB,
|
||||
CMSG_TOGGLE_XP_GAIN = 0x4EC,
|
||||
SMSG_TOGGLE_XP_GAIN = 0x4ED, // enable/disable XP gain console message
|
||||
|
||||
@@ -33,7 +33,7 @@ void PacketLog::Initialize()
|
||||
std::string logsDir = sConfigMgr->GetStringDefault("LogsDir", "");
|
||||
|
||||
if (!logsDir.empty())
|
||||
if ((logsDir.at(logsDir.length()-1) != '/') && (logsDir.at(logsDir.length()-1) != '\\'))
|
||||
if ((logsDir.at(logsDir.length() - 1) != '/') && (logsDir.at(logsDir.length() - 1) != '\\'))
|
||||
logsDir.push_back('/');
|
||||
|
||||
std::string logname = sConfigMgr->GetStringDefault("PacketLogFile", "");
|
||||
@@ -43,7 +43,7 @@ void PacketLog::Initialize()
|
||||
|
||||
void PacketLog::LogPacket(WorldPacket const& packet, Direction direction)
|
||||
{
|
||||
ByteBuffer data(4+4+4+1+packet.size());
|
||||
ByteBuffer data(4 + 4 + 4 + 1 + packet.size());
|
||||
data << int32(packet.GetOpcode());
|
||||
data << int32(packet.size());
|
||||
data << uint32(time(nullptr));
|
||||
|
||||
@@ -19,19 +19,19 @@ class WorldPacket;
|
||||
|
||||
class PacketLog
|
||||
{
|
||||
private:
|
||||
PacketLog();
|
||||
~PacketLog();
|
||||
private:
|
||||
PacketLog();
|
||||
~PacketLog();
|
||||
|
||||
public:
|
||||
static PacketLog* instance();
|
||||
public:
|
||||
static PacketLog* instance();
|
||||
|
||||
void Initialize();
|
||||
bool CanLogPacket() const { return (_file != nullptr); }
|
||||
void LogPacket(WorldPacket const& packet, Direction direction);
|
||||
void Initialize();
|
||||
bool CanLogPacket() const { return (_file != nullptr); }
|
||||
void LogPacket(WorldPacket const& packet, Direction direction);
|
||||
|
||||
private:
|
||||
FILE* _file;
|
||||
private:
|
||||
FILE* _file;
|
||||
};
|
||||
|
||||
#define sPacketLog PacketLog::instance()
|
||||
|
||||
Reference in New Issue
Block a user