Loading...
Searching...
No Matches
SCR_CampaignNetworkComponent Interface Reference

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

Inheritance diagram for SCR_CampaignNetworkComponent:

Public Member Functions

WorldTimestamp GetLastRequestTimestamp ()
 
SCR_ResourceComponent GetLastLoadedComponent ()
 
void SetLastRequestTimestamp (WorldTimestamp timestamp)
 
void RepairComposition (int index, int repairCost, int destructibleID, SCR_SiteSlotEntity slotEnt, notnull SCR_CampaignMilitaryBaseComponent base)
 Repair destroyed mandatory part of 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)
 Server side method used to send a notification to the owner of the controller on which component resides.
 
void SetLastHQRadioMessageTimestamp (WorldTimestamp time)
 
void SendVehicleSpawnHint (int hintID)
 
void RespawnLocationPopup (int baseID)
 
void OnPlayerAliveStateChanged (bool alive)
 
void PlayTaskNotificationMsg (SCR_ETaskNotification taskNotification, SCR_ETaskNotificationMsg msg, int factionId, int baseCallsign, int callerGroupId, int calledGroupId, int grid, float quality, int playerID)
 Play task notification msg.
 
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 ResetSavedSupplies ()
 
void ~SCR_CampaignNetworkComponent ()
 

Static Public Member Functions

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

Static Public Attributes

static const int SUPPLY_DELIVERY_XP_PERCENT = 100
 
static const int SUPPLY_DELIVERY_THRESHOLD_SQ = 200 * 200
 

Protected Member Functions

bool IsProxy ()
 
void RpcAsk_RepairComposition (int index, int repairCost, int destructibleID, RplId slotID, RplId baseID)
 Repair damaged entity in composition.
 
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)
 Show notification about request result to the requester.
 
void RpcDo_PlayerFeedbackValueBase (int msgID, float value, int baseID)
 Show notification about request result to the requester.
 
void RpcDo_PlayerFeedbackBase (int msgID, int baseID)
 Show notification about request result to the requester.
 
void PlayerFeedbackImpl (int msgID, float value=0, int assetID=-1, int baseID=-1)
 Show notification about request result to the requester.
 
void RpcDo_VehicleSpawnHint (int hintID)
 
void RpcDo_UpdatePlayerSpawnHint (bool show, vector position)
 
void HandleRadioRespawnTimer (RplId spawnPointId)
 
void RpcAsk_HandleRadioRespawnTimer (RplId selectedSpawnPointId)
 
void RpcDo_PlayTaskNotificationMsg (SCR_ETaskNotification taskNotification, SCR_ETaskNotificationMsg msg, int factionId, int baseCallsign, int callerGroupId, int calledGroupId, int grid, float quality)
 
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)
 
override void EOnInit (IEntity owner)
 
override void OnPostInit (IEntity owner)
 

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
 

Detailed Description

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

Constructor & Destructor Documentation

◆ ~SCR_CampaignNetworkComponent()

void SCR_CampaignNetworkComponent.~SCR_CampaignNetworkComponent ( )

Member Function Documentation

◆ CompressCallsign()

int SCR_CampaignNetworkComponent.CompressCallsign ( int company,
int platoon,
int squad,
int character )
protected

◆ DecompressCallsign()

void SCR_CampaignNetworkComponent.DecompressCallsign ( int callsign,
out int company,
out int platoon,
out int squad,
out int character )
protected

◆ EOnInit()

override void SCR_CampaignNetworkComponent.EOnInit ( IEntity owner)
protected

◆ GetCampaignNetworkComponent()

static SCR_CampaignNetworkComponent SCR_CampaignNetworkComponent.GetCampaignNetworkComponent ( int playerID)
static
Parameters
[in]playerID
Returns

◆ GetLastLoadedComponent()

SCR_ResourceComponent SCR_CampaignNetworkComponent.GetLastLoadedComponent ( )

◆ GetLastRequestTimestamp()

WorldTimestamp SCR_CampaignNetworkComponent.GetLastRequestTimestamp ( )
Returns
request cooldown

◆ GetOnSuppliesDelivered()

static ScriptInvokerInt3 SCR_CampaignNetworkComponent.GetOnSuppliesDelivered ( )
static
Returns

◆ GetOnTransferSupplies()

static ScriptInvokerTransferSupplies SCR_CampaignNetworkComponent.GetOnTransferSupplies ( )
static
Returns

◆ HandleRadioRespawnTimer()

void SCR_CampaignNetworkComponent.HandleRadioRespawnTimer ( RplId spawnPointId)
protected

◆ IsProxy()

bool SCR_CampaignNetworkComponent.IsProxy ( )
protected
Returns
if the session is run as client

◆ OnBeforePlayerInteraction()

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

Callback.

◆ OnPlayerAliveStateChanged()

void SCR_CampaignNetworkComponent.OnPlayerAliveStateChanged ( bool alive)
Parameters
[in]alive

◆ OnPlayerSuppliesInteraction()

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

◆ OnPostInit()

override void SCR_CampaignNetworkComponent.OnPostInit ( IEntity owner)
protected

◆ OnSuppliesLoaded()

void SCR_CampaignNetworkComponent.OnSuppliesLoaded ( vector position,
float amount,
notnull SCR_ResourceComponent resourceComponentTo )
protected

◆ OnSuppliesUnloaded()

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

◆ PlayerFeedbackImpl()

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

Show notification about request result to the requester.

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

◆ 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 )
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

◆ 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 )

Play task notification msg.

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

◆ RepairComposition()

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

Repair destroyed mandatory part of composition.

◆ ResetSavedSupplies()

void SCR_CampaignNetworkComponent.ResetSavedSupplies ( )

◆ RespawnLocationPopup()

void SCR_CampaignNetworkComponent.RespawnLocationPopup ( int baseID)
Parameters
[in]baseID

◆ RpcAsk_HandleRadioRespawnTimer()

void SCR_CampaignNetworkComponent.RpcAsk_HandleRadioRespawnTimer ( RplId selectedSpawnPointId)
protected

◆ RpcAsk_RepairComposition()

void SCR_CampaignNetworkComponent.RpcAsk_RepairComposition ( int index,
int repairCost,
int destructibleID,
RplId slotID,
RplId baseID )
protected

Repair damaged entity in composition.

◆ RpcDo_PlayerFeedback()

void SCR_CampaignNetworkComponent.RpcDo_PlayerFeedback ( int msgID)
protected

Show notification about request result to the requester.

Parameters
[in]msgIDMessage ID (see ECampaignClientNotificationID)

◆ RpcDo_PlayerFeedbackBase()

void SCR_CampaignNetworkComponent.RpcDo_PlayerFeedbackBase ( int msgID,
int baseID )
protected

Show notification about request result to the requester.

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

◆ RpcDo_PlayerFeedbackValueBase()

void SCR_CampaignNetworkComponent.RpcDo_PlayerFeedbackValueBase ( int msgID,
float value,
int baseID )
protected

Show notification about request result to the requester.

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

◆ RpcDo_PlayRadioMsg()

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

◆ 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 )
protected

◆ RpcDo_UpdatePlayerSpawnHint()

void SCR_CampaignNetworkComponent.RpcDo_UpdatePlayerSpawnHint ( bool show,
vector position )
protected

◆ RpcDo_VehicleSpawnHint()

void SCR_CampaignNetworkComponent.RpcDo_VehicleSpawnHint ( int hintID)
protected

◆ 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 )

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

◆ SendVehicleSpawnHint()

void SCR_CampaignNetworkComponent.SendVehicleSpawnHint ( int hintID)
Parameters
[in]hintID

◆ SetLastHQRadioMessageTimestamp()

void SCR_CampaignNetworkComponent.SetLastHQRadioMessageTimestamp ( WorldTimestamp time)
Parameters
[in]time

◆ SetLastRequestTimestamp()

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

Member Data Documentation

◆ m_bFirstSpawn

bool SCR_CampaignNetworkComponent.m_bFirstSpawn = true
protected

◆ m_bOrphanSuppliesLoaded

bool SCR_CampaignNetworkComponent.m_bOrphanSuppliesLoaded
protected

◆ m_fLastAssetRequestTimestamp

WorldTimestamp SCR_CampaignNetworkComponent.m_fLastAssetRequestTimestamp
protected

◆ m_fLastHQRadioMessageTimestamp

WorldTimestamp SCR_CampaignNetworkComponent.m_fLastHQRadioMessageTimestamp
protected

◆ m_fLoadedSupplyAmount

float SCR_CampaignNetworkComponent.m_fLoadedSupplyAmount
protected

◆ m_fNoRewardSupplies

float SCR_CampaignNetworkComponent.m_fNoRewardSupplies
protected

◆ m_iTotalSuppliesDelivered

int SCR_CampaignNetworkComponent.m_iTotalSuppliesDelivered
protected

◆ m_LastLoadedComponent

SCR_ResourceComponent SCR_CampaignNetworkComponent.m_LastLoadedComponent
protected

◆ m_PlayerController

SCR_PlayerController SCR_CampaignNetworkComponent.m_PlayerController
protected

◆ m_RplComponent

RplComponent SCR_CampaignNetworkComponent.m_RplComponent
protected

◆ m_vLastLoadedAt

vector SCR_CampaignNetworkComponent.m_vLastLoadedAt
protected

◆ s_OnSuppliesDelivered

ref ScriptInvokerInt3 SCR_CampaignNetworkComponent.s_OnSuppliesDelivered
staticprotected

◆ s_OnSuppliesTransferred

ref ScriptInvokerTransferSupplies SCR_CampaignNetworkComponent.s_OnSuppliesTransferred
staticprotected

◆ SUPPLY_DELIVERY_THRESHOLD_SQ

const int SCR_CampaignNetworkComponent.SUPPLY_DELIVERY_THRESHOLD_SQ = 200 * 200
static

◆ SUPPLY_DELIVERY_XP_PERCENT

const int SCR_CampaignNetworkComponent.SUPPLY_DELIVERY_XP_PERCENT = 100
static

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