Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_CampaignNetworkComponent Class Reference

Takes care of Campaign-specific server <> client communication and requests. More...

Inheritance diagram for SCR_CampaignNetworkComponent:
ScriptComponent

Protected Member Functions

WorldTimestamp GetLastRequestTimestamp ()
SCR_ResourceComponent GetLastLoadedComponent ()
void SetLastRequestTimestamp (WorldTimestamp timestamp)
bool IsProxy ()
void RepairComposition (int index, int repairCost, int destructibleID, SCR_SiteSlotEntity slotEnt, notnull SCR_CampaignMilitaryBaseComponent base)
 Repair destroyed mandatory part of composition.
void RpcAsk_RepairComposition (int index, int repairCost, int destructibleID, RplId slotID, RplId baseID)
 Repair damaged entity in composition.
void SendPlayerMessage (SCR_ERadioMsg msgType, int baseCallsign=SCR_MilitaryBaseComponent.INVALID_BASE_CALLSIGN, int calledID=SCR_CampaignMilitaryBaseComponent.INVALID_PLAYER_INDEX, bool public=true, int param=SCR_CampaignRadioMsg.INVALID_RADIO_MSG_PARAM, bool checkHQReached=false)
void SetLastHQRadioMessageTimestamp (WorldTimestamp time)
int CompressCallsign (int company, int platoon, int squad, int character)
void DecompressCallsign (int callsign, out int company, out int platoon, out int squad, out int character)
void RpcDo_PlayerFeedback (int msgID)
void RpcDo_PlayerFeedbackValueBase (int msgID, float value, int baseID)
void RpcDo_PlayerFeedbackBase (int msgID, int baseID)
void PlayerFeedbackImpl (int msgID, float value=0, int assetID=-1, int baseID=-1)
void SendVehicleSpawnHint (int hintID)
void RpcDo_VehicleSpawnHint (int hintID)
void RespawnLocationPopup (int baseID)
void OnPlayerAliveStateChanged (bool alive)
void RpcDo_UpdatePlayerSpawnHint (bool show, vector position)
void HandleRadioRespawnTimer (RplId spawnPointId)
void RpcAsk_HandleRadioRespawnTimer (RplId selectedSpawnPointId)
void PlayTaskNotificationMsg (SCR_ETaskNotification taskNotification, SCR_ETaskNotificationMsg msg, int factionId, int baseCallsign, int callerGroupId, int calledGroupId, int grid, float quality, int playerID)
void RpcDo_PlayTaskNotificationMsg (SCR_ETaskNotification taskNotification, SCR_ETaskNotificationMsg msg, int factionId, int baseCallsign, int callerGroupId, int calledGroupId, int grid, float quality)
void PlayRadioMsg (SCR_ERadioMsg msg, int FactionId, int baseCallsign, int callerCallsignCompany, int callerCallsignPlatoon, int callerCallsignSquad, int callerCallsignCharacter, int calledCallsignCompany, int calledCallsignPlatoon, int calledCallsignSquad, int calledCallsignCharacter, bool isPublic, int param, float seed, float quality, int playerID)
void RpcDo_PlayRadioMsg (SCR_ERadioMsg msg, int factionId, int baseCallsign, int callerCallsign, int calledCallsign, int param, float seed, float quality)
void OnBeforePlayerInteraction (EResourcePlayerInteractionType interactionType, PlayerController playerController, SCR_ResourceComponent resourceComponentFrom, SCR_ResourceComponent resourceComponentTo, EResourceType resourceType, float resourceValue)
 Callback.
void OnPlayerSuppliesInteraction (EResourcePlayerInteractionType interactionType, PlayerController playerController, SCR_ResourceComponent resourceComponentFrom, SCR_ResourceComponent resourceComponentTo, EResourceType resourceType, float resourceValue)
void OnSuppliesLoaded (vector position, float amount, notnull SCR_ResourceComponent resourceComponentTo)
void OnSuppliesUnloaded (vector position, float amount, int playerId, notnull SCR_ResourceComponent resourceComponentFrom, int assistantId=0)
void ResetSavedSupplies ()
void EOnInit (IEntity owner)
void OnPostInit (IEntity owner)
void ~SCR_CampaignNetworkComponent ()

Static Protected Member Functions

static SCR_CampaignNetworkComponent GetCampaignNetworkComponent (int playerID)
static ScriptInvokerInt3 GetOnSuppliesDelivered ()
static ScriptInvokerTransferSupplies GetOnTransferSupplies ()

Protected Attributes

SCR_PlayerController m_PlayerController
RplComponent m_RplComponent
bool m_bFirstSpawn = true
vector m_vLastLoadedAt
SCR_ResourceComponent m_LastLoadedComponent
float m_fLoadedSupplyAmount
bool m_bOrphanSuppliesLoaded
float m_fNoRewardSupplies
int m_iTotalSuppliesDelivered
WorldTimestamp m_fLastAssetRequestTimestamp
WorldTimestamp m_fLastHQRadioMessageTimestamp

Static Protected Attributes

static ref ScriptInvokerInt3 s_OnSuppliesDelivered
static ref ScriptInvokerTransferSupplies s_OnSuppliesTransferred
static const int SUPPLY_DELIVERY_XP_PERCENT = 100
static const int SUPPLY_DELIVERY_THRESHOLD_SQ = 200 * 200

Detailed Description

Takes care of Campaign-specific server <> client communication and requests.

Definition at line 24 of file SCR_CampaignNetworkComponent.c.

Constructor & Destructor Documentation

◆ ~SCR_CampaignNetworkComponent()

void SCR_CampaignNetworkComponent::~SCR_CampaignNetworkComponent ( )
inlineprotected

Definition at line 890 of file SCR_CampaignNetworkComponent.c.

Member Function Documentation

◆ CompressCallsign()

int SCR_CampaignNetworkComponent::CompressCallsign ( int company,
int platoon,
int squad,
int character )
inlineprotected

Definition at line 284 of file SCR_CampaignNetworkComponent.c.

◆ DecompressCallsign()

void SCR_CampaignNetworkComponent::DecompressCallsign ( int callsign,
out int company,
out int platoon,
out int squad,
out int character )
inlineprotected

Definition at line 290 of file SCR_CampaignNetworkComponent.c.

◆ EOnInit()

void SCR_CampaignNetworkComponent::EOnInit ( IEntity owner)
inlineprotected

Definition at line 854 of file SCR_CampaignNetworkComponent.c.

◆ GetCampaignNetworkComponent()

SCR_CampaignNetworkComponent SCR_CampaignNetworkComponent::GetCampaignNetworkComponent ( int playerID)
inlinestaticprotected
Parameters
[in]playerID
Returns

Definition at line 59 of file SCR_CampaignNetworkComponent.c.

◆ GetLastLoadedComponent()

SCR_ResourceComponent SCR_CampaignNetworkComponent::GetLastLoadedComponent ( )
inlineprotected

Definition at line 83 of file SCR_CampaignNetworkComponent.c.

◆ GetLastRequestTimestamp()

WorldTimestamp SCR_CampaignNetworkComponent::GetLastRequestTimestamp ( )
inlineprotected
Returns
request cooldown

Definition at line 77 of file SCR_CampaignNetworkComponent.c.

◆ GetOnSuppliesDelivered()

ScriptInvokerInt3 SCR_CampaignNetworkComponent::GetOnSuppliesDelivered ( )
inlinestaticprotected
Returns

Definition at line 101 of file SCR_CampaignNetworkComponent.c.

◆ GetOnTransferSupplies()

ScriptInvokerTransferSupplies SCR_CampaignNetworkComponent::GetOnTransferSupplies ( )
inlinestaticprotected
Returns

Definition at line 111 of file SCR_CampaignNetworkComponent.c.

◆ HandleRadioRespawnTimer()

void SCR_CampaignNetworkComponent::HandleRadioRespawnTimer ( RplId spawnPointId)
inlineprotected

Definition at line 529 of file SCR_CampaignNetworkComponent.c.

◆ IsProxy()

bool SCR_CampaignNetworkComponent::IsProxy ( )
inlineprotected
Returns
if the session is run as client

Definition at line 121 of file SCR_CampaignNetworkComponent.c.

◆ OnBeforePlayerInteraction()

void SCR_CampaignNetworkComponent::OnBeforePlayerInteraction ( EResourcePlayerInteractionType interactionType,
PlayerController playerController,
SCR_ResourceComponent resourceComponentFrom,
SCR_ResourceComponent resourceComponentTo,
EResourceType resourceType,
float resourceValue )
inlineprotected

Callback.

Definition at line 666 of file SCR_CampaignNetworkComponent.c.

◆ OnPlayerAliveStateChanged()

void SCR_CampaignNetworkComponent::OnPlayerAliveStateChanged ( bool alive)
inlineprotected
Parameters
[in]alive

Definition at line 486 of file SCR_CampaignNetworkComponent.c.

◆ OnPlayerSuppliesInteraction()

void SCR_CampaignNetworkComponent::OnPlayerSuppliesInteraction ( EResourcePlayerInteractionType interactionType,
PlayerController playerController,
SCR_ResourceComponent resourceComponentFrom,
SCR_ResourceComponent resourceComponentTo,
EResourceType resourceType,
float resourceValue )
inlineprotected
Parameters
[in]interactionType
[in]playerController
[in]resourceComponentFrom
[in]resourceComponentTo
[in]resourceType
[in]resourceValue

Definition at line 687 of file SCR_CampaignNetworkComponent.c.

◆ OnPostInit()

void SCR_CampaignNetworkComponent::OnPostInit ( IEntity owner)
inlineprotected

Definition at line 882 of file SCR_CampaignNetworkComponent.c.

◆ OnSuppliesLoaded()

void SCR_CampaignNetworkComponent::OnSuppliesLoaded ( vector position,
float amount,
notnull SCR_ResourceComponent resourceComponentTo )
inlineprotected

Definition at line 730 of file SCR_CampaignNetworkComponent.c.

◆ OnSuppliesUnloaded()

void SCR_CampaignNetworkComponent::OnSuppliesUnloaded ( vector position,
float amount,
int playerId,
notnull SCR_ResourceComponent resourceComponentFrom,
int assistantId = 0 )
inlineprotected

Definition at line 774 of file SCR_CampaignNetworkComponent.c.

◆ PlayerFeedbackImpl()

void SCR_CampaignNetworkComponent::PlayerFeedbackImpl ( int msgID,
float value = 0,
int assetID = -1,
int baseID = -1 )
inlineprotected

Show notification about request result to the requester

Parameters
[in]msgIDMessage ID (see ECampaignClientNotificationID)
[in]value
[in]assetID
[in]baseID

Definition at line 341 of file SCR_CampaignNetworkComponent.c.

◆ PlayRadioMsg()

void SCR_CampaignNetworkComponent::PlayRadioMsg ( SCR_ERadioMsg msg,
int FactionId,
int baseCallsign,
int callerCallsignCompany,
int callerCallsignPlatoon,
int callerCallsignSquad,
int callerCallsignCharacter,
int calledCallsignCompany,
int calledCallsignPlatoon,
int calledCallsignSquad,
int calledCallsignCharacter,
bool isPublic,
int param,
float seed,
float quality,
int playerID )
inlineprotected
Parameters
[in]msg
[in]FactionId
[in]baseCallsign
[in]callerCallsignCompany
[in]callerCallsignPlatoon
[in]callerCallsignSquad
[in]callerCallsignCharacter
[in]calledCallsignCompany
[in]calledCallsignPlatoon
[in]calledCallsignSquad
[in]calledCallsignCharacter
[in]isPublic
[in]param
[in]seed
[in]quality
[in]playerID

Definition at line 631 of file SCR_CampaignNetworkComponent.c.

◆ PlayTaskNotificationMsg()

void SCR_CampaignNetworkComponent::PlayTaskNotificationMsg ( SCR_ETaskNotification taskNotification,
SCR_ETaskNotificationMsg msg,
int factionId,
int baseCallsign,
int callerGroupId,
int calledGroupId,
int grid,
float quality,
int playerID )
inlineprotected

Play task notification msg

Parameters
[in]taskNotification
[in]msg
[in]factionId
[in]baseCallsign
[in]callerGroupId
[in]calledGroupId
[in]grid
[in]quality
[in]playerID

Definition at line 592 of file SCR_CampaignNetworkComponent.c.

◆ RepairComposition()

void SCR_CampaignNetworkComponent::RepairComposition ( int index,
int repairCost,
int destructibleID,
SCR_SiteSlotEntity slotEnt,
notnull SCR_CampaignMilitaryBaseComponent base )
inlineprotected

Repair destroyed mandatory part of composition.

Definition at line 128 of file SCR_CampaignNetworkComponent.c.

◆ ResetSavedSupplies()

void SCR_CampaignNetworkComponent::ResetSavedSupplies ( )
inlineprotected

Definition at line 845 of file SCR_CampaignNetworkComponent.c.

◆ RespawnLocationPopup()

void SCR_CampaignNetworkComponent::RespawnLocationPopup ( int baseID)
inlineprotected
Parameters
[in]baseID

Definition at line 479 of file SCR_CampaignNetworkComponent.c.

◆ RpcAsk_HandleRadioRespawnTimer()

void SCR_CampaignNetworkComponent::RpcAsk_HandleRadioRespawnTimer ( RplId selectedSpawnPointId)
inlineprotected

Definition at line 541 of file SCR_CampaignNetworkComponent.c.

◆ RpcAsk_RepairComposition()

void SCR_CampaignNetworkComponent::RpcAsk_RepairComposition ( int index,
int repairCost,
int destructibleID,
RplId slotID,
RplId baseID )
inlineprotected

Repair damaged entity in composition.

Definition at line 142 of file SCR_CampaignNetworkComponent.c.

◆ RpcDo_PlayerFeedback()

void SCR_CampaignNetworkComponent::RpcDo_PlayerFeedback ( int msgID)
inlineprotected

Show notification about request result to the requester

Parameters
[in]msgIDMessage ID (see ECampaignClientNotificationID)

Definition at line 308 of file SCR_CampaignNetworkComponent.c.

◆ RpcDo_PlayerFeedbackBase()

void SCR_CampaignNetworkComponent::RpcDo_PlayerFeedbackBase ( int msgID,
int baseID )
inlineprotected

Show notification about request result to the requester

Parameters
[in]msgIDMessage ID (see ECampaignClientNotificationID)
[in]baseID

Definition at line 330 of file SCR_CampaignNetworkComponent.c.

◆ RpcDo_PlayerFeedbackValueBase()

void SCR_CampaignNetworkComponent::RpcDo_PlayerFeedbackValueBase ( int msgID,
float value,
int baseID )
inlineprotected

Show notification about request result to the requester

Parameters
[in]msgIDMessage ID (see ECampaignClientNotificationID)
[in]value
[in]baseID

Definition at line 319 of file SCR_CampaignNetworkComponent.c.

◆ RpcDo_PlayRadioMsg()

void SCR_CampaignNetworkComponent::RpcDo_PlayRadioMsg ( SCR_ERadioMsg msg,
int factionId,
int baseCallsign,
int callerCallsign,
int calledCallsign,
int param,
float seed,
float quality )
inlineprotected
Parameters
[in]msg
[in]factionId
[in]baseCallsign
[in]callerCallsign
[in]calledCallsign
[in]param
[in]seed
[in]quality

Definition at line 648 of file SCR_CampaignNetworkComponent.c.

◆ RpcDo_PlayTaskNotificationMsg()

void SCR_CampaignNetworkComponent::RpcDo_PlayTaskNotificationMsg ( SCR_ETaskNotification taskNotification,
SCR_ETaskNotificationMsg msg,
int factionId,
int baseCallsign,
int callerGroupId,
int calledGroupId,
int grid,
float quality )
inlineprotected

Definition at line 604 of file SCR_CampaignNetworkComponent.c.

◆ RpcDo_UpdatePlayerSpawnHint()

void SCR_CampaignNetworkComponent::RpcDo_UpdatePlayerSpawnHint ( bool show,
vector position )
inlineprotected

Definition at line 522 of file SCR_CampaignNetworkComponent.c.

◆ RpcDo_VehicleSpawnHint()

void SCR_CampaignNetworkComponent::RpcDo_VehicleSpawnHint ( int hintID)
inlineprotected

Definition at line 466 of file SCR_CampaignNetworkComponent.c.

◆ SendPlayerMessage()

void SCR_CampaignNetworkComponent::SendPlayerMessage ( SCR_ERadioMsg msgType,
int baseCallsign = SCR_MilitaryBaseComponent.INVALID_BASE_CALLSIGN,
int calledID = SCR_CampaignMilitaryBaseComponent.INVALID_PLAYER_INDEX,
bool public = true,
int param = SCR_CampaignRadioMsg.INVALID_RADIO_MSG_PARAM,
bool checkHQReached = false )
inlineprotected

Server side method used to send a notification to the owner of the controller on which component resides

Parameters
[in]msgType
[in]baseCallsign
[in]calledID
[in]public
[in]param
[in]checkHQReached

Definition at line 200 of file SCR_CampaignNetworkComponent.c.

◆ SendVehicleSpawnHint()

void SCR_CampaignNetworkComponent::SendVehicleSpawnHint ( int hintID)
inlineprotected
Parameters
[in]hintID

Definition at line 459 of file SCR_CampaignNetworkComponent.c.

◆ SetLastHQRadioMessageTimestamp()

void SCR_CampaignNetworkComponent::SetLastHQRadioMessageTimestamp ( WorldTimestamp time)
inlineprotected
Parameters
[in]time

Definition at line 277 of file SCR_CampaignNetworkComponent.c.

◆ SetLastRequestTimestamp()

void SCR_CampaignNetworkComponent::SetLastRequestTimestamp ( WorldTimestamp timestamp)
inlineprotected
Parameters
[in]requestcooldown timestamp

Definition at line 90 of file SCR_CampaignNetworkComponent.c.

Member Data Documentation

◆ m_bFirstSpawn

bool SCR_CampaignNetworkComponent::m_bFirstSpawn = true
protected

Definition at line 29 of file SCR_CampaignNetworkComponent.c.

◆ m_bOrphanSuppliesLoaded

bool SCR_CampaignNetworkComponent::m_bOrphanSuppliesLoaded
protected

Definition at line 34 of file SCR_CampaignNetworkComponent.c.

◆ m_fLastAssetRequestTimestamp

WorldTimestamp SCR_CampaignNetworkComponent::m_fLastAssetRequestTimestamp
protected

Definition at line 51 of file SCR_CampaignNetworkComponent.c.

◆ m_fLastHQRadioMessageTimestamp

WorldTimestamp SCR_CampaignNetworkComponent::m_fLastHQRadioMessageTimestamp
protected

Definition at line 54 of file SCR_CampaignNetworkComponent.c.

◆ m_fLoadedSupplyAmount

float SCR_CampaignNetworkComponent::m_fLoadedSupplyAmount
protected

Definition at line 33 of file SCR_CampaignNetworkComponent.c.

◆ m_fNoRewardSupplies

float SCR_CampaignNetworkComponent::m_fNoRewardSupplies
protected

Definition at line 36 of file SCR_CampaignNetworkComponent.c.

◆ m_iTotalSuppliesDelivered

int SCR_CampaignNetworkComponent::m_iTotalSuppliesDelivered
protected

Definition at line 38 of file SCR_CampaignNetworkComponent.c.

◆ m_LastLoadedComponent

SCR_ResourceComponent SCR_CampaignNetworkComponent::m_LastLoadedComponent
protected

Definition at line 32 of file SCR_CampaignNetworkComponent.c.

◆ m_PlayerController

SCR_PlayerController SCR_CampaignNetworkComponent::m_PlayerController
protected

Definition at line 27 of file SCR_CampaignNetworkComponent.c.

◆ m_RplComponent

RplComponent SCR_CampaignNetworkComponent::m_RplComponent
protected

Definition at line 28 of file SCR_CampaignNetworkComponent.c.

◆ m_vLastLoadedAt

vector SCR_CampaignNetworkComponent::m_vLastLoadedAt
protected

Definition at line 31 of file SCR_CampaignNetworkComponent.c.

◆ s_OnSuppliesDelivered

ref ScriptInvokerInt3 SCR_CampaignNetworkComponent::s_OnSuppliesDelivered
staticprotected

Definition at line 40 of file SCR_CampaignNetworkComponent.c.

◆ s_OnSuppliesTransferred

ref ScriptInvokerTransferSupplies SCR_CampaignNetworkComponent::s_OnSuppliesTransferred
staticprotected

Definition at line 41 of file SCR_CampaignNetworkComponent.c.

◆ SUPPLY_DELIVERY_THRESHOLD_SQ

const int SCR_CampaignNetworkComponent::SUPPLY_DELIVERY_THRESHOLD_SQ = 200 * 200
staticprotected

Definition at line 44 of file SCR_CampaignNetworkComponent.c.

◆ SUPPLY_DELIVERY_XP_PERCENT

const int SCR_CampaignNetworkComponent::SUPPLY_DELIVERY_XP_PERCENT = 100
staticprotected

Definition at line 43 of file SCR_CampaignNetworkComponent.c.


The documentation for this class was generated from the following file: