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_TaskExecutorPlayer.c
Go to the documentation of this file.
1
class
SCR_TaskExecutorPlayer
:
SCR_TaskExecutor
2
{
3
[
Attribute
()]
4
protected
int
m_iPlayerID
;
5
6
//------------------------------------------------------------------------------------------------
7
override
bool
IsClonedBy
(
SCR_TaskExecutor
executor)
8
{
9
if
(!super.IsClonedBy(executor))
10
return
false
;
11
12
SCR_TaskExecutorPlayer
executorPlayer =
SCR_TaskExecutorPlayer
.Cast(executor);
13
if
(!executorPlayer)
14
return
false
;
15
16
if
(
m_iPlayerID
!= executorPlayer.
GetPlayerID
())
17
return
false
;
18
19
return
true
;
20
}
21
22
//------------------------------------------------------------------------------------------------
23
int
GetPlayerID
()
24
{
25
return
m_iPlayerID
;
26
}
27
28
//------------------------------------------------------------------------------------------------
29
void
SetPlayerID
(
int
playerID)
30
{
31
m_iPlayerID
= playerID;
32
}
33
34
//------------------------------------------------------------------------------------------------
35
override
FactionKey
GetFactionKey
()
36
{
37
SCR_FactionManager
factionManager =
SCR_FactionManager
.Cast(
GetGame
().GetFactionManager());
38
if
(!factionManager)
39
return
FactionKey
.Empty;
40
41
Faction
faction = factionManager.GetPlayerFaction(
m_iPlayerID
);
42
if
(!faction)
43
return
FactionKey
.Empty;
44
45
return
faction.GetFactionKey();
46
}
47
48
//------------------------------------------------------------------------------------------------
49
override
int
GetGroupID
()
50
{
51
SCR_GroupsManagerComponent
groupsManagerComponent =
SCR_GroupsManagerComponent
.GetInstance();
52
if
(!groupsManagerComponent)
53
return
-1;
54
55
SCR_AIGroup
group = groupsManagerComponent.GetPlayerGroup(
m_iPlayerID
);
56
if
(!group)
57
return
-1;
58
59
return
group.
GetGroupID
();
60
}
61
62
//------------------------------------------------------------------------------------------------
63
static
bool
Extract
(
SCR_TaskExecutorPlayer
instance,
ScriptCtx
ctx,
SSnapSerializerBase
snapshot)
64
{
65
snapshot.SerializeInt(instance.
m_iPlayerID
);
66
return
true
;
67
}
68
69
//------------------------------------------------------------------------------------------------
70
static
bool
Inject
(
SSnapSerializerBase
snapshot,
ScriptCtx
ctx,
SCR_TaskExecutorPlayer
instance)
71
{
72
snapshot.SerializeInt(instance.
m_iPlayerID
);
73
return
true
;
74
}
75
76
//------------------------------------------------------------------------------------------------
77
static
void
Encode
(
SSnapSerializerBase
snapshot,
ScriptCtx
ctx, ScriptBitSerializer packet)
78
{
79
snapshot.EncodeInt(packet);
80
}
81
82
//------------------------------------------------------------------------------------------------
83
static
bool
Decode
(ScriptBitSerializer packet,
ScriptCtx
ctx,
SSnapSerializerBase
snapshot)
84
{
85
snapshot.DecodeInt(packet);
86
return
true
;
87
}
88
89
//------------------------------------------------------------------------------------------------
90
static
bool
SnapCompare
(
SSnapSerializerBase
lhs,
SSnapSerializerBase
rhs ,
ScriptCtx
ctx)
91
{
92
return
lhs.CompareSnapshots(rhs, 4);
93
}
94
95
//------------------------------------------------------------------------------------------------
96
static
bool
PropCompare
(
SCR_TaskExecutorPlayer
instance,
SSnapSerializerBase
snapshot,
ScriptCtx
ctx)
97
{
98
return
snapshot.CompareInt(instance.
m_iPlayerID
);
99
}
100
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
SCR_FactionManager
void SCR_FactionManager(IEntitySource src, IEntity parent)
Definition
SCR_FactionManager.c:498
SCR_GroupsManagerComponent
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_GroupsManagerComponent.c:1747
Faction
Definition
Faction.c:13
FactionKey
Definition
FactionKey.c:3
SCR_AIGroup
Definition
SCR_AIGroup.c:75
SCR_AIGroup::GetGroupID
int GetGroupID()
Definition
SCR_AIGroup.c:935
SCR_TaskExecutor
Definition
SCR_TaskExecutor.c:2
SCR_TaskExecutorPlayer
Definition
SCR_TaskExecutorPlayer.c:2
SCR_TaskExecutorPlayer::Decode
static bool Decode(ScriptBitSerializer packet, ScriptCtx ctx, SSnapSerializerBase snapshot)
Definition
SCR_TaskExecutorPlayer.c:83
SCR_TaskExecutorPlayer::Encode
static void Encode(SSnapSerializerBase snapshot, ScriptCtx ctx, ScriptBitSerializer packet)
Definition
SCR_TaskExecutorPlayer.c:77
SCR_TaskExecutorPlayer::GetFactionKey
override FactionKey GetFactionKey()
Definition
SCR_TaskExecutorPlayer.c:35
SCR_TaskExecutorPlayer::Inject
static bool Inject(SSnapSerializerBase snapshot, ScriptCtx ctx, SCR_TaskExecutorPlayer instance)
Definition
SCR_TaskExecutorPlayer.c:70
SCR_TaskExecutorPlayer::GetPlayerID
int GetPlayerID()
Definition
SCR_TaskExecutorPlayer.c:23
SCR_TaskExecutorPlayer::SetPlayerID
void SetPlayerID(int playerID)
Definition
SCR_TaskExecutorPlayer.c:29
SCR_TaskExecutorPlayer::Extract
static bool Extract(SCR_TaskExecutorPlayer instance, ScriptCtx ctx, SSnapSerializerBase snapshot)
Definition
SCR_TaskExecutorPlayer.c:63
SCR_TaskExecutorPlayer::IsClonedBy
override bool IsClonedBy(SCR_TaskExecutor executor)
Definition
SCR_TaskExecutorPlayer.c:7
SCR_TaskExecutorPlayer::SnapCompare
static bool SnapCompare(SSnapSerializerBase lhs, SSnapSerializerBase rhs, ScriptCtx ctx)
Definition
SCR_TaskExecutorPlayer.c:90
SCR_TaskExecutorPlayer::GetGroupID
override int GetGroupID()
Definition
SCR_TaskExecutorPlayer.c:49
SCR_TaskExecutorPlayer::PropCompare
static bool PropCompare(SCR_TaskExecutorPlayer instance, SSnapSerializerBase snapshot, ScriptCtx ctx)
Definition
SCR_TaskExecutorPlayer.c:96
SCR_TaskExecutorPlayer::m_iPlayerID
int m_iPlayerID
Definition
SCR_TaskExecutorPlayer.c:4
SSnapSerializerBase
Definition
EnNetwork.c:269
ScriptCtx
Definition
EnNetwork.c:36
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
Tasks
Executors
SCR_TaskExecutorPlayer.c
Generated by
1.17.0