OpenEnroth d1a3925
Loading...
Searching...
No Matches
Functions | Variables
Actor.cpp File Reference
#include "Engine/Objects/Actor.h"
#include <algorithm>
#include <deque>
#include <string>
#include <utility>
#include <vector>
#include <optional>
#include "Engine/Engine.h"
#include "Engine/Data/AwardEnums.h"
#include "Engine/Data/HouseEnumFunctions.h"
#include "Engine/Graphics/Camera.h"
#include "Engine/Graphics/DecalBuilder.h"
#include "Engine/Objects/Decoration.h"
#include "Engine/Graphics/Indoor.h"
#include "Engine/Graphics/Renderer/Renderer.h"
#include "Engine/Graphics/Overlays.h"
#include "Engine/Graphics/Sprites.h"
#include "Engine/Graphics/Vis.h"
#include "Engine/Localization.h"
#include "Engine/Objects/ObjectList.h"
#include "Engine/Objects/SpriteObject.h"
#include "Engine/Objects/MonsterEnumFunctions.h"
#include "Engine/OurMath.h"
#include "Engine/Party.h"
#include "Engine/SpellFxRenderer.h"
#include "Engine/Random/Random.h"
#include "Engine/Spells/CastSpellInfo.h"
#include "Engine/Spells/Spells.h"
#include "Engine/AttackList.h"
#include "Engine/Tables/ItemTable.h"
#include "Engine/Tables/HostilityTable.h"
#include "Engine/Time/Timer.h"
#include "Engine/TurnEngine/TurnEngine.h"
#include "Engine/MapInfo.h"
#include "GUI/UI/UIGame.h"
#include "GUI/UI/UIStatusBar.h"
#include "Media/Audio/AudioPlayer.h"
#include "Library/Logger/Logger.h"
#include "Utility/Math/TrigLut.h"

Functions

bool ShouldMonsterPlayAttackAnim (SpellId spell_id)
 
void npcSetItem (int npc, ItemId item, int a3)
 
bool CheckActors_proximity ()
 
void StatusBarItemFound (int num_gold_found, std::string_view item_unidentified_name)
 
void toggleActorGroupFlag (unsigned int uGroupID, ActorAttribute uFlag, bool bValue)
 
bool Detect_Between_Objects (Pid uObjID, Pid uObj2ID)
 
void Spawn_Light_Elemental (int spell_power, Mastery caster_skill_mastery, Duration duration)
 
void SpawnEncounter (MapInfo *pMapInfo, SpawnPoint *spawn, int monsterCatMod, int countOverride, int aggro)
 
void evaluateAoeDamage ()
 
double sub_43AE12 (signed int a1)
 
void ItemDamageFromActor (Pid uObjID, unsigned int uActorID, const Vec3f &pVelocity)
 
ActorAllocateActor ()
 

Variables

static SpellFxRendererspell_fx_renderer = EngineIocContainer::ResolveSpellFxRenderer()
 
std::deque< ActorpActors
 
size_t nextActorReuseScanStart = 0
 
stru319 stru_50C198
 
static constexpr IndexedArray< int, HOSTILITY_FIRST, HOSTILITY_LAST_4DF380_hostilityRanges
 
std::array< int16_t, 11 > word_4E8152 = {{0, 0, 0, 90, 8, 2, 70, 20, 10, 50, 30}}
 

Function Documentation

◆ AllocateActor()

Actor * AllocateActor ( )

Allocates a new actor in pActors array.

Appends to the end if below the actor limit, otherwise reuses a removed slot. Slot reuse is done in a sweeping fashion starting from the last reused position to minimize the chance of stale references (e.g. in projectiles or summonerId) still pointing to a just-removed actor.

Returns
Pointer to a newly allocated actor, or nullptr if the actor count limit has been hit and no removed slots are available.

◆ CheckActors_proximity()

bool CheckActors_proximity ( )

◆ Detect_Between_Objects()

bool Detect_Between_Objects ( Pid  uObjID,
Pid  uObj2ID 
)

◆ evaluateAoeDamage()

void evaluateAoeDamage ( )
Original binary offset:
0x438F8F

◆ ItemDamageFromActor()

void ItemDamageFromActor ( Pid  uObjID,
unsigned int  uActorID,
const Vec3f pVelocity 
)

◆ npcSetItem()

void npcSetItem ( int  npc,
ItemId  item,
int  a3 
)
Original binary offset:
0x448518

◆ ShouldMonsterPlayAttackAnim()

bool ShouldMonsterPlayAttackAnim ( SpellId  spell_id)

◆ Spawn_Light_Elemental()

void Spawn_Light_Elemental ( int  spell_power,
Mastery  caster_skill_mastery,
Duration  duration 
)

◆ SpawnEncounter()

void SpawnEncounter ( MapInfo pMapInfo,
SpawnPoint spawn,
int  monsterCatMod,
int  countOverride,
int  aggro 
)

◆ StatusBarItemFound()

void StatusBarItemFound ( int  num_gold_found,
std::string_view  item_unidentified_name 
)

◆ sub_43AE12()

double sub_43AE12 ( signed int  a1)

◆ toggleActorGroupFlag()

void toggleActorGroupFlag ( unsigned int  uGroupID,
ActorAttribute  uFlag,
bool  bValue 
)
Original binary offset:
0x448A98

Variable Documentation

◆ _4DF380_hostilityRanges

constexpr IndexedArray<int, HOSTILITY_FIRST, HOSTILITY_LAST> _4DF380_hostilityRanges
staticconstexpr

◆ nextActorReuseScanStart

size_t nextActorReuseScanStart = 0

◆ pActors

std::deque<Actor> pActors

◆ spell_fx_renderer

◆ stru_50C198

stru319 stru_50C198

◆ word_4E8152

std::array<int16_t, 11> word_4E8152 = {{0, 0, 0, 90, 8, 2, 70, 20, 10, 50, 30}}