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

Inherits TaleWorlds.Library.ViewModel.

Inherited by TaleWorlds.CampaignSystem.ViewModelCollection.HeroViewModel, and TaleWorlds.Core.ViewModelCollection.CharacterWithActionViewModel.

Public Types

enum  StanceTypes {
  None = 0 ,
  EmphasizeFace ,
  SideView ,
  CelebrateVictory ,
  OnMount
}
 

Public Member Functions

 CharacterViewModel ()
 
 CharacterViewModel (StanceTypes stance=StanceTypes.None)
 
void SetEquipment (EquipmentIndex index, EquipmentElement item)
 
virtual void SetEquipment (Equipment equipment)
 
void FillFrom (BasicCharacterObject character, int seed=-1)
 
void FillFrom (CharacterViewModel characterViewModel, int seed=-1)
 
void ExecuteEquipWeaponAtIndex (EquipmentIndex index, bool isLeftHand)
 
void ExecuteStartCustomAnimation (string animation, bool loop=false, float loopInterval=0f)
 
void ExecuteStopCustomAnimation ()
 
- Public Member Functions inherited from TaleWorlds.Library.ViewModel
void OnPropertyChanged ([CallerMemberName] string propertyName=null)
 Method for notifying binded views about the changes in a property. Uses reflection to get the value of the property. If reflection is not needed or updated value of the property is already known, use OnPropertyChangedWithValue() instead.
 
void OnPropertyChangedWithValue< T > (T value, [CallerMemberName]string propertyName=null)
 Faster method for notifying binded views about the changes in a property. To avoid reflection, caller can pass changed value to this method. If caller does not have access rights to the value, use OnPropertyChanged() instead.
 
void OnPropertyChangedWithValue (bool value, [CallerMemberName] string propertyName=null)
 
void OnPropertyChangedWithValue (int value, [CallerMemberName] string propertyName=null)
 
void OnPropertyChangedWithValue (float value, [CallerMemberName] string propertyName=null)
 
void OnPropertyChangedWithValue (uint value, [CallerMemberName] string propertyName=null)
 
void OnPropertyChangedWithValue (Color value, [CallerMemberName] string propertyName=null)
 
void OnPropertyChangedWithValue (double value, [CallerMemberName] string propertyName=null)
 
void OnPropertyChangedWithValue (Vec2 value, [CallerMemberName] string propertyName=null)
 
object GetViewModelAtPath (BindingPath path, bool isList)
 
object GetViewModelAtPath (BindingPath path)
 
object GetPropertyValue (string name, PropertyTypeFeeder propertyTypeFeeder)
 
object GetPropertyValue (string name)
 
Type GetPropertyType (string name)
 
void SetPropertyValue (string name, object value)
 
virtual void OnFinalize ()
 
void ExecuteCommand (string commandName, object[] parameters)
 
virtual void RefreshValues ()
 Used for updating localized texts.
 
object GetViewModelAtPath (BindingPath path)
 
object GetViewModelAtPath (BindingPath path, bool isList)
 
object GetPropertyValue (string name)
 
object GetPropertyValue (string name, PropertyTypeFeeder propertyTypeFeeder)
 
void SetPropertyValue (string name, object value)
 
void ExecuteCommand (string commandName, object[] parameters)
 

Static Public Attributes

static Action< CharacterViewModelOnCustomAnimationFinished
 
- Static Public Attributes inherited from TaleWorlds.Library.ViewModel
static bool UIDebugMode
 

Protected Attributes

Equipment _equipment
 
string _bannerCode
 

Properties

string BannerCodeText [get, set]
 
string BodyProperties [get, set]
 
string MountCreationKey [get, set]
 
string CharStringId [get, set]
 
string CustomAnimation [get, set]
 
int StanceIndex [get]
 
bool IsFemale [get, set]
 
bool IsHidden [get, set]
 
bool IsPlayingCustomAnimations [get, set]
 
bool ShouldLoopCustomAnimation [get, set]
 
float CustomAnimationProgressRatio [get, set]
 
float CustomAnimationWaitDuration [get, set]
 
int Race [get, set]
 
bool HasMount [get, set]
 
string EquipmentCode [get, set]
 
string IdleAction [get, set]
 
string IdleFaceAnim [get, set]
 
uint ArmorColor1 [get, set]
 
uint ArmorColor2 [get, set]
 
int LeftHandWieldedEquipmentIndex [get, set]
 
int RightHandWieldedEquipmentIndex [get, set]
 
- Properties inherited from TaleWorlds.Library.ViewModel
PropertyChangedEventHandler PropertyChanged
 
PropertyChangedWithValueEventHandler PropertyChangedWithValue
 
PropertyChangedWithBoolValueEventHandler PropertyChangedWithBoolValue
 
PropertyChangedWithIntValueEventHandler PropertyChangedWithIntValue
 
PropertyChangedWithFloatValueEventHandler PropertyChangedWithFloatValue
 
PropertyChangedWithUIntValueEventHandler PropertyChangedWithUIntValue
 
PropertyChangedWithColorValueEventHandler PropertyChangedWithColorValue
 
PropertyChangedWithDoubleValueEventHandler PropertyChangedWithDoubleValue
 
PropertyChangedWithVec2ValueEventHandler PropertyChangedWithVec2Value
 

Additional Inherited Members

- Static Public Member Functions inherited from TaleWorlds.Library.ViewModel
static void CollectPropertiesAndMethods ()
 
- Protected Member Functions inherited from TaleWorlds.Library.ViewModel
 ViewModel ()
 
bool SetField< T > (ref T field, T value, string propertyName)
 
- Events inherited from TaleWorlds.Library.IViewModel
PropertyChangedWithValueEventHandler PropertyChangedWithValue
 
PropertyChangedWithBoolValueEventHandler PropertyChangedWithBoolValue
 
PropertyChangedWithIntValueEventHandler PropertyChangedWithIntValue
 
PropertyChangedWithFloatValueEventHandler PropertyChangedWithFloatValue
 
PropertyChangedWithUIntValueEventHandler PropertyChangedWithUIntValue
 
PropertyChangedWithColorValueEventHandler PropertyChangedWithColorValue
 
PropertyChangedWithDoubleValueEventHandler PropertyChangedWithDoubleValue
 
PropertyChangedWithVec2ValueEventHandler PropertyChangedWithVec2Value
 

Member Enumeration Documentation

◆ StanceTypes

Enumerator
None 
EmphasizeFace 
SideView 
CelebrateVictory 
OnMount 

Constructor & Destructor Documentation

◆ CharacterViewModel() [1/2]

TaleWorlds.Core.ViewModelCollection.CharacterViewModel.CharacterViewModel ( )

◆ CharacterViewModel() [2/2]

TaleWorlds.Core.ViewModelCollection.CharacterViewModel.CharacterViewModel ( StanceTypes  stance = StanceTypes::None)

Member Function Documentation

◆ SetEquipment() [1/2]

void TaleWorlds.Core.ViewModelCollection.CharacterViewModel.SetEquipment ( EquipmentIndex  index,
EquipmentElement  item 
)

◆ SetEquipment() [2/2]

virtual void TaleWorlds.Core.ViewModelCollection.CharacterViewModel.SetEquipment ( Equipment  equipment)
virtual

◆ FillFrom() [1/2]

void TaleWorlds.Core.ViewModelCollection.CharacterViewModel.FillFrom ( BasicCharacterObject  character,
int  seed = -1 
)

◆ FillFrom() [2/2]

void TaleWorlds.Core.ViewModelCollection.CharacterViewModel.FillFrom ( CharacterViewModel  characterViewModel,
int  seed = -1 
)

◆ ExecuteEquipWeaponAtIndex()

void TaleWorlds.Core.ViewModelCollection.CharacterViewModel.ExecuteEquipWeaponAtIndex ( EquipmentIndex  index,
bool  isLeftHand 
)

◆ ExecuteStartCustomAnimation()

void TaleWorlds.Core.ViewModelCollection.CharacterViewModel.ExecuteStartCustomAnimation ( string  animation,
bool  loop = false,
float  loopInterval = 0f 
)

◆ ExecuteStopCustomAnimation()

void TaleWorlds.Core.ViewModelCollection.CharacterViewModel.ExecuteStopCustomAnimation ( )

Member Data Documentation

◆ OnCustomAnimationFinished

Action<CharacterViewModel> TaleWorlds.Core.ViewModelCollection.CharacterViewModel.OnCustomAnimationFinished
static

◆ _equipment

Equipment TaleWorlds.Core.ViewModelCollection.CharacterViewModel._equipment
protected

◆ _bannerCode

string TaleWorlds.Core.ViewModelCollection.CharacterViewModel._bannerCode
protected

Property Documentation

◆ BannerCodeText

string TaleWorlds.Core.ViewModelCollection.CharacterViewModel.BannerCodeText
getset

◆ BodyProperties

string TaleWorlds.Core.ViewModelCollection.CharacterViewModel.BodyProperties
getset

◆ MountCreationKey

string TaleWorlds.Core.ViewModelCollection.CharacterViewModel.MountCreationKey
getset

◆ CharStringId

string TaleWorlds.Core.ViewModelCollection.CharacterViewModel.CharStringId
getset

◆ CustomAnimation

string TaleWorlds.Core.ViewModelCollection.CharacterViewModel.CustomAnimation
getset

◆ StanceIndex

int TaleWorlds.Core.ViewModelCollection.CharacterViewModel.StanceIndex
get

◆ IsFemale

bool TaleWorlds.Core.ViewModelCollection.CharacterViewModel.IsFemale
getset

◆ IsHidden

bool TaleWorlds.Core.ViewModelCollection.CharacterViewModel.IsHidden
getset

◆ IsPlayingCustomAnimations

bool TaleWorlds.Core.ViewModelCollection.CharacterViewModel.IsPlayingCustomAnimations
getset

◆ ShouldLoopCustomAnimation

bool TaleWorlds.Core.ViewModelCollection.CharacterViewModel.ShouldLoopCustomAnimation
getset

◆ CustomAnimationProgressRatio

float TaleWorlds.Core.ViewModelCollection.CharacterViewModel.CustomAnimationProgressRatio
getset

◆ CustomAnimationWaitDuration

float TaleWorlds.Core.ViewModelCollection.CharacterViewModel.CustomAnimationWaitDuration
getset

◆ Race

int TaleWorlds.Core.ViewModelCollection.CharacterViewModel.Race
getset

◆ HasMount

bool TaleWorlds.Core.ViewModelCollection.CharacterViewModel.HasMount
getset

◆ EquipmentCode

string TaleWorlds.Core.ViewModelCollection.CharacterViewModel.EquipmentCode
getset

◆ IdleAction

string TaleWorlds.Core.ViewModelCollection.CharacterViewModel.IdleAction
getset

◆ IdleFaceAnim

string TaleWorlds.Core.ViewModelCollection.CharacterViewModel.IdleFaceAnim
getset

◆ ArmorColor1

uint TaleWorlds.Core.ViewModelCollection.CharacterViewModel.ArmorColor1
getset

◆ ArmorColor2

uint TaleWorlds.Core.ViewModelCollection.CharacterViewModel.ArmorColor2
getset

◆ LeftHandWieldedEquipmentIndex

int TaleWorlds.Core.ViewModelCollection.CharacterViewModel.LeftHandWieldedEquipmentIndex
getset

◆ RightHandWieldedEquipmentIndex

int TaleWorlds.Core.ViewModelCollection.CharacterViewModel.RightHandWieldedEquipmentIndex
getset