Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_PlayerFactionInfo.c
Go to the documentation of this file.
1
class
SCR_PlayerFactionInfo
2
{
3
protected
int
m_iPlayerId
;
4
protected
int
m_iFactionIndex
= -1;
5
6
//------------------------------------------------------------------------------------------------
8
int
GetFactionIndex
()
9
{
10
return
m_iFactionIndex
;
11
}
12
13
//------------------------------------------------------------------------------------------------
15
void
SetFactionIndex
(
int
factionIndex)
16
{
17
m_iFactionIndex
= factionIndex;
18
}
19
20
//------------------------------------------------------------------------------------------------
22
int
GetPlayerId
()
23
{
24
return
m_iPlayerId
;
25
}
26
27
//------------------------------------------------------------------------------------------------
28
// constructor
29
protected
void
SCR_PlayerFactionInfo
();
30
31
//------------------------------------------------------------------------------------------------
35
static
SCR_PlayerFactionInfo
Create
(
int
playerId)
36
{
37
SCR_PlayerFactionInfo
info =
new
SCR_PlayerFactionInfo
();
38
info.
m_iPlayerId
= playerId;
39
info.
m_iFactionIndex
= -1;
40
return
info;
41
}
42
43
//################################################################################################
45
//################################################################################################
46
47
//------------------------------------------------------------------------------------------------
53
static
bool
Extract
(
SCR_PlayerFactionInfo
instance,
ScriptCtx
ctx,
SSnapSerializerBase
snapshot)
54
{
55
snapshot.SerializeInt(instance.
m_iPlayerId
);
56
snapshot.SerializeInt(instance.
m_iFactionIndex
);
57
return
true
;
58
}
59
60
//------------------------------------------------------------------------------------------------
66
static
bool
Inject
(
SSnapSerializerBase
snapshot,
ScriptCtx
ctx,
SCR_PlayerFactionInfo
instance)
67
{
68
snapshot.SerializeInt(instance.
m_iPlayerId
);
69
snapshot.SerializeInt(instance.
m_iFactionIndex
);
70
return
true
;
71
}
72
73
//------------------------------------------------------------------------------------------------
78
static
void
Encode
(
SSnapSerializerBase
snapshot,
ScriptCtx
ctx, ScriptBitSerializer packet)
79
{
80
snapshot.EncodeInt(packet);
// m_iPlayerId
81
snapshot.EncodeInt(packet);
// m_iFactionIndex
82
}
83
84
//------------------------------------------------------------------------------------------------
90
static
bool
Decode
(ScriptBitSerializer packet,
ScriptCtx
ctx,
SSnapSerializerBase
snapshot)
91
{
92
snapshot.DecodeInt(packet);
// m_iPlayerId
93
snapshot.DecodeInt(packet);
// m_iFactionIndex
94
return
true
;
95
}
96
97
//------------------------------------------------------------------------------------------------
103
static
bool
SnapCompare
(
SSnapSerializerBase
lhs,
SSnapSerializerBase
rhs ,
ScriptCtx
ctx)
104
{
105
return
lhs.CompareSnapshots(rhs, 4 + 4);
// m_iPlayerId, m_iFactionIndex
106
}
107
108
//------------------------------------------------------------------------------------------------
114
static
bool
PropCompare
(
SCR_PlayerFactionInfo
instance,
SSnapSerializerBase
snapshot,
ScriptCtx
ctx)
115
{
116
return
snapshot.CompareInt(instance.
m_iPlayerId
)
117
&& snapshot.CompareInt(instance.
m_iFactionIndex
);
118
}
119
}
SCR_PlayerFactionInfo::m_iFactionIndex
int m_iFactionIndex
Definition
SCR_PlayerFactionInfo.c:4
SCR_PlayerFactionInfo::Extract
static bool Extract(SCR_PlayerFactionInfo instance, ScriptCtx ctx, SSnapSerializerBase snapshot)
Codec methods.
Definition
SCR_PlayerFactionInfo.c:53
SCR_PlayerFactionInfo::GetPlayerId
int GetPlayerId()
Definition
SCR_PlayerFactionInfo.c:22
SCR_PlayerFactionInfo::m_iPlayerId
int m_iPlayerId
Definition
SCR_PlayerFactionInfo.c:3
SCR_PlayerFactionInfo::Create
static SCR_PlayerFactionInfo Create(int playerId)
Definition
SCR_PlayerFactionInfo.c:35
SCR_PlayerFactionInfo::Inject
static bool Inject(SSnapSerializerBase snapshot, ScriptCtx ctx, SCR_PlayerFactionInfo instance)
Definition
SCR_PlayerFactionInfo.c:66
SCR_PlayerFactionInfo::PropCompare
static bool PropCompare(SCR_PlayerFactionInfo instance, SSnapSerializerBase snapshot, ScriptCtx ctx)
Definition
SCR_PlayerFactionInfo.c:114
SCR_PlayerFactionInfo::SnapCompare
static bool SnapCompare(SSnapSerializerBase lhs, SSnapSerializerBase rhs, ScriptCtx ctx)
Definition
SCR_PlayerFactionInfo.c:103
SCR_PlayerFactionInfo::GetFactionIndex
int GetFactionIndex()
Definition
SCR_PlayerFactionInfo.c:8
SCR_PlayerFactionInfo::Decode
static bool Decode(ScriptBitSerializer packet, ScriptCtx ctx, SSnapSerializerBase snapshot)
Definition
SCR_PlayerFactionInfo.c:90
SCR_PlayerFactionInfo::Encode
static void Encode(SSnapSerializerBase snapshot, ScriptCtx ctx, ScriptBitSerializer packet)
Definition
SCR_PlayerFactionInfo.c:78
SCR_PlayerFactionInfo::SCR_PlayerFactionInfo
void SCR_PlayerFactionInfo()
SCR_PlayerFactionInfo::SetFactionIndex
void SetFactionIndex(int factionIndex)
Definition
SCR_PlayerFactionInfo.c:15
SSnapSerializerBase
Definition
EnNetwork.c:269
ScriptCtx
Definition
EnNetwork.c:36
scripts
Game
GameMode
FactionManager
SCR_PlayerFactionInfo.c
Generated by
1.17.0