Core/Game: Include cleanup

* Mostly aimed at removing Log/DatabaseEnv includes from other headers
* Fix most packet headers including other packet headers - moved common structures such as ItemInstance to their own files
* Moved SAI function definitions to source files (massive or requiring many different dependencies)
This commit is contained in:
Shauren
2017-05-18 23:53:25 +02:00
parent 7445670314
commit c5d3dd90be
357 changed files with 4791 additions and 3886 deletions
+13 -7
View File
@@ -19,19 +19,20 @@
#include "WorldSocket.h"
#include "AuthenticationPackets.h"
#include "BattlenetRpcErrorCodes.h"
#include "BigNumber.h"
#include "CharacterPackets.h"
#include "DatabaseEnv.h"
#include "Errors.h"
#include "HmacHash.h"
#include "Opcodes.h"
#include "PacketLog.h"
#include "QueryCallback.h"
#include "Realm.h"
#include "RBAC.h"
#include "ScriptMgr.h"
#include "SessionKeyGeneration.h"
#include "SHA256.h"
#include "World.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include <zlib.h>
#include <memory>
#pragma pack(push, 1)
@@ -42,6 +43,8 @@ struct CompressedWorldPacket
uint32 CompressedAdler;
};
#pragma pack(pop)
class EncryptablePacket : public WorldPacket
{
public:
@@ -53,8 +56,6 @@ private:
bool _encrypt;
};
#pragma pack(pop)
using boost::asio::ip::tcp;
std::string const WorldSocket::ServerConnectionInitialize("WORLD OF WARCRAFT CONNECTION - SERVER TO CLIENT");
@@ -995,3 +996,8 @@ bool WorldSocket::HandlePing(WorldPackets::Auth::Ping& ping)
SendPacketAndLogOpcode(*WorldPackets::Auth::Pong(ping.Serial).Write());
return true;
}
bool PacketHeader::IsValidOpcode()
{
return Command < NUM_OPCODE_HANDLERS;
}