-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRTAPI.hpp
More file actions
171 lines (156 loc) · 5.67 KB
/
RTAPI.hpp
File metadata and controls
171 lines (156 loc) · 5.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
///----------------------------------------------------------------------------------------------------
/// Copyright (c) Raidcore.GG - Licensed under the MIT license.
///
/// Name : RTAPI.hpp
/// Description : Definitions for public-facing real-time API.
/// Authors : K. Bieniek
///----------------------------------------------------------------------------------------------------
#ifndef RTAPI_H
#define RTAPI_H
#define RTAPI_SIG 0x2501A02C
#define DL_RTAPI "RTAPI" // DataLink is RealTimeData struct
#define EV_RTAPI_GROUP_MEMBER_JOINED "RTAPI_GROUP_MEMBER_JOINED" // Payload is RTAPI::GroupMember*
#define EV_RTAPI_GROUP_MEMBER_LEFT "RTAPI_GROUP_MEMBER_LEFT" // Payload is RTAPI::GroupMember*
#define EV_RTAPI_GROUP_MEMBER_UPDATED "RTAPI_GROUP_MEMBER_UPDATED" // Payload is RTAPI::GroupMember*
#include <cstdint>
///----------------------------------------------------------------------------------------------------
/// RTAPI Namespace
///----------------------------------------------------------------------------------------------------
namespace RTAPI
{
///----------------------------------------------------------------------------------------------------
/// EGameState Enumeration
///----------------------------------------------------------------------------------------------------
enum class EGameState : uint32_t
{
CharacterSelection,
CharacterCreation,
Cinematic,
LoadingScreen,
Gameplay
};
///----------------------------------------------------------------------------------------------------
/// EGameLanguage Enumeration
///----------------------------------------------------------------------------------------------------
enum class EGameLanguage : uint32_t
{
English,
Korean,
French,
German,
Spanish,
Chinese
};
///----------------------------------------------------------------------------------------------------
/// ETimeOfDay Enumeration
///----------------------------------------------------------------------------------------------------
enum class ETimeOfDay : uint32_t
{
Dawn,
Day,
Dusk,
Night
};
///----------------------------------------------------------------------------------------------------
/// ECharacterState Enumeration
///----------------------------------------------------------------------------------------------------
enum class ECharacterState : uint32_t
{
IsAlive = 1 << 0,
IsDowned = 1 << 1,
IsInCombat = 1 << 2,
IsSwimming = 1 << 3, // aka. Is on water surface
IsUnderwater = 1 << 4, // aka. Is diving
IsGliding = 1 << 5,
IsFlying = 1 << 6
};
///----------------------------------------------------------------------------------------------------
/// EMapType Enumeration
///----------------------------------------------------------------------------------------------------
enum class EMapType : uint32_t
{
AutoRedirect,
CharacterCreation,
PvP,
GvG,
Instance,
Public,
Tournament,
Tutorial,
UserTournament,
WvW_EternalBattlegrounds,
WvW_BlueBorderlands,
WvW_GreenBorderlands,
WvW_RedBorderlands,
WVW_FortunesVale,
WvW_ObsidianSanctum,
WvW_EdgeOfTheMists,
Public_Mini,
BigBattle,
WvW_Lounge
};
///----------------------------------------------------------------------------------------------------
/// EGroupType Enumeration
///----------------------------------------------------------------------------------------------------
enum class EGroupType : uint32_t
{
None,
Party,
RaidSquad,
Squad
};
///----------------------------------------------------------------------------------------------------
/// GroupMember Struct
///----------------------------------------------------------------------------------------------------
struct GroupMember
{
char AccountName[140];
char CharacterName[140];
uint32_t Subgroup; // 0 for parties, 1-15 according to the squad's subgroup
uint32_t Profession; // 1-9 = Profession; 0 Unknown -> e.g. on loading screen or logged out
uint32_t EliteSpecialization; // Third Spec ID, not necessarily elite; or 0 Unknown -> e.g. on loading screen or logged out
uint32_t IsSelf : 1;
uint32_t IsInInstance : 1; // Is in the same map instance as the player.
uint32_t IsCommander : 1;
uint32_t IsLieutenant : 1;
};
///----------------------------------------------------------------------------------------------------
/// RealTimeData Struct
///----------------------------------------------------------------------------------------------------
struct RealTimeData
{
/* Game Data */
uint32_t GameBuild; // Set to 0 when RTAPI is unloaded.
EGameState GameState;
EGameLanguage Language;
/* Instance/World Data */
ETimeOfDay TimeOfDay;
uint32_t MapID;
EMapType MapType;
uint8_t IPAddress[4];
float Cursor[3]; // Location of cursor in the world
float SquadMarkers[8][3]; // Locations of squad markers
EGroupType GroupType;
uint32_t GroupMemberCount;
uint32_t RESERVED2;
/* Player Data */
uint32_t RESERVED1;
char AccountName[140];
char CharacterName[140];
float CharacterPosition[3];
float CharacterFacing[3];
uint32_t Profession;
uint32_t EliteSpecialization;
uint32_t MountIndex;
ECharacterState CharacterState;
/* Camera Data */
float CameraPosition[3];
float CameraFacing[3];
float CameraFOV;
uint32_t IsActionCamera : 1;
/* Additions. Just slapped on. */
uint32_t CharacterLevel;
uint32_t CharacterEffectiveLevel;
};
}
#endif