Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
ScriptSystem.h
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
#ifndef SC_SYSTEM_H
7
#define SC_SYSTEM_H
8
9
#include "
Platform/Singleton.h
"
10
#include "
ScriptMgr.h
"
11
12
#define TEXT_SOURCE_RANGE -1000000
//the amount of entries each text source has available
13
15
//N=Neutral, A=Alliance, H=Horde.
16
//NEUTRAL or FRIEND = Hostility to player surroundings (not a good definition)
17
//ACTIVE or PASSIVE = Hostility to environment surroundings.
18
enum
eEscortFaction
19
{
20
FACTION_ESCORT_A_NEUTRAL_PASSIVE
= 10,
21
FACTION_ESCORT_H_NEUTRAL_PASSIVE
= 33,
22
FACTION_ESCORT_N_NEUTRAL_PASSIVE
= 113,
23
24
FACTION_ESCORT_A_NEUTRAL_ACTIVE
= 231,
25
FACTION_ESCORT_H_NEUTRAL_ACTIVE
= 232,
26
FACTION_ESCORT_N_NEUTRAL_ACTIVE
= 250,
27
28
FACTION_ESCORT_N_FRIEND_PASSIVE
= 290,
29
FACTION_ESCORT_N_FRIEND_ACTIVE
= 495,
30
31
FACTION_ESCORT_A_PASSIVE
= 774,
32
FACTION_ESCORT_H_PASSIVE
= 775,
33
34
FACTION_ESCORT_N_ACTIVE
= 1986,
35
FACTION_ESCORT_H_ACTIVE
= 2046
36
};
37
38
struct
ScriptPointMove
39
{
40
uint32
uiCreatureEntry
;
41
uint32
uiPointId
;
42
float
fX
;
43
float
fY
;
44
float
fZ
;
45
uint32
uiWaitTime
;
46
};
47
48
typedef
std::vector<ScriptPointMove>
ScriptPointVector
;
49
50
class
SystemMgr
51
{
52
friend
class
Skyfire::Singleton
<
SystemMgr
,
Skyfire
::NullMutex>;
53
SystemMgr
() { }
54
~SystemMgr
() { }
55
56
public
:
57
typedef
UNORDERED_MAP<uint32, ScriptPointVector>
PointMoveMap
;
58
59
//Database
60
void
LoadScriptWaypoints
();
61
62
ScriptPointVector
const
&
GetPointMoveList
(
uint32
creatureEntry)
const
63
{
64
PointMoveMap::const_iterator itr =
m_mPointMoveMap
.find(creatureEntry);
65
66
if
(itr ==
m_mPointMoveMap
.end())
67
return
_empty
;
68
69
return
itr->second;
70
}
71
72
protected
:
73
PointMoveMap
m_mPointMoveMap
;
//coordinates for waypoints
74
75
private
:
76
static
ScriptPointVector
const
_empty
;
77
};
78
79
#define sScriptSystemMgr Skyfire::Singleton<SystemMgr, Skyfire::NullMutex>::instance()
80
81
#endif
uint32
std::uint32_t uint32
Definition
Define.h:77
ScriptMgr.h
eEscortFaction
eEscortFaction
Definition
ScriptSystem.h:19
FACTION_ESCORT_N_ACTIVE
@ FACTION_ESCORT_N_ACTIVE
Definition
ScriptSystem.h:34
FACTION_ESCORT_N_NEUTRAL_PASSIVE
@ FACTION_ESCORT_N_NEUTRAL_PASSIVE
Definition
ScriptSystem.h:22
FACTION_ESCORT_A_NEUTRAL_ACTIVE
@ FACTION_ESCORT_A_NEUTRAL_ACTIVE
Definition
ScriptSystem.h:24
FACTION_ESCORT_A_PASSIVE
@ FACTION_ESCORT_A_PASSIVE
Definition
ScriptSystem.h:31
FACTION_ESCORT_H_NEUTRAL_PASSIVE
@ FACTION_ESCORT_H_NEUTRAL_PASSIVE
Definition
ScriptSystem.h:21
FACTION_ESCORT_H_NEUTRAL_ACTIVE
@ FACTION_ESCORT_H_NEUTRAL_ACTIVE
Definition
ScriptSystem.h:25
FACTION_ESCORT_H_ACTIVE
@ FACTION_ESCORT_H_ACTIVE
Definition
ScriptSystem.h:35
FACTION_ESCORT_N_FRIEND_PASSIVE
@ FACTION_ESCORT_N_FRIEND_PASSIVE
Definition
ScriptSystem.h:28
FACTION_ESCORT_H_PASSIVE
@ FACTION_ESCORT_H_PASSIVE
Definition
ScriptSystem.h:32
FACTION_ESCORT_A_NEUTRAL_PASSIVE
@ FACTION_ESCORT_A_NEUTRAL_PASSIVE
Definition
ScriptSystem.h:20
FACTION_ESCORT_N_NEUTRAL_ACTIVE
@ FACTION_ESCORT_N_NEUTRAL_ACTIVE
Definition
ScriptSystem.h:26
FACTION_ESCORT_N_FRIEND_ACTIVE
@ FACTION_ESCORT_N_FRIEND_ACTIVE
Definition
ScriptSystem.h:29
ScriptPointVector
std::vector< ScriptPointMove > ScriptPointVector
Definition
ScriptSystem.h:48
Singleton.h
UNORDERED_MAP
#define UNORDERED_MAP
Definition
UnorderedMap.h:58
Skyfire::Singleton
Definition
Singleton.h:15
SystemMgr::m_mPointMoveMap
PointMoveMap m_mPointMoveMap
Definition
ScriptSystem.h:73
SystemMgr::_empty
static ScriptPointVector const _empty
Definition
ScriptSystem.h:76
SystemMgr::~SystemMgr
~SystemMgr()
Definition
ScriptSystem.h:54
SystemMgr::SystemMgr
SystemMgr()
Definition
ScriptSystem.h:53
SystemMgr::PointMoveMap
UNORDERED_MAP< uint32, ScriptPointVector > PointMoveMap
Definition
ScriptSystem.h:57
SystemMgr::LoadScriptWaypoints
void LoadScriptWaypoints()
Definition
ScriptSystem.cpp:13
SystemMgr::GetPointMoveList
ScriptPointVector const & GetPointMoveList(uint32 creatureEntry) const
Definition
ScriptSystem.h:62
Skyfire
Definition
AuthPatchTransfer.h:12
ScriptPointMove
Definition
ScriptSystem.h:39
ScriptPointMove::fZ
float fZ
Definition
ScriptSystem.h:44
ScriptPointMove::uiWaitTime
uint32 uiWaitTime
Definition
ScriptSystem.h:45
ScriptPointMove::fX
float fX
Definition
ScriptSystem.h:42
ScriptPointMove::fY
float fY
Definition
ScriptSystem.h:43
ScriptPointMove::uiCreatureEntry
uint32 uiCreatureEntry
Definition
ScriptSystem.h:40
ScriptPointMove::uiPointId
uint32 uiPointId
Definition
ScriptSystem.h:41
src
server
game
Scripting
ScriptSystem.h
Generated on
for Project SkyFire Core by
1.17.0