normalize includes: common

This commit is contained in:
brainiac 2025-12-17 09:32:44 -08:00 committed by Alex
parent 723ca13482
commit 451eb0806a
295 changed files with 1592 additions and 2009 deletions

View File

@ -765,6 +765,7 @@ add_library(common ${common_sources} ${common_headers} ${repositories})
target_compile_definitions(common PUBLIC BOOST_BIND_GLOBAL_PLACEHOLDERS GLM_FORCE_RADIANS GLM_FORCE_CTOR_INIT GLM_ENABLE_EXPERIMENTAL ENABLE_SECURITY)
target_include_directories(common PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../submodules/websocketpp")
target_include_directories(common PRIVATE ..)
target_link_libraries(common PUBLIC cereal::cereal fmt::fmt unofficial::libmariadb $<IF:$<TARGET_EXISTS:libuv::uv_a>,libuv::uv_a,libuv::uv> OpenSSL::SSL OpenSSL::Crypto ZLIB::ZLIB unofficial-sodium::sodium)
# Requires libgoogle-perftools-dev google-perftools packages for linux (debian)

View File

@ -18,11 +18,11 @@
#pragma once
#include <algorithm>
#include <cstdint>
#include <iostream>
#include <limits>
#include <type_traits>
#include <algorithm>
#include <iostream>
/*
* This is an additive lagged fibonacci generator as seen in The Art of Computer Programming, Vol. 2

View File

@ -16,10 +16,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "global_define.h"
#include "base_packet.h"
#include "misc.h"
#include "packet_dump.h"
#include "common/base_packet.h"
#include "common/global_define.h"
#include "common/misc.h"
#include "common/packet_dump.h"
BasePacket::BasePacket(const unsigned char *buf, uint32 len)
{

View File

@ -15,13 +15,14 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef BASEPACKET_H_
#define BASEPACKET_H_
#include "types.h"
#include "serialize_buffer.h"
#include <stdio.h>
#include <string.h>
#pragma once
#include "common/serialize_buffer.h"
#include "common/types.h"
#include <cstdio>
#include <cstring>
#ifdef _WINDOWS
#include <time.h>
@ -93,6 +94,3 @@ protected:
extern void DumpPacketHex(const BasePacket* app);
extern void DumpPacketAscii(const BasePacket* app);
extern void DumpPacketBin(const BasePacket* app);
#endif /*BASEPACKET_H_*/

View File

@ -1,7 +1,8 @@
#include "bazaar.h"
#include "../../common/item_instance.h"
#include "repositories/trader_repository.h"
#include "common/item_instance.h"
#include "common/repositories/trader_repository.h"
#include <memory>
std::vector<BazaarSearchResultsFromDB_Struct>

View File

@ -1,9 +1,9 @@
#ifndef EQEMU_BAZAAR_H
#define EQEMU_BAZAAR_H
#pragma once
#include "common/item_instance.h"
#include "common/shareddb.h"
#include <vector>
#include "shareddb.h"
#include "../../common/item_instance.h"
class Bazaar {
public:
@ -11,6 +11,3 @@ public:
GetSearchResults(Database &content_db, Database &db, BazaarSearchCriteria_Struct search, unsigned int char_zone_id, int char_zone_instance_id);
};
#endif //EQEMU_BAZAAR_H

View File

@ -1,5 +1,6 @@
#include "../common/global_define.h"
#include "../common/bodytypes.h"
#include "bodytypes.h"
#include "common/global_define.h"
std::string BodyType::GetName(uint8 body_type_id)
{

View File

@ -15,10 +15,11 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef BODYTYPES_H
#define BODYTYPES_H
#include "types.h"
#pragma once
#include "common/types.h"
#include <map>
#include <string>
@ -109,5 +110,3 @@ static std::map<uint8, std::string> body_type_names = {
{ BodyType::InvisibleMan, "Invisible Man" },
{ BodyType::Special, "Special" },
};
#endif

View File

@ -15,11 +15,13 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <fmt/format.h>
#include <fmt/ranges.h>
#include "../common/global_define.h"
#include "../common/classes.h"
#include "data_verification.h"
#include "classes.h"
#include "common/data_verification.h"
#include "common/global_define.h"
#include "fmt/format.h"
const char *GetClassIDName(uint8 class_id, uint8 level)
{

View File

@ -15,13 +15,14 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef CLASSES_CH
#define CLASSES_CH
#include "../common/types.h"
#include "../common/rulesys.h"
#include <string>
#pragma once
#include "common/rulesys.h"
#include "common/types.h"
#include <map>
#include <string>
namespace Class {
constexpr uint8 None = 0;
@ -156,5 +157,3 @@ bool IsChainClass(uint8 class_id);
bool IsLeatherClass(uint8 class_id);
bool IsClothClass(uint8 class_id);
uint8 ClassArmorType(uint8 class_id);
#endif

View File

@ -18,11 +18,11 @@
*
*/
#include <fmt/format.h>
#include <fmt/ranges.h>
#include "eqemu_command_handler.h"
#include "terminal_color.hpp"
#include "../platform.h"
#include "common/cli/eqemu_command_handler.h"
#include "common/cli/terminal_color.hpp"
#include "common/platform.h"
#include "fmt/format.h"
namespace EQEmuCommand {

View File

@ -1,7 +1,10 @@
#include "global_define.h"
#include "types.h"
#include <string.h>
#include <zlib.h>
#include "compression.h"
#include "common/global_define.h"
#include "common/types.h"
#include "zlib.h"
#include <cstring>
namespace EQ
{

View File

@ -1,5 +1,7 @@
#pragma once
#include "common/types.h"
namespace EQ
{
uint32 EstimateDeflateBuffer(uint32 len);

View File

@ -15,11 +15,11 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __CONDITION_H
#define __CONDITION_H
#include "global_define.h"
#include "mutex.h"
#pragma once
#include "common/global_define.h"
#include "common/mutex.h"
#ifndef WIN32
#include <pthread.h>
#endif
@ -52,6 +52,3 @@ class Condition {
// bool TimedWait(unsigned long usec);
~Condition();
};
#endif

View File

@ -1,13 +1,13 @@
#include "world_content_service.h"
#include <utility>
#include <glm/vec3.hpp>
#include "../database.h"
#include "../rulesys.h"
#include "../eqemu_logsys.h"
#include "../repositories/instance_list_repository.h"
#include "../zone_store.h"
#include "common/database.h"
#include "common/eqemu_logsys.h"
#include "common/repositories/instance_list_repository.h"
#include "common/rulesys.h"
#include "common/zone_store.h"
#include "glm/vec3.hpp"
#include <utility>
WorldContentService::WorldContentService()
{

View File

@ -1,11 +1,12 @@
#ifndef EQEMU_WORLD_CONTENT_SERVICE_H
#define EQEMU_WORLD_CONTENT_SERVICE_H
#pragma once
#include "common/repositories/content_flags_repository.h"
#include "common/repositories/instance_list_repository.h"
#include "common/repositories/zone_repository.h"
#include <string>
#include <vector>
#include "../repositories/content_flags_repository.h"
#include "../repositories/zone_repository.h"
#include "../repositories/instance_list_repository.h"
class Database;
@ -199,5 +200,3 @@ private:
WorldContentService *LoadStaticGlobalZoneInstances();
std::vector<InstanceListRepository::InstanceList> m_zone_static_instances;
};
#endif //EQEMU_WORLD_CONTENT_SERVICE_H

View File

@ -1,16 +1,17 @@
#include "global_define.h"
#include "eqemu_logsys.h"
#include "crash.h"
#include "strings.h"
#include "process/process.h"
#include "http/httplib.h"
#include "http/uri.h"
#include "json/json.h"
#include "version.h"
#include "eqemu_config.h"
#include "serverinfo.h"
#include "rulesys.h"
#include "platform.h"
#include "common/eqemu_config.h"
#include "common/eqemu_logsys.h"
#include "common/global_define.h"
#include "common/http/httplib.h"
#include "common/http/uri.h"
#include "common/json/json.h"
#include "common/platform.h"
#include "common/process/process.h"
#include "common/rulesys.h"
#include "common/serverinfo.h"
#include "common/strings.h"
#include "common/version.h"
#include <cstdio>
#include <vector>

View File

@ -1,6 +1,3 @@
#ifndef __EQEMU_CRASH_H
#define __EQEMU_CRASH_H
#pragma once
void set_exception_handler();
#endif

View File

@ -1,4 +1,6 @@
#include "crc32.h"
#include "crc16.h"
#include "common/crc32.h"
uint16 CRC16(const unsigned char *buf, int size, int key)
{
@ -12,4 +14,3 @@ uint16 CRC16(const unsigned char *buf, int size, int key)
crc = CRC32::Update(buf, size, crc);
return CRC32::Finish(crc) & 0xffff;
}

View File

@ -1,7 +1,5 @@
#ifndef _CRC16_H
#define _CRC16_H
#include "types.h"
#pragma once
#include "common/types.h"
uint16 CRC16(const unsigned char *buf, int size, int key);
#endif

View File

@ -1,5 +1,6 @@
#include "crc32.h"
#include <assert.h>
#include <cassert>
#include <memory.h>
uint32 CRC32Table[256] =

View File

@ -1,6 +1,6 @@
#ifndef CRC32_H
#define CRC32_H
#include "types.h"
#pragma once
#include "common/types.h"
class CRC32 {
public:
@ -17,4 +17,3 @@ public:
private:
static inline void Calc(const uint8 byte, uint32& crc32);
};
#endif

View File

@ -1,13 +1,13 @@
#pragma once
#include <vector>
#include <string>
#include <sstream>
#include <algorithm>
#include <bitset>
#include <cctype>
#include <ctime>
#include <iomanip>
#include <algorithm>
#include <sstream>
#include <string>
#include <vector>
#if __cplusplus > 201402L
#include <string_view>

View File

@ -1,8 +1,11 @@
#include "../common/data_bucket.h"
#include "database.h"
#include <ctime>
#include "data_bucket.h"
#include "common/data_bucket.h"
#include "common/database.h"
#include "common/json/json.hpp"
#include <cctype>
#include "../common/json/json.hpp"
#include <ctime>
using json = nlohmann::json;

View File

@ -1,11 +1,11 @@
#ifndef EQEMU_DATABUCKET_H
#define EQEMU_DATABUCKET_H
#pragma once
#include "common/json/json_archive_single_line.h"
#include "common/repositories/data_buckets_repository.h"
#include "common/shareddb.h"
#include "common/types.h"
#include <string>
#include "types.h"
#include "repositories/data_buckets_repository.h"
#include "json/json_archive_single_line.h"
#include "shareddb.h"
struct DataBucketKey {
std::string key;
@ -69,5 +69,3 @@ public:
static DataBucketsRepository::DataBuckets
ExtractNestedValue(const DataBucketsRepository::DataBuckets &bucket, const std::string &full_key);
};
#endif //EQEMU_DATABUCKET_H

View File

@ -16,42 +16,56 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/global_define.h"
#include "../common/rulesys.h"
#include "common/data_verification.h"
#include "common/database_schema.h"
#include "common/database.h"
#include "common/eq_packet_structs.h"
#include "common/events/player_event_logs.h"
#include "common/extprofile.h"
#include "common/global_define.h"
#include "common/http/httplib.h"
#include "common/http/uri.h"
#include "common/repositories/account_repository.h"
#include "common/repositories/adventure_stats_repository.h"
#include "common/repositories/bot_data_repository.h"
#include "common/repositories/buyer_repository.h"
#include "common/repositories/character_bind_repository.h"
#include "common/repositories/character_data_repository.h"
#include "common/repositories/character_languages_repository.h"
#include "common/repositories/character_leadership_abilities_repository.h"
#include "common/repositories/character_parcels_repository.h"
#include "common/repositories/character_pet_name_repository.h"
#include "common/repositories/character_skills_repository.h"
#include "common/repositories/data_buckets_repository.h"
#include "common/repositories/group_id_repository.h"
#include "common/repositories/group_leaders_repository.h"
#include "common/repositories/guild_members_repository.h"
#include "common/repositories/instance_list_repository.h"
#include "common/repositories/inventory_snapshots_repository.h"
#include "common/repositories/ip_exemptions_repository.h"
#include "common/repositories/merchantlist_temp_repository.h"
#include "common/repositories/name_filter_repository.h"
#include "common/repositories/npc_types_repository.h"
#include "common/repositories/raid_details_repository.h"
#include "common/repositories/raid_members_repository.h"
#include "common/repositories/reports_repository.h"
#include "common/repositories/trader_repository.h"
#include "common/repositories/variables_repository.h"
#include "common/repositories/zone_repository.h"
#include "common/rulesys.h"
#include "common/strings.h"
#include "common/zone_store.h"
#include "mysqld_error.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iomanip>
#include <iostream>
#include <map>
#include <algorithm>
#include <mysqld_error.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../common/repositories/account_repository.h"
#include "../common/repositories/adventure_stats_repository.h"
#include "../common/repositories/character_bind_repository.h"
#include "../common/repositories/character_data_repository.h"
#include "../common/repositories/character_languages_repository.h"
#include "../common/repositories/character_leadership_abilities_repository.h"
#include "../common/repositories/character_parcels_repository.h"
#include "../common/repositories/character_skills_repository.h"
#include "../common/repositories/data_buckets_repository.h"
#include "../common/repositories/group_id_repository.h"
#include "../common/repositories/group_leaders_repository.h"
#include "../common/repositories/guild_members_repository.h"
#include "../common/repositories/instance_list_repository.h"
#include "../common/repositories/inventory_snapshots_repository.h"
#include "../common/repositories/ip_exemptions_repository.h"
#include "../common/repositories/name_filter_repository.h"
#include "../common/repositories/npc_types_repository.h"
#include "../common/repositories/raid_details_repository.h"
#include "../common/repositories/raid_members_repository.h"
#include "../common/repositories/reports_repository.h"
#include "../common/repositories/variables_repository.h"
#include "../common/repositories/character_pet_name_repository.h"
#include "../common/events/player_event_logs.h"
// Disgrace: for windows compile
#ifdef _WINDOWS
@ -63,25 +77,8 @@
#include "unix.h"
#include <netinet/in.h>
#include <sys/time.h>
#endif
#include "database.h"
#include "data_verification.h"
#include "eq_packet_structs.h"
#include "extprofile.h"
#include "strings.h"
#include "database_schema.h"
#include "http/httplib.h"
#include "http/uri.h"
#include "repositories/zone_repository.h"
#include "zone_store.h"
#include "repositories/merchantlist_temp_repository.h"
#include "repositories/bot_data_repository.h"
#include "repositories/trader_repository.h"
#include "repositories/buyer_repository.h"
extern Client client;
Database::Database() { }

View File

@ -15,25 +15,23 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef EQEMU_DATABASE_H
#define EQEMU_DATABASE_H
#define AUTHENTICATION_TIMEOUT 60
#define INVALID_ID 0xFFFFFFFF
#pragma once
#include "global_define.h"
#include "eqemu_logsys.h"
#include "types.h"
#include "dbcore.h"
#include "linked_list.h"
#include "eq_packet_structs.h"
#include "common/dbcore.h"
#include "common/eq_packet_structs.h"
#include "common/eqemu_logsys.h"
#include "common/global_define.h"
#include "common/linked_list.h"
#include "common/types.h"
#include <cmath>
#include <string>
#include <vector>
#include <map>
#define AUTHENTICATION_TIMEOUT 60
#define INVALID_ID 0xFFFFFFFF
class MySQLRequestResult;
class Client;
@ -292,5 +290,3 @@ private:
void ClearAllRaidDetails();
void ClearAllRaidLeaders();
};
#endif

View File

@ -18,27 +18,26 @@
*
*/
#include <string>
#include <cstdio>
#include <iterator>
#include "database_dump_service.h"
#include "../eqemu_logsys.h"
#include "../strings.h"
#include "../eqemu_config.h"
#include "../database_schema.h"
#include "../file.h"
#include "../process/process.h"
#include "../termcolor/rang.hpp"
#include "common/database_schema.h"
#include "common/eqemu_config.h"
#include "common/eqemu_logsys.h"
#include "common/file.h"
#include "common/process/process.h"
#include "common/strings.h"
#include "common/termcolor/rang.hpp"
#include <cstdio>
#include <ctime>
#include <iterator>
#include <string>
#if _WIN32
#include <windows.h>
#else
#include <sys/time.h>
#include <thread>
#endif
#define DATABASE_DUMP_PATH "backups/"

View File

@ -18,9 +18,9 @@
*
*/
#ifndef EQEMU_DATABASE_DUMP_SERVICE_H
#define EQEMU_DATABASE_DUMP_SERVICE_H
#pragma once
#include <string>
class DatabaseDumpService {
public:
@ -97,6 +97,3 @@ private:
void BuildCredentialsFile();
void RemoveCredentialsFile();
};
#endif //EQEMU_DATABASE_DUMP_SERVICE_H

View File

@ -1,14 +1,17 @@
#include <filesystem>
#include "database_update.h"
#include "../eqemu_logsys.h"
#include "../database.h"
#include "../strings.h"
#include "../rulesys.h"
#include "../http/httplib.h"
#include "database_dump_service.h"
#include "database_update_manifest.h"
#include "database_update_manifest_custom.h"
#include "database_update_manifest_bots.h"
#include "common/database.h"
#include "common/database/database_dump_service.h"
#include "common/database/database_update_manifest_bots.h"
#include "common/database/database_update_manifest_custom.h"
#include "common/database/database_update_manifest.h"
#include "common/eqemu_logsys.h"
#include "common/http/httplib.h"
#include "common/rulesys.h"
#include "common/strings.h"
#include <filesystem>
constexpr int BREAK_LENGTH = 70;

View File

@ -1,7 +1,6 @@
#ifndef EQEMU_DATABASE_UPDATE_H
#define EQEMU_DATABASE_UPDATE_H
#pragma once
#include "../database.h"
#include "common/database.h"
struct ManifestEntry {
int version{}; // database version of the migration
@ -47,7 +46,4 @@ private:
static bool CheckVersionsUpToDate(DatabaseVersion v, DatabaseVersion b);
void InjectBotsVersionColumn();
void InjectCustomVersionColumn();
};
#endif //EQEMU_DATABASE_UPDATE_H

View File

@ -1,5 +1,9 @@
#pragma once
#include "common/database/database_update.h"
#include <vector>
std::vector<ManifestEntry> manifest_entries = {
ManifestEntry{
.version = 9000,

View File

@ -1,5 +1,9 @@
#pragma once
#include "common/database/database_update.h"
#include <vector>
std::vector<ManifestEntry> bot_manifest_entries = {
ManifestEntry{
.version = 9035,

View File

@ -1,5 +1,9 @@
#pragma once
#include "common/database/database_update.h"
#include <vector>
std::vector<ManifestEntry> manifest_entries_custom = {
ManifestEntry{
.version = 1,

View File

@ -16,24 +16,25 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/global_define.h"
#include "../common/rulesys.h"
#include "../common/strings.h"
#include "../common/timer.h"
#include "../common/repositories/character_corpses_repository.h"
#include "../common/repositories/dynamic_zone_members_repository.h"
#include "../common/repositories/dynamic_zones_repository.h"
#include "../common/repositories/group_id_repository.h"
#include "../common/repositories/instance_list_repository.h"
#include "../common/repositories/instance_list_player_repository.h"
#include "../common/repositories/raid_members_repository.h"
#include "../common/repositories/respawn_times_repository.h"
#include "../common/repositories/spawn_condition_values_repository.h"
#include "repositories/spawn2_disabled_repository.h"
#include "repositories/data_buckets_repository.h"
#include "repositories/zone_state_spawns_repository.h"
#include "database.h"
#include "common/global_define.h"
#include "common/repositories/character_corpses_repository.h"
#include "common/repositories/data_buckets_repository.h"
#include "common/repositories/dynamic_zone_members_repository.h"
#include "common/repositories/dynamic_zones_repository.h"
#include "common/repositories/group_id_repository.h"
#include "common/repositories/instance_list_player_repository.h"
#include "common/repositories/instance_list_repository.h"
#include "common/repositories/raid_members_repository.h"
#include "common/repositories/respawn_times_repository.h"
#include "common/repositories/spawn_condition_values_repository.h"
#include "common/repositories/spawn2_disabled_repository.h"
#include "common/repositories/zone_state_spawns_repository.h"
#include "common/rulesys.h"
#include "common/strings.h"
#include "common/timer.h"
#include <iomanip>
#include <iostream>
@ -44,8 +45,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#else
#include "unix.h"
#include "../zone/zonedb.h"
#include "common/unix.h"
#include "zone/zonedb.h"
#include <netinet/in.h>
#include <sys/time.h>
#endif

View File

@ -18,8 +18,7 @@
*
*/
#ifndef EQEMU_DATABASE_SCHEMA_H
#define EQEMU_DATABASE_SCHEMA_H
#pragma once
#include <vector>
#include <map>
@ -438,5 +437,3 @@ namespace DatabaseSchema {
}
}
#endif //EQEMU_DATABASE_SCHEMA_H

View File

@ -1,30 +1,26 @@
#ifdef _WINDOWS
#include <winsock2.h>
#endif
#include "misc_functions.h"
#include "eqemu_logsys.h"
#include "timer.h"
#include "dbcore.h"
#include "mysql_stmt.h"
#include "common/eqemu_logsys.h"
#include "common/misc_functions.h"
#include "common/mysql_stmt.h"
#include "common/strings.h"
#include "common/timer.h"
#include "mysqld_error.h"
#include <fstream>
#include <iostream>
#include <mysqld_error.h>
#include <string.h>
#include "strings.h"
#ifdef _WINDOWS
#define snprintf _snprintf
#define strncasecmp _strnicmp
#define strcasecmp _stricmp
#include <process.h>
#include <winsock2.h>
#else
#include "unix.h"
#include "common/unix.h"
#include <pthread.h>
#endif
#ifdef _EQDEBUG

View File

@ -1,16 +1,11 @@
#ifndef DBCORE_H
#define DBCORE_H
#pragma once
#ifdef _WINDOWS
#include <winsock2.h>
#include <windows.h>
#endif
#include "common/mutex.h"
#include "common/mysql_request_result.h"
#include "common/types.h"
#include "../common/mutex.h"
#include "../common/mysql_request_result.h"
#include "../common/types.h"
#include "mysql.h"
#include <mysql.h>
#include <string.h>
#include <mutex>
@ -102,6 +97,3 @@ private:
mysql_set_server_option(mysql, MYSQL_OPTION_MULTI_STATEMENTS_OFF);
}
};
#endif

View File

@ -17,10 +17,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef COMMON_DEITY_H
#define COMMON_DEITY_H
#pragma once
#include "common/types.h"
#include "types.h"
#include <map>
#include <string>
#include <limits>
@ -113,5 +113,3 @@ static std::map<uint32, uint32> deity_bitmasks = {
{ Deity::Tunare, Deity::Bitmask::Tunare },
{ Deity::Veeshan, Deity::Bitmask::Veeshan }
};
#endif /* COMMON_DEITY_H */

View File

@ -1,11 +1,13 @@
#include <cereal/archives/json.hpp>
#include <cereal/archives/binary.hpp>
#include "discord.h"
#include "../http/httplib.h"
#include "../json/json.h"
#include "../strings.h"
#include "../eqemu_logsys.h"
#include "../events/player_event_logs.h"
#include "common/eqemu_logsys.h"
#include "common/events/player_event_logs.h"
#include "common/http/httplib.h"
#include "common/json/json.h"
#include "common/strings.h"
#include "cereal/archives/binary.hpp"
#include "cereal/archives/json.hpp"
constexpr int MAX_RETRIES = 10;

View File

@ -1,19 +1,16 @@
#ifndef EQEMU_DISCORD_H
#define EQEMU_DISCORD_H
#pragma once
#include "common/events/player_events.h"
#include "common/repositories/player_event_logs_repository.h"
#include "common/types.h"
#include <string>
#include "../types.h"
#include "../repositories/player_event_logs_repository.h"
#include "../events/player_events.h"
class Discord {
class Discord
{
public:
static void SendWebhookMessage(const std::string& message, const std::string& webhook_url);
static std::string FormatDiscordMessage(uint16 category_id, const std::string& message);
static void SendPlayerEventMessage(const PlayerEvent::PlayerEventContainer& e, const std::string &webhook_url);
static bool ValidateWebhookUrl(const std::string &webhook_url);
};
#endif //EQEMU_DISCORD_H

View File

@ -1,6 +1,7 @@
#include "discord_manager.h"
#include "../../common/discord/discord.h"
#include "../events/player_event_logs.h"
#include "common/discord/discord.h"
#include "common/events/player_event_logs.h"
void DiscordManager::QueueWebhookMessage(uint32 webhook_id, const std::string &message)
{

View File

@ -1,14 +1,16 @@
#ifndef EQEMU_DISCORD_MANAGER_H
#define EQEMU_DISCORD_MANAGER_H
#include <mutex>
#pragma once
#include "common/events/player_events.h"
#include "common/repositories/player_event_logs_repository.h"
#include "common/types.h"
#include <map>
#include <mutex>
#include <vector>
#include "../../common/types.h"
#include "../repositories/player_event_logs_repository.h"
#include "../events/player_events.h"
class DiscordManager {
class DiscordManager
{
public:
void QueueWebhookMessage(uint32 webhook_id, const std::string& message);
void ProcessMessageQueue();
@ -23,6 +25,3 @@ private:
std::mutex webhook_queue_lock{};
std::map<uint32, std::vector<std::string>> webhook_message_queue{};
};
#endif

View File

@ -1,13 +1,14 @@
#include "dynamic_zone_base.h"
#include "database.h"
#include "eqemu_logsys.h"
#include "rulesys.h"
#include "servertalk.h"
#include "util/uuid.h"
#include "repositories/character_expedition_lockouts_repository.h"
#include "repositories/dynamic_zone_lockouts_repository.h"
#include "repositories/instance_list_repository.h"
#include "repositories/instance_list_player_repository.h"
#include "common/database.h"
#include "common/eqemu_logsys.h"
#include "common/repositories/character_expedition_lockouts_repository.h"
#include "common/repositories/dynamic_zone_lockouts_repository.h"
#include "common/repositories/instance_list_player_repository.h"
#include "common/repositories/instance_list_repository.h"
#include "common/rulesys.h"
#include "common/servertalk.h"
#include "common/util/uuid.h"
DynamicZoneBase::DynamicZoneBase(DynamicZonesRepository::DynamicZoneInstance&& entry)
{

View File

@ -1,11 +1,11 @@
#ifndef COMMON_DYNAMIC_ZONE_BASE_H
#define COMMON_DYNAMIC_ZONE_BASE_H
#pragma once
#include "common/dynamic_zone_lockout.h"
#include "common/eq_constants.h"
#include "common/repositories/dynamic_zone_members_repository.h"
#include "common/repositories/dynamic_zone_templates_repository.h"
#include "common/repositories/dynamic_zones_repository.h"
#include "dynamic_zone_lockout.h"
#include "eq_constants.h"
#include "repositories/dynamic_zones_repository.h"
#include "repositories/dynamic_zone_members_repository.h"
#include "repositories/dynamic_zone_templates_repository.h"
#include <algorithm>
#include <chrono>
#include <cstdint>
@ -270,5 +270,3 @@ public:
);
}
};
#endif

View File

@ -1,10 +1,11 @@
#include "dynamic_zone_lockout.h"
#include "strings.h"
#include "rulesys.h"
#include "strings.h"
#include "util/uuid.h"
#include <fmt/format.h>
#include <fmt/ranges.h>
#include <cereal/types/chrono.hpp>
#include "fmt/format.h"
#include "cereal/types/chrono.hpp"
#include "cereal/archives/binary.hpp"
DzLockout::DzLockout(std::string uuid, std::string expedition, std::string event, uint64_t expire_time, uint32_t duration)
: m_uuid(std::move(uuid))

View File

@ -1,8 +1,9 @@
#pragma once
#include "repositories/base/base_dynamic_zone_lockouts_repository.h"
#include <chrono>
#include <string>
#include "repositories/base/base_dynamic_zone_lockouts_repository.h"
class DzLockout
{

View File

@ -17,12 +17,12 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "emu_constants.h"
#include "bodytypes.h"
#include "data_verification.h"
#include "eqemu_logsys.h"
#include "eqemu_logsys_log_aliases.h"
#include "rulesys.h"
#include "common/bodytypes.h"
#include "common/data_verification.h"
#include "common/emu_constants.h"
#include "common/eqemu_logsys_log_aliases.h"
#include "common/eqemu_logsys.h"
#include "common/rulesys.h"
int16 EQ::invtype::GetInvTypeSize(int16 inv_type) {
static const int16 local_array[] = {

View File

@ -17,14 +17,13 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef COMMON_EMU_CONSTANTS_H
#define COMMON_EMU_CONSTANTS_H
#pragma once
#include "eq_limits.h"
#include "emu_versions.h"
#include "bodytypes.h"
#include "common/bodytypes.h"
#include "common/emu_versions.h"
#include "common/eq_limits.h"
#include <string.h>
#include <cstring>
namespace AccountStatus {
constexpr uint8 Player = 0;
@ -918,5 +917,3 @@ namespace PetType {
std::string GetName(uint8 pet_type);
bool IsValid(uint8 pet_type);
}
#endif /*COMMON_EMU_CONSTANTS_H*/

View File

@ -17,12 +17,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef COMMON_EMU_LIMITS_H
#define COMMON_EMU_LIMITS_H
#pragma once
#include "types.h"
#include "common/types.h"
#include <stdlib.h>
#include <cstdlib>
namespace EntityLimits
@ -124,5 +123,3 @@ namespace EntityLimits
} /*Pet*/
}; /*EntityLimits*/
#endif /*COMMON_EMU_LIMITS_H*/

View File

@ -16,8 +16,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 04111-1307 USA
*/
#include "global_define.h"
#include "emu_opcodes.h"
#include "common/emu_opcodes.h"
#include "common/global_define.h"
const char *OpcodeNames[_maxEmuOpcode+1] = {
"OP_Unknown",
@ -30,9 +30,3 @@ const char *OpcodeNames[_maxEmuOpcode+1] = {
""
};

View File

@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 04111-1307 USA
*/
#ifndef EMU_OPCODES_H
#define EMU_OPCODES_H
#pragma once
//this is the highest opcode possibly used in the regular EQ protocol
#define MAX_EQ_OPCODE 0xFFFF
@ -47,6 +47,3 @@ typedef enum { //EQEmu internal opcodes list
constexpr int format_as(EmuOpcode opcode) { return static_cast<int>(opcode); }
extern const char *OpcodeNames[_maxEmuOpcode+1];
#endif

View File

@ -17,8 +17,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "emu_versions.h"
#include "emu_constants.h"
#include "common/emu_versions.h"
#include "common/emu_constants.h"
bool EQ::versions::IsValidClientVersion(ClientVersion client_version)

View File

@ -17,13 +17,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef COMMON_EMU_VERSIONS_H
#define COMMON_EMU_VERSIONS_H
#pragma once
#include "types.h"
#include <stdlib.h>
#include "common/types.h"
#include <cstdlib>
namespace EQ
{
@ -218,5 +216,3 @@ namespace EQ
} /*expansions*/
} /*EQEmu*/
#endif /*COMMON_EMU_VERSIONS_H*/

View File

@ -17,11 +17,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef COMMON_EQ_CONSTANTS_H
#define COMMON_EQ_CONSTANTS_H
#pragma once
#include "skills.h"
#include "types.h"
#include "common/skills.h"
#include "common/types.h"
namespace AppearanceType {
constexpr uint32 Die = 0; // Causes the client to keel over and zone to bind point (default action)
@ -1096,5 +1095,3 @@ enum ExpSource
namespace DoorType {
constexpr uint32 BuyerStall = 155;
}
#endif /*COMMON_EQ_CONSTANTS_H*/

View File

@ -17,9 +17,9 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "emu_constants.h"
#include "emu_limits.h"
#include "rulesys.h"
#include "common/emu_constants.h"
#include "common/emu_limits.h"
#include "common/rulesys.h"
#include <memory>

View File

@ -17,18 +17,17 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef COMMON_EQ_LIMITS_H
#define COMMON_EQ_LIMITS_H
#pragma once
#include "types.h"
#include "eq_constants.h"
#include "emu_versions.h"
#include "../common/patches/titanium_limits.h"
#include "../common/patches/sof_limits.h"
#include "../common/patches/sod_limits.h"
#include "../common/patches/uf_limits.h"
#include "../common/patches/rof_limits.h"
#include "../common/patches/rof2_limits.h"
#include "common/emu_versions.h"
#include "common/eq_constants.h"
#include "common/patches/rof_limits.h"
#include "common/patches/rof2_limits.h"
#include "common/patches/sod_limits.h"
#include "common/patches/sof_limits.h"
#include "common/patches/titanium_limits.h"
#include "common/patches/uf_limits.h"
#include "common/types.h"
namespace EQ
@ -268,5 +267,3 @@ namespace Client62
} // namespace constants
} /*Client62*/
#endif /*COMMON_EQ_LIMITS_H*/

View File

@ -16,25 +16,19 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "crc16.h"
#include "global_define.h"
#include "eq_packet.h"
#include "misc.h"
#include "op_codes.h"
#include "platform.h"
#include <iomanip>
#include <iostream>
#include <sstream>
#include <stdio.h>
#include "common/global_define.h"
#include "common/misc.h"
#include "common/op_codes.h"
#ifndef STATIC_OPCODE
#include "opcodemgr.h"
#include "common/opcodemgr.h"
#endif
#include "common/packet_dump.h"
#include "common/packet_functions.h"
#include "common/platform.h"
#include "packet_dump.h"
#include "packet_functions.h"
#include <cstdlib>
#include <cstring>
#include <cstdio>
EQPacket::EQPacket(EmuOpcode op, const unsigned char *buf, uint32 len)
: BasePacket(buf, len),

View File

@ -15,18 +15,17 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _EQPACKET_H
#define _EQPACKET_H
#include "base_packet.h"
#include "platform.h"
#include <iostream>
#pragma once
#include "common/base_packet.h"
#include "common/platform.h"
#ifdef STATIC_OPCODE
typedef unsigned short EmuOpcode;
static const EmuOpcode OP_Unknown = 0;
#else
#include "emu_opcodes.h"
#include "common/emu_opcodes.h"
#endif
class EQPacket : public BasePacket {
@ -152,5 +151,3 @@ protected:
extern void DumpPacket(const EQApplicationPacket* app, bool iShowInfo = false);
extern std::string DumpPacketToString(const EQApplicationPacket* app);
#endif

View File

@ -16,20 +16,20 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef EQ_PACKET_STRUCTS_H
#define EQ_PACKET_STRUCTS_H
#pragma once
#include "common/emu_constants.h"
#include "common/textures.h"
#include "common/types.h"
#include "common/version.h"
#include "cereal/archives/binary.hpp"
#include "cereal/types/string.hpp"
#include "cereal/types/vector.hpp"
#include <list>
#include <string.h>
#include <cstring>
#include <string>
#include <time.h>
#include <cereal/archives/binary.hpp>
#include <cereal/types/string.hpp>
#include <cereal/types/vector.hpp>
#include "../common/version.h"
#include "emu_constants.h"
#include "textures.h"
#include "types.h"
#include <ctime>
static const uint32 BUFF_COUNT = 42;
static const uint32 PET_BUFF_COUNT = 30;
@ -45,6 +45,7 @@ static const uint32 ADVANCED_LORE_LENGTH = 8192;
** Compiler override to ensure
** byte aligned structures
*/
#pragma pack(push)
#pragma pack(1)
struct LoginInfo {
@ -6562,7 +6563,4 @@ struct EvolveGetNextItem {
};
// Restore structure packing to default
#pragma pack()
#endif
#pragma pack(pop)

View File

@ -16,31 +16,32 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "global_define.h"
#include "eqemu_logsys.h"
#include "eq_packet.h"
#include "eq_stream.h"
#include "op_codes.h"
#include "crc16.h"
#include "platform.h"
#include "strings.h"
#include <string>
#include <iomanip>
#include <vector>
#include "common/crc16.h"
#include "common/eq_packet.h"
#include "common/eqemu_logsys.h"
#include "common/global_define.h"
#include "common/op_codes.h"
#include "common/platform.h"
#include "common/strings.h"
#include <algorithm>
#include <iomanip>
#include <string>
#include <vector>
#ifdef _WINDOWS
#include <time.h>
#include <time.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netdb.h>
#include <fcntl.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h>
#include <sys/socket.h>
#include <netdb.h>
#include <fcntl.h>
#include <arpa/inet.h>
#endif
//for logsys
@ -1437,4 +1438,3 @@ EQStream::MatchState EQStream::CheckSignature(const Signature *sig) {
return(res);
}

View File

@ -1,24 +1,22 @@
#ifndef _EQSTREAM_H
#define _EQSTREAM_H
#pragma once
#include <vector>
#include "common/eq_packet.h"
#include "common/eq_stream_intf.h"
#include "common/eq_stream_type.h"
#include "common/misc.h"
#include "common/mutex.h"
#include "common/opcodemgr.h"
#include "common/timer.h"
#include <deque>
#include <map>
#include <queue>
#include <deque>
#include <vector>
#ifndef WIN32
#include <netinet/in.h>
#endif
#include "../common/misc.h"
#include "../common/opcodemgr.h"
#include "../common/timer.h"
#include "eq_packet.h"
#include "eq_stream_intf.h"
#include "eq_stream_type.h"
#include "mutex.h"
class EQApplicationPacket;
class EQProtocolPacket;
@ -314,6 +312,3 @@ class EQStream : public EQStreamInterface {
virtual MatchState CheckSignature(const Signature *sig);
};
#endif

View File

@ -1,19 +1,18 @@
#include "global_define.h"
#include "eqemu_logsys.h"
#include "eq_stream_factory.h"
#include "common/global_define.h"
#ifdef _WINDOWS
#include <winsock2.h>
#include <process.h>
#include <io.h>
#include <stdio.h>
#include <winsock2.h>
#include <process.h>
#include <io.h>
#include <stdio.h>
#else
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/select.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <pthread.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/select.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <pthread.h>
#endif
#include <iostream>

View File

@ -1,14 +1,12 @@
#ifndef _EQSTREAMFACTORY_H
#pragma once
#define _EQSTREAMFACTORY_H
#include "common/condition.h"
#include "common/eq_stream.h"
#include "common/timeoutmgr.h"
#include <map>
#include <memory>
#include <queue>
#include <map>
#include "../common/eq_stream.h"
#include "../common/condition.h"
#include "../common/timeoutmgr.h"
class EQStream;
class Timer;
@ -57,5 +55,3 @@ class EQStreamFactory : private Timeoutable {
void StopWriter() { MWriterRunning.lock(); WriterRunning=false; MWriterRunning.unlock(); WriterWork.Signal(); }
void SignalWriter() { WriterWork.Signal(); }
};
#endif

View File

@ -1,10 +1,11 @@
#include <utility>
#include "global_define.h"
#include "eqemu_logsys.h"
#include "eq_stream_ident.h"
#include "eq_stream_proxy.h"
#include "misc.h"
#include "common/eq_stream_ident.h"
#include "common/eq_stream_proxy.h"
#include "common/eqemu_logsys.h"
#include "common/global_define.h"
#include "common/misc.h"
#include <utility>
EQStreamIdentifier::~EQStreamIdentifier() {
while(!m_identified.empty()) {
@ -162,4 +163,3 @@ EQStreamIdentifier::Record::Record(std::shared_ptr<EQStreamInterface> s)
expire(STREAM_IDENT_WAIT_MS)
{
}

View File

@ -1,11 +1,11 @@
#ifndef EQSTREAMIDENT_H_
#define EQSTREAMIDENT_H_
#pragma once
#include "common/eq_stream_intf.h"
#include "common/timer.h"
#include "eq_stream_intf.h"
#include "timer.h"
#include <vector>
#include <queue>
#include <memory>
#include <queue>
#include <vector>
#define STREAM_IDENT_WAIT_MS 30000
@ -47,5 +47,3 @@ protected:
std::vector<Record> m_streams; //we own these objects, and the streams contained in them.
std::queue<EQStreamInterface *> m_identified; //we own these objects
};
#endif /*EQSTREAMIDENT_H_*/

View File

@ -1,12 +1,13 @@
#ifndef EQSTREAMINTF_H_
#define EQSTREAMINTF_H_
#pragma once
#include "common/emu_versions.h"
#include "common/eq_packet.h"
#include "common/net/reliable_stream_connection.h"
#include <string>
//this is the only part of an EQStream that is seen by the application.
#include <string>
#include "emu_versions.h"
#include "eq_packet.h"
#include "net/reliable_stream_connection.h"
typedef enum {
ESTABLISHED,
@ -106,5 +107,3 @@ public:
virtual void ResetStats() = 0;
virtual EQStreamManagerInterface* GetManager() const = 0;
};
#endif /*EQSTREAMINTF_H_*/

View File

@ -15,16 +15,18 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _EQSTREAM_LOCATOR_H
#define _EQSTREAM_LOCATOR_H
#pragma once
#include "common/types.h"
#include <map>
#include <string>
/*
This did not turn out nearly as nice as I hoped.
*/
#include <map>
#include <string>
class EQStreamInfo {
public:
EQStreamInfo() {}
@ -168,5 +170,3 @@ public:
protected:
std::map<const EQStreamInfo, T *> streams;
};
#endif

View File

@ -1,9 +1,10 @@
#include "global_define.h"
#include "eq_stream_proxy.h"
#include "struct_strategy.h"
#include "eqemu_logsys.h"
#include "opcodemgr.h"
#include "common/eqemu_logsys.h"
#include "common/global_define.h"
#include "common/opcodemgr.h"
#include "common/struct_strategy.h"
EQStreamProxy::EQStreamProxy(std::shared_ptr<EQStreamInterface> &stream, const StructStrategy *structs, OpcodeManager **opcodes)

View File

@ -1,9 +1,8 @@
#ifndef EQSTREAMPROXY_H_
#define EQSTREAMPROXY_H_
#pragma once
#include "common/eq_stream_intf.h"
#include "common/types.h"
#include "types.h"
#include "eq_stream_intf.h"
#include <memory>
class StructStrategy;
@ -44,6 +43,3 @@ protected:
OpcodeManager **const m_opcodes;
//we do not own this object.
};
#endif /*EQSTREAMPROXY_H_*/

View File

@ -1,5 +1,4 @@
#ifndef _EQSTREAMTYPE_H
#define _EQSTREAMTYPE_H
#pragma once
typedef enum {
UnknownStream=0,
@ -11,5 +10,3 @@ typedef enum {
MailStream
} EQStreamType;
#endif

View File

@ -15,10 +15,13 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "global_define.h"
#include "eqdb.h"
#include "database.h"
#include <mysql.h>
#include "common/database.h"
#include "common/global_define.h"
#include "mysql.h"
#include <cstring>
EQDB EQDB::s_EQDB;

View File

@ -15,15 +15,16 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef EQDB_H_
#define EQDB_H_
#pragma once
#include "common/eqdb_res.h"
#include "common/types.h"
#include "mysql.h"
#include <map>
#include <string>
#include <vector>
#include <map>
#include "types.h"
#include "eqdb_res.h"
#include <mysql.h>
//this is the main object exported to perl.
class EQDB {
@ -50,5 +51,3 @@ private:
static EQDB s_EQDB;
MYSQL *mysql_ref;
};
#endif /*EQDB_H_*/

View File

@ -15,9 +15,11 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "global_define.h"
#include "eqdb_res.h"
#include <mysql.h>
#include "common/global_define.h"
#include "mysql.h"
std::vector<std::string> EQDBRes::fetch_row_array() {
std::vector<std::string> array;
@ -49,4 +51,3 @@ std::map<std::string,std::string> EQDBRes::fetch_row_hash() {
return rowhash;
}

View File

@ -15,15 +15,16 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef EQDBRes_H_
#define EQDBRes_H_
#pragma once
#include "common/database.h"
#include "common/types.h"
#include "mysql.h"
#include <string>
#include <vector>
#include <map>
#include "types.h"
#include "database.h"
#include <mysql.h>
//this is the main object exported to perl.
class EQDBRes {
@ -44,5 +45,3 @@ public:
private:
MYSQL_RES *res;
};
#endif /*EQDBRes_H_*/

View File

@ -16,16 +16,17 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/global_define.h"
#include "eqemu_config.h"
#include "misc_functions.h"
#include "strings.h"
#include "eqemu_logsys.h"
#include "json/json.hpp"
#include "common/eqemu_logsys.h"
#include "common/global_define.h"
#include "common/json/json.hpp"
#include "common/misc_functions.h"
#include "common/strings.h"
#include <filesystem>
#include <iostream>
#include <sstream>
#include <filesystem>
std::string EQEmuConfig::ConfigFile = "eqemu_config.json";
EQEmuConfig *EQEmuConfig::_config = nullptr;

View File

@ -15,15 +15,15 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EQEmuConfig_H
#define __EQEmuConfig_H
#include "json/json.h"
#include "linked_list.h"
#include "path_manager.h"
#pragma once
#include "common/json/json.h"
#include "common/linked_list.h"
#include "common/path_manager.h"
#include "fmt/format.h"
#include <fstream>
#include <fmt/format.h>
#include <fmt/ranges.h>
struct LoginConfig {
std::string LoginHost;
@ -211,5 +211,3 @@ class EQEmuConfig
void Dump() const;
void CheckUcsConfigConversion();
};
#endif

View File

@ -16,8 +16,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _EQEMU_EQEMUEXCEPTION_H
#define _EQEMU_EQEMUEXCEPTION_H
#pragma once
#include <sstream>
#include <exception>
@ -106,5 +105,3 @@ namespace EQ
#ifndef EQ_EXCEPT
#define EQ_EXCEPT(n, d) throw EQ::Exception(n, d, __FILE__, __LINE__)
#endif
#endif

View File

@ -19,39 +19,37 @@
*/
#include "eqemu_logsys.h"
#include "rulesys.h"
#include "platform.h"
#include "strings.h"
#include "repositories/discord_webhooks_repository.h"
#include "repositories/logsys_categories_repository.h"
#include "termcolor/rang.hpp"
#include "path_manager.h"
#include "file.h"
#include <iostream>
#include <string>
#include <time.h>
#include <sys/stat.h>
std::ofstream process_log;
#include "common/file.h"
#include "common/path_manager.h"
#include "common/platform.h"
#include "common/repositories/discord_webhooks_repository.h"
#include "common/repositories/logsys_categories_repository.h"
#include "common/rulesys.h"
#include "common/strings.h"
#include "common/termcolor/rang.hpp"
#include <filesystem>
#include <iostream>
#include <string>
#include <sys/stat.h>
#include <time.h>
#ifdef _WINDOWS
#include <direct.h>
#include <conio.h>
#include <iostream>
#include <direct.h>
#include <dos.h>
#include <windows.h>
#include <iostream>
#include <process.h>
#include <windows.h>
#else
#include <unistd.h>
#include <sys/stat.h>
#include <thread>
#include <unistd.h>
#endif
std::ofstream process_log;
/**
* EQEmuLogSys Constructor
*/

View File

@ -18,14 +18,16 @@
*
*/
#ifndef EQEMU_LOGSYS_H
#define EQEMU_LOGSYS_H
#pragma once
#include <iostream>
#include <fstream>
#include <cstdio>
#include <functional>
#include "common/types.h"
#include "fmt/format.h"
#include <algorithm>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iostream>
#ifdef _WIN32
#ifdef utf16_to_utf8
@ -33,10 +35,6 @@
#endif
#endif
#include <fmt/format.h>
#include <fmt/ranges.h>
#include "types.h"
namespace Logs {
enum DebugLevel {
General = 1, // 1 - Low-Level general debugging, useful info on single line
@ -463,5 +461,3 @@ void OutF(
do { \
ls->Out(debug_level, log_category, file, func, line, fmt::format(formatStr, ##__VA_ARGS__).c_str()); \
} while(0)
#endif

View File

@ -18,8 +18,9 @@
*
*/
#ifndef EQEMU_EQEMU_LOGSYS_LOG_ALIASES_H
#define EQEMU_EQEMU_LOGSYS_LOG_ALIASES_H
#pragma once
#include "common/eqemu_logsys.h"
inline auto logsys = EQEmuLogSys::Instance();
@ -935,6 +936,3 @@ inline auto logsys = EQEmuLogSys::Instance();
if (logsys->IsLogEnabled(debug_level, log_category))\
OutF(logsys, debug_level, log_category, __FILE__, __func__, __LINE__, message, ##__VA_ARGS__);\
} while (0)
#endif //EQEMU_EQEMU_LOGSYS_LOG_ALIASES_H

View File

@ -16,13 +16,16 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "eqtime.h"
#include "common/eq_packet_structs.h"
#include "common/eqemu_logsys.h"
#include "common/global_define.h"
#include <fstream>
#include "../common/global_define.h"
#include "../common/eqemu_logsys.h"
#include "../common/eqtime.h"
#include "../common/eq_packet_structs.h"
#include <memory.h>
#include <iostream>
#include <memory.h>
/*#ifdef _CRTDBG_MAP_ALLOC
#undef new
#endif*/

View File

@ -1,7 +1,7 @@
#ifndef EQTIME_H
#define EQTIME_H
#pragma once
#include "common/eq_packet_structs.h"
#include "../common/eq_packet_structs.h"
#include <string>
//Struct
@ -48,5 +48,3 @@ private:
//This is our tz offset
int32 timezone;
};
#endif

View File

@ -1,7 +1,8 @@
#pragma once
#include "uv.h"
#include <functional>
#include <uv.h>
#include <cstring>
namespace EQ
{

View File

@ -1,9 +1,11 @@
#pragma once
#include <any>
#include <functional>
#include <exception>
#include "event_loop.h"
#include <any>
#include <exception>
#include <functional>
namespace EQ {
class Task
{

View File

@ -1,11 +1,12 @@
#pragma once
#include <vector>
#include <thread>
#include <mutex>
#include <condition_variable>
#include <functional>
#include <queue>
#include <future>
#include <mutex>
#include <queue>
#include <thread>
#include <vector>
namespace EQ
{

View File

@ -1,7 +1,9 @@
#pragma once
#include <functional>
#include "event_loop.h"
#include <functional>
namespace EQ {
class Timer
{

View File

@ -1,7 +1,7 @@
#pragma once
#include <unordered_map>
#include <string>
#include <unordered_map>
class EventSubscriptionWatcher
{

View File

@ -1,11 +1,14 @@
#include "player_event_discord_formatter.h"
#include "../repositories/character_data_repository.h"
#include "../json/json_archive_single_line.h"
#include "common/json/json_archive_single_line.h"
#include "common/repositories/character_data_repository.h"
#include "cereal/archives/json.hpp"
#include "cereal/types/vector.hpp"
#include "fmt/format.h"
#include "fmt/ranges.h"
#include <vector>
#include <fmt/format.h>
#include <fmt/ranges.h>
#include <cereal/archives/json.hpp>
#include <cereal/types/vector.hpp>
std::string PlayerEventDiscordFormatter::GetCurrentTimestamp()
{

View File

@ -1,11 +1,12 @@
#ifndef EQEMU_PLAYER_EVENT_DISCORD_FORMATTER_H
#define EQEMU_PLAYER_EVENT_DISCORD_FORMATTER_H
#pragma once
#include "common/events/player_events.h"
#include "common/repositories/base/base_player_event_logs_repository.h"
#include "cereal/archives/json.hpp"
#include "cereal/types/vector.hpp"
#include <string>
#include "player_events.h"
#include "../repositories/base/base_player_event_logs_repository.h"
#include <cereal/archives/json.hpp>
#include <cereal/types/vector.hpp>
struct DiscordField {
std::string name;
@ -209,6 +210,3 @@ public:
std::vector<DiscordEmbed> &embeds
);
};
#endif //EQEMU_PLAYER_EVENT_DISCORD_FORMATTER_H

View File

@ -1,14 +1,16 @@
#include "player_event_logs.h"
#include <cereal/archives/json.hpp>
#include "../platform.h"
#include "../rulesys.h"
#include "player_event_discord_formatter.h"
#include "../repositories/player_event_loot_items_repository.h"
#include "../repositories/player_event_merchant_sell_repository.h"
#include "../repositories/player_event_merchant_purchase_repository.h"
#include "../repositories/player_event_npc_handin_repository.h"
#include "../repositories/player_event_npc_handin_entries_repository.h"
#include "common/events/player_event_discord_formatter.h"
#include "common/platform.h"
#include "common/repositories/player_event_loot_items_repository.h"
#include "common/repositories/player_event_merchant_purchase_repository.h"
#include "common/repositories/player_event_merchant_sell_repository.h"
#include "common/repositories/player_event_npc_handin_entries_repository.h"
#include "common/repositories/player_event_npc_handin_repository.h"
#include "common/rulesys.h"
#include "cereal/archives/json.hpp"
#include "fmt/ranges.h"
const uint32 PROCESS_RETENTION_TRUNCATION_TIMER_INTERVAL = 60 * 60 * 1000; // 1 hour

View File

@ -1,28 +1,26 @@
#ifndef EQEMU_PLAYER_EVENT_LOGS_H
#define EQEMU_PLAYER_EVENT_LOGS_H
#pragma once
#include <cereal/archives/json.hpp>
#include "common/eqemu_config.h"
#include "common/json/json_archive_single_line.h"
#include "common/repositories/player_event_aa_purchase_repository.h"
#include "common/repositories/player_event_killed_named_npc_repository.h"
#include "common/repositories/player_event_killed_npc_repository.h"
#include "common/repositories/player_event_killed_raid_npc_repository.h"
#include "common/repositories/player_event_log_settings_repository.h"
#include "common/repositories/player_event_logs_repository.h"
#include "common/repositories/player_event_loot_items_repository.h"
#include "common/repositories/player_event_merchant_purchase_repository.h"
#include "common/repositories/player_event_merchant_sell_repository.h"
#include "common/repositories/player_event_npc_handin_entries_repository.h"
#include "common/repositories/player_event_npc_handin_repository.h"
#include "common/repositories/player_event_speech_repository.h"
#include "common/repositories/player_event_trade_entries_repository.h"
#include "common/repositories/player_event_trade_repository.h"
#include "common/servertalk.h"
#include "common/timer.h"
#include "cereal/archives/json.hpp"
#include <mutex>
#include "../json/json_archive_single_line.h"
#include "../servertalk.h"
#include "../timer.h"
#include "../eqemu_config.h"
#include "../repositories/player_event_log_settings_repository.h"
#include "../repositories/player_event_logs_repository.h"
#include "../repositories/player_event_loot_items_repository.h"
#include "../repositories/player_event_merchant_purchase_repository.h"
#include "../repositories/player_event_merchant_sell_repository.h"
#include "../repositories/player_event_npc_handin_repository.h"
#include "../repositories/player_event_npc_handin_entries_repository.h"
#include "../repositories/player_event_trade_repository.h"
#include "../repositories/player_event_trade_entries_repository.h"
#include "../repositories/player_event_speech_repository.h"
#include "../repositories/player_event_killed_npc_repository.h"
#include "../repositories/player_event_killed_named_npc_repository.h"
#include "../repositories/player_event_killed_raid_npc_repository.h"
#include "../repositories/player_event_aa_purchase_repository.h"
class PlayerEventLogs {
@ -134,5 +132,3 @@ private:
public:
std::map<PlayerEvent::EventType, EtlSettings> &GetEtlSettings() { return m_etl_settings;}
};
#endif //EQEMU_PLAYER_EVENT_LOGS_H

View File

@ -1,11 +1,12 @@
#ifndef EQEMU_PLAYER_EVENTS_H
#define EQEMU_PLAYER_EVENTS_H
#pragma once
#include "common/repositories/player_event_logs_repository.h"
#include "common/rulesys.h"
#include "common/types.h"
#include "cereal/cereal.hpp"
#include <string>
#include <cereal/cereal.hpp>
#include "../types.h"
#include "../rulesys.h"
#include "../repositories/player_event_logs_repository.h"
#define CEREAL_NVP_IF_NONZERO(ar, name) \
if ((name) != 0) ar(cereal::make_nvp(#name, name))
@ -1753,8 +1754,6 @@ namespace PlayerEvent {
};
}
#endif //EQEMU_PLAYER_EVENTS_H
#define RecordPlayerEventLog(event_type, event_data) do {\
if (PlayerEventLogs::Instance()->IsEventEnabled(event_type)) {\
if (RuleB(Logging, PlayerEventsQSProcess)) {\

View File

@ -1,7 +1,8 @@
#include "evolving_items.h"
#include "item_instance.h"
#include "events/player_event_logs.h"
#include "repositories/character_evolving_items_repository.h"
#include "common/events/player_event_logs.h"
#include "common/item_instance.h"
#include "common/repositories/character_evolving_items_repository.h"
EvolvingItemsManager::EvolvingItemsManager()
{

View File

@ -1,9 +1,8 @@
#ifndef EVOLVING_H
#define EVOLVING_H
#pragma once
#include "shareddb.h"
#include "events/player_events.h"
#include "repositories/items_evolving_details_repository.h"
#include "common/events/player_events.h"
#include "common/repositories/items_evolving_details_repository.h"
#include "common/shareddb.h"
namespace EQ {
class ItemInstance;
@ -66,5 +65,3 @@ private:
Database * m_db;
Database * m_content_db;
};
#endif //EVOLVING_H

View File

@ -16,9 +16,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "global_define.h"
#include "extprofile.h"
#include "common/global_define.h"
//Set defaults in the extended profile...
void InitExtendedProfile(ExtendedProfile_Struct *p) {
memset(p, 0, sizeof(ExtendedProfile_Struct));
@ -49,4 +50,3 @@ bool SetExtendedProfile(ExtendedProfile_Struct *to, char *old, unsigned int len)
return(false);
}

View File

@ -15,12 +15,13 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef EXTENDED_PROFILE_H
#define EXTENDED_PROFILE_H
#include "eq_packet_structs.h"
#include "inventory_profile.h"
#pragma once
#include "common/eq_packet_structs.h"
#include "common/inventory_profile.h"
#pragma pack(push)
#pragma pack(1)
/*
@ -58,10 +59,7 @@ struct ExtendedProfile_Struct {
uint32 next_invsnapshot_time; /* Used */
};
#pragma pack()
#pragma pack(pop)
void InitExtendedProfile(ExtendedProfile_Struct *p);
bool SetExtendedProfile(ExtendedProfile_Struct *to, char *old, unsigned int len);
#endif

View File

@ -17,8 +17,9 @@
*/
#include "faction.h"
#include "races.h"
#include "rulesys.h"
#include "common/races.h"
#include "common/rulesys.h"
const char *FactionValueToString(FACTION_VALUE faction_value)
{
@ -163,4 +164,3 @@ bool IsOfIndiffRace(int r1, int r2)
}
return false;
}

View File

@ -15,11 +15,12 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _EQEMU_FACTION_H
#define _EQEMU_FACTION_H
#include "types.h"
#include "features.h"
#pragma once
#include "common/features.h"
#include "common/types.h"
#include <map>
#include <string>
@ -75,4 +76,3 @@ struct NPCFaction
const char *FactionValueToString(FACTION_VALUE faction_value);
FACTION_VALUE CalculateFaction(FactionMods* fm, int32 tmpCharacter_value);
#endif

View File

@ -15,8 +15,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef FEATURES_H
#define FEATURES_H
#pragma once
/*
@ -257,8 +257,3 @@ Developer configuration
#define PROFILE_DUMP_TIME 180
#endif //EQPROFILE
#endif

Some files were not shown because too many files have changed in this diff Show More