TrinityCore
Loading...
Searching...
No Matches
ScriptSystem.h
Go to the documentation of this file.
1
/*
2
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3
*
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the
6
* Free Software Foundation; either version 2 of the License, or (at your
7
* option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
* more details.
13
*
14
* You should have received a copy of the GNU General Public License along
15
* with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef SC_SYSTEM_H
19
#define SC_SYSTEM_H
20
21
#include "
Define.h
"
22
#include "
Hash.h
"
23
#include "
WaypointDefines.h
"
24
#include <unordered_map>
25
#include <vector>
26
27
class
Creature
;
28
struct
SplineChainLink
;
29
30
class
TC_GAME_API
SystemMgr
31
{
32
public
:
33
static
SystemMgr
* instance();
34
35
// database
36
void
LoadScriptSplineChains();
37
38
std::vector<SplineChainLink>
const
* GetSplineChain(
uint32
entry,
uint16
chainId)
const
;
39
std::vector<SplineChainLink>
const
* GetSplineChain(
Creature
const
* who,
uint16
id
)
const
;
40
41
private
:
42
typedef
std::pair<uint32, uint16>
ChainKeyType
;
// creature entry + chain ID
43
44
SystemMgr
();
45
~SystemMgr
();
46
47
SystemMgr
(
SystemMgr
const
&) =
delete
;
48
SystemMgr
&
operator=
(
SystemMgr
const
&) =
delete
;
49
50
std::unordered_map<ChainKeyType, std::vector<SplineChainLink>>
m_mSplineChainsMap
;
// spline chains
51
};
52
53
#define sScriptSystemMgr SystemMgr::instance()
54
55
#endif
Define.h
TC_GAME_API
#define TC_GAME_API
Definition
Define.h:114
uint16
uint16_t uint16
Definition
Define.h:134
uint32
uint32_t uint32
Definition
Define.h:133
Hash.h
WaypointDefines.h
Creature
Definition
Creature.h:62
SystemMgr
Definition
ScriptSystem.h:31
SystemMgr::operator=
SystemMgr & operator=(SystemMgr const &)=delete
SystemMgr::m_mSplineChainsMap
std::unordered_map< ChainKeyType, std::vector< SplineChainLink > > m_mSplineChainsMap
Definition
ScriptSystem.h:50
SystemMgr::ChainKeyType
std::pair< uint32, uint16 > ChainKeyType
Definition
ScriptSystem.h:42
SystemMgr::~SystemMgr
~SystemMgr()
SystemMgr::SystemMgr
SystemMgr(SystemMgr const &)=delete
SystemMgr::SystemMgr
SystemMgr()
SplineChainLink
Definition
SplineChain.h:25
server
game
Scripting
ScriptSystem.h
Generated on Sun May 10 2026 02:30:17 for TrinityCore by
1.9.8