Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
MMapFactory.cpp
Go to the documentation of this file.
1
/*
2
* This file is part of Project SkyFire https://www.projectskyfire.org.
3
* See LICENSE.md file for Copyright information
4
*/
5
6
#include "
MMapFactory.h
"
7
#include "
World.h
"
8
#include "
Config.h
"
9
#include "
DisableMgr.h
"
10
11
namespace
MMAP
12
{
13
// ######################## MMapFactory ########################
14
// our global singleton copy
15
MMapManager
*
g_MMapManager
= NULL;
16
17
MMapManager
*
MMapFactory::createOrGetMMapManager
()
18
{
19
if
(
g_MMapManager
== NULL)
20
g_MMapManager
=
new
MMapManager
();
21
22
return
g_MMapManager
;
23
}
24
25
bool
MMapFactory::IsPathfindingEnabled
(
uint32
mapId)
26
{
27
return
sWorld
->GetBoolConfig(
WorldBoolConfigs::CONFIG_ENABLE_MMAPS
)
28
&& !
DisableMgr::IsDisabledFor
(
DISABLE_TYPE_MMAP
, mapId, NULL,
MMAP_DISABLE_PATHFINDING
);
29
}
30
31
void
MMapFactory::clear
()
32
{
33
if
(
g_MMapManager
)
34
{
35
delete
g_MMapManager
;
36
g_MMapManager
= NULL;
37
}
38
}
39
}
Config.h
uint32
std::uint32_t uint32
Definition
Define.h:77
DisableMgr.h
MMAP_DISABLE_PATHFINDING
@ MMAP_DISABLE_PATHFINDING
Definition
DisableMgr.h:49
DISABLE_TYPE_MMAP
@ DISABLE_TYPE_MMAP
Definition
DisableMgr.h:22
MMapFactory.h
World.h
MMAP::MMapFactory::createOrGetMMapManager
static MMapManager * createOrGetMMapManager()
Definition
MMapFactory.cpp:17
MMAP::MMapFactory::IsPathfindingEnabled
static bool IsPathfindingEnabled(uint32 mapId)
Definition
MMapFactory.cpp:25
MMAP::MMapFactory::clear
static void clear()
Definition
MMapFactory.cpp:31
MMAP::MMapManager
Definition
MMapManager.h:81
sWorld
#define sWorld
Definition
World.h:910
WorldBoolConfigs::CONFIG_ENABLE_MMAPS
@ CONFIG_ENABLE_MMAPS
Definition
World.h:159
DisableMgr::IsDisabledFor
bool IsDisabledFor(DisableType type, uint32 entry, Unit const *unit, uint8 flags)
Definition
DisableMgr.cpp:292
MMAP
Definition
MMapFactory.cpp:12
MMAP::g_MMapManager
MMapManager * g_MMapManager
Definition
MMapFactory.cpp:15
src
server
collision
Management
MMapFactory.cpp
Generated on
for Project SkyFire Core by
1.17.0