OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
Character Class Reference

#include <Character.h>

Public Member Functions

 Character ()
 
void Zero ()
 
bool matchesAttackPreference (MonsterAttackPreference preference) const
 
void SetVariable (VariableType var, signed int a3)
 
void AddVariable (VariableType var, signed int val)
 
void SubtractVariable (VariableType VarNum, signed int pValue)
 
bool CompareVariable (VariableType VarNum, signed int pValue)
 
void useItem (int targetCharacter, bool isPortraitClick)
 
int GetBaseMight () const
 
int GetBaseIntelligence () const
 
int GetBasePersonality () const
 
int GetBaseEndurance () const
 
int GetBaseAccuracy () const
 
int GetBaseSpeed () const
 
int GetBaseLuck () const
 
int GetBaseStat (CharacterAttribute stat) const
 
int GetBaseLevel () const
 
int GetActualLevel () const
 
int GetActualMight () const
 
int GetActualIntelligence () const
 
int GetActualPersonality () const
 
int GetActualEndurance () const
 
int GetActualAccuracy () const
 
int GetActualSpeed () const
 
int GetActualLuck () const
 
int GetActualStat (CharacterAttribute stat) const
 
int GetActualAttack (bool onlyMainHandDmg) const
 
int GetMeleeDamageMinimal () const
 
int GetMeleeDamageMaximal () const
 
int CalculateMeleeDamageTo (bool ignoreSkillBonus, bool ignoreOffhand, MonsterId uTargetActorID)
 
int GetRangedAttack ()
 
int GetRangedDamageMin ()
 
int GetRangedDamageMax ()
 
int CalculateRangedDamageTo (MonsterId uMonsterInfoID)
 
std::string GetMeleeDamageString ()
 
std::string GetRangedDamageString ()
 
bool CanTrainToNextLevel ()
 
Color GetExperienceDisplayColor ()
 
int CalculateIncommingDamage (DamageType dmg_type, int amount)
 
ItemType GetEquippedItemEquipType (ItemSlot uEquipSlot) const
 
CharacterSkillType GetEquippedItemSkillType (ItemSlot uEquipSlot) const
 
bool IsUnarmed () const
 
bool HasItemEquipped (ItemSlot uEquipIndex) const
 
bool HasEnchantedItemEquipped (ItemEnchantment uEnchantment) const
 
bool WearsItem (ItemId item_id, ItemSlot equip_type) const
 
int StealFromShop (ItemGen *itemToSteal, int extraStealDifficulty, int reputation, int extraStealFine, int *fineIfFailed)
 
StealResult StealFromActor (unsigned int uActorID, int _steal_perm, int reputation)
 
void Heal (int amount)
 
int receiveDamage (signed int amount, DamageType dmg_type)
 
int ReceiveSpecialAttackEffect (SpecialAttackType attType, Actor *pActor)
 
DamageType GetSpellDamageType (SpellId uSpellID) const
 
Duration GetAttackRecoveryTime (bool attackUsesBow) const
 
int GetHealth () const
 
int GetMaxHealth () const
 
int GetMana () const
 
int GetMaxMana () const
 
int GetBaseAC () const
 
int GetActualAC () const
 
unsigned int GetBaseAge () const
 
unsigned int GetActualAge () const
 
int GetBaseResistance (CharacterAttribute a2) const
 
int GetActualResistance (CharacterAttribute resistance) const
 
void SetRecoveryTime (Duration sRecoveryTime)
 
void RandomizeName ()
 
Condition GetMajorConditionIdx () const
 
int GetParameterBonus (int character_parameter) const
 
int GetSpecialItemBonus (ItemEnchantment enchantment) const
 
int GetItemsBonus (CharacterAttribute attr, bool getOnlyMainHandDmg=false) const
 
int GetMagicalBonus (CharacterAttribute a2) const
 
int actualSkillLevel (CharacterSkillType skill) const
 
CombinedSkillValue getActualSkillValue (CharacterSkillType skill) const
 
int GetSkillBonus (CharacterAttribute a2) const
 
Race GetRace () const
 
std::string GetRaceName () const
 
CharacterSex GetSexByVoice () const
 
void SetInitialStats ()
 
void SetSexByVoice ()
 
void ChangeClass (CharacterClass classType)
 
CharacterSkillType GetSkillIdxByOrder (signed int order)
 
void DecreaseAttribute (CharacterAttribute eAttribute)
 
void IncreaseAttribute (CharacterAttribute eAttribute)
 
void resetTempBonuses ()
 
Color GetStatColor (CharacterAttribute uStat) const
 
bool DiscardConditionIfLastsLongerThan (Condition uCondition, Time time)
 
MerchantPhrase SelectPhrasesTransaction (ItemGen *pItem, HouseType building_type, HouseId houseId, ShopScreen ShopMenuType)
 
int GetBodybuilding () const
 
int GetMeditation () const
 
bool CanIdentify (ItemGen *pItem) const
 
bool CanRepair (ItemGen *pItem) const
 
int GetPerception () const
 
int GetDisarmTrap () const
 
char getLearningPercent () const
 
bool canFitItem (unsigned int uSlot, ItemId uItemID) const
 
int findFreeInventoryListSlot () const
 
int CreateItemInInventory (unsigned int uSlot, ItemId uItemID)
 
bool HasSkill (CharacterSkillType skill) const
 
void WearItem (ItemId uItemID)
 
int AddItem (int uSlot, ItemId uItemID)
 
int AddItem2 (int uSlot, ItemGen *Src)
 
int CreateItemInInventory2 (unsigned int index, ItemGen *Src)
 
void PutItemArInventoryIndex (ItemId uItemID, int itemListPos, int uSlot)
 
void RemoveItemAtInventoryIndex (unsigned int uSlot)
 
bool CanAct () const
 
bool CanSteal () const
 
bool CanEquip_RaceAndAlignmentCheck (ItemId uItemID) const
 
void SetCondition (Condition condition, int blockable)
 
bool isClass (CharacterClass class_type, bool check_honorary=true) const
 
void playReaction (CharacterSpeech speech, int a3=0)
 
void playEmotion (CharacterPortrait newPortrait, Duration duration)
 
void ItemsPotionDmgBreak (int enchant_count)
 
unsigned int GetItemListAtInventoryIndex (int inout_item_cell)
 
unsigned int GetItemMainInventoryIndex (int inout_item_cell)
 
ItemGenGetItemAtInventoryIndex (int inout_item_cell)
 
int GetConditionDaysPassed (Condition condition) const
 
bool NothingOrJustBlastersEquipped () const
 
void SalesProcess (unsigned int inventory_idnx, int item_index, HouseId houseId)
 
bool Recover (Duration dt)
 
bool CanCastSpell (unsigned int uRequiredMana)
 
void SpendMana (unsigned int uRequiredMana)
 
void PlayAwardSound ()
 
void EquipBody (ItemType uEquipType)
 
bool hasUnderwaterSuitEquipped ()
 
bool hasItem (ItemId uItemID, bool checkHeldItem)
 
void OnInventoryLeftClick ()
 
bool characterHitOrMiss (Actor *pActor, int distancemod, int skillmod)
 
unsigned int GetMultiplierForSkillLevel (CharacterSkillType uSkillType, int mult1, int mult2, int mult3, int mult4) const
 
int CalculateMeleeDmgToEnemyWithWeapon (ItemGen *weapon, MonsterId uTargetActorID, bool addOneDice)
 
bool wearsItemAnywhere (ItemId item_id) const
 
float GetArmorRecoveryMultiplierFromSkillLevel (CharacterSkillType armour_skill_type, float param2, float param3, float param4, float param5) const
 
void SetSkillReaction ()
 
void PlayAwardSound_Anim ()
 
void PlayAwardSound_Anim_Face (CharacterSpeech speech)
 
void PlayAwardSound_Anim97 ()
 
void PlayAwardSound_Anim97_Face (CharacterSpeech speech)
 
void AddSkillByEvent (CharacterSkillType, uint16_t addSkillValue)
 
void PlayAwardSound_AnimSubtract ()
 
void PlayAwardSound_AnimSubtract_Face (CharacterSpeech speech)
 
void SubtractSkillByEvent (CharacterSkillType skill, uint16_t subSkillValue)
 
bool IsWeak () const
 
bool IsDead () const
 
bool IsEradicated () const
 
bool IsZombie () const
 
bool IsCursed () const
 
bool IsPetrified () const
 
bool IsUnconcious () const
 
bool IsAsleep () const
 
bool IsParalyzed () const
 
bool IsDrunk () const
 
void SetCondWeakWithBlockCheck (int blockable)
 
void SetCondInsaneWithBlockCheck (int blockable)
 
void SetCondDeadWithBlockCheck (int blockable)
 
void SetCondUnconsciousWithBlockCheck (int blockable)
 
bool IsRaceHuman () const
 
bool IsRaceDwarf () const
 
bool IsRaceElf () const
 
bool IsRaceGoblin () const
 
bool IsMale () const
 
bool IsFemale () const
 
ItemGenGetMainHandItem ()
 
ItemGenGetOffHandItem ()
 
ItemGenGetBowItem ()
 
ItemGenGetArmorItem ()
 
ItemGenGetHelmItem ()
 
ItemGenGetBeltItem ()
 
ItemGenGetCloakItem ()
 
ItemGenGetGloveItem ()
 
ItemGenGetBootItem ()
 
ItemGenGetAmuletItem ()
 
ItemGenGetNthRingItem (int ringNum)
 
ItemGenGetItem (ItemSlot index)
 
const ItemGenGetMainHandItem () const
 
const ItemGenGetOffHandItem () const
 
const ItemGenGetBowItem () const
 
const ItemGenGetArmorItem () const
 
const ItemGenGetHelmItem () const
 
const ItemGenGetBeltItem () const
 
const ItemGenGetCloakItem () const
 
const ItemGenGetGloveItem () const
 
const ItemGenGetBootItem () const
 
const ItemGenGetAmuletItem () const
 
const ItemGenGetNthRingItem (int ringNum) const
 
const ItemGenGetItem (ItemSlot index) const
 
int getCharacterIndex ()
 
void cleanupBeacons ()
 
bool setBeacon (int index, Duration duration)
 
CombinedSkillValue getSkillValue (CharacterSkillType skill) const
 
void setSkillValue (CharacterSkillType skill, const CombinedSkillValue &value)
 
void setXP (int xp)
 
void tickRegeneration (int tick5, const RegenData &rData, bool stacking)
 

Static Public Member Functions

static void _42ECB5_CharacterAttacksActor ()
 
static void _42FA66_do_explosive_impact (Vec3f pos, int a4, int16_t a5, int actchar)
 

Public Attributes

CharacterConditions conditions
 
uint64_t experience
 
std::string name
 
CharacterSex uSex
 
CharacterClass classType
 
uint8_t uCurrentFace
 
IndexedArray< int, ATTRIBUTE_FIRST_STAT, ATTRIBUTE_LAST_STAT_stats
 
IndexedArray< int, ATTRIBUTE_FIRST_STAT, ATTRIBUTE_LAST_STAT_statBonuses
 
int16_t sACModifier
 
uint16_t uLevel
 
int16_t sLevelModifier
 
int16_t sAgeModifier
 
IndexedArray< CombinedSkillValue, CHARACTER_SKILL_FIRST, CHARACTER_SKILL_LASTpActiveSkills
 
IndexedBitset< 1, 512 > _achievedAwardsBits
 
IndexedArray< bool, SPELL_FIRST_REGULAR, SPELL_LAST_REGULARbHaveSpell
 
IndexedArray< bool, ATTRIBUTE_FIRST_STAT, ATTRIBUTE_LAST_STAT_pureStatPotionUsed
 
std::array< ItemGen, INVENTORY_SLOT_COUNTpInventoryItemList
 
std::array< int, INVENTORY_SLOT_COUNTpInventoryMatrix
 
int16_t sResFireBase
 
int16_t sResAirBase
 
int16_t sResWaterBase
 
int16_t sResEarthBase
 
int16_t sResPhysicalBase
 
int16_t sResMagicBase
 
int16_t sResSpiritBase
 
int16_t sResMindBase
 
int16_t sResBodyBase
 
int16_t sResLightBase
 
int16_t sResDarkBase
 
int16_t sResFireBonus
 
int16_t sResAirBonus
 
int16_t sResWaterBonus
 
int16_t sResEarthBonus
 
int16_t sResPhysicalBonus
 
int16_t sResMagicBonus
 
int16_t sResSpiritBonus
 
int16_t sResMindBonus
 
int16_t sResBodyBonus
 
int16_t sResLightBonus
 
int16_t sResDarkBonus
 
IndexedArray< SpellBuff, CHARACTER_BUFF_FIRST, CHARACTER_BUFF_LASTpCharacterBuffs
 
unsigned int uVoiceID
 
int uPrevVoiceID
 
int uPrevFace
 
Duration timeToRecovery
 
unsigned int uSkillPoints
 
int health
 
int mana
 
unsigned int uBirthYear
 
IndexedArray< unsigned int, ITEM_SLOT_FIRST_VALID, ITEM_SLOT_LAST_VALIDpEquipment
 
MagicSchool lastOpenedSpellbookPage
 
SpellId uQuickSpell
 
IndexedBitset< 1, 512 > _characterEventBits
 
char _some_attack_bonus
 
char _melee_dmg_bonus
 
char _ranged_atk_bonus
 
char _ranged_dmg_bonus
 
char uFullHealthBonus
 
char _health_related
 
char uFullManaBonus
 
char _mana_related
 
CharacterPortrait portrait
 
Duration portraitTimePassed
 
Duration portraitTimeLength
 
int16_t portraitImageIndex
 
TalkAnimation talkAnimation
 
std::vector< LloydBeaconvBeacons
 
char uNumDivineInterventionCastsThisDay
 
char uNumArmageddonCasts
 
char uNumFireSpikeCasts
 

Static Public Attributes

static constexpr unsigned int INVENTORY_SLOTS_WIDTH = 14
 
static constexpr unsigned int INVENTORY_SLOTS_HEIGHT = 9
 
static constexpr unsigned int INVENTORY_SLOT_COUNT = INVENTORY_SLOTS_WIDTH * INVENTORY_SLOTS_HEIGHT
 

Constructor & Destructor Documentation

◆ Character()

Character::Character ( )

Member Function Documentation

◆ _42ECB5_CharacterAttacksActor()

void Character::_42ECB5_CharacterAttacksActor ( )
static

◆ _42FA66_do_explosive_impact()

void Character::_42FA66_do_explosive_impact ( Vec3f  pos,
int  a4,
int16_t  a5,
int  actchar 
)
static

◆ actualSkillLevel()

int Character::actualSkillLevel ( CharacterSkillType  skill) const

◆ AddItem()

int Character::AddItem ( int  uSlot,
ItemId  uItemID 
)

◆ AddItem2()

int Character::AddItem2 ( int  uSlot,
ItemGen Src 
)

◆ AddSkillByEvent()

void Character::AddSkillByEvent ( CharacterSkillType  skill,
uint16_t  addSkillValue 
)

◆ AddVariable()

void Character::AddVariable ( VariableType  var,
signed int  val 
)

◆ CalculateIncommingDamage()

int Character::CalculateIncommingDamage ( DamageType  dmg_type,
int  amount 
)

◆ CalculateMeleeDamageTo()

int Character::CalculateMeleeDamageTo ( bool  ignoreSkillBonus,
bool  ignoreOffhand,
MonsterId  uTargetActorID 
)

◆ CalculateMeleeDmgToEnemyWithWeapon()

int Character::CalculateMeleeDmgToEnemyWithWeapon ( ItemGen weapon,
MonsterId  uTargetActorID,
bool  addOneDice 
)

◆ CalculateRangedDamageTo()

int Character::CalculateRangedDamageTo ( MonsterId  uMonsterInfoID)

◆ CanAct()

bool Character::CanAct ( ) const

◆ CanCastSpell()

bool Character::CanCastSpell ( unsigned int  uRequiredMana)

◆ CanEquip_RaceAndAlignmentCheck()

bool Character::CanEquip_RaceAndAlignmentCheck ( ItemId  uItemID) const

◆ canFitItem()

bool Character::canFitItem ( unsigned int  uSlot,
ItemId  uItemID 
) const
Original binary offset:
0x492528

◆ CanIdentify()

bool Character::CanIdentify ( ItemGen pItem) const

◆ CanRepair()

bool Character::CanRepair ( ItemGen pItem) const

◆ CanSteal()

bool Character::CanSteal ( ) const

◆ CanTrainToNextLevel()

bool Character::CanTrainToNextLevel ( )

◆ ChangeClass()

void Character::ChangeClass ( CharacterClass  classType)

◆ characterHitOrMiss()

bool Character::characterHitOrMiss ( Actor pActor,
int  distancemod,
int  skillmod 
)

◆ cleanupBeacons()

void Character::cleanupBeacons ( )

◆ CompareVariable()

bool Character::CompareVariable ( VariableType  VarNum,
signed int  pValue 
)

◆ CreateItemInInventory()

int Character::CreateItemInInventory ( unsigned int  uSlot,
ItemId  uItemID 
)

◆ CreateItemInInventory2()

int Character::CreateItemInInventory2 ( unsigned int  index,
ItemGen Src 
)

◆ DecreaseAttribute()

void Character::DecreaseAttribute ( CharacterAttribute  eAttribute)

◆ DiscardConditionIfLastsLongerThan()

bool Character::DiscardConditionIfLastsLongerThan ( Condition  uCondition,
Time  time 
)

◆ EquipBody()

void Character::EquipBody ( ItemType  uEquipType)

◆ findFreeInventoryListSlot()

int Character::findFreeInventoryListSlot ( ) const
Original binary offset:
0x4925E6

◆ GetActualAC()

int Character::GetActualAC ( ) const

◆ GetActualAccuracy()

int Character::GetActualAccuracy ( ) const

◆ GetActualAge()

unsigned int Character::GetActualAge ( ) const

◆ GetActualAttack()

int Character::GetActualAttack ( bool  onlyMainHandDmg) const

◆ GetActualEndurance()

int Character::GetActualEndurance ( ) const

◆ GetActualIntelligence()

int Character::GetActualIntelligence ( ) const

◆ GetActualLevel()

int Character::GetActualLevel ( ) const

◆ GetActualLuck()

int Character::GetActualLuck ( ) const

◆ GetActualMight()

int Character::GetActualMight ( ) const

◆ GetActualPersonality()

int Character::GetActualPersonality ( ) const

◆ GetActualResistance()

int Character::GetActualResistance ( CharacterAttribute  resistance) const

◆ getActualSkillValue()

CombinedSkillValue Character::getActualSkillValue ( CharacterSkillType  skill) const

◆ GetActualSpeed()

int Character::GetActualSpeed ( ) const

◆ GetActualStat()

int Character::GetActualStat ( CharacterAttribute  stat) const

◆ GetAmuletItem() [1/2]

ItemGen * Character::GetAmuletItem ( )

◆ GetAmuletItem() [2/2]

const ItemGen * Character::GetAmuletItem ( ) const

◆ GetArmorItem() [1/2]

ItemGen * Character::GetArmorItem ( )

◆ GetArmorItem() [2/2]

const ItemGen * Character::GetArmorItem ( ) const

◆ GetArmorRecoveryMultiplierFromSkillLevel()

float Character::GetArmorRecoveryMultiplierFromSkillLevel ( CharacterSkillType  armour_skill_type,
float  param2,
float  param3,
float  param4,
float  param5 
) const

◆ GetAttackRecoveryTime()

Duration Character::GetAttackRecoveryTime ( bool  attackUsesBow) const

◆ GetBaseAC()

int Character::GetBaseAC ( ) const

◆ GetBaseAccuracy()

int Character::GetBaseAccuracy ( ) const

◆ GetBaseAge()

unsigned int Character::GetBaseAge ( ) const

◆ GetBaseEndurance()

int Character::GetBaseEndurance ( ) const

◆ GetBaseIntelligence()

int Character::GetBaseIntelligence ( ) const

◆ GetBaseLevel()

int Character::GetBaseLevel ( ) const

◆ GetBaseLuck()

int Character::GetBaseLuck ( ) const

◆ GetBaseMight()

int Character::GetBaseMight ( ) const

◆ GetBasePersonality()

int Character::GetBasePersonality ( ) const

◆ GetBaseResistance()

int Character::GetBaseResistance ( CharacterAttribute  a2) const

◆ GetBaseSpeed()

int Character::GetBaseSpeed ( ) const

◆ GetBaseStat()

int Character::GetBaseStat ( CharacterAttribute  stat) const

◆ GetBeltItem() [1/2]

ItemGen * Character::GetBeltItem ( )

◆ GetBeltItem() [2/2]

const ItemGen * Character::GetBeltItem ( ) const

◆ GetBodybuilding()

int Character::GetBodybuilding ( ) const

◆ GetBootItem() [1/2]

ItemGen * Character::GetBootItem ( )

◆ GetBootItem() [2/2]

const ItemGen * Character::GetBootItem ( ) const

◆ GetBowItem() [1/2]

ItemGen * Character::GetBowItem ( )

◆ GetBowItem() [2/2]

const ItemGen * Character::GetBowItem ( ) const

◆ getCharacterIndex()

int Character::getCharacterIndex ( )
Returns
0-based index of this character in the party.

◆ GetCloakItem() [1/2]

ItemGen * Character::GetCloakItem ( )

◆ GetCloakItem() [2/2]

const ItemGen * Character::GetCloakItem ( ) const

◆ GetConditionDaysPassed()

int Character::GetConditionDaysPassed ( Condition  condition) const

◆ GetDisarmTrap()

int Character::GetDisarmTrap ( ) const

◆ GetEquippedItemEquipType()

ItemType Character::GetEquippedItemEquipType ( ItemSlot  uEquipSlot) const

◆ GetEquippedItemSkillType()

CharacterSkillType Character::GetEquippedItemSkillType ( ItemSlot  uEquipSlot) const

◆ GetExperienceDisplayColor()

Color Character::GetExperienceDisplayColor ( )

◆ GetGloveItem() [1/2]

ItemGen * Character::GetGloveItem ( )

◆ GetGloveItem() [2/2]

const ItemGen * Character::GetGloveItem ( ) const

◆ GetHealth()

int Character::GetHealth ( ) const
inline

◆ GetHelmItem() [1/2]

ItemGen * Character::GetHelmItem ( )

◆ GetHelmItem() [2/2]

const ItemGen * Character::GetHelmItem ( ) const

◆ GetItem() [1/2]

ItemGen * Character::GetItem ( ItemSlot  index)

◆ GetItem() [2/2]

const ItemGen * Character::GetItem ( ItemSlot  index) const

◆ GetItemAtInventoryIndex()

ItemGen * Character::GetItemAtInventoryIndex ( int  inout_item_cell)

◆ GetItemListAtInventoryIndex()

unsigned int Character::GetItemListAtInventoryIndex ( int  inout_item_cell)

◆ GetItemMainInventoryIndex()

unsigned int Character::GetItemMainInventoryIndex ( int  inout_item_cell)

◆ GetItemsBonus()

int Character::GetItemsBonus ( CharacterAttribute  attr,
bool  getOnlyMainHandDmg = false 
) const

◆ getLearningPercent()

char Character::getLearningPercent ( ) const

Get percentage bonus for character EXP received.

Original binary offset:
0x491317

◆ GetMagicalBonus()

int Character::GetMagicalBonus ( CharacterAttribute  a2) const

◆ GetMainHandItem() [1/2]

ItemGen * Character::GetMainHandItem ( )

◆ GetMainHandItem() [2/2]

const ItemGen * Character::GetMainHandItem ( ) const

◆ GetMajorConditionIdx()

Condition Character::GetMajorConditionIdx ( ) const

◆ GetMana()

int Character::GetMana ( ) const
inline

◆ GetMaxHealth()

int Character::GetMaxHealth ( ) const

◆ GetMaxMana()

int Character::GetMaxMana ( ) const

◆ GetMeditation()

int Character::GetMeditation ( ) const

◆ GetMeleeDamageMaximal()

int Character::GetMeleeDamageMaximal ( ) const

◆ GetMeleeDamageMinimal()

int Character::GetMeleeDamageMinimal ( ) const

◆ GetMeleeDamageString()

std::string Character::GetMeleeDamageString ( )

◆ GetMultiplierForSkillLevel()

unsigned int Character::GetMultiplierForSkillLevel ( CharacterSkillType  uSkillType,
int  mult1,
int  mult2,
int  mult3,
int  mult4 
) const

◆ GetNthRingItem() [1/2]

ItemGen * Character::GetNthRingItem ( int  ringNum)

◆ GetNthRingItem() [2/2]

const ItemGen * Character::GetNthRingItem ( int  ringNum) const

◆ GetOffHandItem() [1/2]

ItemGen * Character::GetOffHandItem ( )

◆ GetOffHandItem() [2/2]

const ItemGen * Character::GetOffHandItem ( ) const

◆ GetParameterBonus()

int Character::GetParameterBonus ( int  character_parameter) const

◆ GetPerception()

int Character::GetPerception ( ) const

◆ GetRace()

enum Race Character::GetRace ( ) const

◆ GetRaceName()

std::string Character::GetRaceName ( ) const

◆ GetRangedAttack()

int Character::GetRangedAttack ( )

◆ GetRangedDamageMax()

int Character::GetRangedDamageMax ( )

◆ GetRangedDamageMin()

int Character::GetRangedDamageMin ( )

◆ GetRangedDamageString()

std::string Character::GetRangedDamageString ( )

◆ GetSexByVoice()

CharacterSex Character::GetSexByVoice ( ) const

◆ GetSkillBonus()

int Character::GetSkillBonus ( CharacterAttribute  a2) const

◆ GetSkillIdxByOrder()

CharacterSkillType Character::GetSkillIdxByOrder ( signed int  order)

◆ getSkillValue()

CombinedSkillValue Character::getSkillValue ( CharacterSkillType  skill) const

◆ GetSpecialItemBonus()

int Character::GetSpecialItemBonus ( ItemEnchantment  enchantment) const

◆ GetSpellDamageType()

DamageType Character::GetSpellDamageType ( SpellId  uSpellID) const

◆ GetStatColor()

Color Character::GetStatColor ( CharacterAttribute  uStat) const

◆ HasEnchantedItemEquipped()

bool Character::HasEnchantedItemEquipped ( ItemEnchantment  uEnchantment) const

◆ hasItem()

bool Character::hasItem ( ItemId  uItemID,
bool  checkHeldItem 
)
Original binary offset:
0x43EE15

◆ HasItemEquipped()

bool Character::HasItemEquipped ( ItemSlot  uEquipIndex) const

◆ HasSkill()

bool Character::HasSkill ( CharacterSkillType  skill) const

◆ hasUnderwaterSuitEquipped()

bool Character::hasUnderwaterSuitEquipped ( )
Original binary offset:
0x43EE77

◆ Heal()

void Character::Heal ( int  amount)

◆ IncreaseAttribute()

void Character::IncreaseAttribute ( CharacterAttribute  eAttribute)

◆ IsAsleep()

bool Character::IsAsleep ( ) const

◆ isClass()

bool Character::isClass ( CharacterClass  class_type,
bool  check_honorary = true 
) const
Original binary offset:
0x49327B

◆ IsCursed()

bool Character::IsCursed ( ) const

◆ IsDead()

bool Character::IsDead ( ) const

◆ IsDrunk()

bool Character::IsDrunk ( ) const

◆ IsEradicated()

bool Character::IsEradicated ( ) const

◆ IsFemale()

bool Character::IsFemale ( ) const
inline

◆ IsMale()

bool Character::IsMale ( ) const
inline

◆ IsParalyzed()

bool Character::IsParalyzed ( ) const

◆ IsPetrified()

bool Character::IsPetrified ( ) const

◆ IsRaceDwarf()

bool Character::IsRaceDwarf ( ) const
inline

◆ IsRaceElf()

bool Character::IsRaceElf ( ) const
inline

◆ IsRaceGoblin()

bool Character::IsRaceGoblin ( ) const
inline

◆ IsRaceHuman()

bool Character::IsRaceHuman ( ) const
inline

◆ IsUnarmed()

bool Character::IsUnarmed ( ) const

◆ IsUnconcious()

bool Character::IsUnconcious ( ) const

◆ IsWeak()

bool Character::IsWeak ( ) const

◆ IsZombie()

bool Character::IsZombie ( ) const

◆ ItemsPotionDmgBreak()

void Character::ItemsPotionDmgBreak ( int  enchant_count)

◆ matchesAttackPreference()

bool Character::matchesAttackPreference ( MonsterAttackPreference  preference) const

◆ NothingOrJustBlastersEquipped()

bool Character::NothingOrJustBlastersEquipped ( ) const

◆ OnInventoryLeftClick()

void Character::OnInventoryLeftClick ( )

◆ PlayAwardSound()

void Character::PlayAwardSound ( )

◆ PlayAwardSound_Anim()

void Character::PlayAwardSound_Anim ( )

◆ PlayAwardSound_Anim97()

void Character::PlayAwardSound_Anim97 ( )

◆ PlayAwardSound_Anim97_Face()

void Character::PlayAwardSound_Anim97_Face ( CharacterSpeech  speech)

◆ PlayAwardSound_Anim_Face()

void Character::PlayAwardSound_Anim_Face ( CharacterSpeech  speech)

◆ PlayAwardSound_AnimSubtract()

void Character::PlayAwardSound_AnimSubtract ( )

◆ PlayAwardSound_AnimSubtract_Face()

void Character::PlayAwardSound_AnimSubtract_Face ( CharacterSpeech  speech)

◆ playEmotion()

void Character::playEmotion ( CharacterPortrait  newPortrait,
Duration  duration 
)
Original binary offset:
0x494A25

◆ playReaction()

void Character::playReaction ( CharacterSpeech  speech,
int  a3 = 0 
)
Original binary offset:
0x4948B1

◆ PutItemArInventoryIndex()

void Character::PutItemArInventoryIndex ( ItemId  uItemID,
int  itemListPos,
int  uSlot 
)

◆ RandomizeName()

void Character::RandomizeName ( )

◆ receiveDamage()

int Character::receiveDamage ( signed int  amount,
DamageType  dmg_type 
)
Original binary offset:
0x48DC1E

◆ ReceiveSpecialAttackEffect()

int Character::ReceiveSpecialAttackEffect ( SpecialAttackType  attType,
Actor pActor 
)

◆ Recover()

bool Character::Recover ( Duration  dt)

◆ RemoveItemAtInventoryIndex()

void Character::RemoveItemAtInventoryIndex ( unsigned int  uSlot)

◆ resetTempBonuses()

void Character::resetTempBonuses ( )

◆ SalesProcess()

void Character::SalesProcess ( unsigned int  inventory_idnx,
int  item_index,
HouseId  houseId 
)

◆ SelectPhrasesTransaction()

MerchantPhrase Character::SelectPhrasesTransaction ( ItemGen pItem,
HouseType  building_type,
HouseId  houseId,
ShopScreen  ShopMenuType 
)

◆ setBeacon()

bool Character::setBeacon ( int  index,
Duration  duration 
)

◆ SetCondDeadWithBlockCheck()

void Character::SetCondDeadWithBlockCheck ( int  blockable)

◆ SetCondInsaneWithBlockCheck()

void Character::SetCondInsaneWithBlockCheck ( int  blockable)

◆ SetCondition()

void Character::SetCondition ( Condition  condition,
int  blockable 
)

◆ SetCondUnconsciousWithBlockCheck()

void Character::SetCondUnconsciousWithBlockCheck ( int  blockable)

◆ SetCondWeakWithBlockCheck()

void Character::SetCondWeakWithBlockCheck ( int  blockable)

◆ SetInitialStats()

void Character::SetInitialStats ( )

◆ SetRecoveryTime()

void Character::SetRecoveryTime ( Duration  sRecoveryTime)

◆ SetSexByVoice()

void Character::SetSexByVoice ( )

◆ SetSkillReaction()

void Character::SetSkillReaction ( )

◆ setSkillValue()

void Character::setSkillValue ( CharacterSkillType  skill,
const CombinedSkillValue value 
)

◆ SetVariable()

void Character::SetVariable ( VariableType  var,
signed int  a3 
)

◆ setXP()

void Character::setXP ( int  xp)

◆ SpendMana()

void Character::SpendMana ( unsigned int  uRequiredMana)

◆ StealFromActor()

StealResult Character::StealFromActor ( unsigned int  uActorID,
int  _steal_perm,
int  reputation 
)

◆ StealFromShop()

int Character::StealFromShop ( ItemGen itemToSteal,
int  extraStealDifficulty,
int  reputation,
int  extraStealFine,
int *  fineIfFailed 
)

◆ SubtractSkillByEvent()

void Character::SubtractSkillByEvent ( CharacterSkillType  skill,
uint16_t  subSkillValue 
)

◆ SubtractVariable()

void Character::SubtractVariable ( VariableType  VarNum,
signed int  pValue 
)

◆ tickRegeneration()

void Character::tickRegeneration ( int  tick5,
const RegenData rData,
bool  stacking 
)

◆ useItem()

void Character::useItem ( int  targetCharacter,
bool  isPortraitClick 
)

Use item on character. This includes potion drinking, spell scroll/books usages and so on.

Parameters
targetCharacterCharacter that uses the item.
isPortraitClicktrue if item used on character portrait, false if on character doll in inventory screen.
Original binary offset:
0x4680ED

◆ WearItem()

void Character::WearItem ( ItemId  uItemID)

◆ WearsItem()

bool Character::WearsItem ( ItemId  item_id,
ItemSlot  equip_type 
) const

◆ wearsItemAnywhere()

bool Character::wearsItemAnywhere ( ItemId  item_id) const

◆ Zero()

void Character::Zero ( )

Member Data Documentation

◆ _achievedAwardsBits

IndexedBitset<1, 512> Character::_achievedAwardsBits

◆ _characterEventBits

IndexedBitset<1, 512> Character::_characterEventBits

◆ _health_related

char Character::_health_related

◆ _mana_related

char Character::_mana_related

◆ _melee_dmg_bonus

char Character::_melee_dmg_bonus

◆ _pureStatPotionUsed

IndexedArray<bool, ATTRIBUTE_FIRST_STAT, ATTRIBUTE_LAST_STAT> Character::_pureStatPotionUsed

◆ _ranged_atk_bonus

char Character::_ranged_atk_bonus

◆ _ranged_dmg_bonus

char Character::_ranged_dmg_bonus

◆ _some_attack_bonus

char Character::_some_attack_bonus

◆ _statBonuses

IndexedArray<int, ATTRIBUTE_FIRST_STAT, ATTRIBUTE_LAST_STAT> Character::_statBonuses

◆ _stats

◆ bHaveSpell

IndexedArray<bool, SPELL_FIRST_REGULAR, SPELL_LAST_REGULAR> Character::bHaveSpell

◆ classType

CharacterClass Character::classType

◆ conditions

CharacterConditions Character::conditions

◆ experience

uint64_t Character::experience

◆ health

int Character::health

◆ INVENTORY_SLOT_COUNT

constexpr unsigned int Character::INVENTORY_SLOT_COUNT = INVENTORY_SLOTS_WIDTH * INVENTORY_SLOTS_HEIGHT
staticconstexpr

◆ INVENTORY_SLOTS_HEIGHT

constexpr unsigned int Character::INVENTORY_SLOTS_HEIGHT = 9
staticconstexpr

◆ INVENTORY_SLOTS_WIDTH

constexpr unsigned int Character::INVENTORY_SLOTS_WIDTH = 14
staticconstexpr

◆ lastOpenedSpellbookPage

MagicSchool Character::lastOpenedSpellbookPage

◆ mana

int Character::mana

◆ name

std::string Character::name

◆ pActiveSkills

◆ pCharacterBuffs

◆ pEquipment

IndexedArray<unsigned int, ITEM_SLOT_FIRST_VALID, ITEM_SLOT_LAST_VALID> Character::pEquipment

◆ pInventoryItemList

std::array<ItemGen, INVENTORY_SLOT_COUNT> Character::pInventoryItemList

◆ pInventoryMatrix

std::array<int, INVENTORY_SLOT_COUNT> Character::pInventoryMatrix

◆ portrait

CharacterPortrait Character::portrait

◆ portraitImageIndex

int16_t Character::portraitImageIndex

◆ portraitTimeLength

Duration Character::portraitTimeLength

◆ portraitTimePassed

Duration Character::portraitTimePassed

◆ sACModifier

int16_t Character::sACModifier

◆ sAgeModifier

int16_t Character::sAgeModifier

◆ sLevelModifier

int16_t Character::sLevelModifier

◆ sResAirBase

int16_t Character::sResAirBase

◆ sResAirBonus

int16_t Character::sResAirBonus

◆ sResBodyBase

int16_t Character::sResBodyBase

◆ sResBodyBonus

int16_t Character::sResBodyBonus

◆ sResDarkBase

int16_t Character::sResDarkBase

◆ sResDarkBonus

int16_t Character::sResDarkBonus

◆ sResEarthBase

int16_t Character::sResEarthBase

◆ sResEarthBonus

int16_t Character::sResEarthBonus

◆ sResFireBase

int16_t Character::sResFireBase

◆ sResFireBonus

int16_t Character::sResFireBonus

◆ sResLightBase

int16_t Character::sResLightBase

◆ sResLightBonus

int16_t Character::sResLightBonus

◆ sResMagicBase

int16_t Character::sResMagicBase

◆ sResMagicBonus

int16_t Character::sResMagicBonus

◆ sResMindBase

int16_t Character::sResMindBase

◆ sResMindBonus

int16_t Character::sResMindBonus

◆ sResPhysicalBase

int16_t Character::sResPhysicalBase

◆ sResPhysicalBonus

int16_t Character::sResPhysicalBonus

◆ sResSpiritBase

int16_t Character::sResSpiritBase

◆ sResSpiritBonus

int16_t Character::sResSpiritBonus

◆ sResWaterBase

int16_t Character::sResWaterBase

◆ sResWaterBonus

int16_t Character::sResWaterBonus

◆ talkAnimation

TalkAnimation Character::talkAnimation

◆ timeToRecovery

Duration Character::timeToRecovery

◆ uBirthYear

unsigned int Character::uBirthYear

◆ uCurrentFace

uint8_t Character::uCurrentFace

◆ uFullHealthBonus

char Character::uFullHealthBonus

◆ uFullManaBonus

char Character::uFullManaBonus

◆ uLevel

uint16_t Character::uLevel

◆ uNumArmageddonCasts

char Character::uNumArmageddonCasts

◆ uNumDivineInterventionCastsThisDay

char Character::uNumDivineInterventionCastsThisDay

◆ uNumFireSpikeCasts

char Character::uNumFireSpikeCasts

◆ uPrevFace

int Character::uPrevFace

◆ uPrevVoiceID

int Character::uPrevVoiceID

◆ uQuickSpell

SpellId Character::uQuickSpell

◆ uSex

CharacterSex Character::uSex

◆ uSkillPoints

unsigned int Character::uSkillPoints

◆ uVoiceID

unsigned int Character::uVoiceID

◆ vBeacons

std::vector<LloydBeacon> Character::vBeacons

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