M&B: Bannerlord 1.0.0
The horns sound, the ravens gather.
Loading...
Searching...
No Matches
TaleWorlds.Core.VirtualPlayer Class Reference

Public Member Functions

 VirtualPlayer (int index, string name, PlayerId playerID, ICommunicator communicator)
 
AddComponent< T > ()
 
PeerComponent AddComponent (Type peerComponentType)
 
PeerComponent AddComponent (uint componentId)
 
PeerComponent GetComponent (uint componentId)
 
GetComponent< T > ()
 
PeerComponent GetComponent (Type peerComponentType)
 
void RemoveComponent< T > (bool synched=true)
 
void RemoveComponent (PeerComponent component)
 
void OnDisconnect ()
 
void SynchronizeComponentsTo (VirtualPlayer peer)
 
void UpdateIndexForReconnectingPlayer (int playerIndex)
 

Static Public Member Functions

static List< T > Peers< T > ()
 
static void Reset ()
 

Public Attributes

readonly ICommunicator Communicator
 
Dictionary< int, List< int > > UsedCosmetics
 

Properties

static Dictionary< Type, object > PeerComponents [get]
 
string BannerCode [get, set]
 
BodyProperties BodyProperties [get, set]
 
int Race [get, set]
 
bool IsFemale [get, set]
 
PlayerId Id [get, set]
 
int Index [get]
 
bool IsMine [get]
 
string UserName [get]
 Platform provided (GDK, Steam, etc.) name of the peer. Used in logging. MissionPeer.DisplayedName is used to display the name in game. More...
 
int ChosenBadgeIndex [get, set]
 

Constructor & Destructor Documentation

◆ VirtualPlayer()

TaleWorlds.Core.VirtualPlayer.VirtualPlayer ( int  index,
string  name,
PlayerId  playerID,
ICommunicator  communicator 
)

Member Function Documentation

◆ Peers< T >()

static List< T > TaleWorlds.Core.VirtualPlayer.Peers< T > ( )
static
Type Constraints
T :PeerComponent 

◆ Reset()

static void TaleWorlds.Core.VirtualPlayer.Reset ( )
static

◆ AddComponent< T >()

Type Constraints
T :PeerComponent 
T :new() 

◆ AddComponent() [1/2]

PeerComponent TaleWorlds.Core.VirtualPlayer.AddComponent ( Type  peerComponentType)

◆ AddComponent() [2/2]

PeerComponent TaleWorlds.Core.VirtualPlayer.AddComponent ( uint  componentId)

◆ GetComponent() [1/2]

PeerComponent TaleWorlds.Core.VirtualPlayer.GetComponent ( uint  componentId)

◆ GetComponent< T >()

Type Constraints
T :PeerComponent 

◆ GetComponent() [2/2]

PeerComponent TaleWorlds.Core.VirtualPlayer.GetComponent ( Type  peerComponentType)

◆ RemoveComponent< T >()

void TaleWorlds.Core.VirtualPlayer.RemoveComponent< T > ( bool  synched = true)
Type Constraints
T :PeerComponent 

◆ RemoveComponent()

void TaleWorlds.Core.VirtualPlayer.RemoveComponent ( PeerComponent  component)

◆ OnDisconnect()

void TaleWorlds.Core.VirtualPlayer.OnDisconnect ( )

◆ SynchronizeComponentsTo()

void TaleWorlds.Core.VirtualPlayer.SynchronizeComponentsTo ( VirtualPlayer  peer)

◆ UpdateIndexForReconnectingPlayer()

void TaleWorlds.Core.VirtualPlayer.UpdateIndexForReconnectingPlayer ( int  playerIndex)

Member Data Documentation

◆ Communicator

readonly ICommunicator TaleWorlds.Core.VirtualPlayer.Communicator

◆ UsedCosmetics

Dictionary<int, List<int> > TaleWorlds.Core.VirtualPlayer.UsedCosmetics

Property Documentation

◆ PeerComponents

Dictionary<Type, object> TaleWorlds.Core.VirtualPlayer.PeerComponents
staticget

◆ BannerCode

string TaleWorlds.Core.VirtualPlayer.BannerCode
getset

◆ BodyProperties

BodyProperties TaleWorlds.Core.VirtualPlayer.BodyProperties
getset

◆ Race

int TaleWorlds.Core.VirtualPlayer.Race
getset

◆ IsFemale

bool TaleWorlds.Core.VirtualPlayer.IsFemale
getset

◆ Id

PlayerId TaleWorlds.Core.VirtualPlayer.Id
getset

◆ Index

int TaleWorlds.Core.VirtualPlayer.Index
get

◆ IsMine

bool TaleWorlds.Core.VirtualPlayer.IsMine
get

◆ UserName

string TaleWorlds.Core.VirtualPlayer.UserName
get

◆ ChosenBadgeIndex

int TaleWorlds.Core.VirtualPlayer.ChosenBadgeIndex
getset