Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
FactionChatChannel.c
Go to the documentation of this file.
1
class
FactionChatChannel
:
BaseChatChannel
2
{
3
4
5
//------------------------------------------------------------------------------------------------
6
override
bool
IsDelivering(BaseChatComponent sender, BaseChatComponent receiver)
7
{
8
SCR_PlayerController
senderPC =
SCR_PlayerController
.Cast(sender.GetOwner());
9
SCR_PlayerController
receiverPC =
SCR_PlayerController
.Cast(receiver.GetOwner());
10
if
(!receiverPC || !senderPC)
11
return
false
;
12
13
SCR_FactionManager
factionManager =
SCR_FactionManager
.Cast(
GetGame
().GetFactionManager());
14
if
(!factionManager)
15
return
false
;
16
17
Faction
senderFaction = factionManager.GetPlayerFaction(senderPC.GetPlayerId());
18
Faction
receiverFaction = factionManager.GetPlayerFaction(receiverPC.GetPlayerId());
19
20
// Compare factions
21
if
(senderFaction == receiverFaction)
22
return
true
;
23
24
// Receiver faction is not the same as sender faction
25
return
false
;
26
}
27
28
29
//------------------------------------------------------------------------------------------------
30
override
bool
IsAvailable(BaseChatComponent sender)
31
{
32
33
SCR_PlayerController
senderPC =
SCR_PlayerController
.Cast(sender.GetOwner());
34
if
(!senderPC)
35
return
false
;
36
37
SCR_FactionManager
factionManager =
SCR_FactionManager
.Cast(
GetGame
().GetFactionManager());
38
if
(!factionManager)
39
return
false
;
40
41
Faction
senderFaction = factionManager.GetPlayerFaction(senderPC.GetPlayerId());
42
if
(senderFaction)
43
return
true
;
44
else
45
return
false
;
46
}
47
};
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
SCR_FactionManager
void SCR_FactionManager(IEntitySource src, IEntity parent)
Definition
SCR_FactionManager.c:498
BaseChatChannel
Definition
BaseChatChannel.c:13
FactionChatChannel
Definition
FactionChatChannel.c:2
Faction
Definition
Faction.c:13
SCR_PlayerController
Definition
SCR_PlayerController.c:31
scripts
GameCode
Network
FactionChatChannel.c
Generated by
1.17.0