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

#include <Actor.h>

Public Member Functions

 Actor ()
 
 Actor (int id)
 
void SummonMinion (int summonerId)
 
void Reset ()
 
void Remove ()
 
void PrepareSprites (char load_sounds_if_bit1_set)
 
void UpdateAnimation ()
 
MonsterHostility GetActorsRelation (Actor *a2)
 
void SetRandomGoldIfTheresNoItem ()
 
bool CanAct () const
 
bool IsNotAlive ()
 
bool IsPeasant ()
 
void ResetAnimation ()
 
void ResetQueue ()
 
void ResetActive ()
 
void ResetFullAiState ()
 
void ResetHasItem ()
 
void ResetHostile ()
 
void ResetAggressor ()
 
bool ActorEnemy () const
 
bool ActorFriend () const
 
bool ActorHasItem () const
 
bool ActorNearby () const
 
int _43B3E0_CalcDamage (ActorAbility dmgSource)
 
void LootActor ()
 
bool _427102_IsOkToCastSpell (SpellId spell)
 
ActorAbility special_ability_use_check (int a2)
 
bool _4273BB_DoesHitOtherActor (Actor *defender, int a3, int a4)
 
bool ActorHitOrMiss (Character *pPlayer)
 
int CalcMagicalDamageToActor (DamageType dmgType, int incomingDmg)
 
bool DoesDmgTypeDoDamage (DamageType uType)
 

Static Public Member Functions

static void _SelectTarget (unsigned int uActorID, Pid *OutTargetPID, bool can_target_party)
 
static void AI_Pursue3 (unsigned int uActorID, Pid a2, Duration uActionLength, AIDirection *a4)
 
static void AI_Pursue2 (unsigned int uActorID, Pid a2, Duration uActionLength, AIDirection *pDir, int a5)
 
static void AI_Flee (unsigned int uActorID, Pid edx0, Duration uActionLength, AIDirection *a4)
 
static void AI_Pursue1 (unsigned int uActorID, Pid a2, signed int arg0, Duration uActionLength, AIDirection *pDir)
 
static void playSound (unsigned int uActorID, ActorSound uSoundID)
 
static void Die (unsigned int uActorID)
 
static void resurrect (unsigned int uActorID)
 
static void AI_Bored (unsigned int uActorID, Pid uObjID, AIDirection *a4)
 
static void AI_Stun (unsigned int uActorID, Pid edx0, int arg0)
 
static char _4031C1_update_job_never_gets_called (unsigned int uActorID, signed int a2, int a3)
 
static void AI_RandomMove (unsigned int uActor_id, Pid uTarget_id, int radius, Duration uActionLength)
 
static void AI_MissileAttack1 (unsigned int uActorID, Pid sTargetPid, AIDirection *pDir)
 
static void AI_MissileAttack2 (unsigned int uActorID, Pid sTargetPid, AIDirection *pDir)
 
static void AI_SpellAttack1 (unsigned int uActorID, Pid sTargetPid, AIDirection *pDir)
 
static void AI_SpellAttack2 (unsigned int uActorID, Pid sTargetPid, AIDirection *pDir)
 
static void AI_MeleeAttack (unsigned int uActorID, Pid sTargetPid, AIDirection *arg0)
 
static void StandAwhile (unsigned int uActorID)
 
static void AI_Stand (unsigned int uActorID, Pid object_to_face_pid, Duration uActionLength, AIDirection *a4)
 
static void AI_StandOrBored (unsigned int uActorID, Pid uObjID, Duration uActionLength, AIDirection *a4)
 
static void AI_FaceObject (unsigned int uActorID, Pid uObjID, AIDirection *Dir_In)
 
static void GetDirectionInfo (Vec3f p1, Vec3f p2, AIDirection *pOut)
 
static void GetDirectionInfo (Pid uObj1ID, Pid uObj2ID, AIDirection *pOut, int PreferedZ)
 
static void Explode (unsigned int uActorID)
 
static void AI_RangedAttack (unsigned int uActorID, AIDirection *a2, int type, ActorAbility a4)
 
static void AI_SpellAttack (unsigned int uActorID, AIDirection *pDir, SpellId uSpellID, ActorAbility a4, CombinedSkillValue uSkill)
 
static void ActorDamageFromMonster (Pid attacker_id, unsigned int actor_id, const Vec3f &pVelocity, ActorAbility a4)
 
static unsigned short GetObjDescId (SpellId spellId)
 
static void AggroSurroundingPeasants (unsigned int uActorID, int a2)
 
static bool ArePeasantsOfSameFaction (Actor *a1, Actor *a2)
 
static void StealFrom (unsigned int uActorID)
 
static void giveItem (signed int uActorID, ItemId uItemID, unsigned int bGive)
 
static void toggleFlag (signed int uActorID, ActorAttribute uFlag, bool bToggle)
 
static void ApplyFineForKillingPeasant (unsigned int uActorID)
 
static void DrawHealthBar (Actor *actor, GUIWindow *window)
 
static void AddOnDamageOverlay (unsigned int uActorID, int overlayType, int damage)
 
static void Arena_summon_actor (MonsterId monster_id, Vec3f pos)
 
static int DamageMonsterFromParty (Pid a1, unsigned int uActorID_Monster, const Vec3f &pVelocity)
 
static void MakeActorAIList_ODM ()
 
static int MakeActorAIList_BLV ()
 
static void UpdateActorAI ()
 
static void InitializeActors ()
 
static bool isActorKilled (ActorKillCheckPolicy policy, int param, int count)
 
static int searchDeadActors (int *pTotalActors)
 
static int searchDeadActorsByMonsterID (int *pTotalActors, MonsterId monsterID)
 
static int searchDeadActorsByGroup (int *pTotalActors, int group)
 
static int searchDeadActorsByID (int *pTotalActors, int id)
 

Public Attributes

int id = -1
 
std::string name
 
int16_t npcId = 0
 
ActorAttributes attributes = 0
 
int16_t currentHP = 0
 
MonsterInfo monsterInfo
 
int16_t word_000084_range_attack = 0
 
MonsterId word_000086_some_monster_id = MONSTER_INVALID
 
uint16_t radius = 32
 
uint16_t height = 128
 
uint16_t moveSpeed = 200
 
Vec3f pos
 
Vec3f velocity
 
uint16_t yawAngle = 0
 
uint16_t pitchAngle = 0
 
int sectorId = 0
 
Duration currentActionLength = 0_ticks
 
Vec3f initialPosition
 
Vec3f guardingPosition
 
uint16_t tetherDistance = 256
 
AIState aiState = Standing
 
ActorAnimation currentActionAnimation = ANIM_Standing
 
ItemId carriedItemId = ITEM_NULL
 
Duration currentActionTime = 0_ticks
 
IndexedArray< uint16_t, ANIM_First, ANIM_LastspriteIds = {{}}
 
IndexedArray< SoundId, ACTOR_SOUND_FIRST, ACTOR_SOUND_LASTsoundSampleIds = {{}}
 
IndexedArray< SpellBuff, ACTOR_BUFF_FIRST, ACTOR_BUFF_LASTbuffs
 
std::array< ItemGen, 4 > items
 
unsigned int group = 0
 
MonsterType ally = MONSTER_TYPE_INVALID
 
std::array< ActorJob, 8 > scheduledJobs
 
Pid summonerId
 
Pid lastCharacterIdToHit
 
int uniqueNameIndex = 0
 
bool donebloodsplat { false }
 
Duration massDistortionTime
 

Constructor & Destructor Documentation

◆ Actor() [1/2]

Actor::Actor ( )
inline

◆ Actor() [2/2]

Actor::Actor ( int  id)
inlineexplicit

Member Function Documentation

◆ _4031C1_update_job_never_gets_called()

char Actor::_4031C1_update_job_never_gets_called ( unsigned int  uActorID,
signed int  a2,
int  a3 
)
static

◆ _427102_IsOkToCastSpell()

bool Actor::_427102_IsOkToCastSpell ( SpellId  spell)

◆ _4273BB_DoesHitOtherActor()

bool Actor::_4273BB_DoesHitOtherActor ( Actor defender,
int  a3,
int  a4 
)

◆ _43B3E0_CalcDamage()

int Actor::_43B3E0_CalcDamage ( ActorAbility  dmgSource)

◆ _SelectTarget()

void Actor::_SelectTarget ( unsigned int  uActorID,
Pid OutTargetPID,
bool  can_target_party 
)
static

◆ ActorDamageFromMonster()

void Actor::ActorDamageFromMonster ( Pid  attacker_id,
unsigned int  actor_id,
const Vec3f pVelocity,
ActorAbility  a4 
)
static

◆ ActorEnemy()

bool Actor::ActorEnemy ( ) const
inline

◆ ActorFriend()

bool Actor::ActorFriend ( ) const
inline

◆ ActorHasItem()

bool Actor::ActorHasItem ( ) const
inline

◆ ActorHitOrMiss()

bool Actor::ActorHitOrMiss ( Character pPlayer)

◆ ActorNearby()

bool Actor::ActorNearby ( ) const
inline

◆ AddOnDamageOverlay()

void Actor::AddOnDamageOverlay ( unsigned int  uActorID,
int  overlayType,
int  damage 
)
static

◆ AggroSurroundingPeasants()

void Actor::AggroSurroundingPeasants ( unsigned int  uActorID,
int  a2 
)
static

◆ AI_Bored()

void Actor::AI_Bored ( unsigned int  uActorID,
Pid  uObjID,
AIDirection a4 
)
static

◆ AI_FaceObject()

void Actor::AI_FaceObject ( unsigned int  uActorID,
Pid  uObjID,
AIDirection Dir_In 
)
static

◆ AI_Flee()

void Actor::AI_Flee ( unsigned int  uActorID,
Pid  edx0,
Duration  uActionLength,
AIDirection a4 
)
static

◆ AI_MeleeAttack()

void Actor::AI_MeleeAttack ( unsigned int  uActorID,
Pid  sTargetPid,
AIDirection arg0 
)
static

◆ AI_MissileAttack1()

void Actor::AI_MissileAttack1 ( unsigned int  uActorID,
Pid  sTargetPid,
AIDirection pDir 
)
static

◆ AI_MissileAttack2()

void Actor::AI_MissileAttack2 ( unsigned int  uActorID,
Pid  sTargetPid,
AIDirection pDir 
)
static

◆ AI_Pursue1()

void Actor::AI_Pursue1 ( unsigned int  uActorID,
Pid  a2,
signed int  arg0,
Duration  uActionLength,
AIDirection pDir 
)
static

◆ AI_Pursue2()

void Actor::AI_Pursue2 ( unsigned int  uActorID,
Pid  a2,
Duration  uActionLength,
AIDirection pDir,
int  a5 
)
static

◆ AI_Pursue3()

void Actor::AI_Pursue3 ( unsigned int  uActorID,
Pid  a2,
Duration  uActionLength,
AIDirection a4 
)
static

◆ AI_RandomMove()

void Actor::AI_RandomMove ( unsigned int  uActor_id,
Pid  uTarget_id,
int  radius,
Duration  uActionLength 
)
static

◆ AI_RangedAttack()

void Actor::AI_RangedAttack ( unsigned int  uActorID,
AIDirection a2,
int  type,
ActorAbility  a4 
)
static

◆ AI_SpellAttack()

void Actor::AI_SpellAttack ( unsigned int  uActorID,
AIDirection pDir,
SpellId  uSpellID,
ActorAbility  a4,
CombinedSkillValue  uSkill 
)
static

◆ AI_SpellAttack1()

void Actor::AI_SpellAttack1 ( unsigned int  uActorID,
Pid  sTargetPid,
AIDirection pDir 
)
static

◆ AI_SpellAttack2()

void Actor::AI_SpellAttack2 ( unsigned int  uActorID,
Pid  sTargetPid,
AIDirection pDir 
)
static

◆ AI_Stand()

void Actor::AI_Stand ( unsigned int  uActorID,
Pid  object_to_face_pid,
Duration  uActionLength,
AIDirection a4 
)
static

◆ AI_StandOrBored()

void Actor::AI_StandOrBored ( unsigned int  uActorID,
Pid  uObjID,
Duration  uActionLength,
AIDirection a4 
)
static

◆ AI_Stun()

void Actor::AI_Stun ( unsigned int  uActorID,
Pid  edx0,
int  arg0 
)
static

◆ ApplyFineForKillingPeasant()

void Actor::ApplyFineForKillingPeasant ( unsigned int  uActorID)
static

◆ Arena_summon_actor()

void Actor::Arena_summon_actor ( MonsterId  monster_id,
Vec3f  pos 
)
static

◆ ArePeasantsOfSameFaction()

bool Actor::ArePeasantsOfSameFaction ( Actor a1,
Actor a2 
)
static

◆ CalcMagicalDamageToActor()

int Actor::CalcMagicalDamageToActor ( DamageType  dmgType,
int  incomingDmg 
)

◆ CanAct()

bool Actor::CanAct ( ) const

◆ DamageMonsterFromParty()

int Actor::DamageMonsterFromParty ( Pid  a1,
unsigned int  uActorID_Monster,
const Vec3f pVelocity 
)
static

◆ Die()

void Actor::Die ( unsigned int  uActorID)
static

◆ DoesDmgTypeDoDamage()

bool Actor::DoesDmgTypeDoDamage ( DamageType  uType)

◆ DrawHealthBar()

void Actor::DrawHealthBar ( Actor actor,
GUIWindow window 
)
static

◆ Explode()

void Actor::Explode ( unsigned int  uActorID)
static

◆ GetActorsRelation()

MonsterHostility Actor::GetActorsRelation ( Actor a2)

◆ GetDirectionInfo() [1/2]

void Actor::GetDirectionInfo ( Pid  uObj1ID,
Pid  uObj2ID,
AIDirection pOut,
int  PreferedZ 
)
static

◆ GetDirectionInfo() [2/2]

void Actor::GetDirectionInfo ( Vec3f  p1,
Vec3f  p2,
AIDirection pOut 
)
static
Parameters
p1From Vec3f.
p2To Vec3f.
[out]pOutAIDirection from p1 to p2.

◆ GetObjDescId()

unsigned short Actor::GetObjDescId ( SpellId  spellId)
static

◆ giveItem()

void Actor::giveItem ( signed int  uActorID,
ItemId  uItemID,
unsigned int  bGive 
)
static
Original binary offset:
0x4485A7

◆ InitializeActors()

void Actor::InitializeActors ( )
static

◆ isActorKilled()

bool Actor::isActorKilled ( ActorKillCheckPolicy  policy,
int  param,
int  count 
)
static
Parameters
policyDetermines type for actors check.
paramParameter determined by check policy.
countKilled count or 0 if all must be killed
Original binary offset:
0x44665D

◆ IsNotAlive()

bool Actor::IsNotAlive ( )

◆ IsPeasant()

bool Actor::IsPeasant ( )

◆ LootActor()

void Actor::LootActor ( )

◆ MakeActorAIList_BLV()

int Actor::MakeActorAIList_BLV ( )
static

◆ MakeActorAIList_ODM()

void Actor::MakeActorAIList_ODM ( )
static

◆ playSound()

void Actor::playSound ( unsigned int  uActorID,
ActorSound  uSoundID 
)
static
Original binary offset:
0x402CED

◆ PrepareSprites()

void Actor::PrepareSprites ( char  load_sounds_if_bit1_set)

◆ Remove()

void Actor::Remove ( )

◆ Reset()

void Actor::Reset ( )

◆ ResetActive()

void Actor::ResetActive ( )
inline

◆ ResetAggressor()

void Actor::ResetAggressor ( )
inline

◆ ResetAnimation()

void Actor::ResetAnimation ( )
inline

◆ ResetFullAiState()

void Actor::ResetFullAiState ( )
inline

◆ ResetHasItem()

void Actor::ResetHasItem ( )
inline

◆ ResetHostile()

void Actor::ResetHostile ( )
inline

◆ ResetQueue()

void Actor::ResetQueue ( )
inline

◆ resurrect()

void Actor::resurrect ( unsigned int  uActorID)
static

◆ searchDeadActors()

int Actor::searchDeadActors ( int *  pTotalActors)
static
Original binary offset:
0x408A27

◆ searchDeadActorsByGroup()

int Actor::searchDeadActorsByGroup ( int *  pTotalActors,
int  group 
)
static
Original binary offset:
0x408AE7

◆ searchDeadActorsByID()

int Actor::searchDeadActorsByID ( int *  pTotalActors,
int  id 
)
static
Original binary offset:
0x408B54

◆ searchDeadActorsByMonsterID()

int Actor::searchDeadActorsByMonsterID ( int *  pTotalActors,
MonsterId  monsterID 
)
static
Original binary offset:
0x408A7E

◆ SetRandomGoldIfTheresNoItem()

void Actor::SetRandomGoldIfTheresNoItem ( )

◆ special_ability_use_check()

ActorAbility Actor::special_ability_use_check ( int  a2)

◆ StandAwhile()

void Actor::StandAwhile ( unsigned int  uActorID)
static

◆ StealFrom()

void Actor::StealFrom ( unsigned int  uActorID)
static

◆ SummonMinion()

void Actor::SummonMinion ( int  summonerId)

◆ toggleFlag()

void Actor::toggleFlag ( signed int  uActorID,
ActorAttribute  uFlag,
bool  bToggle 
)
static
Original binary offset:
0x448A40

◆ UpdateActorAI()

void Actor::UpdateActorAI ( )
static

◆ UpdateAnimation()

void Actor::UpdateAnimation ( )

Member Data Documentation

◆ aiState

AIState Actor::aiState = Standing

◆ ally

◆ attributes

ActorAttributes Actor::attributes = 0

◆ buffs

◆ carriedItemId

ItemId Actor::carriedItemId = ITEM_NULL

◆ currentActionAnimation

ActorAnimation Actor::currentActionAnimation = ANIM_Standing

◆ currentActionLength

Duration Actor::currentActionLength = 0_ticks

◆ currentActionTime

Duration Actor::currentActionTime = 0_ticks

◆ currentHP

int16_t Actor::currentHP = 0

◆ donebloodsplat

bool Actor::donebloodsplat { false }

◆ group

unsigned int Actor::group = 0

◆ guardingPosition

Vec3f Actor::guardingPosition

◆ height

uint16_t Actor::height = 128

◆ id

int Actor::id = -1

◆ initialPosition

Vec3f Actor::initialPosition

◆ items

std::array<ItemGen, 4> Actor::items

◆ lastCharacterIdToHit

Pid Actor::lastCharacterIdToHit

◆ massDistortionTime

Duration Actor::massDistortionTime

◆ monsterInfo

MonsterInfo Actor::monsterInfo

◆ moveSpeed

uint16_t Actor::moveSpeed = 200

◆ name

std::string Actor::name

◆ npcId

int16_t Actor::npcId = 0

◆ pitchAngle

uint16_t Actor::pitchAngle = 0

◆ pos

Vec3f Actor::pos

◆ radius

uint16_t Actor::radius = 32

◆ scheduledJobs

std::array<ActorJob, 8> Actor::scheduledJobs

◆ sectorId

int Actor::sectorId = 0

◆ soundSampleIds

IndexedArray<SoundId, ACTOR_SOUND_FIRST, ACTOR_SOUND_LAST> Actor::soundSampleIds = {{}}

◆ spriteIds

IndexedArray<uint16_t, ANIM_First, ANIM_Last> Actor::spriteIds = {{}}

◆ summonerId

Pid Actor::summonerId

◆ tetherDistance

uint16_t Actor::tetherDistance = 256

◆ uniqueNameIndex

int Actor::uniqueNameIndex = 0

◆ velocity

Vec3f Actor::velocity

◆ word_000084_range_attack

int16_t Actor::word_000084_range_attack = 0

◆ word_000086_some_monster_id

MonsterId Actor::word_000086_some_monster_id = MONSTER_INVALID

◆ yawAngle

uint16_t Actor::yawAngle = 0

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