Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_NotificationRank.c
Go to the documentation of this file.
1 
9 {
10  override string GetText(SCR_NotificationData data)
11  {
12  SCR_ECharacterRank neededRank;
13  int playerID;
14  data.GetParams(playerID, neededRank);
15 
16  data.SetNotificationTextEntries(GetPlayerRankName(playerID));
17  return super.GetText(data);
18  }
19 
20  override void SetPosition(SCR_NotificationData data)
21  {
22  if (!CanSetPosition(data))
23  return;
24 
25  int playerID;
26  data.GetParams(playerID);
27  SetPositionDataEditablePlayer(playerID, data);
28  }
29 
30  string GetPlayerRankName(int playerID)
31  {
32  PlayerManager playerManager = GetGame().GetPlayerManager();
33  if (!playerManager)
34  return string.Empty;
35 
36  IEntity ent = playerManager.GetPlayerControlledEntity(playerID);
37  if (!ent)
38  return string.Empty;
39 
41  if (!rankComponent)
42  return string.Empty;
43 
44  return rankComponent.GetCharacterRankName(ent);
45  }
46 };
SCR_NotificationDisplayData
Definition: SCR_NotificationDisplayData.c:7
SCR_BaseContainerCustomTitleEnum
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
Definition: SCR_CampaignHintStorage.c:22
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_ECharacterRank
SCR_ECharacterRank
Definition: SCR_CharacterRankComponent.c:305
SCR_CharacterRankComponent
void SCR_CharacterRankComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_CharacterRankComponent.c:209
ENotification
ENotification
Definition: ENotification.c:4
SCR_NotificationRank
Definition: SCR_NotificationRank.c:8
SCR_NotificationData
Definition: SCR_NotificationData.c:6
data
Get all prefabs that have the spawner data
Definition: SCR_EntityCatalogManagerComponent.c:305
PlayerManager
Definition: PlayerManager.c:12
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468