Core/Misc: Add missing includes

This commit is contained in:
Shauren
2025-11-15 11:42:30 +01:00
parent a8dd7dcf0e
commit 21ff7f2503
17 changed files with 34 additions and 20 deletions

View File

@@ -232,7 +232,7 @@ public:
static inline auto initiate(Initiation&& initiation, RawCompletionToken&& token, Args&&... args)
{
return async_initiate<
conditional_t<
std::conditional_t<
is_const<remove_reference_t<RawCompletionToken>>::value,
CompletionToken const, CompletionToken>,
typename Trinity::Asio::Impl::AsExpectedSignature<Signatures>::type...>(
@@ -311,7 +311,7 @@ public:
static inline auto initiate(Initiation&& initiation, RawCompletionToken&& token, Args&&... args)
{
return async_initiate<
conditional_t<
std::conditional_t<
is_const<remove_reference_t<RawCompletionToken>>::value,
CompletionToken const, CompletionToken>,
typename Trinity::Asio::Impl::AsExpectedSignature<Signature>::type>(

View File

@@ -23,6 +23,7 @@
#include <G3D/Ray.h>
#include <G3D/BoundsTrait.h>
#include <memory>
#include <span>
#include <unordered_map>
template<class Node>

View File

@@ -18,6 +18,7 @@
#ifndef _VMAPDEFINITIONS_H
#define _VMAPDEFINITIONS_H
#include "Define.h"
#include <cstdio>
#define LIQUID_TILE_SIZE (533.333f / 128.f)

View File

@@ -19,15 +19,16 @@
#define TRINITY_FUZZYFIND_H
#include <map>
#include <string>
#include <type_traits>
struct StringContainsStringI_T;
namespace Trinity
{
namespace Containers
{
template <typename Container, typename NeedleContainer, typename ContainsOperator = bool(std::string const&, std::string const&), typename T = void>
auto FuzzyFindIn(Container const& container, NeedleContainer const& needles, ContainsOperator const& contains = StringContainsStringI, int(*bonus)(decltype((*std::begin(std::declval<Container>())))) = nullptr)
template <typename Container, typename NeedleContainer, typename ContainsOperator = StringContainsStringI_T, typename T = void>
auto FuzzyFindIn(Container const& container, NeedleContainer const& needles, ContainsOperator const& contains = {}, int(*bonus)(decltype((*std::begin(std::declval<Container>())))) = nullptr)
{
using IteratorResult = decltype((*std::begin(container)));
using MappedType = std::conditional_t<std::is_reference_v<IteratorResult>, std::reference_wrapper<std::remove_reference_t<IteratorResult>>, IteratorResult>;

View File

@@ -18,6 +18,7 @@
#ifndef TRINITY_SMARTENUM_H
#define TRINITY_SMARTENUM_H
#include "Define.h"
#include "IteratorPair.h"
#include <iterator>

View File

@@ -458,9 +458,16 @@ inline std::vector<uint8> HexStrToByteVector(std::string_view str, bool reverse
TC_COMMON_API float DegToRad(float degrees);
TC_COMMON_API bool StringEqualI(std::string_view str1, std::string_view str2);
inline bool StringStartsWith(std::string_view haystack, std::string_view needle) { return (haystack.substr(0, needle.length()) == needle); }
inline bool StringStartsWith(std::string_view haystack, std::string_view needle) { return haystack.starts_with(needle); }
inline bool StringStartsWithI(std::string_view haystack, std::string_view needle) { return StringEqualI(haystack.substr(0, needle.length()), needle); }
TC_COMMON_API bool StringContainsStringI(std::string_view haystack, std::string_view needle);
struct StringContainsStringI_T
{
bool operator()(std::string_view haystack, std::string_view needle) const { return StringContainsStringI(haystack, needle); }
};
TC_COMMON_API bool StringCompareLessI(std::string_view a, std::string_view b);
struct StringCompareLessI_T

View File

@@ -19,7 +19,6 @@
#define TRINITY_CREATUREAIFACTORY_H
#include "ObjectMgr.h"
#include "ObjectRegistry.h"
#include "SelectableAI.h"
class Creature;

View File

@@ -18,6 +18,7 @@
#ifndef TRINITY_GAMEOBJECTAIFACTORY_H
#define TRINITY_GAMEOBJECTAIFACTORY_H
#include "ObjectMgr.h"
#include "SelectableAI.h"
class GameObject;

View File

@@ -19,6 +19,7 @@
#define TRINITYCORE_PLAYER_CHOICE_H
#include "Define.h"
#include "Duration.h"
#include "EnumFlag.h"
#include "Optional.h"
#include <algorithm>

View File

@@ -19,7 +19,6 @@
#include "Config.h"
#include "NetworkThread.h"
#include "ScriptMgr.h"
#include "WorldSocket.h"
#include <boost/system/error_code.hpp>
class WorldSocketThread : public Trinity::Net::NetworkThread<WorldSocket>

View File

@@ -19,8 +19,7 @@
#define TRINITYCORE_WORLD_SOCKET_MGR_H
#include "SocketMgr.h"
class WorldSocket;
#include "WorldSocket.h"
/// Manages all sockets connected to peers and network threads
class TC_GAME_API WorldSocketMgr : public Trinity::Net::SocketMgr<WorldSocket>

View File

@@ -18,6 +18,8 @@
#ifndef CHARACTERDATABASECLEANER_H
#define CHARACTERDATABASECLEANER_H
#include "Define.h"
namespace CharacterDatabaseCleaner
{
enum CleaningFlags

View File

@@ -18,6 +18,9 @@
#ifndef _WARDEN_MODULE_MAC_H
#define _WARDEN_MODULE_MAC_H
#include "Define.h"
#include <array>
std::array<uint8, 9318> Module_0DBBF209A27B1E279A9FEC5C168A15F7_Data =
{
0x07, 0x0C, 0x44, 0xCD, 0xC9, 0xFB, 0x99, 0xBC, 0x7C, 0x77, 0xDC, 0xE8, 0x8D, 0x07, 0xBE, 0x55,

View File

@@ -45,10 +45,10 @@ enum BRCCreatureIds
NPC_ROMOGG_BONECRUSHER = 39665
};
template<typename AI>
inline AI* GetBlackrockCavernsAI(Creature* creature)
template <class AI, class T>
inline AI* GetBlackrockCavernsAI(T* obj)
{
return GetInstanceAI<AI>(creature, BCScriptName);
return GetInstanceAI<AI>(obj, BCScriptName);
}
#endif // BLACKROCKCAVERNS_H_

View File

@@ -41,10 +41,10 @@ enum SSCreatureIds
NPC_MORTIMER_MOLOCH = 46482
};
template<typename AI>
inline AI* GetStormwindStockadeAI(Creature* creature)
template <class AI, class T>
inline AI* GetStormwindStockadeAI(T* obj)
{
return GetInstanceAI<AI>(creature, StormwindStockadeScriptName);
return GetInstanceAI<AI>(obj, StormwindStockadeScriptName);
}
#define RegisterStormwindStockadesAI(AI) RegisterCreatureAIWithFactory(AI, GetStormwindStockadeAI)

View File

@@ -76,10 +76,10 @@ enum SCMisc
CREATURE_FORMATION_MILLHOUSE_EVENT_LAST_GROUP = 340492,
};
template<typename AI>
inline AI* GetStonecoreAI(Creature* creature)
template <class AI, class T>
inline AI* GetStonecoreAI(T* obj)
{
return GetInstanceAI<AI>(creature, SCScriptName);
return GetInstanceAI<AI>(obj, SCScriptName);
}
#endif // DEF_STONECORE

View File

@@ -49,7 +49,6 @@
#include "TerrainMgr.h"
#include "ThreadPool.h"
#include "World.h"
#include "WorldSocket.h"
#include "WorldSocketMgr.h"
#include "Util.h"
#include <openssl/opensslv.h>