World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
Структура Actor

#include <Actor.h>

+ Граф связей класса Actor:

Открытые члены

 Actor ()
 
void SummonMinion (int summonerId)
 
void Reset ()
 
void Remove ()
 
void PrepareSprites (char load_sounds_if_bit1_set)
 
void UpdateAnimation ()
 
signed int GetActorsRelation (Actor *a2)
 
void SetRandomGoldIfTheresNoItem ()
 
bool CanAct ()
 
bool IsNotAlive ()
 
bool IsPeasant ()
 
void ResetAnimation ()
 
void ResetQueue ()
 
void ResetActive ()
 
void ResetAlive ()
 
void ResetHasItem ()
 
void ResetHostile ()
 
void ResetAggressor ()
 
bool ActorEnemy () const
 
bool ActorFriend () const
 
bool ActorHasItem () const
 
bool ActorNearby () const
 
int _43B3E0_CalcDamage (signed int dmgSource)
 
void LootActor ()
 
bool _427102_IsOkToCastSpell (enum SPELL_TYPE spell)
 
ABILITY_INDEX special_ability_use_check (int a2)
 
bool _4273BB_DoesHitOtherActor (Actor *defender, int a3, int a4)
 
bool ActorHitOrMiss (Player *pPlayer)
 
int CalcMagicalDamageToActor (DAMAGE_TYPE dmgType, int incomingDmg)
 
bool DoesDmgTypeDoDamage (DAMAGE_TYPE uType)
 

Открытые статические члены

static void _SelectTarget (unsigned int uActorID, int *a2, bool can_target_party)
 
static void AI_Pursue3 (unsigned int uActorID, unsigned int a2, signed int uActionLength, struct AIDirection *a4)
 
static void AI_Pursue2 (unsigned int uActorID, unsigned int a2, signed int uActionLength, struct AIDirection *pDir, int a5)
 
static void AI_Flee (unsigned int uActorID, signed int edx0, int uActionLength, struct AIDirection *a4)
 
static void AI_Pursue1 (unsigned int uActorID, unsigned int a2, signed int arg0, signed int uActionLength, struct AIDirection *pDir)
 
static void PlaySound (unsigned int uActorID, unsigned int uSoundID)
 
static void Die (unsigned int uActorID)
 
static void Resurrect (unsigned int uActorID)
 
static void AI_Bored (unsigned int uActorID, unsigned int uObjID, struct AIDirection *a4)
 
static void AI_Stun (unsigned int uActorID, signed int 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, unsigned int uTarget_id, int radius, int uActionLength)
 
static void AI_MissileAttack1 (unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir)
 
static void AI_MissileAttack2 (unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir)
 
static void AI_SpellAttack1 (unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir)
 
static void AI_SpellAttack2 (unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir)
 
static void AI_MeleeAttack (unsigned int uActorID, signed int sTargetPid, struct AIDirection *arg0)
 
static void StandAwhile (unsigned int uActorID)
 
static void AI_Stand (unsigned int uActorID, unsigned int object_to_face_pid, unsigned int uActionLength, struct AIDirection *a4)
 
static void AI_StandOrBored (unsigned int uActorID, signed int uObjID, int uActionLength, struct AIDirection *a4)
 
static void AI_FaceObject (unsigned int uActorID, unsigned int uObjID, int UNUSED, struct AIDirection *Dir_In)
 
static void GetDirectionInfo (unsigned int uObj1ID, unsigned int uObj2ID, struct AIDirection *pOut, int a4)
 
static void Explode (unsigned int uActorID)
 
static void AI_RangedAttack (unsigned int uActorID, struct AIDirection *a2, int type, char a4)
 
static void AI_SpellAttack (unsigned int uActorID, struct AIDirection *pDir, int uSpellID, int a4, unsigned int uSkillLevel)
 
static void ActorDamageFromMonster (int attacker_id, unsigned int actor_id, struct Vec3_int_ *pVelocity, int a4)
 
static unsigned short GetObjDescId (int 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, unsigned int uItemID, unsigned int bGive)
 
static void ToggleFlag (signed int uActorID, unsigned int uFlag, int bToggle)
 
static void ApplyFineForKillingPeasant (unsigned int uActorID)
 
static void DrawHealthBar (Actor *actor, GUIWindow *window)
 
static void AddBloodsplatOnDamageOverlay (unsigned int uActorID, int a2, int a3)
 
static bool _46DF1A_collide_against_actor (int a1, int a2)
 
static void Arena_summon_actor (int monster_id, int16_t x, int y, int z)
 
static void DamageMonsterFromParty (int a1, unsigned int uActorID_Monster, struct Vec3_int_ *pVelocity)
 
static void MakeActorAIList_ODM ()
 
static int MakeActorAIList_BLV ()
 
static void UpdateActorAI ()
 
static void InitializeActors ()
 
static unsigned int SearchAliveActors (unsigned int *pTotalActors)
 
static unsigned int SearchActorByMonsterID (unsigned int *pTotalActors, int uMonsterID)
 
static unsigned int SearchActorByGroup (unsigned int *pTotalActors, unsigned int uGroup)
 
static unsigned int SearchActorByID (unsigned int *pTotalActors, unsigned int a2)
 

Открытые атрибуты

char pActorName [32]
 
int16_t sNPC_ID
 
int16_t field_22
 
unsigned int uAttributes
 
int16_t sCurrentHP
 
char field_2A [2]
 
struct MonsterInfo pMonsterInfo
 
int16_t word_000084_range_attack
 
int16_t word_000086_some_monster_id
 
uint16_t uActorRadius
 
uint16_t uActorHeight
 
uint16_t uMovementSpeed
 
struct Vec3_short_ vPosition
 
struct Vec3_short_ vVelocity
 
uint16_t uYawAngle
 
uint16_t uPitchAngle
 
int16_t uSectorID
 
uint16_t uCurrentActionLength
 
struct Vec3_short_ vInitialPosition
 
struct Vec3_short_ vGuardingPosition
 
uint16_t uTetherDistance
 
AIState uAIState
 
uint16_t uCurrentActionAnimation
 
uint16_t uCarriedItemID
 
char field_B6
 
char field_B7
 
unsigned int uCurrentActionTime
 
uint16_t pSpriteIDs [8]
 
uint16_t pSoundSampleIDs [4]
 
struct SpellBuff pActorBuffs [22]
 
struct ItemGen ActorHasItems [4]
 
unsigned int uGroup
 
unsigned int uAlly
 
struct ActorJob pScheduledJobs [8]
 
unsigned int uSummonerID
 
unsigned int uLastCharacterIDToHit
 
int dword_000334_unique_name
 
char field_338 [12]
 

Подробное описание

См. определение в файле Actor.h строка 151

Конструктор(ы)

◆ Actor()

Actor::Actor ( )
inline

См. определение в файле Actor.h строка 153

153  {
154  signed int i; // edx@1
155 
156  for (i = 0; i < 22; i++) {
157  this->pActorBuffs[i].uSkill = 0;
158  this->pActorBuffs[i].uPower = 0;
159  this->pActorBuffs[i].expire_time.value = 0;
160  this->pActorBuffs[i].uCaster = 0;
161  this->pActorBuffs[i].uFlags = 0;
162  }
163  for (i = 0; i < 4; i++) this->ActorHasItems[i].Reset();
164  Reset();
165  }

Перекрестные ссылки ActorHasItems, SpellBuff::expire_time, pActorBuffs, Reset(), SpellBuff::uCaster, SpellBuff::uFlags, SpellBuff::uPower, SpellBuff::uSkill и GameTime::value.

+ Граф вызовов:

Методы

◆ SummonMinion()

void Actor::SummonMinion ( int  summonerId)

См. определение в файле Actor.cpp строка 2606

2606  {
2607  unsigned __int8 extraSummonLevel; // al@1
2608  int summonMonsterBaseType; // esi@1
2609  int v5; // edx@2
2610  int v7; // edi@10
2611  Actor *actor; // esi@10
2612  MonsterInfo *v9; // ebx@10
2613  // MonsterDesc *v10; // edi@10
2614  int v13; // ebx@10
2615  int64 v15; // edi@10
2616  int64 v17; // ebx@10
2617  unsigned int v19; // qax@10
2618  int result; // eax@13
2619  unsigned int monsterId; // [sp+10h] [bp-18h]@8
2620  int v27; // [sp+18h] [bp-10h]@10
2621  int actorSector; // [sp+1Ch] [bp-Ch]@8
2622 
2623  actorSector = 0;
2625  actorSector = pIndoor->GetSector(this->vPosition.x, this->vPosition.y,
2626  this->vPosition.z);
2627 
2628  v19 = this->uAlly;
2629  if (!this->uAlly) {
2630  monsterId = this->pMonsterInfo.uID - 1;
2631  v19 = (uint)(monsterId * 0.33333334);
2632  }
2633  v27 = uCurrentlyLoadedLevelType == LEVEL_Outdoor ? 128 : 64;
2634  v13 = rand() % 2048;
2635  v15 = fixpoint_mul(stru_5C6E00->Cos(v13), v27) + this->vPosition.x;
2636  v17 = fixpoint_mul(stru_5C6E00->Sin(v13), v27) + this->vPosition.y;
2637 
2639  result = pIndoor->GetSector(v15, v17, this->vPosition.z);
2640  if (result != actorSector) return;
2641  result = BLV_GetFloorLevel(v15, v17, v27, result, &monsterId);
2642  if (result != -30000) return;
2643  if (abs(result - v27) > 1024) return;
2644  }
2645 
2646  extraSummonLevel = this->pMonsterInfo.uSpecialAbilityDamageDiceRolls;
2647  summonMonsterBaseType = this->pMonsterInfo.field_3C_some_special_attack;
2648  if (extraSummonLevel) {
2649  if (extraSummonLevel >= 1 && extraSummonLevel <= 3)
2650  summonMonsterBaseType =
2651  summonMonsterBaseType + extraSummonLevel - 1;
2652  } else {
2653  v5 = rand() % 100;
2654  if (v5 >= 90)
2655  summonMonsterBaseType += 2;
2656  else if (v5 >= 60)
2657  summonMonsterBaseType += 1;
2658  }
2659  v7 = summonMonsterBaseType - 1;
2660  actor = &pActors[uNumActors];
2661  v9 = &pMonsterStats->pInfos[v7 + 1];
2662  pActors[uNumActors].Reset();
2663  strcpy(actor->pActorName, v9->pName);
2664  actor->sCurrentHP = (short)v9->uHP;
2665  memcpy(&actor->pMonsterInfo, v9, sizeof(actor->pMonsterInfo));
2666  actor->word_000086_some_monster_id = summonMonsterBaseType;
2669  actor->pMonsterInfo.uTreasureDiceRolls = 0;
2670  actor->pMonsterInfo.uTreasureType = 0;
2671  actor->pMonsterInfo.uExp = 0;
2673 
2674  actor->vInitialPosition.x = v15;
2675  actor->vInitialPosition.y = v17;
2676  actor->vInitialPosition.z = this->vPosition.z;
2677  actor->vPosition.x = v15;
2678  actor->vPosition.y = v17;
2679  actor->vPosition.z = this->vPosition.z;
2680 
2681  actor->uTetherDistance = 256;
2682  actor->uSectorID = actorSector;
2683  actor->PrepareSprites(0);
2685  actor->uAlly = v19;
2686  actor->uCurrentActionTime = 0;
2687  actor->uGroup = this->uGroup;
2688  actor->uAIState = Summoned;
2689  actor->uCurrentActionLength = 256;
2690  actor->UpdateAnimation();
2691 
2692  ++uNumActors;
2694  if (ActorEnemy()) actor->uAttributes |= ACTOR_AGGRESSOR;
2695  actor->uSummonerID = PID(OBJECT_Actor, summonerId);
2696 }

Перекрестные ссылки ActorEnemy(), BLV_GetFloorLevel(), stru193_math::Cos(), MonsterInfo::field_3C_some_special_attack, fixpoint_mul(), IndoorLocation::GetSector(), MonsterInfo::Hostility_Friendly, LEVEL_Indoor, LEVEL_Outdoor, OBJECT_Actor, pActorName, pActors, pIndoor, MonsterStats::pInfos, pMonsterInfo, pMonsterList, MonsterList::pMonsters, pMonsterStats, MonsterInfo::pName, PrepareSprites(), sCurrentHP, stru193_math::Sin(), stru_5C6E00, Summoned, uActorHeight, uActorRadius, uAIState, uAlly, uAttributes, uCurrentActionLength, uCurrentActionTime, uCurrentlyLoadedLevelType, MonsterInfo::uExp, uGroup, MonsterInfo::uHostilityType, MonsterInfo::uHP, MonsterInfo::uID, MonsterDesc::uMonsterHeight, MonsterDesc::uMonsterRadius, MonsterDesc::uMovementSpeed, uMovementSpeed, uNumActors, UpdateAnimation(), uSectorID, MonsterInfo::uSpecialAbilityDamageDiceBonus, MonsterInfo::uSpecialAbilityDamageDiceRolls, uSummonerID, uTetherDistance, MonsterInfo::uTreasureDiceRolls, MonsterInfo::uTreasureType, vInitialPosition, vPosition и word_000086_some_monster_id.

Используется в special_ability_use_check().

+ Граф вызовов:
+ Граф вызова функции:

◆ Reset()

void Actor::Reset ( )

См. определение в файле Actor.cpp строка 2443

2443  {
2444  this->pActorName[0] = 0;
2445  this->word_000086_some_monster_id = 0;
2446  this->sNPC_ID = 0;
2447  this->vPosition.z = 0;
2448  this->vPosition.y = 0;
2449  this->vPosition.x = 0;
2450  this->vVelocity.z = 0;
2451  this->vVelocity.y = 0;
2452  this->vVelocity.x = 0;
2453  this->uYawAngle = 0;
2454  this->uPitchAngle = 0;
2455  this->uAttributes = 0;
2456  this->uSectorID = 0;
2457  this->uCurrentActionTime = 0;
2458  this->vInitialPosition.z = 0;
2459  this->vInitialPosition.y = 0;
2460  this->vInitialPosition.x = 0;
2461  this->vGuardingPosition.z = 0;
2462  this->vGuardingPosition.y = 0;
2463  this->vGuardingPosition.x = 0;
2464  this->uTetherDistance = 256;
2465  this->uActorRadius = 32;
2466  this->uActorHeight = 128;
2467  this->uAIState = Standing;
2469  this->uMovementSpeed = 200;
2470  this->uCarriedItemID = 0;
2471  this->uGroup = 0;
2472  this->uAlly = 0;
2473  this->uSummonerID = 0;
2474  this->uLastCharacterIDToHit = 0;
2475  this->dword_000334_unique_name = 0;
2476  memset(this->pSpriteIDs, 0, sizeof(pSpriteIDs));
2477  memset(this->pActorBuffs, 0, 0x160u);
2478 }

Перекрестные ссылки ANIM_Standing, dword_000334_unique_name, pActorBuffs, pActorName, pSpriteIDs, sNPC_ID, Standing, uActorHeight, uActorRadius, uAIState, uAlly, uAttributes, uCarriedItemID, uCurrentActionAnimation, uCurrentActionTime, uGroup, uLastCharacterIDToHit, uMovementSpeed, uPitchAngle, uSectorID, uSummonerID, uTetherDistance, uYawAngle, vGuardingPosition, vInitialPosition, vPosition, vVelocity и word_000086_some_monster_id.

Используется в Actor() и AI_SpellAttack().

+ Граф вызова функции:

◆ Remove()

void Actor::Remove ( )

См. определение в файле Actor.cpp строка 2504

2504 { this->uAIState = Removed; }

Перекрестные ссылки Removed и uAIState.

Используется в LootActor().

+ Граф вызова функции:

◆ PrepareSprites()

void Actor::PrepareSprites ( char  load_sounds_if_bit1_set)

См. определение в файле Actor.cpp строка 2481

2481  {
2482  MonsterDesc *v3; // esi@1
2483  MonsterInfo *v9; // [sp+84h] [bp-10h]@1
2484 
2486  v9 = &pMonsterStats->pInfos[pMonsterInfo.uID /*- 1 + 1*/];
2487  // v12 = pSpriteIDs;
2488  // Source = (char *)v3->pSpriteNames;
2489  // do
2490  for (uint i = 0; i < 8; ++i) {
2491  // strcpy(pSpriteName, v3->pSpriteNames[i]);
2492  pSpriteIDs[i] = pSpriteFrameTable->FastFindSprite(v3->pSpriteNames[i]);
2494  }
2495  uActorHeight = v3->uMonsterHeight;
2496  uActorRadius = v3->uMonsterRadius;
2497  uMovementSpeed = v9->uBaseSpeed;
2498  if (!(load_sounds_if_bit1_set & 1)) {
2499  for (int i = 0; i < 4; ++i) pSoundSampleIDs[i] = v3->pSoundSampleIDs[i];
2500  }
2501 }

Перекрестные ссылки SpriteFrameTable::FastFindSprite(), SpriteFrameTable::InitializeSprite(), MonsterStats::pInfos, pMonsterInfo, pMonsterList, MonsterList::pMonsters, pMonsterStats, pSoundSampleIDs, pSpriteFrameTable, pSpriteIDs, uActorHeight, uActorRadius, MonsterInfo::uBaseSpeed, MonsterInfo::uID и uMovementSpeed.

Используется в PrepareToLoadBLV(), SpawnEncounter() и SummonMinion().

+ Граф вызовов:
+ Граф вызова функции:

◆ UpdateAnimation()

void Actor::UpdateAnimation ( )

См. определение в файле Actor.cpp строка 2376

2376  {
2377  ResetAnimation();
2378  switch (uAIState) {
2379  case Tethered:
2381  break;
2382 
2383  case AttackingMelee:
2385  uAttributes |= ACTOR_ANIMATION;
2386  break;
2387 
2388  case AttackingRanged1:
2389  case AttackingRanged2:
2390  case AttackingRanged3:
2391  case AttackingRanged4:
2393  uAttributes |= ACTOR_ANIMATION;
2394  break;
2395 
2396  case Dying:
2397  case Resurrected:
2399  uAttributes |= ACTOR_ANIMATION;
2400  break;
2401 
2402  case Pursuing:
2403  case Fleeing:
2405  uAttributes |= ACTOR_ANIMATION;
2406  break;
2407 
2408  case Stunned:
2410  uAttributes |= ACTOR_ANIMATION;
2411  break;
2412 
2413  case Fidgeting:
2415  uAttributes |= ACTOR_ANIMATION;
2416  break;
2417 
2418  case Standing:
2419  case Interacting:
2420  case Summoned:
2422  uAttributes |= ACTOR_ANIMATION;
2423  break;
2424 
2425  case Dead:
2427  .hw_sprites[0] == nullptr)
2428  uAIState = Removed;
2429  else
2431  break;
2432 
2433  case Removed:
2434  case Disabled:
2435  return;
2436 
2437  default:
2438  assert(false);
2439  }
2440 }

Перекрестные ссылки ANIM_AtkMelee, ANIM_AtkRanged, ANIM_Bored, ANIM_Dead, ANIM_Dying, ANIM_GotHit, ANIM_Standing, ANIM_Walking, AttackingMelee, AttackingRanged1, AttackingRanged2, AttackingRanged3, AttackingRanged4, Dead, Disabled, Dying, Fidgeting, Fleeing, SpriteFrame::hw_sprites, Interacting, pSpriteFrameTable, pSpriteIDs, SpriteFrameTable::pSpriteSFrames, Pursuing, Removed, ResetAnimation(), Resurrected, Standing, Stunned, Summoned, Tethered, uAIState, uAttributes и uCurrentActionAnimation.

Используется в stru262_TurnBased::ActorAIChooseNewTargets(), AI_Bored(), AI_Flee(), AI_Pursue1(), AI_Pursue2(), AI_Pursue3(), stru262_TurnBased::AITurnBasedAction(), Die(), Resurrect(), SummonMinion() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ GetActorsRelation()

signed int Actor::GetActorsRelation ( Actor a2)

См. определение в файле Actor.cpp строка 2319

2319  {
2320  unsigned int thisGroup; // ebp@19
2321  int otherGroup; // eax@22
2322  unsigned int thisAlly; // edx@25
2323  unsigned int otherAlly; // edx@33
2324 
2325  if (otherActPtr) {
2326  if (otherActPtr->uGroup != 0 && this->uGroup != 0 &&
2327  otherActPtr->uGroup == this->uGroup)
2328  return 0;
2329  }
2330 
2331  if (this->pActorBuffs[ACTOR_BUFF_BERSERK].Active()) return 4;
2332  thisAlly = this->uAlly;
2333  if (this->pActorBuffs[ACTOR_BUFF_ENSLAVED].Active() || thisAlly == 9999)
2334  thisGroup = 0;
2335  else if (thisAlly > 0)
2336  thisGroup = thisAlly;
2337  else
2338  thisGroup = (this->pMonsterInfo.uID - 1) / 3 + 1;
2339 
2340  if (otherActPtr) {
2341  if (otherActPtr->pActorBuffs[ACTOR_BUFF_BERSERK].Active()) return 4;
2342  otherAlly = otherActPtr->uAlly;
2343  if (otherActPtr->pActorBuffs[ACTOR_BUFF_ENSLAVED].Active() ||
2344  otherAlly == 9999)
2345  otherGroup = 0;
2346  else if (otherAlly > 0)
2347  otherGroup = otherAlly;
2348  else
2349  otherGroup = (otherActPtr->pMonsterInfo.uID - 1) / 3 + 1;
2350  } else {
2351  otherGroup = 0;
2352  }
2353 
2354  if (this->pActorBuffs[ACTOR_BUFF_CHARM].Active() && !otherGroup ||
2355  otherActPtr && otherActPtr->pActorBuffs[ACTOR_BUFF_CHARM].Active() &&
2356  !thisGroup)
2357  return 0;
2358  if (!this->pActorBuffs[ACTOR_BUFF_ENSLAVED].Active() &&
2359  this->ActorEnemy() && !otherGroup)
2360  return 4;
2361  if (thisGroup >= 89 || otherGroup >= 89) return 0;
2362 
2363  if (thisGroup == 0) {
2364  if ((!otherActPtr || this->pActorBuffs[ACTOR_BUFF_ENSLAVED].Active() &&
2365  otherActPtr->ActorFriend()) &&
2366  !pFactionTable->relations[otherGroup][0])
2367  return pFactionTable->relations[0][otherGroup];
2368  else
2369  return 4;
2370  } else {
2371  return pFactionTable->relations[thisGroup][otherGroup];
2372  }
2373 }

Перекрестные ссылки SpellBuff::Active(), ACTOR_BUFF_BERSERK, ACTOR_BUFF_CHARM, ACTOR_BUFF_ENSLAVED, ActorEnemy(), ActorFriend(), pActorBuffs, pFactionTable, pMonsterInfo, FactionTable::relations, uAlly, uGroup и MonsterInfo::uID.

Используется в _SelectTarget(), MakeActorAIList_BLV() и MakeActorAIList_ODM().

+ Граф вызовов:
+ Граф вызова функции:

◆ SetRandomGoldIfTheresNoItem()

void Actor::SetRandomGoldIfTheresNoItem ( )

См. определение в файле Actor.cpp строка 174

174  {
175  int v2; // edi@1
176 
177  v2 = 0;
178  if (!this->ActorHasItems[3].uItemID) {
179  if (this->pMonsterInfo.uTreasureDiceRolls) {
180  for (int i = 0; i < this->pMonsterInfo.uTreasureDiceRolls; i++)
181  v2 += rand() % this->pMonsterInfo.uTreasureDiceSides + 1;
182  if (v2) {
185  (ITEM_ENCHANTMENT)v2; // actual gold amount
186  }
187  }
188  }
189  if (rand() % 100 < this->pMonsterInfo.uTreasureDropChance) {
190  if (this->pMonsterInfo.uTreasureLevel)
192  this->pMonsterInfo.uTreasureType,
193  &this->ActorHasItems[2]);
194  }
195  this->uAttributes |= ACTOR_HAS_ITEM;
196 }

Перекрестные ссылки ActorHasItems, ItemsTable::GenerateItem(), ITEM_GOLD_SMALL, pItemsTable, pMonsterInfo, ItemGen::special_enchantment, uAttributes, ItemGen::uItemID, MonsterInfo::uTreasureDiceRolls, MonsterInfo::uTreasureDiceSides, MonsterInfo::uTreasureDropChance и MonsterInfo::uTreasureLevel.

Используется в Player::StealFromActor().

+ Граф вызовов:
+ Граф вызова функции:

◆ CanAct()

bool Actor::CanAct ( )

См. определение в файле Actor.cpp строка 157

157  {
158  bool stoned = this->pActorBuffs[ACTOR_BUFF_STONED].Active();
159  bool paralyzed = this->pActorBuffs[ACTOR_BUFF_PARALYZED].Active();
160  return !(stoned || paralyzed || this->uAIState == Dying ||
161  this->uAIState == Dead || this->uAIState == Removed ||
162  this->uAIState == Summoned || this->uAIState == Disabled);
163 }

Перекрестные ссылки SpellBuff::Active(), ACTOR_BUFF_PARALYZED, ACTOR_BUFF_STONED, Dead, Disabled, Dying, pActorBuffs, Removed, Summoned и uAIState.

Используется в AggroSurroundingPeasants(), AI_Flee(), DamageMonsterFromParty(), InitializeActors(), MakeActorAIList_BLV(), MakeActorAIList_ODM() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ IsNotAlive()

bool Actor::IsNotAlive ( )

См. определение в файле Actor.cpp строка 166

166  {
167  bool stoned = this->pActorBuffs[ACTOR_BUFF_STONED].Active();
168  return (stoned || (uAIState == Dying) || (uAIState == Dead) ||
169  (uAIState == Removed) || (uAIState == Summoned) ||
170  (uAIState == Disabled));
171 }

Перекрестные ссылки SpellBuff::Active(), ACTOR_BUFF_STONED, Dead, Disabled, Dying, pActorBuffs, Removed, Summoned и uAIState.

Используется в _SelectTarget(), ActorDamageFromMonster(), DamageMonsterFromParty(), SearchActorByGroup(), SearchActorByID(), SearchActorByMonsterID() и SearchAliveActors().

+ Граф вызовов:
+ Граф вызова функции:

◆ IsPeasant()

bool Actor::IsPeasant ( )

См. определение в файле Actor.cpp строка 1369

1369  {
1370  unsigned int InHostile_Id; // eax@1
1371 
1372  InHostile_Id = this->uAlly;
1373  if (!this->uAlly) InHostile_Id = (this->pMonsterInfo.uID - 1) / 3 + 1;
1374  return (signed int)InHostile_Id >= 39 &&
1375  (signed int)InHostile_Id <= 44 // Dwarfs peasants
1376  || (signed int)InHostile_Id >= 45 &&
1377  (signed int)InHostile_Id <= 50 // Elves peasants
1378  || (signed int)InHostile_Id >= 51 &&
1379  (signed int)InHostile_Id <= 62 // Humans peasants
1380  || (signed int)InHostile_Id >= 78 &&
1381  (signed int)InHostile_Id <= 83; // Goblins peasants
1382 }

Перекрестные ссылки pMonsterInfo, uAlly и MonsterInfo::uID.

Используется в ApplyFineForKillingPeasant() и InitializeActors().

+ Граф вызова функции:

◆ ResetAnimation()

void Actor::ResetAnimation ( )
inline

См. определение в файле Actor.h строка 178

178 { uAttributes &= 0xFFDFFFFF; }

Перекрестные ссылки uAttributes.

Используется в UpdateAnimation().

+ Граф вызова функции:

◆ ResetQueue()

void Actor::ResetQueue ( )
inline

См. определение в файле Actor.h строка 179

179 { uAttributes &= ~ACTOR_STAND_IN_QUEUE; }

Перекрестные ссылки uAttributes.

◆ ResetActive()

void Actor::ResetActive ( )
inline

См. определение в файле Actor.h строка 180

180 { uAttributes &= 0xFFFFBFFF; }

Перекрестные ссылки uAttributes.

Используется в MakeActorAIList_ODM().

+ Граф вызова функции:

◆ ResetAlive()

void Actor::ResetAlive ( )
inline

См. определение в файле Actor.h строка 181

181 { uAttributes &= 0xFFFFFBFF; }

Перекрестные ссылки uAttributes.

Используется в MakeActorAIList_ODM().

+ Граф вызова функции:

◆ ResetHasItem()

void Actor::ResetHasItem ( )
inline

См. определение в файле Actor.h строка 182

182 { uAttributes &= 0xFF7FFFFF; }

Перекрестные ссылки uAttributes.

Используется в InitializeActors().

+ Граф вызова функции:

◆ ResetHostile()

void Actor::ResetHostile ( )
inline

См. определение в файле Actor.h строка 183

183 { uAttributes &= 0xFEFFFFFF; }

Перекрестные ссылки uAttributes.

Используется в MakeActorAIList_ODM().

+ Граф вызова функции:

◆ ResetAggressor()

void Actor::ResetAggressor ( )
inline

См. определение в файле Actor.h строка 184

184 { uAttributes &= 0xFFF7FFFF; }

Перекрестные ссылки uAttributes.

Используется в InitializeActors().

+ Граф вызова функции:

◆ ActorEnemy()

bool Actor::ActorEnemy ( ) const
inline

См. определение в файле Actor.h строка 185

185  {
186  return (uAttributes & ACTOR_AGGRESSOR) != 0;
187  }

Перекрестные ссылки uAttributes.

Используется в _SelectTarget(), GetActorsRelation(), MakeActorAIList_BLV(), MakeActorAIList_ODM(), Player::StealFromActor() и SummonMinion().

+ Граф вызова функции:

◆ ActorFriend()

bool Actor::ActorFriend ( ) const
inline

См. определение в файле Actor.h строка 188

188  {
189  return (uAttributes & ACTOR_AGGRESSOR) == 0;
190  }

Перекрестные ссылки uAttributes.

Используется в GetActorsRelation().

+ Граф вызова функции:

◆ ActorHasItem()

bool Actor::ActorHasItem ( ) const
inline

См. определение в файле Actor.h строка 191

191  {
192  return (uAttributes & ACTOR_HAS_ITEM) != 0;
193  }

Перекрестные ссылки uAttributes.

Используется в LootActor() и Player::StealFromActor().

+ Граф вызова функции:

◆ ActorNearby()

bool Actor::ActorNearby ( ) const
inline

См. определение в файле Actor.h строка 194

194  {
195  return (uAttributes & ACTOR_NEARBY) != 0;
196  }

Перекрестные ссылки uAttributes.

Используется в MakeActorAIList_BLV() и UpdateActorAI().

+ Граф вызова функции:

◆ _SelectTarget()

void Actor::_SelectTarget ( unsigned int  uActorID,
int *  a2,
bool  can_target_party 
)
static

См. определение в файле Actor.cpp строка 2230

2231  {
2232  int v5; // ecx@1
2233  signed int v10; // eax@13
2234  uint v11; // ebx@16
2235  uint v12; // eax@16
2236  signed int v14; // eax@31
2237  uint v15; // edi@43
2238  uint v16; // ebx@45
2239  uint v17; // eax@45
2240  signed int closestId; // [sp+14h] [bp-1Ch]@1
2241  uint v23; // [sp+1Ch] [bp-14h]@16
2242  unsigned int lowestRadius; // [sp+24h] [bp-Ch]@1
2243  uint v27; // [sp+2Ch] [bp-4h]@16
2244  uint v28; // [sp+2Ch] [bp-4h]@45
2245 
2246  lowestRadius = UINT_MAX;
2247  v5 = 0;
2248  *a2 = 0;
2249  closestId = 0;
2250  assert(uActorID < uNumActors);
2251  Actor *thisActor = &pActors[uActorID];
2252 
2253  for (uint i = 0; i < uNumActors; ++i) {
2254  Actor *actor = &pActors[i];
2255  if (actor->uAIState == Dead || actor->uAIState == Dying ||
2256  actor->uAIState == Removed || actor->uAIState == Summoned ||
2257  actor->uAIState == Disabled || uActorID == i)
2258  continue;
2259 
2260  if (thisActor->uLastCharacterIDToHit == 0 ||
2261  PID(OBJECT_Actor, v5) != thisActor->uLastCharacterIDToHit) {
2262  v10 = thisActor->GetActorsRelation(actor);
2263  if (v10 == 0) continue;
2264  } else if (thisActor->IsNotAlive()) {
2265  thisActor->uLastCharacterIDToHit = 0;
2266  v10 = thisActor->GetActorsRelation(actor);
2267  if (v10 == 0) continue;
2268  } else {
2269  if ((actor->uGroup != 0 || thisActor->uGroup != 0) &&
2270  actor->uGroup == thisActor->uGroup)
2271  continue;
2272  v10 = 4;
2273  }
2274  if (thisActor->pMonsterInfo.uHostilityType)
2275  v10 = pMonsterStats->pInfos[thisActor->pMonsterInfo.uID]
2276  .uHostilityType;
2277  v11 = _4DF380_hostilityRanges[v10];
2278  v23 = abs(thisActor->vPosition.x - actor->vPosition.x);
2279  v27 = abs(thisActor->vPosition.y - actor->vPosition.y);
2280  v12 = abs(thisActor->vPosition.z - actor->vPosition.z);
2281  if (v23 <= v11 && v27 <= v11 && v12 <= v11 &&
2283  PID(OBJECT_Actor, uActorID)) &&
2284  v23 * v23 + v27 * v27 + v12 * v12 < lowestRadius) {
2285  lowestRadius = v23 * v23 + v27 * v27 + v12 * v12;
2286  closestId = i;
2287  }
2288  }
2289 
2290  if (lowestRadius != UINT_MAX) {
2291  *a2 = PID(OBJECT_Actor, closestId);
2292  }
2293 
2294  if (can_target_party && !pParty->Invisible()) {
2295  if (thisActor->ActorEnemy() &&
2296  !thisActor->pActorBuffs[ACTOR_BUFF_ENSLAVED].Active() &&
2297  !thisActor->pActorBuffs[ACTOR_BUFF_CHARM].Active() &&
2298  !thisActor->pActorBuffs[ACTOR_BUFF_SUMMONED].Active())
2299  v14 = 4;
2300  else
2301  v14 = thisActor->GetActorsRelation(0);
2302  if (v14 != 0) {
2303  if (!thisActor->pMonsterInfo.uHostilityType)
2304  v15 = _4DF380_hostilityRanges[v14];
2305  else
2306  v15 = _4DF380_hostilityRanges[4];
2307  v16 = abs(thisActor->vPosition.x - pParty->vPosition.x);
2308  v28 = abs(thisActor->vPosition.y - pParty->vPosition.y);
2309  v17 = abs(thisActor->vPosition.z - pParty->vPosition.z);
2310  if (v16 <= v15 && v28 <= v15 && v17 <= v15 &&
2311  (v16 * v16 + v28 * v28 + v17 * v17 < lowestRadius)) {
2312  *a2 = OBJECT_Player;
2313  }
2314  }
2315  }
2316 }

Перекрестные ссылки _4DF380_hostilityRanges, SpellBuff::Active(), ACTOR_BUFF_CHARM, ACTOR_BUFF_ENSLAVED, ACTOR_BUFF_SUMMONED, ActorEnemy(), Dead, Disabled, Dying, GetActorsRelation(), Party::Invisible(), IsNotAlive(), OBJECT_Actor, OBJECT_Player, pActorBuffs, pActors, MonsterStats::pInfos, pMonsterInfo, pMonsterStats, pParty, Removed, sub_4070EF_prolly_detect_player(), Summoned, uAIState, uGroup, MonsterInfo::uHostilityType, MonsterInfo::uID, uLastCharacterIDToHit, uNumActors, Party::vPosition и vPosition.

Используется в stru262_TurnBased::ActorAIChooseNewTargets(), stru262_TurnBased::ActorMove(), stru262_TurnBased::AI_Action_() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_Pursue3()

void Actor::AI_Pursue3 ( unsigned int  uActorID,
unsigned int  a2,
signed int  uActionLength,
struct AIDirection a4 
)
static

См. определение в файле Actor.cpp строка 2171

2172  {
2173  int v5; // eax@1
2174  Actor *v6; // ebx@1
2175  int v7; // ecx@1
2176  signed __int16 v12; // cx@19
2177  __int16 v14; // ax@25
2178  unsigned __int16 v16; // ax@28
2179  AIDirection a3; // [sp+Ch] [bp-40h]@8
2180  AIDirection *v20; // [sp+28h] [bp-24h]@8
2181 
2182  v5 = 0;
2183  v6 = &pActors[uActorID];
2184  v7 = PID(OBJECT_Actor, uActorID);
2185  if (v6->pMonsterInfo.uFlying != 0 && !pParty->bFlying) {
2186  if (v6->pMonsterInfo.uMissleAttack1Type &&
2188  v5 = v6->uActorRadius + 512;
2189  else
2190  v5 = pParty->uPartyHeight;
2191  }
2192  if (!a4) {
2193  Actor::GetDirectionInfo(v7, a2, &a3, v5);
2194  v20 = &a3;
2195  }
2198  if (!uActionLength) uActionLength = 256;
2199  return Actor::AI_StandOrBored(uActorID, 4, uActionLength, a4);
2200  }
2201  if (a4->uDistance < 307.2) {
2202  if (!uActionLength) uActionLength = 256;
2203  return Actor::AI_StandOrBored(uActorID, a2, uActionLength, a4);
2204  }
2205  if (uActionLength) {
2206  v6->uCurrentActionLength = uActionLength + rand() % uActionLength;
2207  } else {
2208  v12 = v6->uMovementSpeed;
2209  if (v12)
2210  v6->uCurrentActionLength = (signed int)(a4->uDistanceXZ << 7) / v12;
2211  else
2212  v6->uCurrentActionLength = 0;
2213  if (v6->uCurrentActionLength > 128) v6->uCurrentActionLength = 128;
2214  }
2215  v14 = (short)a4->uYawAngle;
2216  if (rand() % 2)
2217  v14 += 256;
2218  else
2219  v14 -= 256;
2220  v6->uYawAngle = v14;
2221  v16 = (short)a4->uPitchAngle;
2222  v6->uCurrentActionTime = 0;
2223  v6->uPitchAngle = v16;
2224  v6->uAIState = Pursuing;
2225  if (rand() % 100 < 2) Actor::PlaySound(uActorID, 2);
2226  v6->UpdateAnimation();
2227 }

Перекрестные ссылки AI_StandOrBored(), MonsterStats::BelongsToSupertype(), Party::bFlying, GetDirectionInfo(), LEVEL_Outdoor, MONSTER_SUPERTYPE_TREANT, OBJECT_Actor, pActors, PlaySound(), pMonsterInfo, pParty, Pursuing, uActorRadius, uAIState, uCurrentActionLength, uCurrentActionTime, uCurrentlyLoadedLevelType, AIDirection::uDistance, AIDirection::uDistanceXZ, MonsterInfo::uFlying, MonsterInfo::uID, MonsterInfo::uMissleAttack1Type, uMovementSpeed, Party::uPartyHeight, UpdateAnimation(), AIDirection::uPitchAngle, uPitchAngle, AIDirection::uYawAngle и uYawAngle.

Используется в UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_Pursue2()

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

См. определение в файле Actor.cpp строка 2114

2115  {
2116  int v6; // eax@1
2117  Actor *v7; // ebx@1
2118  unsigned int v8; // ecx@1
2119  AIDirection *v10; // esi@7
2120  signed __int16 v13; // cx@19
2121  unsigned __int16 v14; // ax@25
2122  AIDirection a3; // [sp+Ch] [bp-40h]@8
2123  AIDirection v18; // [sp+28h] [bp-24h]@8
2124 
2125  v6 = 0;
2126  v7 = &pActors[uActorID];
2127  v8 = PID(OBJECT_Actor, uActorID);
2128  if (v7->pMonsterInfo.uFlying != 0 && !pParty->bFlying) {
2129  if (v7->pMonsterInfo.uMissleAttack1Type &&
2131  v6 = v7->uActorRadius + 512;
2132  else
2133  v6 = pParty->uPartyHeight;
2134  }
2135  v10 = pDir;
2136  if (!pDir) {
2137  Actor::GetDirectionInfo(v8, a2, &a3, v6);
2138  v10 = &a3;
2139  }
2142  if (!uActionLength) uActionLength = 256;
2143  Actor::AI_StandOrBored(uActorID, 4, uActionLength, v10);
2144  return;
2145  }
2146  if ((signed int)v10->uDistance < a5) {
2147  if (!uActionLength) uActionLength = 256;
2148  Actor::AI_StandOrBored(uActorID, a2, uActionLength, v10);
2149  return;
2150  }
2151  if (uActionLength) {
2152  v7->uCurrentActionLength = uActionLength;
2153  } else {
2154  v13 = v7->uMovementSpeed;
2155  if (v13)
2156  v7->uCurrentActionLength =
2157  (signed int)(v10->uDistanceXZ << 7) / v13;
2158  else
2159  v7->uCurrentActionLength = 0;
2160  if (v7->uCurrentActionLength > 32) v7->uCurrentActionLength = 32;
2161  }
2162  v7->uYawAngle = (short)v10->uYawAngle;
2163  v14 = (short)v10->uPitchAngle;
2164  v7->uCurrentActionTime = 0;
2165  v7->uPitchAngle = v14;
2166  v7->uAIState = Pursuing;
2167  v7->UpdateAnimation();
2168 }

Перекрестные ссылки AI_StandOrBored(), MonsterStats::BelongsToSupertype(), Party::bFlying, GetDirectionInfo(), LEVEL_Outdoor, MONSTER_SUPERTYPE_TREANT, OBJECT_Actor, pActors, pMonsterInfo, pParty, Pursuing, uActorRadius, uAIState, uCurrentActionLength, uCurrentActionTime, uCurrentlyLoadedLevelType, AIDirection::uDistance, AIDirection::uDistanceXZ, MonsterInfo::uFlying, MonsterInfo::uID, MonsterInfo::uMissleAttack1Type, uMovementSpeed, Party::uPartyHeight, UpdateAnimation(), AIDirection::uPitchAngle, uPitchAngle, AIDirection::uYawAngle и uYawAngle.

Используется в stru262_TurnBased::ActorMove() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_Flee()

void Actor::AI_Flee ( unsigned int  uActorID,
signed int  edx0,
int  uActionLength,
struct AIDirection a4 
)
static

См. определение в файле Actor.cpp строка 2070

2071  {
2072  Actor *v5; // ebx@1
2073  int v7; // ecx@2
2074  AIDirection v10; // [sp+8h] [bp-7Ch]@4
2075  AIDirection a3; // [sp+24h] [bp-60h]@3
2076  AIDirection *v13; // [sp+5Ch] [bp-28h]@4
2077 
2078  v5 = &pActors[uActorID];
2079  if (v5->CanAct()) {
2080  v7 = PID(OBJECT_Actor, uActorID);
2081  if (!a4) {
2082  Actor::GetDirectionInfo(v7, sTargetPid, &a3,
2083  v5->pMonsterInfo.uFlying);
2084  a4 = &a3;
2085  }
2086  Actor::GetDirectionInfo(v7, 4u, &v10, 0);
2087  v13 = &v10;
2090  PID_TYPE(sTargetPid) == OBJECT_Actor && v13->uDistance < 307.2) {
2091  if (!uActionLength) uActionLength = 256;
2092  Actor::AI_StandOrBored(uActorID, 4, uActionLength, v13);
2093  } else {
2094  if (v5->uMovementSpeed)
2095  v5->uCurrentActionLength =
2096  (signed int)(a4->uDistanceXZ << 7) / v5->uMovementSpeed;
2097  else
2098  v5->uCurrentActionLength = 0;
2099  if (v5->uCurrentActionLength > 256) v5->uCurrentActionLength = 256;
2100  v5->uYawAngle =
2101  (short)stru_5C6E00->uIntegerHalfPi + (short)a4->uYawAngle;
2102  v5->uYawAngle =
2103  (short)stru_5C6E00->uDoublePiMask &
2104  (v5->uYawAngle + rand() % (signed int)stru_5C6E00->uIntegerPi);
2105  v5->uCurrentActionTime = 0;
2106  v5->uPitchAngle = (short)a4->uPitchAngle;
2107  v5->uAIState = Fleeing;
2108  v5->UpdateAnimation();
2109  }
2110  }
2111 }

Перекрестные ссылки AI_StandOrBored(), MonsterStats::BelongsToSupertype(), CanAct(), Fleeing, GetDirectionInfo(), MONSTER_SUPERTYPE_TREANT, OBJECT_Actor, pActors, pMonsterInfo, stru_5C6E00, uAIState, uCurrentActionLength, uCurrentActionTime, AIDirection::uDistance, AIDirection::uDistanceXZ, stru193_math::uDoublePiMask, MonsterInfo::uFlying, MonsterInfo::uID, stru193_math::uIntegerHalfPi, stru193_math::uIntegerPi, uMovementSpeed, UpdateAnimation(), AIDirection::uPitchAngle, uPitchAngle, AIDirection::uYawAngle и uYawAngle.

Используется в stru262_TurnBased::ActorMove(), UpdateActorAI(), UpdateActors_BLV(), UpdateActors_ODM() и Party::Yell().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_Pursue1()

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

См. определение в файле Actor.cpp строка 2003

2004  {
2005  int v6; // eax@1
2006  Actor *v7; // ebx@1
2007  unsigned int v8; // ecx@1
2008  AIDirection *v10; // esi@6
2009  AIDirection a3; // [sp+Ch] [bp-5Ch]@7
2010  unsigned int v18; // [sp+64h] [bp-4h]@1
2011 
2012  v6 = 0;
2013  v7 = &pActors[uActorID];
2014  v8 = PID(OBJECT_Actor, uActorID);
2015  if (v7->pMonsterInfo.uFlying != 0 &&
2016  !pParty->bFlying) { // TODO(_): Does v6 have a point?
2018  v6 = v7->uActorRadius + 512;
2019  else
2020  v6 = pParty->uPartyHeight;
2021  }
2022 
2023  if (pDir == nullptr) {
2024  Actor::GetDirectionInfo(v8, a2, &a3, v6);
2025  v10 = &a3;
2026  } else {
2027  v10 = pDir;
2028  }
2031  if (!uActionLength) uActionLength = 256;
2032  Actor::AI_StandOrBored(uActorID, 4, uActionLength, v10);
2033  return;
2034  }
2035  if (v10->uDistance < 307.2) {
2036  if (!uActionLength) uActionLength = 256;
2037  Actor::AI_Stand(uActorID, a2, uActionLength, v10);
2038  return;
2039  }
2040  if (v7->uMovementSpeed == 0) {
2041  Actor::AI_Stand(uActorID, a2, uActionLength, v10);
2042  return;
2043  }
2044  if (arg0 % 2)
2045  v18 = -16;
2046  else
2047  v18 = 16;
2048 
2049  v7->uYawAngle = stru_5C6E00->Atan2(
2050  pParty->vPosition.x +
2052  v10->uYawAngle),
2053  v10->uDistanceXZ) -
2054  v7->vPosition.x,
2055  pParty->vPosition.y +
2057  v10->uYawAngle),
2058  v10->uDistanceXZ) -
2059  v7->vPosition.y);
2060  if (uActionLength)
2061  v7->uCurrentActionLength = uActionLength;
2062  else
2063  v7->uCurrentActionLength = 128;
2064  v7->uPitchAngle = (short)v10->uPitchAngle;
2065  v7->uAIState = Pursuing;
2066  v7->UpdateAnimation();
2067 }

Перекрестные ссылки AI_Stand(), AI_StandOrBored(), stru193_math::Atan2(), MonsterStats::BelongsToSupertype(), Party::bFlying, stru193_math::Cos(), fixpoint_mul(), GetDirectionInfo(), MONSTER_SUPERTYPE_TREANT, OBJECT_Actor, pActors, pMonsterInfo, pParty, Pursuing, stru193_math::Sin(), stru_5C6E00, uActorRadius, uAIState, uCurrentActionLength, AIDirection::uDistance, AIDirection::uDistanceXZ, MonsterInfo::uFlying, MonsterInfo::uID, stru193_math::uIntegerPi, MonsterInfo::uMissleAttack1Type, uMovementSpeed, Party::uPartyHeight, UpdateAnimation(), AIDirection::uPitchAngle, uPitchAngle, AIDirection::uYawAngle, uYawAngle, Party::vPosition и vPosition.

Используется в stru262_TurnBased::ActorMove(), AI_MeleeAttack(), AI_MissileAttack1(), AI_MissileAttack2(), AI_SpellAttack1(), AI_SpellAttack2() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ PlaySound()

void Actor::PlaySound ( unsigned int  uActorID,
unsigned int  uSoundID 
)
static

См. определение в файле Actor.cpp строка 1974

1974  {
1975  SoundID sound_sample_id =
1976  (SoundID)pActors[uActorID].pSoundSampleIDs[uSoundID];
1977  if (sound_sample_id) {
1978  if (!pActors[uActorID].pActorBuffs[ACTOR_BUFF_SHRINK].Active()) {
1979  pAudioPlayer->PlaySound(sound_sample_id,
1980  PID(OBJECT_Actor, uActorID), 0, -1, 0,
1981  0);
1982  } else {
1983  switch (pActors[uActorID].pActorBuffs[ACTOR_BUFF_SHRINK].uPower) {
1984  case 1:
1985  pAudioPlayer->PlaySound(sound_sample_id, PID(OBJECT_Actor, uActorID), 0, 0, 0, 0);
1986  break;
1987  case 2:
1988  pAudioPlayer->PlaySound(sound_sample_id, PID(OBJECT_Actor, uActorID), 0, 0, 0, 0);
1989  break;
1990  case 3:
1991  case 4:
1992  pAudioPlayer->PlaySound(sound_sample_id, PID(OBJECT_Actor, uActorID), 0, 0, 0, 0);
1993  break;
1994  default:
1995  pAudioPlayer->PlaySound(sound_sample_id, PID(OBJECT_Actor, uActorID), 0, -1, 0, 0);
1996  break;
1997  }
1998  }
1999  }
2000 }

Перекрестные ссылки ACTOR_BUFF_SHRINK, OBJECT_Actor, pActorBuffs, pActors, pAudioPlayer, AudioPlayer::PlaySound() и pSoundSampleIDs.

Используется в AI_Bored(), AI_MeleeAttack(), AI_MissileAttack1(), AI_MissileAttack2(), AI_Pursue3(), AI_RandomMove(), AI_SpellAttack1(), AI_SpellAttack2(), AI_Stun(), Die() и Resurrect().

+ Граф вызовов:
+ Граф вызова функции:

◆ Die()

void Actor::Die ( unsigned int  uActorID)
static

См. определение в файле Actor.cpp строка 1906

1906  {
1907  Actor *actor = &pActors[uActorID];
1908 
1909  actor->uCurrentActionTime = 0;
1910  actor->uAIState = Dying;
1912  actor->sCurrentHP = 0;
1913  actor->uCurrentActionLength =
1915  .uAnimLength;
1918  Actor::PlaySound(uActorID, 1);
1919  actor->UpdateAnimation();
1920 
1921  for (uint i = 0; i < 5; ++i)
1922  if (pParty->monster_id_for_hunting[i] == actor->pMonsterInfo.uID)
1924 
1925  for (uint i = 0; i < 22; ++i) actor->pActorBuffs[i].Reset();
1926 
1927  ItemGen drop;
1928  drop.Reset();
1929  switch (actor->pMonsterInfo.uID) {
1930  case MONSTER_HARPY_1:
1931  case MONSTER_HARPY_2:
1932  case MONSTER_HARPY_3:
1933  drop.uItemID = ITEM_HARPY_FEATHER;
1934  break;
1935 
1936  case MONSTER_OOZE_1:
1937  case MONSTER_OOZE_2:
1938  case MONSTER_OOZE_3:
1940  break;
1941 
1942  case MONSTER_TROLL_1:
1943  case MONSTER_TROLL_2:
1944  case MONSTER_TROLL_3:
1945  drop.uItemID = ITEM_TROLL_BLOOD;
1946  break;
1947 
1948  case MONSTER_DEVIL_1:
1949  case MONSTER_DEVIL_2:
1950  case MONSTER_DEVIL_3:
1951  drop.uItemID = ITEM_DEVIL_ICHOR;
1952  break;
1953 
1954  case MONSTER_DRAGON_1:
1955  case MONSTER_DRAGON_2:
1956  case MONSTER_DRAGON_3:
1957  drop.uItemID = ITEM_DRAGON_EYE;
1958  break;
1959  }
1960 
1961  if (rand() % 100 < 20 && drop.uItemID != 0) {
1963  (SPRITE_OBJECT_TYPE)pItemsTable->pItems[drop.uItemID].uSpriteID,
1964  actor->vPosition.x, actor->vPosition.y, actor->vPosition.z + 16,
1965  rand() % 200 + 200, 1, 1, 0, &drop);
1966  }
1967 
1968  if (actor->pMonsterInfo.uSpecialAbilityType ==
1970  Actor::Explode(uActorID);
1971 }

Перекрестные ссылки ACTOR_BUFF_PARALYZED, ACTOR_BUFF_STONED, ANIM_Dying, Dying, Explode(), ITEM_DEVIL_ICHOR, ITEM_DRAGON_EYE, ITEM_HARPY_FEATHER, ITEM_OOZE_ENDOPLASM_VIAL, ITEM_TROLL_BLOOD, MONSTER_DEVIL_1, MONSTER_DEVIL_2, MONSTER_DEVIL_3, MONSTER_DRAGON_1, MONSTER_DRAGON_2, MONSTER_DRAGON_3, Party::monster_for_hunting_killed, MONSTER_HARPY_1, MONSTER_HARPY_2, MONSTER_HARPY_3, Party::monster_id_for_hunting, MONSTER_OOZE_1, MONSTER_OOZE_2, MONSTER_OOZE_3, MONSTER_SPECIAL_ABILITY_EXPLODE, MONSTER_TROLL_1, MONSTER_TROLL_2, MONSTER_TROLL_3, pActorBuffs, pActors, ItemsTable::pItems, pItemsTable, PlaySound(), pMonsterInfo, pParty, pSpriteFrameTable, pSpriteIDs, SpriteFrameTable::pSpriteSFrames, SpellBuff::Reset(), ItemGen::Reset(), sCurrentHP, SpriteObject::sub_42F7EB_DropItemAt(), uAIState, SpriteFrame::uAnimLength, uCurrentActionAnimation, uCurrentActionLength, uCurrentActionTime, MonsterInfo::uID, ItemGen::uItemID, UpdateAnimation(), MonsterInfo::uSpecialAbilityType и vPosition.

Используется в ActorDamageFromMonster(), DamageMonsterFromParty(), DamagePlayerFromMonster(), ItemDamageFromActor() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ Resurrect()

void Actor::Resurrect ( unsigned int  uActorID)
static

См. определение в файле Actor.cpp строка 1890

1890  {
1891  Actor *pActor; // esi@1
1892 
1893  pActor = &pActors[uActorID];
1894  pActor->uCurrentActionTime = 0;
1895  pActor->uAIState = Resurrected;
1897  pActor->uCurrentActionLength =
1899  .uAnimLength;
1900  pActor->sCurrentHP = (short)pActor->pMonsterInfo.uHP;
1901  Actor::PlaySound(uActorID, 1);
1902  pActor->UpdateAnimation();
1903 }

Перекрестные ссылки ANIM_Dying, pActors, PlaySound(), pMonsterInfo, pSpriteFrameTable, pSpriteIDs, SpriteFrameTable::pSpriteSFrames, Resurrected, sCurrentHP, uAIState, SpriteFrame::uAnimLength, uCurrentActionAnimation, uCurrentActionLength, uCurrentActionTime, MonsterInfo::uHP и UpdateAnimation().

Используется в CastSpellInfoHelpers::_427E01_cast_spell().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_Bored()

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

См. определение в файле Actor.cpp строка 1853

1854  {
1855  unsigned int v7; // eax@3
1856  unsigned int v9; // eax@3
1857 
1858  Actor *actor = &pActors[uActorID];
1859 
1860  AIDirection a3; // [sp+Ch] [bp-5Ch]@2
1861  if (!a4) {
1862  Actor::GetDirectionInfo(PID(OBJECT_Actor, uActorID), uObjID, &a3, 0);
1863  a4 = &a3;
1864  }
1865 
1866  actor->uCurrentActionLength =
1868  .uAnimLength;
1869 
1871  actor->vPosition.y - pIndoorCameraD3D->vPartyPos.y);
1872  v9 = stru_5C6E00->uIntegerPi + actor->uYawAngle +
1873  ((signed int)stru_5C6E00->uIntegerPi >> 3) - v7;
1874 
1875  if (v9 & 0x700) { // turned away - just stand
1876  Actor::AI_Stand(uActorID, uObjID, actor->uCurrentActionLength, a4);
1877  } else { // facing player - play bored anim
1878  actor->uAIState = Fidgeting;
1879  actor->uCurrentActionTime = 0;
1880  actor->uYawAngle = a4->uYawAngle;
1881  actor->vVelocity.z = 0;
1882  actor->vVelocity.y = 0;
1883  actor->vVelocity.x = 0;
1884  if (rand() % 100 < 5) Actor::PlaySound(uActorID, 3);
1885  actor->UpdateAnimation();
1886  }
1887 }

Перекрестные ссылки AI_Stand(), ANIM_Bored, stru193_math::Atan2(), Fidgeting, GetDirectionInfo(), OBJECT_Actor, pActors, pIndoorCameraD3D, PlaySound(), pSpriteFrameTable, pSpriteIDs, SpriteFrameTable::pSpriteSFrames, stru_5C6E00, uAIState, SpriteFrame::uAnimLength, uCurrentActionLength, uCurrentActionTime, stru193_math::uIntegerPi, UpdateAnimation(), AIDirection::uYawAngle, uYawAngle, IndoorCameraD3D::vPartyPos, vPosition, vVelocity, Vec2< T >::x и Vec2< T >::y.

Используется в stru262_TurnBased::ActorAIChooseNewTargets(), AI_FaceObject(), AI_StandOrBored() и stru262_TurnBased::AIAttacks().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_Stun()

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

См. определение в файле Actor.cpp строка 1815

1816  {
1817  __int16 v7; // ax@16
1818  AIDirection a3; // [sp+Ch] [bp-40h]@16
1819 
1820  if (pActors[uActorID].uAIState == Fleeing)
1821  pActors[uActorID].uAttributes |= ACTOR_FLEEING;
1822  if (pActors[uActorID].pMonsterInfo.uHostilityType != 4) {
1823  pActors[uActorID].uAttributes &= 0xFFFFFFFB; // ~0x4
1824  pActors[uActorID].pMonsterInfo.uHostilityType =
1826  }
1827  if (pActors[uActorID].pActorBuffs[ACTOR_BUFF_CHARM].Active())
1828  pActors[uActorID].pActorBuffs[ACTOR_BUFF_CHARM].Reset();
1829  if (pActors[uActorID].pActorBuffs[ACTOR_BUFF_AFRAID].Active())
1830  pActors[uActorID].pActorBuffs[ACTOR_BUFF_AFRAID].Reset();
1831  if (stunRegardlessOfState ||
1832  (pActors[uActorID].uAIState != Stunned &&
1833  pActors[uActorID].uAIState != AttackingRanged1 &&
1834  pActors[uActorID].uAIState != AttackingRanged2 &&
1835  pActors[uActorID].uAIState != AttackingRanged3 &&
1836  pActors[uActorID].uAIState != AttackingRanged4 &&
1837  pActors[uActorID].uAIState != AttackingMelee)) {
1838  Actor::GetDirectionInfo(PID(OBJECT_Actor, uActorID), edx0, &a3, 0);
1839  // v10 = &a3;
1840  pActors[uActorID].uYawAngle = (short)a3.uYawAngle;
1841  v7 = pSpriteFrameTable
1842  ->pSpriteSFrames[pActors[uActorID].pSpriteIDs[ANIM_GotHit]]
1843  .uAnimLength;
1844  pActors[uActorID].uCurrentActionTime = 0;
1845  pActors[uActorID].uAIState = Stunned;
1846  pActors[uActorID].uCurrentActionLength = 8 * v7;
1847  Actor::PlaySound(uActorID, 2);
1848  pActors[uActorID].UpdateAnimation();
1849  }
1850 }

Перекрестные ссылки ACTOR_BUFF_AFRAID, ACTOR_BUFF_CHARM, ANIM_GotHit, AttackingMelee, AttackingRanged1, AttackingRanged2, AttackingRanged3, AttackingRanged4, Fleeing, GetDirectionInfo(), MonsterInfo::Hostility_Long, OBJECT_Actor, pActorBuffs, pActors, PlaySound(), pMonsterInfo, pSpriteFrameTable, SpriteFrameTable::pSpriteSFrames, Stunned, uAIState, SpriteFrame::uAnimLength, MonsterInfo::uHostilityType и AIDirection::uYawAngle.

Используется в ActorDamageFromMonster(), DamageMonsterFromParty(), DamagePlayerFromMonster(), ItemDamageFromActor() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ _4031C1_update_job_never_gets_called()

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

См. определение в файле Actor.cpp строка 1754

1756  { // attempted to implement something like jobs for actors, but
1757  // apparently was never finished
1758  return 0;
1759  /*unsigned int v3; // edi@1
1760  Actor *v4; // esi@1
1761  ActorJob *v5; // eax@1
1762  signed int v6; // edx@2
1763  ActorJob *v7; // eax@2
1764  signed int v8; // edi@2
1765  ActorJob *v9; // ecx@2
1766  __int16 v10; // cx@15
1767  signed int v12; // [sp+8h] [bp-4h]@1
1768 
1769  v3 = uActorID;
1770  v12 = a2;
1771  v4 = &pActors[uActorID];
1772  v5 = (ActorJob *)pActors[uActorID].CanAct();
1773  if ( v5 )
1774  {
1775  v6 = 65535;
1776  v7 = &v4->pScheduledJobs[v3];
1777  v8 = 7;
1778  v9 = &v7[7];//(char *)&v7[7].uHour;
1779  while ( !(v9->uAttributes & 1) || v9->uHour > v12 )
1780  {
1781  --v8;
1782  --v9;
1783  if ( v8 < 0 )
1784  break;
1785  }
1786  if( v8 >= 0 )
1787  v6 = v8;
1788  if ( !v8 && v6 == 65535 )
1789  v6 = 7;
1790  v5 = &v7[v6];
1791  if ( v4->vInitialPosition.x != v5->vPos.x
1792  || v4->vInitialPosition.y != v5->vPos.y
1793  || v4->vInitialPosition.z != v5->vPos.z
1794  || v4->pMonsterInfo.uMovementType != v5->uAction )
1795  {
1796  v4->vInitialPosition.x = v5->vPos.x;
1797  v4->vInitialPosition.y = v5->vPos.y;
1798  v10 = v5->vPos.z;
1799  v4->vInitialPosition.z = v10;
1800  LOBYTE(v5) = v5->uAction;
1801  v4->pMonsterInfo.uMovementType = MONSTER_MOVEMENT_TYPE_STAIONARY;
1802  if ( a3 == 1 )
1803  {
1804  v4->vPosition.x = v4->vInitialPosition.x;
1805  v4->vPosition.y = v4->vInitialPosition.y;
1806  LOBYTE(v5) = v10;
1807  v4->vPosition.z = v10;
1808  }
1809  }
1810  }
1811  return (char)v5;*/
1812 }

Используется в InitializeActors().

+ Граф вызова функции:

◆ AI_RandomMove()

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

См. определение в файле Actor.cpp строка 1696

1697  {
1698  int x; // ebx@1
1699  int absy; // eax@1
1700  unsigned int v9; // ebx@11
1701  int v10; // ebx@13
1702  AIDirection doNotInitializeBecauseShouldBeRandom; // [sp+Ch] [bp-30h]@7
1703  int y; // [sp+30h] [bp-Ch]@1
1704  int absx; // [sp+38h] [bp-4h]@1
1705 
1706  x = pActors[uActor_id].vInitialPosition.x - pActors[uActor_id].vPosition.x;
1707  y = pActors[uActor_id].vInitialPosition.y - pActors[uActor_id].vPosition.y;
1708  absx = abs(x);
1709  absy = abs(y);
1710  if (absx <= absy)
1711  absx = absy + (absx / 2);
1712  else
1713  absx = absx + absy / 2;
1716  if (!uActionLength) uActionLength = 256;
1717  Actor::AI_StandOrBored(uActor_id, OBJECT_Player, uActionLength,
1718  &doNotInitializeBecauseShouldBeRandom);
1719  return;
1720  }
1721  if (pActors[uActor_id].pMonsterInfo.uMovementType ==
1723  absx < 128) {
1724  Actor::AI_Stand(uActor_id, uTarget_id, 256,
1725  &doNotInitializeBecauseShouldBeRandom);
1726  return;
1727  }
1728  absx += ((rand() & 0xF) * radius) / 16;
1729  v9 = (stru_5C6E00->uIntegerDoublePi - 1) & stru_5C6E00->Atan2(x, y);
1730  if (rand() % 100 < 25) {
1731  Actor::StandAwhile(uActor_id);
1732  return;
1733  }
1734  v10 = v9 + rand() % 256 - 128;
1735  if (abs(v10 - pActors[uActor_id].uYawAngle) > 256 &&
1736  !(pActors[uActor_id].uAttributes & ACTOR_ANIMATION)) {
1737  Actor::AI_Stand(uActor_id, uTarget_id, 256,
1738  &doNotInitializeBecauseShouldBeRandom);
1739  return;
1740  }
1741  pActors[uActor_id].uYawAngle = v10;
1742  if (pActors[uActor_id].uMovementSpeed)
1743  pActors[uActor_id].uCurrentActionLength =
1744  32 * absx / pActors[uActor_id].uMovementSpeed;
1745  else
1746  pActors[uActor_id].uCurrentActionLength = 0;
1747  pActors[uActor_id].uCurrentActionTime = 0;
1748  pActors[uActor_id].uAIState = Tethered;
1749  if (rand() % 100 < 2) Actor::PlaySound(uActor_id, 3);
1750  pActors[uActor_id].UpdateAnimation();
1751 }

Перекрестные ссылки AI_Stand(), AI_StandOrBored(), stru193_math::Atan2(), MonsterStats::BelongsToSupertype(), MONSTER_MOVEMENT_TYPE_GLOBAL, MONSTER_SUPERTYPE_TREANT, OBJECT_Player, pActors, PlaySound(), pMonsterInfo, StandAwhile(), stru_5C6E00, Tethered, uAttributes, MonsterInfo::uID, stru193_math::uIntegerDoublePi, uMovementSpeed, MonsterInfo::uMovementType и uYawAngle.

Используется в stru262_TurnBased::ActorMove() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_MissileAttack1()

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

См. определение в файле Actor.cpp строка 1626

1627  {
1628  Actor *v3; // ebx@1
1629  int v4; // esi@3
1630  int v5; // edi@3
1631  signed int v6; // eax@4
1632  Vec3_int_ v7; // ST04_12@6
1633  AIDirection *v10; // eax@9
1634  __int16 v14; // ax@11
1635  AIDirection a3; // [sp+Ch] [bp-48h]@10
1636  AIDirection v18; // [sp+28h] [bp-2Ch]@10
1637  int v19; // [sp+44h] [bp-10h]@6
1638  // signed int a2; // [sp+48h] [bp-Ch]@1
1639  int v22 = 0; // [sp+50h] [bp-4h]@3
1640  unsigned int pDira; // [sp+5Ch] [bp+8h]@11
1641 
1642  v3 = &pActors[uActorID];
1643  // a2 = edx0;
1644  if (PID_TYPE(sTargetPid) == OBJECT_Actor) {
1645  v6 = PID_ID(sTargetPid);
1646  v4 = pActors[v6].vPosition.x;
1647  v5 = pActors[v6].vPosition.y;
1648  v22 = (int)(pActors[v6].uActorHeight * 0.75 + pActors[v6].vPosition.z);
1649  } else {
1650  if (PID_TYPE(sTargetPid) == OBJECT_Player) {
1651  v4 = pParty->vPosition.x;
1652  v5 = pParty->vPosition.y;
1653  v22 = pParty->vPosition.z + pParty->sEyelevel;
1654  } else {
1655  v4 = (int)pDir;
1656  v5 = (int)pDir;
1657  }
1658  }
1659  v19 = v3->uActorHeight;
1660  v7.z = v3->vPosition.z + (v19 * 0.75);
1661  v7.y = v3->vPosition.y;
1662  v7.x = v3->vPosition.x;
1663  if (sub_407A1C(v4, v5, v22, v7) ||
1664  sub_407A1C(v7.x, v7.y, v7.z, Vec3_int_(v4, v5, v22))) {
1665  if (pDir == nullptr) {
1666  Actor::GetDirectionInfo(PID(OBJECT_Actor, uActorID), sTargetPid,
1667  &a3, 0);
1668  v10 = &a3;
1669  } else {
1670  v10 = pDir;
1671  }
1672  v3->uYawAngle = (short)v10->uYawAngle;
1673  v14 = pSpriteFrameTable->pSpriteSFrames[v3->pSpriteIDs[ANIM_AtkRanged]]
1674  .uAnimLength;
1675  v3->uCurrentActionLength = 8 * v14;
1676  v3->uCurrentActionTime = 0;
1677  v3->uAIState = AttackingRanged1;
1678  Actor::PlaySound(uActorID, 0);
1679  pDira = pMonsterStats->pInfos[v3->pMonsterInfo.uID].uRecoveryTime;
1680  if (v3->pActorBuffs[ACTOR_BUFF_SLOWED].Active()) pDira *= 2;
1681  if (pParty->bTurnBasedModeOn) {
1682  v3->pMonsterInfo.uRecoveryTime = pDira;
1683  } else {
1684  v3->pMonsterInfo.uRecoveryTime = v3->uCurrentActionLength - (int)(flt_6BE3A8_debug_recmod2 * pDira * -2.133333333333333);
1685  }
1686  v3->vVelocity.z = 0;
1687  v3->vVelocity.y = 0;
1688  v3->vVelocity.x = 0;
1689  v3->UpdateAnimation();
1690  } else {
1691  Actor::AI_Pursue1(uActorID, sTargetPid, uActorID, 64, pDir);
1692  }
1693 }

Перекрестные ссылки ACTOR_BUFF_SLOWED, AI_Pursue1(), ANIM_AtkRanged, AttackingRanged1, Party::bTurnBasedModeOn, flt_6BE3A8_debug_recmod2, GetDirectionInfo(), OBJECT_Actor, OBJECT_Player, pActors, MonsterStats::pInfos, PlaySound(), pMonsterStats, pParty, pSpriteFrameTable, SpriteFrameTable::pSpriteSFrames, Party::sEyelevel, sub_407A1C(), uActorHeight, SpriteFrame::uAnimLength, MonsterInfo::uRecoveryTime, AIDirection::uYawAngle, Party::vPosition и vPosition.

Используется в stru262_TurnBased::AI_Action_() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_MissileAttack2()

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

См. определение в файле Actor.cpp строка 1561

1562  {
1563  Actor *v3; // ebx@1
1564  int16_t v4; // esi@3
1565  int16_t v5; // edi@3
1566  signed int v6; // eax@4
1567  Vec3_int_ v7; // ST04_12@6
1568  AIDirection *v9; // eax@8
1569  __int16 v13; // ax@10
1570  AIDirection a3; // [sp+Ch] [bp-48h]@9
1571  AIDirection v17; // [sp+28h] [bp-2Ch]@9
1572  int v18; // [sp+44h] [bp-10h]@6
1573  int v20; // [sp+4Ch] [bp-8h]@3
1574  unsigned int pDira; // [sp+5Ch] [bp+8h]@10
1575 
1576  v3 = &pActors[uActorID];
1577  if (PID_TYPE(sTargetPid) == OBJECT_Actor) {
1578  v6 = PID_ID(sTargetPid);
1579  v4 = pActors[v6].vPosition.x;
1580  v5 = pActors[v6].vPosition.y;
1581  v20 = (int)(pActors[v6].uActorHeight * 0.75 + pActors[v6].vPosition.z);
1582  } else if (PID_TYPE(sTargetPid) == OBJECT_Player) {
1583  v4 = pParty->vPosition.x;
1584  v5 = pParty->vPosition.y;
1585  v20 = pParty->vPosition.z + pParty->sEyelevel;
1586  } else {
1587  Error("Should not get here");
1588  return;
1589  }
1590  v18 = v3->uActorHeight;
1591  v7.z = v3->vPosition.z + (v18 * 0.75);
1592  v7.y = v3->vPosition.y;
1593  v7.x = v3->vPosition.x;
1594  if (sub_407A1C(v4, v5, v20, v7)) {
1595  if (pDir == nullptr) {
1596  Actor::GetDirectionInfo(PID(OBJECT_Actor, uActorID), sTargetPid,
1597  &a3, 0);
1598  v9 = &a3;
1599  } else {
1600  v9 = pDir;
1601  }
1602  v3->uYawAngle = (short)v9->uYawAngle;
1603  v13 = pSpriteFrameTable->pSpriteSFrames[v3->pSpriteIDs[ANIM_AtkRanged]]
1604  .uAnimLength;
1605  v3->uCurrentActionLength = 8 * v13;
1606  v3->uCurrentActionTime = 0;
1607  v3->uAIState = AttackingRanged2;
1608  Actor::PlaySound(uActorID, 0);
1609  pDira = pMonsterStats->pInfos[v3->pMonsterInfo.uID].uRecoveryTime;
1610  if (v3->pActorBuffs[ACTOR_BUFF_SLOWED].Active()) pDira *= 2;
1611  if (!pParty->bTurnBasedModeOn) {
1612  v3->pMonsterInfo.uRecoveryTime = (int)(flt_6BE3A8_debug_recmod2 * pDira * 2.133333333333333);
1613  } else {
1614  v3->pMonsterInfo.uRecoveryTime = pDira;
1615  }
1616  v3->vVelocity.z = 0;
1617  v3->vVelocity.y = 0;
1618  v3->vVelocity.x = 0;
1619  v3->UpdateAnimation();
1620  } else {
1621  Actor::AI_Pursue1(uActorID, sTargetPid, uActorID, 64, pDir);
1622  }
1623 }

Перекрестные ссылки ACTOR_BUFF_SLOWED, AI_Pursue1(), ANIM_AtkRanged, AttackingRanged2, Party::bTurnBasedModeOn, flt_6BE3A8_debug_recmod2, GetDirectionInfo(), OBJECT_Actor, OBJECT_Player, pActors, MonsterStats::pInfos, PlaySound(), pMonsterStats, pParty, pSpriteFrameTable, SpriteFrameTable::pSpriteSFrames, Party::sEyelevel, sub_407A1C(), uActorHeight, SpriteFrame::uAnimLength, MonsterInfo::uRecoveryTime, AIDirection::uYawAngle, Party::vPosition и vPosition.

Используется в stru262_TurnBased::AI_Action_() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_SpellAttack1()

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

См. определение в файле Actor.cpp строка 1486

1487  {
1488  Actor *v3; // ebx@1
1489  int16_t v4; // esi@3
1490  int16_t v5; // edi@3
1491  signed int v6; // eax@4
1492  Vec3_int_ v7; // ST04_12@6
1493  AIDirection *v9; // eax@8
1494  __int16 v13; // ax@10
1495  signed int v16; // ecx@17
1496  AIDirection a3; // [sp+Ch] [bp-48h]@9
1497  AIDirection v18; // [sp+28h] [bp-2Ch]@9
1498  int v19; // [sp+44h] [bp-10h]@6
1499  int v21; // [sp+4Ch] [bp-8h]@3
1500  unsigned int pDira; // [sp+5Ch] [bp+8h]@10
1501 
1502  v3 = &pActors[uActorID];
1503  if (PID_TYPE(sTargetPid) == OBJECT_Actor) {
1504  v6 = PID_ID(sTargetPid);
1505  v4 = pActors[v6].vPosition.x;
1506  v5 = pActors[v6].vPosition.y;
1507  v21 = (int)(pActors[v6].uActorHeight * 0.75 + pActors[v6].vPosition.z);
1508  } else if (PID_TYPE(sTargetPid) == OBJECT_Player) {
1509  v4 = pParty->vPosition.x;
1510  v5 = pParty->vPosition.y;
1511  v21 = pParty->vPosition.z + pParty->sEyelevel;
1512  } else {
1513  Error("Should not get here");
1514  return;
1515  }
1516  v19 = v3->uActorHeight;
1517  v7.z = v3->vPosition.z + (v19 * 0.75);
1518  v7.y = v3->vPosition.y;
1519  v7.x = v3->vPosition.x;
1520  if (sub_407A1C(v4, v5, v21, v7)) {
1521  if (pDir == nullptr) {
1522  Actor::GetDirectionInfo(PID(OBJECT_Actor, uActorID), sTargetPid,
1523  &a3, 0);
1524  v9 = &a3;
1525  } else {
1526  v9 = pDir;
1527  }
1528  v3->uYawAngle = (short)v9->uYawAngle;
1529  v13 = pSpriteFrameTable->pSpriteSFrames[v3->pSpriteIDs[ANIM_AtkRanged]]
1530  .uAnimLength;
1531  v3->uCurrentActionLength = 8 * v13;
1532  v3->uCurrentActionTime = 0;
1533  v3->uAIState = AttackingRanged3;
1534  Actor::PlaySound(uActorID, 0);
1535  pDira = pMonsterStats->pInfos[v3->pMonsterInfo.uID].uRecoveryTime;
1536  if (v3->pActorBuffs[ACTOR_BUFF_SLOWED].Active()) pDira *= 2;
1537  if (pParty->bTurnBasedModeOn) {
1538  v3->pMonsterInfo.uRecoveryTime = pDira;
1539  } else {
1540  v3->pMonsterInfo.uRecoveryTime = v3->uCurrentActionLength + (int)(flt_6BE3A8_debug_recmod2 * pDira * 2.133333333333333);
1541  }
1542  v16 = v3->pMonsterInfo.uSpell1ID;
1543  v3->vVelocity.z = 0;
1544  v3->vVelocity.y = 0;
1545  v3->vVelocity.x = 0;
1546  if (ShouldMonsterPlayAttackAnim(v3->pMonsterInfo.uSpell1ID)) {
1547  v3->uCurrentActionLength = 64;
1548  v3->uCurrentActionTime = 0;
1549  v3->uAIState = Fidgeting;
1550  v3->UpdateAnimation();
1551  v3->uAIState = AttackingRanged3;
1552  } else {
1553  v3->UpdateAnimation();
1554  }
1555  } else {
1556  Actor::AI_Pursue1(uActorID, sTargetPid, uActorID, 64, pDir);
1557  }
1558 }

Перекрестные ссылки ACTOR_BUFF_SLOWED, AI_Pursue1(), ANIM_AtkRanged, AttackingRanged3, Party::bTurnBasedModeOn, Fidgeting, flt_6BE3A8_debug_recmod2, GetDirectionInfo(), OBJECT_Actor, OBJECT_Player, pActors, MonsterStats::pInfos, PlaySound(), pMonsterStats, pParty, pSpriteFrameTable, SpriteFrameTable::pSpriteSFrames, Party::sEyelevel, ShouldMonsterPlayAttackAnim(), sub_407A1C(), uActorHeight, SpriteFrame::uAnimLength, MonsterInfo::uRecoveryTime, AIDirection::uYawAngle, Party::vPosition и vPosition.

Используется в stru262_TurnBased::AI_Action_() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_SpellAttack2()

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

См. определение в файле Actor.cpp строка 1412

1413  {
1414  Actor *v3; // ebx@1
1415  int16_t v4; // esi@3
1416  int16_t v5; // edi@3
1417  signed int v6; // eax@4
1418  Vec3_int_ v7; // ST04_12@6
1419  AIDirection *v9; // eax@8
1420  __int16 v13; // ax@10
1421  AIDirection a3; // [sp+Ch] [bp-48h]@9
1422  AIDirection v18; // [sp+28h] [bp-2Ch]@9
1423  int v19; // [sp+44h] [bp-10h]@6
1424  signed int a2; // [sp+48h] [bp-Ch]@1
1425  int v21; // [sp+4Ch] [bp-8h]@3
1426  unsigned int pDira; // [sp+5Ch] [bp+8h]@10
1427 
1428  v3 = &pActors[uActorID];
1429  a2 = edx0;
1430  if (PID_TYPE(edx0) == OBJECT_Actor) {
1431  v6 = PID_ID(edx0);
1432  v4 = pActors[v6].vPosition.x;
1433  v5 = pActors[v6].vPosition.y;
1434  v21 = (int)(pActors[v6].uActorHeight * 0.75 + pActors[v6].vPosition.z);
1435  } else if (PID_TYPE(edx0) == OBJECT_Player) {
1436  v4 = pParty->vPosition.x;
1437  v5 = pParty->vPosition.y;
1438  v21 = pParty->vPosition.z + pParty->sEyelevel;
1439  } else {
1440  Error("Should not get here");
1441  return;
1442  }
1443  v19 = v3->uActorHeight;
1444  v7.z = v3->vPosition.z + (v19 * 0.75);
1445  v7.y = v3->vPosition.y;
1446  v7.x = v3->vPosition.x;
1447  if (sub_407A1C(v4, v5, v21, v7)) {
1448  if (pDir == nullptr) {
1449  Actor::GetDirectionInfo(PID(OBJECT_Actor, uActorID), a2, &a3, 0);
1450  v9 = &a3;
1451  } else {
1452  v9 = pDir;
1453  }
1454  v3->uYawAngle = (short)v9->uYawAngle;
1455  v13 = pSpriteFrameTable->pSpriteSFrames[v3->pSpriteIDs[ANIM_AtkRanged]]
1456  .uAnimLength;
1457  v3->uCurrentActionLength = 8 * v13;
1458  v3->uCurrentActionTime = 0;
1459  v3->uAIState = AttackingRanged4;
1460  Actor::PlaySound(uActorID, 0);
1461  pDira = pMonsterStats->pInfos[v3->pMonsterInfo.uID].uRecoveryTime;
1462  if (v3->pActorBuffs[ACTOR_BUFF_SLOWED].Active()) pDira *= 2;
1463  if (pParty->bTurnBasedModeOn) {
1464  v3->pMonsterInfo.uRecoveryTime = pDira;
1465  } else {
1466  v3->pMonsterInfo.uRecoveryTime = v3->uCurrentActionLength + (int)(flt_6BE3A8_debug_recmod2 * pDira * 2.133333333333333);
1467  }
1468  v3->vVelocity.z = 0;
1469  v3->vVelocity.y = 0;
1470  v3->vVelocity.x = 0;
1471  if (ShouldMonsterPlayAttackAnim(v3->pMonsterInfo.uSpell2ID)) {
1472  v3->uCurrentActionLength = 64;
1473  v3->uCurrentActionTime = 0;
1474  v3->uAIState = Fidgeting;
1475  v3->UpdateAnimation();
1476  v3->uAIState = AttackingRanged4;
1477  } else {
1478  v3->UpdateAnimation();
1479  }
1480  } else {
1481  Actor::AI_Pursue1(uActorID, a2, uActorID, 64, pDir);
1482  }
1483 }

Перекрестные ссылки ACTOR_BUFF_SLOWED, AI_Pursue1(), ANIM_AtkRanged, AttackingRanged4, Party::bTurnBasedModeOn, Fidgeting, flt_6BE3A8_debug_recmod2, GetDirectionInfo(), OBJECT_Actor, OBJECT_Player, pActors, MonsterStats::pInfos, PlaySound(), pMonsterStats, pParty, pSpriteFrameTable, SpriteFrameTable::pSpriteSFrames, Party::sEyelevel, ShouldMonsterPlayAttackAnim(), sub_407A1C(), uActorHeight, SpriteFrame::uAnimLength, MonsterInfo::uRecoveryTime, AIDirection::uYawAngle, Party::vPosition и vPosition.

Используется в stru262_TurnBased::AI_Action_() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_MeleeAttack()

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

См. определение в файле Actor.cpp строка 1148

1149  {
1150  int16_t v6; // esi@6
1151  int16_t v7; // edi@6
1152  signed int v8; // eax@7
1153  Vec3_int_ v10; // ST04_12@9
1154  AIDirection *v12; // eax@11
1155  AIDirection a3; // [sp+Ch] [bp-48h]@12
1156  AIDirection v20; // [sp+28h] [bp-2Ch]@12
1157  int v23; // [sp+4Ch] [bp-8h]@6
1158  unsigned int v25; // [sp+5Ch] [bp+8h]@13
1159 
1160  assert(uActorID < uNumActors);
1161 
1162  if (pActors[uActorID].pMonsterInfo.uMovementType ==
1164  pActors[uActorID].pMonsterInfo.uAIType == 1) {
1165  Actor::AI_Stand(uActorID, sTargetPid, 0, arg0);
1166  return;
1167  }
1168 
1169  if (PID_TYPE(sTargetPid) == OBJECT_Actor) {
1170  v8 = PID_ID(sTargetPid);
1171  v6 = pActors[v8].vPosition.x;
1172  v7 = pActors[v8].vPosition.y;
1173  v23 = (int)(pActors[v8].uActorHeight * 0.75 + pActors[v8].vPosition.z);
1174  } else if (PID_TYPE(sTargetPid) == OBJECT_Player) {
1175  v6 = pParty->vPosition.x;
1176  v7 = pParty->vPosition.y;
1177  v23 = pParty->vPosition.z + pParty->sEyelevel;
1178  } else {
1179  Error("Should not get here");
1180  return;
1181  }
1182 
1183  v10.x = pActors[uActorID].vPosition.x;
1184  v10.y = pActors[uActorID].vPosition.y;
1185  v10.z = (int32_t)(pActors[uActorID].uActorHeight * 0.75 +
1186  pActors[uActorID].vPosition.z);
1187 
1188  if (sub_407A1C((int)v6, (int)v7, v23, v10)) {
1189  if (arg0 != nullptr) {
1190  v12 = arg0;
1191  } else {
1192  Actor::GetDirectionInfo(PID(OBJECT_Actor, uActorID), sTargetPid,
1193  &a3, 0);
1194  v12 = &a3;
1195  }
1196  pActors[uActorID].uYawAngle = (short)v12->uYawAngle;
1197  pActors[uActorID].uCurrentActionLength =
1199  ->pSpriteSFrames[pActors[uActorID].pSpriteIDs[ANIM_AtkMelee]]
1200  .uAnimLength *
1201  8;
1202  pActors[uActorID].uCurrentActionTime = 0;
1203  pActors[uActorID].uAIState = AttackingMelee;
1204  Actor::PlaySound(uActorID, 0);
1205  v25 = pMonsterStats->pInfos[pActors[uActorID].pMonsterInfo.uID]
1206  .uRecoveryTime;
1207  if (pActors[uActorID].pActorBuffs[ACTOR_BUFF_SLOWED].Active()) v25 *= 2;
1208  if (!pParty->bTurnBasedModeOn) {
1209  pActors[uActorID].pMonsterInfo.uRecoveryTime = (int)(flt_6BE3A8_debug_recmod2 * v25 * 2.133333333333333);
1210  } else {
1211  pActors[uActorID].pMonsterInfo.uRecoveryTime = v25;
1212  }
1213  pActors[uActorID].vVelocity.z = 0;
1214  pActors[uActorID].vVelocity.y = 0;
1215  pActors[uActorID].vVelocity.x = 0;
1216  pActors[uActorID].UpdateAnimation();
1217  } else {
1218  Actor::AI_Pursue1(uActorID, sTargetPid, rand() % 2, 64, arg0);
1219  }
1220 }

Перекрестные ссылки ACTOR_BUFF_SLOWED, AI_Pursue1(), AI_Stand(), ANIM_AtkMelee, AttackingMelee, Party::bTurnBasedModeOn, flt_6BE3A8_debug_recmod2, GetDirectionInfo(), MONSTER_MOVEMENT_TYPE_STAIONARY, OBJECT_Actor, OBJECT_Player, pActorBuffs, pActors, MonsterStats::pInfos, PlaySound(), pMonsterInfo, pMonsterStats, pParty, pSpriteFrameTable, SpriteFrameTable::pSpriteSFrames, Party::sEyelevel, sub_407A1C(), uActorHeight, SpriteFrame::uAnimLength, MonsterInfo::uMovementType, uNumActors, MonsterInfo::uRecoveryTime, AIDirection::uYawAngle, Party::vPosition и vPosition.

Используется в stru262_TurnBased::AI_Action_() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ StandAwhile()

void Actor::StandAwhile ( unsigned int  uActorID)
static

См. определение в файле Actor.cpp строка 1137

1137  {
1138  pActors[uActorID].uCurrentActionLength = rand() % 128 + 128;
1139  pActors[uActorID].uCurrentActionTime = 0;
1140  pActors[uActorID].uAIState = Standing;
1141  pActors[uActorID].vVelocity.z = 0;
1142  pActors[uActorID].vVelocity.y = 0;
1143  pActors[uActorID].vVelocity.x = 0;
1144  pActors[uActorID].UpdateAnimation();
1145 }

Перекрестные ссылки pActors и Standing.

Используется в AI_RandomMove().

+ Граф вызова функции:

◆ AI_Stand()

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

См. определение в файле Actor.cpp строка 1109

1110  {
1111  assert(uActorID < uNumActors);
1112  // Actor* actor = &pActors[uActorID];
1113 
1114  AIDirection a3;
1115  if (!a4) {
1116  Actor::GetDirectionInfo(PID(OBJECT_Actor, uActorID), object_to_face_pid,
1117  &a3, 0);
1118  a4 = &a3;
1119  }
1120 
1121  pActors[uActorID].uAIState = Standing;
1122  if (!uActionLength)
1123  pActors[uActorID].uCurrentActionLength =
1124  rand() % 256 + 256; // от 256 до 256 + 256
1125  else
1126  pActors[uActorID].uCurrentActionLength = uActionLength;
1127  pActors[uActorID].uCurrentActionTime = 0;
1128  pActors[uActorID].uYawAngle = a4->uYawAngle;
1129  pActors[uActorID].uPitchAngle = a4->uPitchAngle;
1130  pActors[uActorID].vVelocity.z = 0;
1131  pActors[uActorID].vVelocity.y = 0;
1132  pActors[uActorID].vVelocity.x = 0;
1133  pActors[uActorID].UpdateAnimation();
1134 }

Перекрестные ссылки GetDirectionInfo(), OBJECT_Actor, pActors, Standing, uNumActors, AIDirection::uPitchAngle и AIDirection::uYawAngle.

Используется в CastSpellInfoHelpers::_427E01_cast_spell(), stru262_TurnBased::ActorAIChooseNewTargets(), stru262_TurnBased::ActorAIDoAdditionalMove(), stru262_TurnBased::ActorAISetMovementDecision(), stru262_TurnBased::ActorAIStopMovement(), stru262_TurnBased::ActorMove(), stru262_TurnBased::AI_Action_(), AI_Bored(), AI_MeleeAttack(), AI_Pursue1(), AI_RandomMove(), AI_StandOrBored(), stru262_TurnBased::AIAttacks(), InitializeActors() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_StandOrBored()

void Actor::AI_StandOrBored ( unsigned int  uActorID,
signed int  uObjID,
int  uActionLength,
struct AIDirection a4 
)
static

См. определение в файле Actor.cpp строка 1100

1101  {
1102  if (rand() % 2) // 0 or 1
1103  AI_Bored(uActorID, uObjID, a4);
1104  else
1105  AI_Stand(uActorID, uObjID, uActionLength, a4);
1106 }

Перекрестные ссылки AI_Bored() и AI_Stand().

Используется в AI_Flee(), AI_Pursue1(), AI_Pursue2(), AI_Pursue3(), AI_RandomMove(), stru262_TurnBased::AITurnBasedAction(), stru262_TurnBased::NextTurn(), stru262_TurnBased::Start(), UpdateActorAI(), UpdateActors_BLV() и UpdateActors_ODM().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_FaceObject()

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

См. определение в файле Actor.cpp строка 1072

1073  {
1074  AIDirection *Dir_Out;
1075  AIDirection Dir_Ret;
1076 
1077  if (rand() % 100 >= 5) {
1078  if (!Dir_In) {
1079  Actor::GetDirectionInfo(PID(OBJECT_Actor, uActorID), uObjID, &Dir_Ret, 0);
1080  Dir_Out = &Dir_Ret;
1081  } else {
1082  Dir_Out = Dir_In;
1083  }
1084 
1085  pActors[uActorID].uYawAngle = Dir_Out->uYawAngle;
1086  pActors[uActorID].uCurrentActionTime = 0;
1087  pActors[uActorID].vVelocity.z = 0;
1088  pActors[uActorID].vVelocity.y = 0;
1089  pActors[uActorID].vVelocity.x = 0;
1090  pActors[uActorID].uPitchAngle = Dir_Out->uPitchAngle;
1091  pActors[uActorID].uCurrentActionLength = 256;
1092  pActors[uActorID].uAIState = Interacting;
1093  pActors[uActorID].UpdateAnimation();
1094  } else {
1095  Actor::AI_Bored(uActorID, uObjID, Dir_In);
1096  }
1097 }

Перекрестные ссылки AI_Bored(), GetDirectionInfo(), Interacting, OBJECT_Actor, pActors, AIDirection::uPitchAngle и AIDirection::uYawAngle.

Используется в ActorInteraction(), UpdateActors_BLV() и UpdateActors_ODM().

+ Граф вызовов:
+ Граф вызова функции:

◆ GetDirectionInfo()

void Actor::GetDirectionInfo ( unsigned int  uObj1ID,
unsigned int  uObj2ID,
struct AIDirection pOut,
int  a4 
)
static

См. определение в файле Actor.cpp строка 890

891  {
892  signed int v4; // eax@1
893  signed int v5; // ecx@1
894  int v18; // edx@15
895  float v31; // st7@45
896  float v32; // st6@45
897  float v33; // st7@45
898  Vec3_int_ v37; // [sp-10h] [bp-5Ch]@15
899  AIDirection v41; // [sp+14h] [bp-38h]@46
900  float outy2 = 0; // [sp+38h] [bp-14h]@33
901  float outx2 = 0; // [sp+3Ch] [bp-10h]@33
902  int outz = 0; // [sp+40h] [bp-Ch]@6
903  int outy = 0; // [sp+44h] [bp-8h]@6
904  int outx = 0; // [sp+48h] [bp-4h]@6
905  float a4a; // [sp+58h] [bp+Ch]@45
906 
907  v4 = PID_ID(uObj1ID);
908  // v6 = uObj2ID;
909  v5 = PID_ID(uObj2ID);
910  switch (PID_TYPE(uObj1ID)) {
911  case OBJECT_Item: {
912  outx = pSpriteObjects[v4].vPosition.x;
913  outy = pSpriteObjects[v4].vPosition.y;
914  outz = pSpriteObjects[v4].vPosition.z;
915  break;
916  }
917  case OBJECT_Actor: {
918  outx = pActors[v4].vPosition.x;
919  outy = pActors[v4].vPosition.y;
920  outz = pActors[v4].vPosition.z + (pActors[v4].uActorHeight * 0.75);
921  break;
922  }
923  case OBJECT_Player: {
924  if (!v4) {
925  outx = pParty->vPosition.x;
926  outy = pParty->vPosition.y;
927  outz =
928  pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
929  break;
930  }
931  if (v4 == 4) {
933  v37.z =
934  pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
935  v37.x = pParty->vPosition.x;
936  v37.y = pParty->vPosition.y;
937  Vec3_int_::Rotate(24, v18, 0, v37, &outx, &outy, &outz);
938  break;
939  }
940  if (v4 == 3) {
942  v37.z =
943  pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
944  v37.x = pParty->vPosition.x;
945  v37.y = pParty->vPosition.y;
946  Vec3_int_::Rotate(8, v18, 0, v37, &outx, &outy, &outz);
947  break;
948  }
949  if (v4 == 2) {
950  v37.z =
951  pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
953  v37.x = pParty->vPosition.x;
954  v37.y = pParty->vPosition.y;
955  Vec3_int_::Rotate(8, v18, 0, v37, &outx, &outy, &outz);
956  break;
957  }
958  if (v4 == 1) {
959  v37.z =
960  pParty->vPosition.z + (signed int)pParty->uPartyHeight / 3;
962  v37.x = pParty->vPosition.x;
963  v37.y = pParty->vPosition.y;
964  Vec3_int_::Rotate(24, v18, 0, v37, &outx, &outy, &outz);
965  break;
966  }
967  }
968  case OBJECT_Decoration: {
969  outx = pLevelDecorations[v4].vPosition.x;
970  outy = pLevelDecorations[v4].vPosition.y;
971  outz = pLevelDecorations[v4].vPosition.z;
972  break;
973  }
974  default: {
975  outz = 0;
976  outy = 0;
977  outx = 0;
978  break;
979  }
980  case OBJECT_BModel: {
982  outx = (pIndoor->pFaces[v4].pBounding.x1 +
983  pIndoor->pFaces[v4].pBounding.x2) >>
984  1;
985  outy = (pIndoor->pFaces[v4].pBounding.y1 +
986  pIndoor->pFaces[v4].pBounding.y2) >>
987  1;
988  outz = (pIndoor->pFaces[v4].pBounding.z1 +
989  pIndoor->pFaces[v4].pBounding.z2) >>
990  1;
991  }
992  break;
993  }
994  }
995 
996  switch (PID_TYPE(uObj2ID)) {
997  case OBJECT_Item: {
998  outx2 = (float)pSpriteObjects[v5].vPosition.x;
999  outy2 = (float)pSpriteObjects[v5].vPosition.y;
1000  a4 = pSpriteObjects[v5].vPosition.z;
1001  break;
1002  }
1003  case OBJECT_Actor: {
1004  outx2 = (float)pActors[v5].vPosition.x;
1005  outy2 = (float)pActors[v5].vPosition.y;
1006  a4 = pActors[v5].vPosition.z + (pActors[v5].uActorHeight * 0.75);
1007  break;
1008  }
1009  case OBJECT_Player: {
1010  outx2 = (float)pParty->vPosition.x;
1011  outy2 = (float)pParty->vPosition.y;
1012  if (!a4) a4 = pParty->sEyelevel;
1013  a4 = pParty->vPosition.z + a4;
1014  break;
1015  }
1016  case OBJECT_Decoration: {
1017  outx2 = (float)pLevelDecorations[v5].vPosition.x;
1018  outy2 = (float)pLevelDecorations[v5].vPosition.y;
1019  a4 = pLevelDecorations[v5].vPosition.z;
1020  break;
1021  }
1022  default: {
1023  outx2 = 0.0;
1024  outy2 = 0.0;
1025  a4 = 0;
1026  break;
1027  }
1028  case OBJECT_BModel: {
1030  outx2 = (float)((pIndoor->pFaces[v5].pBounding.x1 +
1031  pIndoor->pFaces[v5].pBounding.x2) >>
1032  1);
1033  outy2 = (float)((pIndoor->pFaces[v5].pBounding.y1 +
1034  pIndoor->pFaces[v5].pBounding.y2) >>
1035  1);
1036  a4 = (pIndoor->pFaces[v5].pBounding.z1 +
1037  pIndoor->pFaces[v5].pBounding.z2) >>
1038  1;
1039  }
1040  break;
1041  }
1042  }
1043 
1044  v31 = (float)outx2 - (float)outx;
1045  v32 = (float)outy2 - (float)outy;
1046  a4a = (float)a4 - (float)outz;
1047  outx2 = v32 * v32;
1048  outy2 = v31 * v31;
1049  v33 = sqrt(a4a * a4a + outy2 + outx2);
1050  if (v33 <= 1.0) {
1051  pOut->vDirection.x = 65536;
1052  pOut->vDirection.y = 0;
1053  pOut->vDirection.z = 0;
1054  pOut->uDistance = 1;
1055  pOut->uDistanceXZ = 1;
1056  pOut->uYawAngle = 0;
1057  pOut->uPitchAngle = 0;
1058  } else {
1059  pOut->vDirection.x = (int32_t)(1.0 / v33 * v31 * 65536.0);
1060  pOut->vDirection.y = (int32_t)(1.0 / v33 * v32 * 65536.0);
1061  pOut->vDirection.z = (int32_t)(1.0 / v33 * a4a * 65536.0);
1062  pOut->uDistance = (uint)v33;
1063  pOut->uDistanceXZ = (uint)sqrt(outy2 + outx2);
1064  pOut->uYawAngle =
1065  stru_5C6E00->Atan2((signed __int64)v31, (signed __int64)v32);
1066  pOut->uPitchAngle =
1067  stru_5C6E00->Atan2(pOut->uDistanceXZ, (signed __int64)a4a);
1068  }
1069 }

Перекрестные ссылки stru193_math::Atan2(), LEVEL_Indoor, OBJECT_Actor, OBJECT_BModel, OBJECT_Decoration, OBJECT_Item, OBJECT_Player, pActors, BLVFace::pBounding, IndoorLocation::pFaces, pIndoor, pLevelDecorations, pParty, pSpriteObjects, Party::sEyelevel, Party::sRotationY, stru_5C6E00, uCurrentlyLoadedLevelType, AIDirection::uDistance, AIDirection::uDistanceXZ, stru193_math::uIntegerHalfPi, Party::uPartyHeight, AIDirection::uPitchAngle, AIDirection::uYawAngle, AIDirection::vDirection, Party::vPosition, vPosition, BBox_short_::x1, BBox_short_::x2, BBox_short_::y1, BBox_short_::y2, BBox_short_::z1 и BBox_short_::z2.

Используется в CastSpellInfoHelpers::_427E01_cast_spell(), stru262_TurnBased::ActorAIChooseNewTargets(), stru262_TurnBased::ActorAIDoAdditionalMove(), stru262_TurnBased::ActorAISetMovementDecision(), stru262_TurnBased::ActorAIStopMovement(), stru262_TurnBased::ActorMove(), stru262_TurnBased::AI_Action_(), AI_Bored(), AI_FaceObject(), AI_Flee(), AI_MeleeAttack(), AI_MissileAttack1(), AI_MissileAttack2(), AI_Pursue1(), AI_Pursue2(), AI_Pursue3(), AI_SpellAttack1(), AI_SpellAttack2(), AI_Stand(), AI_Stun(), stru262_TurnBased::AIAttacks(), stru262_TurnBased::AITurnBasedAction(), stru262_TurnBased::Start(), sub_448CF4_spawn_monsters() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ Explode()

void Actor::Explode ( unsigned int  uActorID)
static

См. определение в файле Actor.cpp строка 850

850  { // death explosion for some actors eg gogs
851  SpriteObject a1;
854  a1.containing_item.Reset();
855  a1.spell_id = 0;
856  a1.spell_level = 0;
857  a1.spell_skill = 0;
858  a1.vPosition.x = pActors[uActorID].vPosition.x;
859  a1.vPosition.y = pActors[uActorID].vPosition.y;
860  a1.vPosition.z = pActors[uActorID].vPosition.z + (pActors[uActorID].uActorHeight * 0.75);
861  a1.uFacing = 0;
862  a1.uSoundID = 0;
863  a1.uAttributes = 0;
864  a1.uSectorID = pIndoor->GetSector(a1.vPosition.x, a1.vPosition.y, a1.vPosition.z);
865  a1.uSpriteFrameID = 0;
866  a1.spell_caster_pid = PID(OBJECT_Actor, uActorID);
867  a1.spell_target_pid = 0;
869  a1.field_61 = 4;
870  a1.Create(0, 0, 0, 0);
871  return;
872 }

Перекрестные ссылки SpriteObject::containing_item, SpriteObject::Create(), SpriteObject::field_60_distance_related_prolly_lod, SpriteObject::field_61, IndoorLocation::GetSector(), OBJECT_Actor, ObjectList::ObjectIDByItemID(), pActors, pIndoor, pObjectList, ItemGen::Reset(), SpriteObject::spell_caster_pid, SpriteObject::spell_id, SpriteObject::spell_level, SpriteObject::spell_skill, SpriteObject::spell_target_pid, SPRITE_OBJECT_EXPLODE, SpriteObject::uAttributes, SpriteObject::uFacing, SpriteObject::uObjectDescID, SpriteObject::uSectorID, SpriteObject::uSoundID, SpriteObject::uSpriteFrameID, SpriteObject::uType и SpriteObject::vPosition.

Используется в Die().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_RangedAttack()

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

См. определение в файле Actor.cpp строка 747

748  {
749  char specAb; // al@1
750  int v13; // edx@28
751 
752  SpriteObject a1; // [sp+Ch] [bp-74h]@1
753 
754  switch (type) {
755  case 1:
757  break;
758  case 2:
760  break;
761  case 3:
763  break;
764  case 4:
766  break;
767  case 5:
769  break;
770  case 6:
772  break;
773  case 7:
775  break;
776  case 8:
778  break;
779  case 9:
781  break;
782  case 10:
784  break;
785  case 11:
787  break;
788  case 13:
790  break;
791  default:
792  return;
793  }
794  bool found = false;
796  if (a1.uObjectDescID == 0) {
797  Error("Item not found");
798  return;
799  }
800  a1.containing_item.Reset();
801  a1.spell_id = 0;
802  a1.vPosition.x = pActors[uActorID].vPosition.x;
803  a1.vPosition.y = pActors[uActorID].vPosition.y;
804  a1.vPosition.z = pActors[uActorID].vPosition.z + (pActors[uActorID].uActorHeight * 0.75);
805  a1.spell_level = 0;
806  a1.spell_skill = 0;
807  a1.uFacing = pDir->uYawAngle;
808  a1.uSoundID = 0;
809  a1.uAttributes = 0;
810  a1.uSectorID =
811  pIndoor->GetSector(a1.vPosition.x, a1.vPosition.y, a1.vPosition.z);
812  a1.uSpriteFrameID = 0;
813  a1.spell_caster_pid = PID(OBJECT_Actor, uActorID);
814  a1.spell_target_pid = 0;
815  if (pDir->uDistance < 307.2)
817  else if (pDir->uDistance < 1024)
819  else if (pDir->uDistance < 2560)
821  else
823 
824  a1.field_61 = a4;
825  a1.Create(pDir->uYawAngle, pDir->uPitchAngle,
826  pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed,
827  0);
828  if (pActors[uActorID].pMonsterInfo.uSpecialAbilityType == 1) {
829  specAb = pActors[uActorID].pMonsterInfo.uSpecialAbilityDamageDiceBonus;
830  if (specAb == 2) {
831  a1.vPosition.z += 40;
832  v13 = pDir->uYawAngle;
833  } else {
834  if (specAb != 3) return;
835  a1.Create(
836  pDir->uYawAngle + 30, // TODO(_) find out why the YawAngle change
837  pDir->uPitchAngle,
838  pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed,
839  0);
840  v13 = pDir->uYawAngle - 30;
841  }
842  a1.Create(
843  v13, pDir->uPitchAngle,
844  pObjectList->pObjects[(signed __int16)a1.uObjectDescID].uSpeed, 0);
845  }
846  return;
847 }

Перекрестные ссылки SpriteObject::containing_item, SpriteObject::Create(), SpriteObject::field_60_distance_related_prolly_lod, SpriteObject::field_61, IndoorLocation::GetSector(), OBJECT_Actor, ObjectList::ObjectIDByItemID(), pActors, pIndoor, pMonsterInfo, pObjectList, ObjectList::pObjects, ItemGen::Reset(), SpriteObject::spell_caster_pid, SpriteObject::spell_id, SpriteObject::spell_level, SpriteObject::spell_skill, SpriteObject::spell_target_pid, SPRITE_ARROW_PROJECTILE, SPRITE_BLASTER_PROJECTILE, SPRITE_PROJECTILE_500, SPRITE_PROJECTILE_505, SPRITE_PROJECTILE_510, SPRITE_PROJECTILE_515, SPRITE_PROJECTILE_520, SPRITE_PROJECTILE_525, SPRITE_PROJECTILE_530, SPRITE_PROJECTILE_535, SPRITE_PROJECTILE_540, SPRITE_PROJECTILE_550, SpriteObject::uAttributes, AIDirection::uDistance, SpriteObject::uFacing, SpriteObject::uObjectDescID, AIDirection::uPitchAngle, SpriteObject::uSectorID, SpriteObject::uSoundID, MonsterInfo::uSpecialAbilityType, ObjectDesc::uSpeed, SpriteObject::uSpriteFrameID, SpriteObject::uType, AIDirection::uYawAngle и SpriteObject::vPosition.

Используется в stru262_TurnBased::AIAttacks() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ AI_SpellAttack()

void Actor::AI_SpellAttack ( unsigned int  uActorID,
struct AIDirection pDir,
int  uSpellID,
int  a4,
unsigned int  uSkillLevel 
)
static

См. определение в файле Actor.cpp строка 199

200  {
201  Actor *actorPtr; // esi@1
202  unsigned int realPoints; // edi@1
203  unsigned int masteryLevel; // eax@1
204  int v8; // edi@16
205  signed int v10; // ecx@22
206  int v19; // edi@34
207  int v20; // eax@35
208  signed int v23; // eax@41
209  int v28; // st6@50
210  int v30; // esi@50
211  int v31; // ST3C_4@51
212  unsigned int v32; // edi@51
213  signed int v36; // eax@67
214  int v39; // ecx@75
215  int v42; // ecx@91
216  int v44; // ecx@100
217  int v48; // ecx@110
218  int v51; // ecx@130
219  int v54; // ecx@138
220  int v59; // edi@146
221  int v61; // edi@146
222  signed int v63; // edi@146
223  int v68; // edi@168
224  signed int v70; // ecx@172
225  int v79; // edx@185
226  int v80; // eax@185
227  signed int v91; // eax@200
228  int v94; // ecx@208
229  int v96; // ecx@217
230  int pitch; // [sp+2Ch] [bp-A4h]@51
231  int v114; // [sp+48h] [bp-88h]@41
232  SpriteObject a1; // [sp+4Ch] [bp-84h]@1
233  int v116; // [sp+BCh] [bp-14h]@49
234  int v118; // [sp+C4h] [bp-Ch]@29
235  int v119; // [sp+C8h] [bp-8h]@48
236  int v120; // [sp+CCh] [bp-4h]@1
237  int spellnuma; // [sp+D8h] [bp+8h]@29
238  int spellnumb; // [sp+D8h] [bp+8h]@48
239  int spellnumc; // [sp+D8h] [bp+8h]@50
240  int spellnume; // [sp+D8h] [bp+8h]@179
241  int a1a; // [sp+E0h] [bp+10h]@34
242  int a1c; // [sp+E0h] [bp+10h]@184
243 
244  GameTime spell_length = GameTime(0);
245 
246  actorPtr = &pActors[uActorID];
247  realPoints = uSkillLevel & 0x3F;
248  masteryLevel = SkillToMastery(uSkillLevel);
249 
250  switch (uSpellID) {
252  case SPELL_FIRE_FIREBALL:
257  case SPELL_EARTH_BLADES:
261  case SPELL_BODY_HARM:
265  a1.uType = spell_sprite_mapping[uSpellID].uSpriteType;
266  a1.uObjectDescID = GetObjDescId(uSpellID);
267  a1.containing_item.Reset();
268  a1.spell_id = uSpellID;
269  a1.spell_level = uSkillLevel;
270  a1.vPosition.x = actorPtr->vPosition.x;
271  a1.spell_skill = 0;
272  a1.vPosition.y = actorPtr->vPosition.y;
273  a1.vPosition.z = actorPtr->vPosition.z +
274  ((signed int)actorPtr->uActorHeight >> 1);
275  a1.uFacing = (short)pDir->uYawAngle;
276  a1.uSoundID = 0;
277  a1.uAttributes = 0;
278  a1.uSectorID = pIndoor->GetSector(a1.vPosition.x, a1.vPosition.y,
279  a1.vPosition.z);
280  a1.uSpriteFrameID = 0;
281  a1.spell_caster_pid = PID(OBJECT_Actor, uActorID);
282  a1.spell_target_pid = 0;
283  if ((double)pDir->uDistance < 307.2)
285  else if (pDir->uDistance < 1024)
287  else if (pDir->uDistance < 2560)
289  else
291 
292  a1.field_61 = 2;
293  v91 = a1.Create(
294  pDir->uYawAngle, pDir->uPitchAngle,
296  if (v91 != -1) {
297  pAudioPlayer->PlaySpellSound(uSpellID, PID(OBJECT_Item, v91));
298  return;
299  }
300  return;
301  break;
302 
303  case SPELL_FIRE_HASTE:
304  if (masteryLevel == 1 || masteryLevel == 2)
305  v39 = 60 * (realPoints + 60);
306  else if (masteryLevel == 3)
307  v39 = 2 * 60 * (realPoints + 20);
308  else if (masteryLevel == 4)
309  v39 = 3 * 60 * (realPoints + 15);
310  else
311  v39 = 0;
312 
313  spell_length = GameTime::FromMinutes(v39 / 60);
314 
315  actorPtr->pActorBuffs[ACTOR_BUFF_HASTE].Apply((pParty->GetPlayingTime() + spell_length),
316  masteryLevel, 0, 0, 0);
319  PID(OBJECT_Actor, uActorID), 0, -1, 0,
320  0);
321  return;
322 
325  v114 = pParty->vPosition.z + 2500;
326  v23 = 8;
327  if (masteryLevel == 2)
328  v23 = 10;
329  else if (masteryLevel == 3)
330  v23 = 12;
331  else if (masteryLevel == 4)
332  v23 = 14;
333  spellnumb = 0;
334  v28 = 0;
335  for (int i = 0; i < v23; i++) {
336  v30 = rand() % 1000;
337  spellnumc = v30 - 2500;
338  v120 = v28 * v28;
339  v119 = spellnumb * spellnumb;
340  if (sqrt((float)(spellnumc * spellnumc + v119 + v120)) <= 1.0) {
341  v32 = 0;
342  pitch = 0;
343  } else {
344  v31 = (signed __int64)sqrt((float)(v119 + v120));
345  v32 = stru_5C6E00->Atan2(spellnumb, (int)v28);
346  pitch = stru_5C6E00->Atan2(v31, (int)spellnumc);
347  }
348  a1.containing_item.Reset();
349  a1.uType = spell_sprite_mapping[uSpellID].uSpriteType;
350  a1.uObjectDescID = GetObjDescId(uSpellID);
351  a1.spell_level = uSkillLevel;
352  a1.vPosition.x = pParty->vPosition.x;
353  a1.vPosition.y = pParty->vPosition.y;
354  a1.vPosition.z = v30 + v114;
356  a1.spell_skill = 0;
357  a1.uAttributes = 0;
358  a1.uSectorID = 0;
359  a1.uSpriteFrameID = 0;
360  a1.spell_caster_pid = PID(OBJECT_Actor, uActorID);
361  a1.spell_target_pid = 0;
363  stru_50C198._427546(v30 + 2500);
364  a1.uFacing = v32;
365  a1.uSoundID = 0;
366  if (pDir->uDistance < 307.2)
368  else if (pDir->uDistance < 1024)
370  else if (pDir->uDistance < 2560)
372  else
374  a1.field_61 = 2;
375  v36 = a1.Create(
376  v32, pitch,
377  pObjectList->pObjects[(signed __int16)a1.uObjectDescID]
378  .uSpeed,
379  0);
380  if (v36 != -1) {
381  pAudioPlayer->PlaySpellSound(9, PID(OBJECT_Item, v36));
382  }
383  spellnumb = rand() % 1024 - 512;
384  v28 = rand() % 1024 - 512;
385  }
386  return;
387  break;
388 
389  case SPELL_AIR_SPARKS:
390  if (masteryLevel == 2)
391  v10 = 5;
392  else if (masteryLevel == 3)
393  v10 = 7;
394  else if (masteryLevel == 4)
395  v10 = 9;
396  else
397  v10 = 3;
398  spellnuma = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360;
399  a1.uType = spell_sprite_mapping[uSpellID].uSpriteType;
400  v118 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 /
401  (v10 - 1);
402  a1.uObjectDescID = GetObjDescId(uSpellID);
403 
404  a1.containing_item.Reset();
406  a1.spell_level = uSkillLevel;
407  a1.vPosition.x = actorPtr->vPosition.x;
408  a1.spell_skill = 0;
409  a1.vPosition.y = actorPtr->vPosition.y;
410  a1.vPosition.z = actorPtr->vPosition.z +
411  ((signed int)actorPtr->uActorHeight >> 1);
412  a1.uFacing = pDir->uYawAngle;
413  a1.uSoundID = 0;
414  a1.uAttributes = 0;
415  a1.uSectorID = pIndoor->GetSector(a1.vPosition.x, a1.vPosition.y,
416  a1.vPosition.z);
417  a1.spell_caster_pid = PID(OBJECT_Actor, uActorID);
418  a1.uSpriteFrameID = 0;
419  a1.spell_target_pid = 0;
421  v19 = spellnuma / -2;
422  a1a = spellnuma / 2;
423  if (spellnuma / -2 > spellnuma / 2) {
424  v20 = spellnuma / 2;
425  } else {
426  do {
427  a1.uFacing = v19 + (short)pDir->uYawAngle;
428  v20 = a1.Create(
429  (int16_t)a1.uFacing, pDir->uPitchAngle,
431  .uSpeed,
432  0);
433  v19 += v118;
434  } while (v19 <= a1a);
435  }
436  if (v20 != -1) {
437  pAudioPlayer->PlaySpellSound(15, PID(OBJECT_Item, v20));
438  return;
439  }
440  return;
441  break;
442 
443  case SPELL_AIR_SHIELD:
444  if (masteryLevel == 1 || masteryLevel == 2)
445  v8 = 5 * 60 * realPoints + 3840;
446  else if (masteryLevel == 3)
447  v8 = 15 * 60 * realPoints + 3840;
448  else if (masteryLevel == 4)
449  v8 = 60 * 60 * (realPoints + 64);
450  else
451  v8 = 0;
452  spell_length = GameTime::FromMinutes(v8 / 60);
454  (pParty->GetPlayingTime() + spell_length),
455  masteryLevel, 0, 0, 0);
456  return;
457 
459  if (masteryLevel == 1 || masteryLevel == 2)
460  v44 = 5 * 60 * realPoints + 3840;
461  else if (masteryLevel == 3)
462  v44 = 15 * 60 * realPoints + 3840;
463  else if (masteryLevel == 4)
464  v44 = 60 * 60 * (realPoints + 64);
465  else
466  v44 = 0;
467  spell_length = GameTime::FromMinutes(v44 / 60);
469  (pParty->GetPlayingTime() + spell_length),
470  masteryLevel, realPoints + 5, 0, 0);
473  PID(OBJECT_Actor, uActorID), 0, -1, 0, 0);
474  return;
475 
476  case SPELL_SPIRIT_BLESS:
477  if (masteryLevel == 1 || masteryLevel == 2)
478  v42 = 5 * 60 * realPoints + 3840;
479  else if (masteryLevel == 3)
480  v42 = 15 * 60 * realPoints + 3840;
481  else if (masteryLevel == 4)
482  v42 = 20 * 60 * realPoints + 3840;
483  else
484  v42 = 0;
485  spell_length = GameTime::FromMinutes(v42 / 60);
487  (pParty->GetPlayingTime() + spell_length),
488  masteryLevel, realPoints + 5, 0, 0);
489 
492  PID(OBJECT_Actor, uActorID), 0, -1, 0,
493  0);
494  return;
495 
496  case SPELL_SPIRIT_FATE:
497  if (masteryLevel == 1 || masteryLevel == 2)
498  v48 = 2 * realPoints + 40;
499  else if (masteryLevel == 3)
500  v48 = 3 * realPoints + 60;
501  else if (masteryLevel == 4)
502  v48 = 2 * (3 * realPoints + 60);
503  else
504  v48 = 0;
505  spell_length = GameTime::FromMinutes(5);
506  actorPtr->pActorBuffs[ACTOR_BUFF_FATE].Apply(
507  (pParty->GetPlayingTime() + spell_length),
508  masteryLevel, v48, 0, 0);
511  PID(OBJECT_Actor, uActorID), 0, -1, 0,
512  0);
513  return;
514 
516  if (masteryLevel == 1 || masteryLevel == 2)
517  v54 = 5 * 60 * realPoints + 3840;
518  else if (masteryLevel == 3)
519  v54 = 15 * 60 * realPoints + 3840;
520  else if (masteryLevel == 4)
521  v54 = 20 * 60 * realPoints + 3840;
522  else
523  v54 = 0;
524  spell_length = GameTime::FromMinutes(v54 / 60);
526  (pParty->GetPlayingTime() + spell_length),
527  masteryLevel, realPoints + 5, 0, 0);
530  PID(OBJECT_Actor, uActorID), 0, -1, 0,
531  0);
532  return;
533 
535  if ((signed int)masteryLevel <= 0 || (signed int)masteryLevel > 4)
536  v51 = 0;
537  else
538  v51 = 60 * 60 * realPoints;
539  spell_length = GameTime::FromMinutes(v51 / 60);
541  (pParty->GetPlayingTime() + spell_length),
542  masteryLevel, realPoints, 0, 0);
545  PID(OBJECT_Actor, uActorID), 0, -1, 0,
546  0);
547  return;
548 
550  actorPtr->sCurrentHP += 5 * realPoints + 10;
551  if (actorPtr->sCurrentHP >= (signed int)actorPtr->pMonsterInfo.uHP)
552  actorPtr->sCurrentHP = (short)actorPtr->pMonsterInfo.uHP;
555  PID(OBJECT_Actor, uActorID), 0, -1, 0,
556  0);
557  return;
558 
560  for (int i = 0; i < 20; i++) pParty->pPartyBuffs[i].Reset();
561  for (int i = 1; i <= 4; i++) {
562  v59 = pPlayers[i]->GetParameterBonus(
563  pPlayers[i]->GetActualWillpower());
564  v61 = (pPlayers[i]->GetParameterBonus(
565  pPlayers[i]->GetActualIntelligence()) +
566  v59) /
567  2;
568  v63 = v61 +
569  pPlayers[i]->GetParameterBonus(
570  pPlayers[i]->GetActualLuck()) +
571  30;
572  if (rand() % v63 < 30) {
573  for (uint k = 0; k < pPlayers[i]->pPlayerBuffs.size(); k++)
574  pPlayers[i]->pPlayerBuffs[k].Reset();
575  pOtherOverlayList->_4418B1(11210, i + 99, 0, 65536);
576  }
577  }
578  pAudioPlayer->PlaySpellSound(80, PID(OBJECT_Actor, uActorID));
579  return;
580 
582  if (masteryLevel == 1 || masteryLevel == 2) {
583  v96 = 5 * 60 * realPoints + 128 * 30;
584  } else if (masteryLevel == 3) {
585  HEXRAYS_LOWORD(realPoints) = 3 * realPoints;
586  v96 = 15 * 60 * (uSkillLevel & 0x3F) + 128 * 30;
587  } else if (masteryLevel == 4) {
588  v96 = 20 * 60 * realPoints + 128 * 30;
589  HEXRAYS_LOWORD(realPoints) = 4 * realPoints;
590  } else {
591  HEXRAYS_LOWORD(realPoints) = uSkillLevel;
592  v96 = 0;
593  }
594  spell_length = GameTime::FromMinutes(v96 / 60);
596  (pParty->GetPlayingTime() + spell_length),
597  masteryLevel, realPoints, 0, 0);
600  PID(OBJECT_Actor, uActorID), 0, -1, 0,
601  0);
602  return;
603 
605  if (masteryLevel == 1 || masteryLevel == 2)
606  v94 = 5 * 60 * realPoints + 30 * 128;
607  else if (masteryLevel == 3)
608  v94 = 15 * 60 * realPoints + 30 * 128;
609  else if (masteryLevel == 4)
610  v94 = 20 * 60 * realPoints + 30 * 128;
611  else
612  v94 = 0;
613  spell_length = GameTime::FromMinutes(v94 / 60);
615  (pParty->GetPlayingTime() + spell_length),
616  masteryLevel, realPoints + 5, 0, 0);
619  PID(OBJECT_Actor, uActorID), 0, -1, 0,
620  0);
621  return;
622 
624  if (masteryLevel == 2)
625  v70 = 5;
626  else if (masteryLevel == 3)
627  v70 = 7;
628  else if (masteryLevel == 4)
629  v70 = 9;
630  else
631  v70 = 3;
632 
633  spellnume = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360;
634  a1.uType = spell_sprite_mapping[uSpellID].uSpriteType;
635  v116 = (signed int)(60 * stru_5C6E00->uIntegerDoublePi) / 360 /
636  (v70 - 1);
637  a1.uObjectDescID = GetObjDescId(uSpellID);
638  a1.containing_item.Reset();
639  a1.spell_id = uSpellID;
640  a1.spell_level = uSkillLevel;
641  a1.vPosition.x = actorPtr->vPosition.x;
642  a1.spell_skill = 0;
643  a1.vPosition.y = actorPtr->vPosition.y;
644  a1.vPosition.z = actorPtr->vPosition.z +
645  ((signed int)actorPtr->uActorHeight >> 1);
646  a1.uFacing = pDir->uYawAngle;
647  a1.uSoundID = 0;
648  a1.uAttributes = 0;
649  a1.uSectorID = pIndoor->GetSector(a1.vPosition.x, a1.vPosition.y,
650  a1.vPosition.z);
651  a1.spell_caster_pid = PID(OBJECT_Actor, uActorID);
652  a1.uSpriteFrameID = 0;
653  a1.spell_target_pid = 0;
655  a1c = spellnume / -2;
656  if (spellnume / -2 > spellnume / 2) {
657  v80 = spellnume / -2;
658  } else {
659  do {
660  v79 = pDir->uYawAngle;
661  a1.uFacing = a1c + (short)pDir->uYawAngle;
662  v80 = a1.Create(
663  v79, pDir->uPitchAngle,
665  .uSpeed,
666  0);
667  a1c += v116;
668  } while (a1c <= spellnume / 2);
669  }
670  if (v80 != -1) {
671  pAudioPlayer->PlaySpellSound(93, PID(OBJECT_Item, v80));
672  return;
673  }
674  return;
675 
677  if (masteryLevel == 0)
678  v68 = 0;
679  else if (masteryLevel == 1 || (masteryLevel == 2) ||
680  (masteryLevel == 3))
681  v68 = 5 * 30 * realPoints + 30 * 128;
682  else
683  v68 = 15 * 30 * realPoints + 30 * 128;
684  spell_length = GameTime::FromMinutes(v68 / 60);
686  (pParty->GetPlayingTime() + spell_length),
687  masteryLevel, 0, 0, 0);
690  PID(OBJECT_Actor, uActorID), 0, -1, 0,
691  0);
692  return;
693  }
694 }

Перекрестные ссылки stru319::_427546(), OtherOverlayList::_4418B1(), SpellFxRenderer::_4A7E89_sparkles_on_actor_after_it_casts_buff(), ACTOR_BUFF_BLESS, ACTOR_BUFF_DAY_OF_PROTECTION, ACTOR_BUFF_FATE, ACTOR_BUFF_HASTE, ACTOR_BUFF_HEROISM, ACTOR_BUFF_HOUR_OF_POWER, ACTOR_BUFF_PAIN_HAMMERHANDS, ACTOR_BUFF_PAIN_REFLECTION, ACTOR_BUFF_SHIELD, ACTOR_BUFF_STONESKIN, SpellBuff::Apply(), stru193_math::Atan2(), SpriteObject::containing_item, SpriteObject::Create(), SpriteObject::field_60_distance_related_prolly_lod, SpriteObject::field_61, GameTime::FromMinutes(), GetObjDescId(), Party::GetPlayingTime(), IndoorLocation::GetSector(), LEVEL_Indoor, OBJECT_Actor, OBJECT_Item, pActorBuffs, pActors, pAudioPlayer, pIndoor, AudioPlayer::PlaySound(), AudioPlayer::PlaySpellSound(), pMonsterInfo, pObjectList, ObjectList::pObjects, pOtherOverlayList, pParty, Party::pPartyBuffs, pPlayers, Reset(), ItemGen::Reset(), sCurrentHP, SkillToMastery(), SOUND_51heroism03, SOUND_94dayofprotection03, SOUND_9armageddon01, SOUND_Bless, SOUND_Fate, SOUND_Haste, SOUND_Sacrifice2, SOUND_Stoneskin, SPELL_AIR_LIGHNING_BOLT, SPELL_AIR_SHIELD, SPELL_AIR_SPARKS, SPELL_BODY_HAMMERHANDS, SPELL_BODY_HARM, SPELL_BODY_POWER_CURE, SpriteObject::spell_caster_pid, SPELL_DARK_DRAGON_BREATH, SPELL_DARK_PAIN_REFLECTION, SPELL_DARK_SHARPMETAL, SPELL_DARK_TOXIC_CLOUD, SPELL_EARTH_BLADES, SPELL_EARTH_ROCK_BLAST, SPELL_EARTH_STONESKIN, SPELL_FIRE_FIRE_BOLT, SPELL_FIRE_FIREBALL, SPELL_FIRE_HASTE, SPELL_FIRE_INCINERATE, SPELL_FIRE_METEOR_SHOWER, spell_fx_renderer, SpriteObject::spell_id, SpriteObject::spell_level, SPELL_LIGHT_DAY_OF_PROTECTION, SPELL_LIGHT_DISPEL_MAGIC, SPELL_LIGHT_HOUR_OF_POWER, SPELL_LIGHT_LIGHT_BOLT, SPELL_MIND_MIND_BLAST, SPELL_MIND_PSYCHIC_SHOCK, SpriteObject::spell_skill, SPELL_SPIRIT_BLESS, SPELL_SPIRIT_FATE, SPELL_SPIRIT_HEROISM, spell_sprite_mapping, SpriteObject::spell_target_pid, SPELL_WATER_ACID_BURST, SPELL_WATER_ICE_BOLT, stru_50C198, stru_5C6E00, uActorHeight, SpriteObject::uAttributes, uCurrentlyLoadedLevelType, AIDirection::uDistance, SpriteObject::uFacing, MonsterInfo::uHP, stru193_math::uIntegerDoublePi, SpriteObject::uObjectDescID, AIDirection::uPitchAngle, SpriteObject::uSectorID, SpriteObject::uSoundID, ObjectDesc::uSpeed, SpriteObject::uSpriteFrameID, SpriteObject::uType, AIDirection::uYawAngle, SpriteObject::vPosition, Party::vPosition и vPosition.

Используется в stru262_TurnBased::AIAttacks() и UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ ActorDamageFromMonster()

void Actor::ActorDamageFromMonster ( int  attacker_id,
unsigned int  actor_id,
struct Vec3_int_ *  pVelocity,
int  a4 
)
static

См. определение в файле Actor.cpp строка 2507

2509  {
2510  int v4; // ebx@1
2511  int dmgToRecv; // qax@8
2512  signed int v12; // ecx@20
2513  int finalDmg; // edi@30
2514  int pushDistance; // [sp+20h] [bp+Ch]@34
2515 
2516  v4 = 0;
2517  if (PID_TYPE(attacker_id) == OBJECT_Item) {
2518  v4 = pSpriteObjects[PID_ID(attacker_id)]
2519  .field_60_distance_related_prolly_lod;
2520  attacker_id = pSpriteObjects[PID_ID(attacker_id)].spell_caster_pid;
2521  }
2522  if (PID_TYPE(attacker_id) == OBJECT_Actor) {
2523  if (!pActors[actor_id].IsNotAlive()) {
2524  pActors[actor_id].uLastCharacterIDToHit = attacker_id;
2525  if (pActors[actor_id].uAIState == Fleeing)
2526  pActors[actor_id].uAttributes |= ACTOR_FLEEING;
2527  if (pActors[PID_ID(attacker_id)]._4273BB_DoesHitOtherActor(
2528  &pActors[actor_id], v4, 0)) {
2529  dmgToRecv = pActors[PID_ID(attacker_id)]._43B3E0_CalcDamage(a4);
2530  if (pActors[PID_ID(attacker_id)]
2532  .Active()) {
2533  if (pActors[PID_ID(attacker_id)]
2535  .uPower > 0)
2536  dmgToRecv =
2537  dmgToRecv / pActors[PID_ID(attacker_id)]
2538  .pActorBuffs[ACTOR_BUFF_SHRINK]
2539  .uPower;
2540  }
2541  if (pActors[actor_id].pActorBuffs[ACTOR_BUFF_STONED].Active())
2542  dmgToRecv = 0;
2543  if (a4 == 0) {
2544  v12 =
2545  pActors[PID_ID(attacker_id)].pMonsterInfo.uAttack1Type;
2546  } else if (a4 == 1) {
2547  v12 =
2548  pActors[PID_ID(attacker_id)].pMonsterInfo.uAttack2Type;
2549  if (pActors[actor_id]
2551  .Active())
2552  dmgToRecv = dmgToRecv / 2;
2553  } else if (a4 == 2) {
2554  v12 = pSpellStats
2555  ->pInfos[pActors[actor_id].pMonsterInfo.uSpell1ID]
2556  .uSchool;
2557  } else if (a4 == 3) {
2558  v12 = pSpellStats
2559  ->pInfos[pActors[actor_id].pMonsterInfo.uSpell2ID]
2560  .uSchool;
2561  } else if (a4 == 4) {
2562  v12 = pActors[PID_ID(attacker_id)]
2563  .pMonsterInfo.field_3C_some_special_attack;
2564  } else {
2565  v12 = 4;
2566  }
2567  finalDmg = pActors[actor_id].CalcMagicalDamageToActor(
2568  (DAMAGE_TYPE)v12, dmgToRecv);
2569  pActors[actor_id].sCurrentHP -= finalDmg;
2570  if (finalDmg) {
2571  if (pActors[actor_id].sCurrentHP > 0)
2572  Actor::AI_Stun(actor_id, attacker_id, 0);
2573  else
2574  Actor::Die(actor_id);
2575  Actor::AggroSurroundingPeasants(actor_id, 0);
2576  pushDistance =
2577  20 * finalDmg / pActors[actor_id].pMonsterInfo.uHP;
2578  if (pushDistance > 10) pushDistance = 10;
2580  pActors[actor_id].pMonsterInfo.uID,
2582  pVelocity->x =
2583  (int32)fixpoint_mul(pushDistance, pVelocity->x);
2584  pVelocity->y =
2585  (int32)fixpoint_mul(pushDistance, pVelocity->y);
2586  pVelocity->z =
2587  (int32)fixpoint_mul(pushDistance, pVelocity->z);
2588  pActors[actor_id].vVelocity.x =
2589  50 * (short)pVelocity->x;
2590  pActors[actor_id].vVelocity.y =
2591  50 * (short)pVelocity->y;
2592  pActors[actor_id].vVelocity.z =
2593  50 * (short)pVelocity->z;
2594  }
2595  Actor::AddBloodsplatOnDamageOverlay(actor_id, 1, finalDmg);
2596  } else {
2597  Actor::AI_Stun(actor_id, attacker_id, 0);
2598  }
2599  return;
2600  }
2601  }
2602  }
2603 }

Перекрестные ссылки _4273BB_DoesHitOtherActor(), ACTOR_BUFF_SHIELD, ACTOR_BUFF_SHRINK, ACTOR_BUFF_STONED, AddBloodsplatOnDamageOverlay(), AggroSurroundingPeasants(), AI_Stun(), MonsterStats::BelongsToSupertype(), Die(), fixpoint_mul(), Fleeing, IsNotAlive(), MONSTER_SUPERTYPE_TREANT, OBJECT_Actor, OBJECT_Item, pActorBuffs, pActors, SpellStats::pInfos, pMonsterInfo, pSpellStats, pSpriteObjects, sCurrentHP, uAIState, MonsterInfo::uID и SpellInfo::uSchool.

Используется в area_of_effect__damage_evaluate() и sub_43A97E().

+ Граф вызовов:
+ Граф вызова функции:

◆ GetObjDescId()

unsigned short Actor::GetObjDescId ( int  spellId)
static

См. определение в файле Actor.cpp строка 696

696  {
697  return pObjectList->ObjectIDByItemID(spell_sprite_mapping[spellId].uSpriteType); // crash here
698 }

Перекрестные ссылки ObjectList::ObjectIDByItemID(), pObjectList и spell_sprite_mapping.

Используется в AI_SpellAttack().

+ Граф вызовов:
+ Граф вызова функции:

◆ AggroSurroundingPeasants()

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

См. определение в файле Actor.cpp строка 717

717  {
718  int v4; // ebx@8
719  int v5; // ST1C_4@8
720  int v6; // eax@8
721 
722  int x = 0;
723  x |= 0x80000;
724  int y = 0;
725  y |= 0x80000;
726  Actor *victim = &pActors[uActorID];
727  if (a2 == 1) victim->uAttributes |= ACTOR_AGGRESSOR;
728 
729  for (uint i = 0; i < uNumActors; ++i) {
730  Actor *actor = &pActors[i];
731  if (!actor->CanAct() || i == uActorID) continue;
732 
733  if (Actor::ArePeasantsOfSameFaction(victim, actor)) {
734  v4 = abs(actor->vPosition.x - victim->vPosition.x);
735  v5 = abs(actor->vPosition.y - victim->vPosition.y);
736  v6 = abs(actor->vPosition.z - victim->vPosition.z);
737  if (int_get_vector_length(v4, v5, v6) < 4096) {
740  if (a2 == 1) actor->uAttributes |= ACTOR_AGGRESSOR;
741  }
742  }
743  }
744 }

Перекрестные ссылки ArePeasantsOfSameFaction(), CanAct(), MonsterInfo::Hostility_Long, int_get_vector_length(), pActors, pMonsterInfo, uAttributes, MonsterInfo::uHostilityType, uNumActors и vPosition.

Используется в ActorDamageFromMonster(), DamageMonsterFromParty(), DamagePlayerFromMonster() и Player::StealFromActor().

+ Граф вызовов:
+ Граф вызова функции:

◆ ArePeasantsOfSameFaction()

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

См. определение в файле Actor.cpp строка 700

700  {
701  unsigned int v2 = a1->uAlly;
702  if (!a1->uAlly) v2 = (a1->pMonsterInfo.uID - 1) / 3 + 1;
703 
704  unsigned int v3 = a2->uAlly;
705  if (!a2->uAlly) v3 = (a2->pMonsterInfo.uID - 1) / 3 + 1;
706 
707  if (v2 >= 39 && v2 <= 44 && v3 >= 39 && v3 <= 44 ||
708  v2 >= 45 && v2 <= 50 && v3 >= 45 && v3 <= 50 ||
709  v2 >= 51 && v2 <= 62 && v3 >= 51 && v3 <= 62 ||
710  v2 >= 78 && v2 <= 83 && v3 >= 78 && v3 <= 83 || v2 == v3)
711  return true;
712  else
713  return false;
714 }

Перекрестные ссылки pMonsterInfo, uAlly и MonsterInfo::uID.

Используется в AggroSurroundingPeasants().

+ Граф вызова функции:

◆ StealFrom()

void Actor::StealFrom ( unsigned int  uActorID)
static

См. определение в файле Actor.cpp строка 1385

1385  {
1386  Player *pPlayer; // edi@1
1387  int v4; // ebx@2
1388  unsigned int v5; // eax@2
1389  DDM_DLV_Header *v6; // esi@4
1390  int v8; // [sp+8h] [bp-4h]@6
1391 
1392  pPlayer = &pParty->pPlayers[uActiveCharacter - 1];
1393  if (pPlayer->CanAct()) {
1395  v4 = 0;
1397  if (v5) v4 = pMapStats->pInfos[v5]._steal_perm;
1398  v6 = &pOutdoor->ddm;
1400  pPlayer->StealFromActor(uActorID, v4, v6->uReputation++);
1401  v8 = pPlayer->GetAttackRecoveryTime(0);
1402  if (v8 < 30) v8 = 30;
1403  if (!pParty->bTurnBasedModeOn)
1404  pPlayer->SetRecoveryTime(
1405  (int)(flt_6BE3A4_debug_recmod1 * v8 * 2.133333333333333));
1407  }
1408  return;
1409 }

Перекрестные ссылки MapInfo::_steal_perm, stru262_TurnBased::ApplyPlayerAction(), Party::bTurnBasedModeOn, Player::CanAct(), CastSpellInfoHelpers::Cancel_Spell_Cast_In_Progress(), OutdoorLocation::ddm, IndoorLocation::dlv, flt_6BE3A4_debug_recmod1, Player::GetAttackRecoveryTime(), MapStats::GetMapInfo(), LEVEL_Outdoor, pCurrentMapName, pIndoor, MapStats::pInfos, pMapStats, pOutdoor, pParty, Party::pPlayers, pTurnEngine, Player::SetRecoveryTime(), Player::StealFromActor(), uActiveCharacter, uCurrentlyLoadedLevelType и DDM_DLV_Header::uReputation.

Используется в Application::Game::EventLoop().

+ Граф вызовов:
+ Граф вызова функции:

◆ GiveItem()

void Actor::GiveItem ( signed int  uActorID,
unsigned int  uItemID,
unsigned int  bGive 
)
static

См. определение в файле Actor.cpp строка 134

135  {
136  if ((uActorID >= 0) &&
137  (signed int)uActorID <= (signed int)(uNumActors - 1)) {
138  if (bGive) {
139  if (pActors[uActorID].uCarriedItemID == ITEM_NULL)
140  pActors[uActorID].uCarriedItemID = uItemID;
141  else if (pActors[uActorID].ActorHasItems[0].uItemID == ITEM_NULL)
142  pActors[uActorID].ActorHasItems[0].uItemID = uItemID;
143  else if (pActors[uActorID].ActorHasItems[1].uItemID == ITEM_NULL)
144  pActors[uActorID].ActorHasItems[1].uItemID = uItemID;
145  } else {
146  if (pActors[uActorID].uCarriedItemID == uItemID)
147  pActors[uActorID].uCarriedItemID = ITEM_NULL;
148  else if (pActors[uActorID].ActorHasItems[0].uItemID == uItemID)
149  pActors[uActorID].ActorHasItems[0].Reset();
150  else if (pActors[uActorID].ActorHasItems[1].uItemID == uItemID)
151  pActors[uActorID].ActorHasItems[1].Reset();
152  }
153  }
154 }

Перекрестные ссылки ActorHasItems, ITEM_NULL, pActors, uCarriedItemID и uNumActors.

Используется в EventProcessor() и sub_448518_npc_set_item().

+ Граф вызова функции:

◆ ToggleFlag()

void Actor::ToggleFlag ( signed int  uActorID,
unsigned int  uFlag,
int  bToggle 
)
static

См. определение в файле Actor.cpp строка 112

112  {
113  if (uActorID >= 0 && uActorID <= (signed int)(uNumActors - 1)) {
114  if (bToggle) {
115  pActors[uActorID].uAttributes |= uFlag;
116  } else {
117  if (uFlag == 0x10000) {
118  if (pActors[uActorID].uAIState == Disabled)
119  pActors[uActorID].uAIState = Standing;
120  }
121  pActors[uActorID].uAttributes &= ~uFlag;
122  }
123  }
124 }

Перекрестные ссылки Disabled, pActors, Standing, uAIState и uNumActors.

Используется в EventProcessor().

+ Граф вызова функции:

◆ ApplyFineForKillingPeasant()

void Actor::ApplyFineForKillingPeasant ( unsigned int  uActorID)
static

См. определение в файле Actor.cpp строка 1223

1223  {
1224  if (uLevelMapStatsID == 0 || !pActors[uActorID].IsPeasant()) return;
1225 
1226  if ((uLevelMapStatsID == 6 || uLevelMapStatsID == 7) &&
1227  pParty->IsPartyEvil()) // celeste and bracada
1228  return;
1229 
1230  if ((uLevelMapStatsID == 5 || uLevelMapStatsID == 8) &&
1231  pParty->IsPartyGood()) // the pit and deyja
1232  return;
1233 
1235  pActors[uActorID].pMonsterInfo.uLevel +
1237  if (pParty->uFine < 0) pParty->uFine = 0;
1238  if (pParty->uFine > 4000000) pParty->uFine = 4000000;
1239 
1241  if (pOutdoor->ddm.uReputation < 10000) pOutdoor->ddm.uReputation++;
1242  } else if (uCurrentlyLoadedLevelType == LEVEL_Indoor) {
1243  if (pIndoor->dlv.uReputation < 10000) pIndoor->dlv.uReputation++;
1244  } else {
1245  assert(false);
1246  }
1247 
1248  if (pParty->uFine) {
1249  for (int i = 1; i <= 4; i++) {
1250  if (!_449B57_test_bit(pPlayers[i]->_achieved_awards_bits, PLAYER_GUILD_BITS__FINED))
1251  _449B7E_toggle_bit(pPlayers[i]->_achieved_awards_bits, PLAYER_GUILD_BITS__FINED, 1u);
1252  }
1253  }
1254 }

Перекрестные ссылки _449B57_test_bit(), _449B7E_toggle_bit(), MapInfo::_steal_perm, OutdoorLocation::ddm, IndoorLocation::dlv, Party::GetPartyReputation(), Party::IsPartyEvil(), Party::IsPartyGood(), IsPeasant(), LEVEL_Indoor, LEVEL_Outdoor, pActors, pIndoor, MapStats::pInfos, pMapStats, pOutdoor, pParty, pPlayers, uCurrentlyLoadedLevelType, Party::uFine, uLevelMapStatsID и DDM_DLV_Header::uReputation.

Используется в DamageMonsterFromParty() и DamagePlayerFromMonster().

+ Граф вызовов:
+ Граф вызова функции:

◆ DrawHealthBar()

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

См. определение в файле Actor.cpp строка 67

67  {
68  // bar length
69  unsigned int bar_length;
70  if (actor->pMonsterInfo.uHP <= 25)
71  bar_length = 25;
72  else if (actor->pMonsterInfo.uHP < 200)
73  bar_length = actor->pMonsterInfo.uHP;
74  else
75  bar_length = 200;
76 
77  // bar colour
78  Image *bar_image = game_ui_monster_hp_green;
79  if (actor->sCurrentHP <= (0.34 * actor->pMonsterInfo.uHP))
80  bar_image = game_ui_monster_hp_red;
81  else if (actor->sCurrentHP <= (0.67 * actor->pMonsterInfo.uHP))
82  bar_image = game_ui_monster_hp_yellow;
83 
84  // how much of bar is filled
85  unsigned int bar_filled_length = bar_length;
86  if (actor->sCurrentHP < (int)actor->pMonsterInfo.uHP)
87  bar_filled_length = (bar_length * actor->sCurrentHP) / actor->pMonsterInfo.uHP;
88 
89  // centralise for clipping and draw
90  unsigned int uX = window->uFrameX + (signed int)(window->uFrameWidth - bar_length) / 2;
91 
92  render->SetUIClipRect(uX, window->uFrameY + 32, uX + bar_length, window->uFrameY + 52);
93  render->DrawTextureAlphaNew(uX / 640.0f, (window->uFrameY + 32) / 480.0f,
95 
96  render->SetUIClipRect(uX, window->uFrameY + 32, uX + bar_filled_length,
97  window->uFrameY + 52);
98  render->DrawTextureAlphaNew(uX / 640.0f, (window->uFrameY + 34) / 480.0f,
99  bar_image);
100 
101  // draw hp bar ends
102  render->ResetUIClipRect();
103  render->DrawTextureAlphaNew((uX - 5) / 640.0f,
104  (window->uFrameY + 32) / 480.0f,
106  render->DrawTextureAlphaNew((uX + bar_length) / 640.0f,
107  (window->uFrameY + 32) / 480.0f,
109 }

Перекрестные ссылки game_ui_monster_hp_background, game_ui_monster_hp_border_left, game_ui_monster_hp_border_right, game_ui_monster_hp_green, game_ui_monster_hp_red, game_ui_monster_hp_yellow, pMonsterInfo, render, sCurrentHP и MonsterInfo::uHP.

Используется в MonsterPopup_Draw().

+ Граф вызова функции:

◆ _43B3E0_CalcDamage()

int Actor::_43B3E0_CalcDamage ( signed int  dmgSource)

См. определение в файле Actor.cpp строка 1314

1314  {
1315  int v2; // ebp@1
1316  int v3; // eax@9
1317  int v4; // edi@9
1318  int v5; // esi@9
1319  unsigned __int16 v8; // si@21
1320  int v9; // edi@21
1321  int v10; // eax@23
1322  int v11; // [sp+10h] [bp-4h]@1
1323 
1324  v2 = 0;
1325  v11 = 0;
1326 
1327  switch (dmgSource) {
1328  case 0:
1329  if (this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].Active())
1331  if (this->pActorBuffs[ACTOR_BUFF_HEROISM].Active() &&
1332  this->pActorBuffs[ACTOR_BUFF_HEROISM].uPower > v2)
1334  if (this->pActorBuffs[ACTOR_BUFF_PAIN_HAMMERHANDS].Active())
1338  v5 = this->pMonsterInfo.uAttack1DamageBonus;
1339  break;
1340  case 1:
1343  v5 = this->pMonsterInfo.uAttack2DamageBonus;
1344  break;
1345  case 2:
1347  v9 = this->pMonsterInfo.uSpell1ID;
1348  v10 = SkillToMastery(v8);
1349  return _43AFE3_calc_spell_damage(v9, v8 & 0x3F, v10, 0);
1350  break;
1351  case 3:
1353  v9 = this->pMonsterInfo.uSpell2ID;
1354  v10 = SkillToMastery(v8);
1355  return _43AFE3_calc_spell_damage(v9, v8 & 0x3F, v10, 0);
1356  break;
1357  case 4:
1361  default:
1362  return 0;
1363  }
1364  for (int i = 0; i < v3; i++) v11 += rand() % v4 + 1;
1365  return v11 + v5 + v2;
1366 }

Перекрестные ссылки _43AFE3_calc_spell_damage(), ACTOR_BUFF_HEROISM, ACTOR_BUFF_HOUR_OF_POWER, ACTOR_BUFF_PAIN_HAMMERHANDS, pActorBuffs, pMonsterInfo, SkillToMastery(), MonsterInfo::uAttack1DamageBonus, MonsterInfo::uAttack1DamageDiceRolls, MonsterInfo::uAttack1DamageDiceSides, MonsterInfo::uAttack2DamageBonus, MonsterInfo::uAttack2DamageDiceRolls, MonsterInfo::uAttack2DamageDiceSides, SpellBuff::uPower, MonsterInfo::uSpecialAbilityDamageDiceBonus, MonsterInfo::uSpecialAbilityDamageDiceRolls, MonsterInfo::uSpecialAbilityDamageDiceSides, MonsterInfo::uSpell1ID, MonsterInfo::uSpell2ID, MonsterInfo::uSpellSkillAndMastery1 и MonsterInfo::uSpellSkillAndMastery2.

Используется в DamagePlayerFromMonster().

+ Граф вызовов:
+ Граф вызова функции:

◆ AddBloodsplatOnDamageOverlay()

void Actor::AddBloodsplatOnDamageOverlay ( unsigned int  uActorID,
int  a2,
int  a3 
)
static

См. определение в файле Actor.cpp строка 1257

1258  {
1259  unsigned int v4; // esi@1
1260 
1261  v4 = PID(OBJECT_Actor, uActorID);
1262  switch (a2) {
1263  case 1:
1264  if (a3)
1265  pOtherOverlayList->_4418B6(904, v4, 0,
1266  (int)(sub_43AE12(a3) * 65536.0), 0);
1267  return;
1268  case 2:
1269  if (a3)
1270  pOtherOverlayList->_4418B6(905, v4, 0,
1271  (int)(sub_43AE12(a3) * 65536.0), 0);
1272  return;
1273  case 3:
1274  if (a3)
1275  pOtherOverlayList->_4418B6(906, v4, 0,
1276  (int)(sub_43AE12(a3) * 65536.0), 0);
1277  return;
1278  case 4:
1279  if (a3)
1280  pOtherOverlayList->_4418B6(907, v4, 0,
1281  (int)(sub_43AE12(a3) * 65536.0), 0);
1282  return;
1283  case 5:
1284  pOtherOverlayList->_4418B6(901, v4, 0, PID(OBJECT_Actor, uActorID),
1285  0);
1286  return;
1287  case 6:
1288  pOtherOverlayList->_4418B6(902, v4, 0, PID(OBJECT_Actor, uActorID),
1289  0);
1290  return;
1291  case 7:
1292  pOtherOverlayList->_4418B6(903, v4, 0, PID(OBJECT_Actor, uActorID),
1293  0);
1294  return;
1295  case 8:
1296  pOtherOverlayList->_4418B6(900, v4, 0, PID(OBJECT_Actor, uActorID),
1297  0);
1298  return;
1299  case 9:
1300  pOtherOverlayList->_4418B6(909, v4, 0, PID(OBJECT_Actor, uActorID),
1301  0);
1302  return;
1303  case 10:
1304  pOtherOverlayList->_4418B6(908, v4, 0, PID(OBJECT_Actor, uActorID),
1305  0);
1306  return;
1307  default:
1308  return;
1309  }
1310  return;
1311 }

Перекрестные ссылки OtherOverlayList::_4418B6(), OBJECT_Actor, pOtherOverlayList и sub_43AE12().

Используется в ActorDamageFromMonster(), DamageMonsterFromParty() и ItemDamageFromActor().

+ Граф вызовов:
+ Граф вызова функции:

◆ _46DF1A_collide_against_actor()

bool Actor::_46DF1A_collide_against_actor ( int  a1,
int  a2 
)
static

См. определение в файле Actor.cpp строка 2699

2699  {
2700  Actor *v2; // edi@1
2701  unsigned __int16 v3; // ax@1
2702  int v4; // esi@6
2703  int v8; // ecx@14
2704  int v9; // eax@14
2705  int v10; // ebx@14
2706  int v11; // esi@14
2707  int v12; // ebx@15
2708  int v13; // ebx@17
2709 
2710  v2 = &pActors[a1];
2711  v3 = v2->uAIState;
2712  if (v3 == Removed || v3 == Dying || v3 == Disabled || v3 == Dead ||
2713  v3 == Summoned)
2714  return 0;
2715  v4 = v2->uActorRadius;
2716  if (a2) v4 = a2;
2717 
2718  if (stru_721530.sMaxX > v2->vPosition.x + v4 ||
2719  stru_721530.sMinX < v2->vPosition.x - v4 ||
2720  stru_721530.sMaxY > v2->vPosition.y + v4 ||
2721  stru_721530.sMinY < v2->vPosition.y - v4 ||
2722  stru_721530.sMaxZ > v2->vPosition.z + v2->uActorHeight ||
2723  stru_721530.sMinZ < v2->vPosition.z) {
2724  return false;
2725  }
2726  v8 = v2->vPosition.x - stru_721530.normal.x;
2727  v9 = v2->vPosition.y - stru_721530.normal.y;
2728  v10 = stru_721530.prolly_normal_d + v4;
2729  v11 = (v8 * stru_721530.direction.y - v9 * stru_721530.direction.x) >> 16;
2730  v12 = (v8 * stru_721530.direction.x + v9 * stru_721530.direction.y) >> 16;
2731  if (abs(v11) > v10 || v12 <= 0) return false;
2733  v2->vPosition.z)
2734  return false;
2735 
2736  v13 = v12 - integer_sqrt(v10 * v10 - v11 * v11);
2737  if (v13 < 0) v13 = 0;
2738  if (v13 < stru_721530.field_7C) {
2739  stru_721530.field_7C = v13;
2740  stru_721530.pid = PID(OBJECT_Actor, a1);
2741  }
2742  return true;
2743 }

Перекрестные ссылки Dead, stru141_actor_collision_object::direction, Disabled, Dying, stru141_actor_collision_object::field_7C, fixpoint_mul(), integer_sqrt(), stru141_actor_collision_object::normal, OBJECT_Actor, pActors, stru141_actor_collision_object::pid, stru141_actor_collision_object::prolly_normal_d, Removed, stru141_actor_collision_object::sMaxX, stru141_actor_collision_object::sMaxY, stru141_actor_collision_object::sMaxZ, stru141_actor_collision_object::sMinX, stru141_actor_collision_object::sMinY, stru141_actor_collision_object::sMinZ, stru_721530 и Summoned.

Используется в BLV_ProcessPartyActions(), ODM_ProcessPartyActions(), UpdateActors_BLV(), UpdateActors_ODM(), SpriteObject::UpdateObject_fn0_BLV() и SpriteObject::UpdateObject_fn0_ODM().

+ Граф вызовов:
+ Граф вызова функции:

◆ Arena_summon_actor()

void Actor::Arena_summon_actor ( int  monster_id,
int16_t  x,
int  y,
int  z 
)
static

См. определение в файле Actor.cpp строка 3697

3697  {
3698  // int v12; // ebx@7
3699  // int v13; // eax@8
3700  __int16 v16; // [sp+10h] [bp-4h]@3
3701 
3702  if (uNumActors < 500) {
3703  v16 = 0;
3705  v16 = pIndoor->GetSector(x, y, z);
3706  pActors[uNumActors].Reset();
3707  strcpy(pActors[uNumActors].pActorName,
3708  pMonsterStats->pInfos[monster_id].pName);
3709  pActors[uNumActors].sCurrentHP =
3710  (short)pMonsterStats->pInfos[monster_id].uHP;
3711  memcpy(&pActors[uNumActors].pMonsterInfo,
3712  &pMonsterStats->pInfos[monster_id], 0x58u);
3713  pActors[uNumActors].word_000086_some_monster_id = monster_id;
3714  pActors[uNumActors].uActorRadius =
3715  pMonsterList->pMonsters[monster_id - 1].uMonsterRadius;
3716  pActors[uNumActors].uActorHeight =
3717  pMonsterList->pMonsters[monster_id - 1].uMonsterHeight;
3718  pActors[uNumActors].uMovementSpeed =
3719  pMonsterList->pMonsters[monster_id - 1].uMovementSpeed;
3720  pActors[uNumActors].vInitialPosition.x = x;
3721  pActors[uNumActors].vPosition.x = x;
3722  pActors[uNumActors].uAttributes |= ACTOR_AGGRESSOR;
3723  pActors[uNumActors].pMonsterInfo.uTreasureType = 0;
3724  pActors[uNumActors].pMonsterInfo.uTreasureLevel = 0;
3725  pActors[uNumActors].pMonsterInfo.uTreasureDiceSides = 0;
3726  pActors[uNumActors].pMonsterInfo.uTreasureDiceRolls = 0;
3727  pActors[uNumActors].pMonsterInfo.uTreasureDropChance = 0;
3728  pActors[uNumActors].vInitialPosition.y = y;
3729  pActors[uNumActors].vPosition.y = y;
3730  pActors[uNumActors].vInitialPosition.z = z;
3731  pActors[uNumActors].vPosition.z = z;
3732  pActors[uNumActors].uTetherDistance = 256;
3733  pActors[uNumActors].uSectorID = v16;
3734  pActors[uNumActors].uGroup = 1;
3735  pActors[uNumActors].pMonsterInfo.uHostilityType =
3737  pActors[uNumActors].PrepareSprites(0);
3738  // for ( int i = 0; i < 4; i++)
3739  // pSoundList->LoadSound(pMonsterList->pMonsters[monster_id -
3740  // 1].pSoundSampleIDs[i], 0);
3741  // v12 = 0;
3742  // do
3743  // {
3744  // v13 = pSoundList->LoadSound(v12 +
3745  // word_4EE088_sound_ids[pMonsterStats->pInfos[monster_id].uSpell1ID],
3746  // 1); v12++;
3747  // }
3748  // while ( v13 );
3749  ++uNumActors;
3750  }
3751 }

Перекрестные ссылки IndoorLocation::GetSector(), MonsterInfo::Hostility_Long, LEVEL_Indoor, pActorName, pActors, pIndoor, MonsterStats::pInfos, pMonsterInfo, pMonsterList, MonsterList::pMonsters, pMonsterStats, MonsterInfo::pName, uCurrentlyLoadedLevelType, MonsterInfo::uHP, MonsterDesc::uMonsterHeight, MonsterDesc::uMonsterRadius, MonsterDesc::uMovementSpeed и uNumActors.

Используется в ArenaFight().

+ Граф вызовов:
+ Граф вызова функции:

◆ DamageMonsterFromParty()

void Actor::DamageMonsterFromParty ( int  a1,
unsigned int  uActorID_Monster,
struct Vec3_int_ *  pVelocity 
)
static

См. определение в файле Actor.cpp строка 3379

3380  {
3381  SpriteObject *projectileSprite; // ebx@1
3382  Actor *pMonster; // esi@7
3383  unsigned __int16 v16; // cx@25
3384  int v33; // eax@100
3385  int v40; // ebx@107
3386  int extraRecoveryTime; // qax@125
3387  unsigned __int16 v43; // ax@132
3388  unsigned __int16 v45; // ax@132
3389  // unsigned __int64 v46; // [sp+Ch] [bp-60h]@6
3390  char *pPlayerName; // [sp+18h] [bp-54h]@12
3391  char *pMonsterName; // [sp+1Ch] [bp-50h]@6
3392  signed int a4; // [sp+44h] [bp-28h]@1
3393  bool IsAdditionalDamagePossible; // [sp+50h] [bp-1Ch]@1
3394  int v61; // [sp+58h] [bp-14h]@1
3395  bool isLifeStealing; // [sp+5Ch] [bp-10h]@1
3396  int uDamageAmount; // [sp+60h] [bp-Ch]@1
3397  DAMAGE_TYPE attackElement; // [sp+64h] [bp-8h]@27
3398 
3399  projectileSprite = 0;
3400  uDamageAmount = 0;
3401  a4 = 0;
3402  v61 = 0;
3403  IsAdditionalDamagePossible = false;
3404  isLifeStealing = 0;
3405  if (PID_TYPE(a1) == OBJECT_Item) {
3406  projectileSprite = &pSpriteObjects[PID_ID(a1)];
3407  v61 = projectileSprite->field_60_distance_related_prolly_lod;
3408  a1 = projectileSprite->spell_caster_pid;
3409  }
3410  if (PID_TYPE(a1) != OBJECT_Player) return;
3411 
3412  assert(PID_ID(abs(a1)) < 4);
3413  Player *player = &pParty->pPlayers[PID_ID(a1)];
3414  pMonster = &pActors[uActorID_Monster];
3415  if (pMonster->IsNotAlive()) return;
3416 
3417  pMonster->uAttributes |= 0xC000;
3418  if (pMonster->uAIState == Fleeing) pMonster->uAttributes |= ACTOR_FLEEING;
3419  bool hit_will_stun = false, hit_will_paralyze = false;
3420  if (!projectileSprite) {
3421  int main_hand_idx = player->pEquipment.uMainHand;
3422  IsAdditionalDamagePossible = true;
3423  if (player->HasItemEquipped(EQUIP_TWO_HANDED)) {
3424  uint main_hand_skill =
3425  player->GetMainHandItem()->GetPlayerSkillType();
3426  uint main_hand_mastery =
3427  SkillToMastery(player->pActiveSkills[main_hand_skill]);
3428  switch (main_hand_skill) {
3429  case PLAYER_SKILL_STAFF:
3430  if (main_hand_mastery >= 3) {
3431  if (rand() % 100 <
3433  0x3F)) // stun chance when mastery >= 3
3434  hit_will_stun = true;
3435  }
3436  break;
3437 
3438  case PLAYER_SKILL_MACE:
3439  if (main_hand_mastery >= 3) {
3440  if (rand() % 100 <
3442  0x3F))
3443  hit_will_stun = true;
3444  }
3445  if (main_hand_mastery >= 4) {
3446  if (rand() % 100 <
3448  0x3F))
3449  hit_will_paralyze = true;
3450  }
3451  break;
3452  }
3453  }
3454  attackElement = DMGT_PHISYCAL;
3455  uDamageAmount = player->CalculateMeleeDamageTo(
3456  false, false, pMonster->pMonsterInfo.uID);
3457  if (!player->PlayerHitOrMiss(pMonster, v61, a4)) {
3458  player->PlaySound(SPEECH_52, 0);
3459  return;
3460  }
3461  } else {
3462  v61 = projectileSprite->field_60_distance_related_prolly_lod;
3463  if (projectileSprite->spell_id != SPELL_DARK_SOULDRINKER) {
3464  int d1 = abs(pParty->vPosition.x - projectileSprite->vPosition.x);
3465  int d2 = abs(pParty->vPosition.y - projectileSprite->vPosition.y);
3466  int d3 = abs(pParty->vPosition.z - projectileSprite->vPosition.z);
3467  v61 = int_get_vector_length(d1, d2, d3);
3468 
3469  if (v61 >= 5120 && !(pMonster->uAttributes & ACTOR_ALIVE)) // 0x400
3470  return;
3471  else if (v61 >= 2560)
3472  v61 = 2;
3473  else
3474  v61 = 1;
3475  }
3476 
3477  switch (projectileSprite->spell_id) {
3479  v16 = player->pActiveSkills[PLAYER_SKILL_BLASTER];
3480  v61 = 1;
3481  if (SkillToMastery(v16) >= 3)
3482  a4 = player->pActiveSkills[PLAYER_SKILL_BLASTER] & 0x3F;
3483  attackElement = DMGT_PHISYCAL;
3484  uDamageAmount = player->CalculateMeleeDamageTo(true, true, 0);
3485  if (!player->PlayerHitOrMiss(pMonster, v61, a4)) {
3486  player->PlaySound(SPEECH_52, 0);
3487  return;
3488  }
3489  break;
3490  case SPELL_101:
3491  attackElement = DMGT_FIRE;
3492  uDamageAmount = player->CalculateRangedDamageTo(0);
3493  if (pMonster->pActorBuffs[ACTOR_BUFF_SHIELD].Active())
3494  uDamageAmount >>= 1;
3495  IsAdditionalDamagePossible = true;
3496  if (!player->PlayerHitOrMiss(pMonster, v61, a4)) {
3497  player->PlaySound(SPEECH_52, 0);
3498  return;
3499  }
3500  break;
3501  case SPELL_EARTH_BLADES:
3502  a4 = 5 * projectileSprite->spell_level;
3503  attackElement =
3505  uDamageAmount = _43AFE3_calc_spell_damage(
3506  39, projectileSprite->spell_level,
3507  projectileSprite->spell_skill, pMonster->sCurrentHP);
3508  if (pMonster->pActorBuffs[ACTOR_BUFF_SHIELD].Active())
3509  uDamageAmount >>= 1;
3510  IsAdditionalDamagePossible = false;
3511  if (!player->PlayerHitOrMiss(pMonster, v61, a4)) {
3512  player->PlaySound(SPEECH_52, 0);
3513  return;
3514  }
3515  break;
3516  case SPELL_EARTH_STUN:
3517  uDamageAmount = 0;
3518  attackElement = DMGT_PHISYCAL;
3519  hit_will_stun = 1;
3520  if (!player->PlayerHitOrMiss(pMonster, v61, a4)) {
3521  player->PlaySound(SPEECH_52, 0);
3522  return;
3523  }
3524  break;
3525  case SPELL_BOW_ARROW:
3526  attackElement = DMGT_PHISYCAL;
3527  uDamageAmount = player->CalculateRangedDamageTo(
3528  pMonster->word_000086_some_monster_id);
3529  if (pMonster->pActorBuffs[ACTOR_BUFF_SHIELD].Active())
3530  uDamageAmount /= 2;
3531  IsAdditionalDamagePossible = true;
3532  if (projectileSprite->containing_item.uItemID != 0 &&
3533  projectileSprite->containing_item.special_enchantment ==
3534  3) { // of carnage
3535  attackElement = DMGT_FIRE;
3536  } else if (!player->PlayerHitOrMiss(pMonster, v61, a4)) {
3537  player->PlaySound(SPEECH_52, 0);
3538  return;
3539  }
3540  break;
3541 
3542  default:
3543  attackElement = (DAMAGE_TYPE)player->GetSpellSchool(
3544  projectileSprite->spell_id);
3545  IsAdditionalDamagePossible = false;
3546  uDamageAmount = _43AFE3_calc_spell_damage(
3547  projectileSprite->spell_id, projectileSprite->spell_level,
3548  projectileSprite->spell_skill, pMonster->sCurrentHP);
3549  break;
3550  }
3551  }
3552 
3553  if (player->IsWeak()) uDamageAmount /= 2;
3554  if (pMonster->pActorBuffs[ACTOR_BUFF_STONED].Active()) uDamageAmount = 0;
3555  v61 = pMonster->CalcMagicalDamageToActor(attackElement, uDamageAmount);
3556  if (!projectileSprite && player->IsUnarmed() &&
3557  player->pPlayerBuffs[PLAYER_BUFF_HAMMERHANDS].Active()) {
3558  v61 += pMonster->CalcMagicalDamageToActor(
3559  (DAMAGE_TYPE)8,
3560  player->pPlayerBuffs[PLAYER_BUFF_HAMMERHANDS].uPower);
3561  }
3562  uDamageAmount = v61;
3563  if (IsAdditionalDamagePossible) {
3564  if (projectileSprite) {
3565  a4 =
3567  &attackElement, &isLifeStealing);
3568  if (isLifeStealing && pMonster->sCurrentHP > 0) {
3569  player->sHealth += v61 / 5;
3570  if (player->sHealth > player->GetMaxHealth())
3571  player->sHealth = player->GetMaxHealth();
3572  }
3573  uDamageAmount +=
3574  pMonster->CalcMagicalDamageToActor(attackElement, a4);
3575  } else {
3576  for (int i = 0; i < 2; i++) {
3577  if (player->HasItemEquipped((ITEM_EQUIP_TYPE)i)) {
3578  ItemGen *item;
3579  if (i == 0)
3580  item = player->GetOffHandItem();
3581  else
3582  item = player->GetMainHandItem();
3583  a4 = item->_439DF3_get_additional_damage(&attackElement,
3584  &isLifeStealing);
3585  if (isLifeStealing && pMonster->sCurrentHP > 0) {
3586  player->sHealth += v61 / 5;
3587  if (player->sHealth > player->GetMaxHealth())
3588  player->sHealth = player->GetMaxHealth();
3589  }
3590  uDamageAmount +=
3591  pMonster->CalcMagicalDamageToActor(attackElement, a4);
3592  }
3593  }
3594  }
3595  }
3596  pMonster->sCurrentHP -= uDamageAmount;
3597  if (uDamageAmount == 0 && !hit_will_stun) {
3598  player->PlaySound(SPEECH_52, 0);
3599  return;
3600  }
3601  if (pMonster->sCurrentHP > 0) {
3602  Actor::AI_Stun(uActorID_Monster, a1, 0);
3603  Actor::AggroSurroundingPeasants(uActorID_Monster, 1);
3604  if (!engine->config->NoShowDamage()) {
3605  String str;
3606  if (projectileSprite)
3607  str = localization->FormatString(
3608  189, player->pName, pMonster->pActorName,
3609  uDamageAmount); // "%s shoots %s for %lu points"
3610  else
3611  str = localization->FormatString(
3612  164, player->pName, pMonster->pActorName,
3613  uDamageAmount); // "%s hits %s for %lu damage"
3615  }
3616  } else {
3617  if (pMonsterStats->pInfos[pMonster->pMonsterInfo.uID].bQuestMonster & 1) {
3618  if (!engine->config->NoBloodsplats()) {
3619  v33 = _4D864C_force_sw_render_rules && !engine->config->NoHugeBloodsplats()
3620  ? 10 * pMonster->uActorRadius
3621  : pMonster->uActorRadius;
3622  decal_builder->AddBloodsplat((float)pMonster->vPosition.x,
3623  (float)pMonster->vPosition.y,
3624  (float)pMonster->vPosition.z, 1.0,
3625  0.0, 0.0, (float)v33, 0, 0);
3626  }
3627  }
3628  Actor::Die(uActorID_Monster);
3629  Actor::ApplyFineForKillingPeasant(uActorID_Monster);
3630  Actor::AggroSurroundingPeasants(uActorID_Monster, 1);
3631  if (pMonster->pMonsterInfo.uExp)
3633  pMonsterStats->pInfos[pMonster->pMonsterInfo.uID].uExp);
3634  v40 = SPEECH_51;
3635  if (rand() % 100 < 20)
3636  v40 = ((signed int)pMonster->pMonsterInfo.uHP >= 100) + 1;
3637  player->PlaySound((PlayerSpeech)v40, 0);
3638  if (!engine->config->NoShowDamage()) {
3639  pMonsterName = (char *)uDamageAmount;
3640  pPlayerName = player->pName;
3641 
3642  auto str = localization->FormatString(
3643  175, player->pName, uDamageAmount,
3644  pMonster); // "%s inflicts %lu points killing %s"
3646  }
3647  }
3648  if (pMonster->pActorBuffs[ACTOR_BUFF_PAIN_REFLECTION].Active() &&
3649  uDamageAmount != 0)
3650  player->ReceiveDamage(uDamageAmount, attackElement);
3651  int knockbackValue = 20 * v61 / (signed int)pMonster->pMonsterInfo.uHP;
3653  hit_will_stun) &&
3654  pMonster->DoesDmgTypeDoDamage(DMGT_EARTH)) {
3655  extraRecoveryTime = 20;
3656  knockbackValue = 10;
3657  if (!pParty->bTurnBasedModeOn)
3658  extraRecoveryTime =
3659  (int)(flt_6BE3A8_debug_recmod2 * 42.66666666666666);
3660  pMonster->pMonsterInfo.uRecoveryTime += extraRecoveryTime;
3661  if (!engine->config->NoShowDamage()) {
3662  pMonsterName = player->pName;
3663 
3664  auto str = localization->FormatString(635, player->pName,
3665  pMonster); // "%s stuns %s"
3667  }
3668  }
3669  if (hit_will_paralyze && pMonster->CanAct() &&
3670  pMonster->DoesDmgTypeDoDamage(DMGT_EARTH)) {
3671  v43 = player->GetActualSkillLevel(PLAYER_SKILL_MACE);
3672  v45 = SkillToMastery(v43);
3673  GameTime v46 = GameTime(0, v43 & 63); // ??
3674  pMonster->pActorBuffs[ACTOR_BUFF_PARALYZED].Apply((pParty->GetPlayingTime() + v46), v45, 0, 0, 0);
3675  if (!engine->config->NoShowDamage()) {
3676  pMonsterName = player->pName;
3677 
3678  auto str = localization->FormatString(
3679  636, player->pName, pMonster); // "%s paralyzes %s"
3681  }
3682  }
3683  if (knockbackValue > 10) knockbackValue = 10;
3686  pVelocity->x = fixpoint_mul(knockbackValue, pVelocity->x);
3687  pVelocity->y = fixpoint_mul(knockbackValue, pVelocity->y);
3688  pVelocity->z = fixpoint_mul(knockbackValue, pVelocity->z);
3689  pMonster->vVelocity.x = 50 * (short)pVelocity->x;
3690  pMonster->vVelocity.y = 50 * (short)pVelocity->y;
3691  pMonster->vVelocity.z = 50 * (short)pVelocity->z;
3692  }
3693  Actor::AddBloodsplatOnDamageOverlay(uActorID_Monster, 1, v61);
3694 }

Перекрестные ссылки ItemGen::_439DF3_get_additional_damage(), _43AFE3_calc_spell_damage(), _4D864C_force_sw_render_rules, SpellBuff::Active(), ACTOR_BUFF_PAIN_REFLECTION, ACTOR_BUFF_PARALYZED, ACTOR_BUFF_SHIELD, ACTOR_BUFF_STONED, DecalBuilder::AddBloodsplat(), AddBloodsplatOnDamageOverlay(), AggroSurroundingPeasants(), AI_Stun(), SpellBuff::Apply(), ApplyFineForKillingPeasant(), MonsterStats::BelongsToSupertype(), MonsterInfo::bQuestMonster, Party::bTurnBasedModeOn, CalcMagicalDamageToActor(), Player::CalculateMeleeDamageTo(), Player::CalculateRangedDamageTo(), CanAct(), SpriteObject::containing_item, decal_builder, Die(), DMGT_EARTH, DMGT_FIRE, DMGT_PHISYCAL, DoesDmgTypeDoDamage(), engine, EQUIP_TWO_HANDED, SpriteObject::field_60_distance_related_prolly_lod, fixpoint_mul(), Fleeing, flt_6BE3A8_debug_recmod2, Localization::FormatString(), GameUI_StatusBar_OnEvent(), Player::GetActualSkillLevel(), Player::GetMainHandItem(), Player::GetMaxHealth(), Player::GetOffHandItem(), ItemGen::GetPlayerSkillType(), Party::GetPlayingTime(), Player::GetSpecialItemBonus(), Player::GetSpellSchool(), Party::GivePartyExp(), Player::HasItemEquipped(), int_get_vector_length(), IsNotAlive(), Player::IsUnarmed(), Player::IsWeak(), ITEM_ENCHANTMENT_OF_FORCE, localization, MONSTER_SUPERTYPE_TREANT, OBJECT_Item, OBJECT_Player, Player::pActiveSkills, pActorBuffs, pActorName, pActors, Player::pEquipment, MonsterStats::pInfos, PLAYER_BUFF_HAMMERHANDS, PLAYER_SKILL_BLASTER, PLAYER_SKILL_MACE, PLAYER_SKILL_STAFF, Player::PlayerHitOrMiss(), Player::PlaySound(), pMonsterInfo, pMonsterStats, Player::pName, pParty, Player::pPlayerBuffs, Party::pPlayers, pSpriteObjects, Player::ReceiveDamage(), sCurrentHP, Player::sHealth, SkillToMastery(), ItemGen::special_enchantment, SPEECH_51, SPEECH_52, SPELL_101, SPELL_BOW_ARROW, SpriteObject::spell_caster_pid, SPELL_DARK_SOULDRINKER, SPELL_EARTH_BLADES, SPELL_EARTH_STUN, SpriteObject::spell_id, SPELL_LASER_PROJECTILE, SpriteObject::spell_level, SpriteObject::spell_skill, uActorRadius, uAIState, uAttributes, MonsterInfo::uExp, MonsterInfo::uHP, MonsterInfo::uID, ItemGen::uItemID, PlayerEquipment::uMainHand, MonsterInfo::uRecoveryTime, SpriteObject::vPosition, Party::vPosition, vPosition, vVelocity и word_000086_some_monster_id.

Используется в CastSpellInfoHelpers::_427E01_cast_spell(), Player::_42ECB5_PlayerAttacksActor(), _493938_regenerate(), area_of_effect__damage_evaluate() и sub_43A97E().

+ Граф вызовов:
+ Граф вызова функции:

◆ MakeActorAIList_ODM()

void Actor::MakeActorAIList_ODM ( )
static

См. определение в файле Actor.cpp строка 4457

4457  {
4458  int v1; // eax@4
4459  unsigned int v7; // ST20_4@10
4460  int distance; // edi@10
4461  // int v10; // ebx@14
4462  int v21; // [sp+Ch] [bp-14h]@4
4463  int v22; // [sp+10h] [bp-10h]@4
4464 
4465  pParty->uFlags &= 0xFFFFFFCF; // ~0x30
4466 
4467  ai_arrays_size = 0;
4468  for (uint i = 0; i < uNumActors; ++i) {
4469  Actor *actor = &pActors[i];
4470 
4471  actor->ResetAlive(); // ~0x400
4472  if (!actor->CanAct()) {
4473  actor->ResetActive();
4474  continue;
4475  }
4476 
4477  v22 = abs(pParty->vPosition.z - actor->vPosition.z);
4478  v21 = abs(pParty->vPosition.y - actor->vPosition.y);
4479  v1 = abs(pParty->vPosition.x - actor->vPosition.x);
4480  v7 = int_get_vector_length(v22, v21, v1);
4481  distance = v7 - actor->uActorRadius;
4482  if (distance < 0) distance = 0;
4483 
4484  if (distance < 5632) {
4485  actor->ResetHostile();
4486  if (actor->ActorEnemy() || actor->GetActorsRelation(0)) {
4487  // v11 = (pParty->uFlags & 0x10) == 0;
4488  actor->uAttributes |= ACTOR_HOSTILE;
4489  if (distance < 5120) pParty->SetYellowAlert();
4490  if (distance < 307) pParty->SetRedAlert();
4491  }
4492  actor->uAttributes |= ACTOR_ACTIVE;
4495  } else {
4496  actor->ResetActive();
4497  }
4498  }
4499 
4500  /*
4501  result = v27;
4502  if ( v27 > 0 )
4503  {
4504  v14 = 0;
4505  v15 = 1;
4506  v26 = 1;
4507  do
4508  {
4509  while ( 1 )
4510  {
4511  v24 = v15;
4512  if ( v15 >= result )
4513  break;
4514  v16 = ai_near_actors_distances[v14];
4515  if ( v16 > ai_near_actors_distances[v15] )
4516  {
4517  v17 = &ai_near_actors_ids[v15];
4518  v18 = ai_near_actors_ids[v14];
4519  ai_near_actors_ids[v14] = *v17;
4520  *v17 = v18;
4521  v15 = v24;
4522  ai_near_actors_distances[v14] = ai_near_actors_distances[v24];
4523  ai_near_actors_distances[v24] = v16;
4524  }
4525  result = v27;
4526  ++v15;
4527  }
4528  ++v14;
4529  v15 = v26 + 1;
4530  v26 = v15;
4531  }
4532  while ( v15 - 1 < result );
4533  }*/
4534 
4535  for (int i = 0; i < ai_arrays_size; ++i) {
4536  for (int j = 0; j < i; ++j) {
4538  int tmp = ai_near_actors_distances[j];
4540  ai_near_actors_distances[i] = tmp;
4541 
4542  tmp = ai_near_actors_ids[j];
4544  ai_near_actors_ids[i] = tmp;
4545  }
4546  }
4547  }
4548 
4549  if (ai_arrays_size > 30) ai_arrays_size = 30;
4550 
4551  for (int i = 0; i < ai_arrays_size; ++i)
4552  pActors[ai_near_actors_ids[i]].uAttributes |= ACTOR_ALIVE; // 0x400
4553 }

Перекрестные ссылки ActorEnemy(), ai_arrays_size, ai_near_actors_distances, ai_near_actors_ids, CanAct(), GetActorsRelation(), int_get_vector_length(), pActors, pParty, ResetActive(), ResetAlive(), ResetHostile(), Party::SetRedAlert(), Party::SetYellowAlert(), uActorRadius, uAttributes, Party::uFlags, uNumActors, Party::vPosition и vPosition.

Используется в UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ MakeActorAIList_BLV()

int Actor::MakeActorAIList_BLV ( )
static

См. определение в файле Actor.cpp строка 4556

4556  {
4557  int v1; // eax@4
4558  int distance; // edi@10
4559  int v13; // edx@24
4560  int v15; // ebx@26
4561  unsigned int v17; // esi@27
4562  int v18; // ecx@31
4563  signed int v19; // edi@31
4564  signed int v25; // eax@40
4565  uint j; // edi@45
4566  int v30; // eax@48
4567  int v37; // [sp+Ch] [bp-18h]@1
4568  int v38; // [sp+10h] [bp-14h]@4
4569  int v39; // [sp+14h] [bp-10h]@4
4570  uint i; // [sp+18h] [bp-Ch]@31
4571  uint v45; // [sp+20h] [bp-4h]@1
4572 
4573  // __debugbreak(); // refactor for blv ai
4574  pParty->uFlags &= 0xFFFFFFCF; // ~0x30
4576  pParty->vPosition.z);
4577  v45 = 0;
4578  for (uint i = 0; i < uNumActors; ++i) {
4579  pActors[i].ResetAlive(); // ~0x0400
4580  if (!pActors[i].CanAct()) {
4581  pActors[i].ResetActive();
4582  continue;
4583  }
4584  v1 = abs(pParty->vPosition.x - pActors[i].vPosition.x);
4585  v38 = abs(pParty->vPosition.y - pActors[i].vPosition.y);
4586  v39 = abs(pParty->vPosition.z - pActors[i].vPosition.z);
4587 
4588  distance =
4589  int_get_vector_length(v39, v38, v1) - pActors[i].uActorRadius;
4590  if (distance < 0) distance = 0;
4591  if (distance < 10240) {
4592  pActors[i].ResetHostile(); // ~0x01000000
4593  if (pActors[i].ActorEnemy() || pActors[i].GetActorsRelation(0)) {
4594  pActors[i].uAttributes |= ACTOR_HOSTILE;
4595  if (!(pParty->uFlags & 0x10) && (double)distance < 307.2)
4596  pParty->SetRedAlert();
4597  if (!(pParty->uFlags & 0x20) && distance < 5120)
4599  }
4601  ai_near_actors_ids[v45] = i;
4602  v45++;
4603  } else {
4604  pActors[i].ResetActive();
4605  }
4606  }
4607  v13 = 0;
4608  if (v45 > 0) {
4609  for (uint i = 1; i < v45; i++) {
4610  for (uint j = 1; j < v45; ++j) {
4611  v15 = ai_near_actors_distances[v13];
4612  if (ai_near_actors_distances[v13] >
4614  v17 = ai_near_actors_ids[v13];
4616  ai_near_actors_ids[j] = v17;
4618  ai_near_actors_distances[j] = v15;
4619  }
4620  }
4621  ++v13;
4622  }
4623  }
4624  v18 = 0;
4625  v19 = 0;
4626  for (i = 0; i < v45; i++) {
4629  PID(OBJECT_Actor, ai_near_actors_ids[i]), 4)) {
4630  pActors[ai_near_actors_ids[i]].uAttributes |= ACTOR_NEARBY;
4633  if (v19 >= 30) break;
4634  }
4635  }
4636  ai_arrays_size = v19;
4637  if ((signed int)uNumActors > 0) {
4638  for (uint i = 0; i < (signed int)uNumActors; ++i) {
4639  if (pActors[i].CanAct() && pActors[i].uSectorID == v37) {
4640  v25 = 0;
4641  if (v19 <= 0) {
4642  pActors[i].uAttributes |= ACTOR_ACTIVE;
4644  } else {
4645  while (ai_array_4F6638_actor_ids[v25] != i) {
4646  ++v25;
4647  if (v25 >= v19) {
4648  pActors[i].uAttributes |= ACTOR_ACTIVE;
4650  break;
4651  }
4652  }
4653  }
4654  }
4655  }
4656  }
4657  for (j = 0; j < v45; ++j) {
4658  if (pActors[ai_near_actors_ids[j]].uAttributes & 0xC000 &&
4660  v30 = 0;
4661  if (ai_arrays_size <= 0) {
4663  ai_near_actors_ids[j];
4664  } else {
4665  while (ai_array_4F6638_actor_ids[v30] !=
4666  ai_near_actors_ids[j]) {
4667  ++v30;
4668  if (v30 >= ai_arrays_size) {
4670  ai_near_actors_ids[j];
4671  break;
4672  }
4673  }
4674  }
4675  }
4676  }
4677  if (ai_arrays_size > 30) ai_arrays_size = 30;
4678  memcpy(ai_near_actors_ids.data(), ai_array_4F6638_actor_ids.data(),
4679  4 * ai_arrays_size);
4680  memcpy(ai_near_actors_distances.data(), ai_array_4F5E68.data(),
4681  4 * ai_arrays_size);
4682  for (int i = 0; i < ai_arrays_size; i++)
4683  pActors[ai_near_actors_ids[i]].uAttributes |= ACTOR_ALIVE; // 0x400
4684  return ai_arrays_size;
4685 }

Перекрестные ссылки ActorEnemy(), ActorNearby(), ai_array_4F5E68, ai_array_4F6638_actor_ids, ai_arrays_size, ai_near_actors_distances, ai_near_actors_ids, CanAct(), GetActorsRelation(), IndoorLocation::GetSector(), int_get_vector_length(), OBJECT_Actor, pActors, pIndoor, pParty, Party::SetRedAlert(), Party::SetYellowAlert(), sub_4070EF_prolly_detect_player(), uAttributes, Party::uFlags, uNumActors и Party::vPosition.

Используется в UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ UpdateActorAI()

void Actor::UpdateActorAI ( )
static

См. определение в файле Actor.cpp строка 2745

2745  {
2746  signed int v4; // edi@10
2747  signed int sDmg; // eax@14
2748  Player *pPlayer; // ecx@21
2749  Actor *pActor; // esi@34
2750  // unsigned __int16 v22; // ax@86
2751  unsigned int v27; // ecx@123
2752  unsigned int v28; // eax@123
2753  int v33; // eax@144
2754  int v34; // eax@147
2755  char v35; // al@150
2756  unsigned int v36; // edi@152
2757  signed int v37; // eax@154
2758  double v42; // st7@176
2759  double v43; // st6@176
2760  int v45; // eax@192
2761  unsigned __int8 v46; // cl@197
2762  signed int v47; // st7@206
2763  uint v58; // st7@246
2764  unsigned int v65; // [sp-10h] [bp-C0h]@144
2765  int v70; // [sp-10h] [bp-C0h]@213
2766  AIDirection v72; // [sp+0h] [bp-B0h]@246
2767  AIDirection a3; // [sp+1Ch] [bp-94h]@129
2768  int target_pid_type; // [sp+70h] [bp-40h]@83
2769  signed int a1; // [sp+74h] [bp-3Ch]@129
2770  int v78; // [sp+78h] [bp-38h]@79
2771  AIDirection *pDir; // [sp+7Ch] [bp-34h]@129
2772  float radiusMultiplier; // [sp+98h] [bp-18h]@33
2773  int v81; // [sp+9Ch] [bp-14h]@100
2774  signed int target_pid; // [sp+ACh] [bp-4h]@83
2775  AIState uAIState;
2776  uint v38;
2777 
2778  // Build AI array
2781  else
2783 
2784  // Armageddon damage mechanic
2786  pParty->armageddon_timer > 0) {
2787  if (pParty->armageddon_timer > 417) {
2788  pParty->armageddon_timer = 0;
2789  } else {
2791  (pParty->sRotationY + rand() % 16 - 8);
2792  pParty->sRotationX = pParty->sRotationX + rand() % 16 - 8;
2793  if (pParty->sRotationX > 128)
2794  pParty->sRotationX = 128;
2795  else if (pParty->sRotationX < -128)
2796  pParty->sRotationX = -128;
2797 
2798  pParty->uFlags |= 2u;
2800  v4 = pParty->armageddonDamage + 50;
2801  if (pParty->armageddon_timer <= 0) {
2802  pParty->armageddon_timer = 0;
2803  for (size_t i = 0; i < uNumActors; i++) {
2804  pActor = &pActors[i];
2805  if (pActor->CanAct()) {
2806  sDmg = pActor->CalcMagicalDamageToActor((DAMAGE_TYPE)5,
2807  v4);
2808  pActor->sCurrentHP -= sDmg;
2809  if (sDmg) {
2810  if (pActor->sCurrentHP >= 0) {
2811  Actor::AI_Stun(i, 4, 0);
2812  } else {
2813  Actor::Die(i);
2814  if (pActor->pMonsterInfo.uExp)
2817  ->pInfos[pActor->pMonsterInfo.uID]
2818  .uExp);
2819  }
2820  }
2821  }
2822  }
2823  for (int i = 1; i <= 4; i++) {
2824  pPlayer = pPlayers[i];
2825  if (!pPlayer->conditions_times[Condition_Dead] &&
2828  pPlayer->ReceiveDamage(v4, DMGT_MAGICAL);
2829  }
2830  }
2832  }
2833  }
2834 
2835  // Turn-based mode: return
2836  if (pParty->bTurnBasedModeOn) {
2838  return;
2839  }
2840 
2841  for (uint i = 0; i < uNumActors; ++i) {
2842  pActor = &pActors[i];
2844 
2845  // Skip actor if: Dead / Removed / Disabled / uAttributes & 0x0400
2846  if (pActor->uAIState == Dead || pActor->uAIState == Removed ||
2847  pActor->uAIState == Disabled || pActor->uAttributes & ACTOR_ALIVE)
2848  continue;
2849 
2850  // Kill actor if HP == 0
2851  if (!pActor->sCurrentHP && pActor->uAIState != Dying) Actor::Die(i);
2852 
2853  // Kill buffs if expired
2854  for (uint j = 0; j < 22; ++j) {
2855  if (j != 10)
2856  pActor->pActorBuffs[j].IsBuffExpiredToTime(
2857  pParty->GetPlayingTime());
2858  }
2859 
2860  // If shrink expired: reset height
2861  if (pActor->pActorBuffs[ACTOR_BUFF_SHRINK].Expired()) {
2862  pActor->uActorHeight =
2863  pMonsterList->pMonsters[pActor->pMonsterInfo.uID - 1]
2864  .uMonsterHeight;
2865  }
2866 
2867  // If Charm still active: make actor friendly
2868  if (pActor->pActorBuffs[ACTOR_BUFF_CHARM].Active()) {
2869  pActor->pMonsterInfo.uHostilityType =
2871  } else if (pActor->pActorBuffs[ACTOR_BUFF_CHARM].Expired()) {
2872  // Else: reset hostilty
2873  pActor->pMonsterInfo.uHostilityType =
2875  }
2876 
2877  // If actor Paralyzed or Stoned: skip
2878  if (pActor->pActorBuffs[ACTOR_BUFF_PARALYZED].Active() ||
2880  continue;
2881 
2882  // Calculate RecoveryTime
2883  pActor->pMonsterInfo.uRecoveryTime = std::max((signed int)
2885 
2887  if (pActor->uCurrentActionTime < pActor->uCurrentActionLength) continue;
2888 
2889  if (pActor->uAIState == Dying) {
2890  pActor->uAIState = Dead;
2891  } else {
2892  if (pActor->uAIState != Summoned) {
2893  Actor::AI_StandOrBored(i, OBJECT_Player, 256, nullptr);
2894  continue;
2895  }
2896  pActor->uAIState = Standing;
2897  }
2898 
2899  pActor->uCurrentActionTime = 0;
2900  pActor->uCurrentActionLength = 0;
2901  pActor->UpdateAnimation();
2902  }
2903 
2904  for (v78 = 0; v78 < ai_arrays_size; ++v78) {
2905  uint actor_id = ai_near_actors_ids[v78];
2906  assert(actor_id < uNumActors);
2907 
2908  pActor = &pActors[actor_id];
2909 
2910  v47 = (signed int)(pActor->pMonsterInfo.uRecoveryTime *
2911  2.133333333333333);
2912 
2913  Actor::_SelectTarget(actor_id, &ai_near_actors_targets_pid[actor_id],
2914  true);
2915 
2916  if (pActor->pMonsterInfo.uHostilityType &&
2917  !ai_near_actors_targets_pid[actor_id])
2918  pActor->pMonsterInfo.uHostilityType =
2920 
2921  target_pid = ai_near_actors_targets_pid[actor_id];
2922  target_pid_type = PID_TYPE(target_pid);
2923 
2924  if (target_pid_type == OBJECT_Actor)
2925  radiusMultiplier = 0.5;
2926  else
2927  radiusMultiplier = 1.0;
2928 
2929  // v22 = pActor->uAIState;
2930  if (pActor->uAIState == Dying || pActor->uAIState == Dead ||
2931  pActor->uAIState == Removed || pActor->uAIState == Disabled ||
2932  pActor->uAIState == Summoned)
2933  continue;
2934 
2935  if (!pActor->sCurrentHP) Actor::Die(actor_id);
2936 
2937  for (int i = 0; i < 22; i++) {
2938  if (i != 10)
2939  pActor->pActorBuffs[i].IsBuffExpiredToTime(
2940  pParty->GetPlayingTime());
2941  }
2942 
2943  if (pActor->pActorBuffs[ACTOR_BUFF_SHRINK].Expired()) {
2944  pActor->uActorHeight =
2945  pMonsterList->pMonsters[pActor->pMonsterInfo.uID - 1]
2946  .uMonsterHeight;
2947  }
2948 
2949  if (pActor->pActorBuffs[ACTOR_BUFF_CHARM].Active()) {
2950  pActor->pMonsterInfo.uHostilityType =
2952  } else if (pActor->pActorBuffs[ACTOR_BUFF_CHARM].Expired()) {
2953  pActor->pMonsterInfo.uHostilityType =
2955  }
2956 
2957  // If actor is summoned and buff expired: continue and set state to
2958  // Removed
2959  if (pActor->pActorBuffs[ACTOR_BUFF_SUMMONED].Expired()) {
2960  pActor->uAIState = Removed;
2961  continue;
2962  }
2963 
2964  if (pActor->pActorBuffs[ACTOR_BUFF_STONED].Active() ||
2966  continue;
2967  }
2968 
2969  v27 = pMiscTimer->uTimeElapsed;
2970  v28 = pActor->pMonsterInfo.uRecoveryTime;
2972 
2973  if ((signed int)v28 > 0) pActor->pMonsterInfo.uRecoveryTime = v28 - v27;
2974  if (pActor->pMonsterInfo.uRecoveryTime < 0)
2975  pActor->pMonsterInfo.uRecoveryTime = 0;
2976  if (!pActor->ActorNearby()) pActor->uAttributes |= ACTOR_NEARBY;
2977 
2978  a1 = PID(OBJECT_Actor, actor_id);
2979  Actor::GetDirectionInfo(PID(OBJECT_Actor, actor_id), target_pid, &a3,
2980  0);
2981  pDir = &a3;
2982  uAIState = pActor->uAIState;
2983 
2984  if (pActor->pMonsterInfo.uHostilityType ==
2986  (signed int)pActor->pMonsterInfo.uRecoveryTime > 0 ||
2987  radiusMultiplier * 307.2 < pDir->uDistance ||
2988  uAIState != Pursuing && uAIState != Standing &&
2989  uAIState != Tethered && uAIState != Fidgeting &&
2990  !pActor->pMonsterInfo.uMissleAttack1Type ||
2991  uAIState != Stunned) {
2992  if (pActor->uCurrentActionTime < pActor->uCurrentActionLength) {
2993  continue;
2994  } else if (pActor->uAIState == AttackingMelee) {
2995  v35 = pActor->special_ability_use_check(actor_id);
2996  AttackerInfo.Add(a1, 5120, pActor->vPosition.x,
2997  pActor->vPosition.y,
2998  pActor->vPosition.z +
2999  ((signed int)pActor->uActorHeight >> 1),
3000  v35, 1);
3001  } else if (pActor->uAIState == AttackingRanged1) {
3002  v34 = pActor->pMonsterInfo.uMissleAttack1Type;
3003  Actor::AI_RangedAttack(actor_id, pDir, v34, 0); // light missile
3004  } else if (pActor->uAIState == AttackingRanged2) {
3005  v34 = pActor->pMonsterInfo.uMissleAttack2Type;
3006  Actor::AI_RangedAttack(actor_id, pDir, v34, 1); // arrow
3007  } else if (pActor->uAIState == AttackingRanged3) {
3008  v65 = pActor->pMonsterInfo.uSpellSkillAndMastery1;
3009  v33 = pActor->pMonsterInfo.uSpell1ID;
3010  Actor::AI_SpellAttack(actor_id, pDir, v33, 2, v65);
3011  } else if (pActor->uAIState == AttackingRanged4) {
3012  v65 = pActor->pMonsterInfo.uSpellSkillAndMastery2;
3013  v33 = pActor->pMonsterInfo.uSpell2ID;
3014  Actor::AI_SpellAttack(actor_id, pDir, v33, 3, v65);
3015  }
3016  }
3017 
3018  v36 = pDir->uDistance;
3019 
3020  if (pActor->pMonsterInfo.uHostilityType ==
3022  if (target_pid_type == OBJECT_Actor) {
3023  v36 = pDir->uDistance;
3024  v37 = pFactionTable->relations
3025  [(pActor->pMonsterInfo.uID - 1) / 3 + 1]
3026  [(pActors[PID_ID(target_pid)].pMonsterInfo.uID - 1) /
3027  3 +
3028  1];
3029  } else {
3030  v37 = 4;
3031  }
3032  v38 = 0;
3033  if (v37 == 2)
3034  v38 = 1024;
3035  else if (v37 == 3)
3036  v38 = 2560;
3037  else if (v37 == 4)
3038  v38 = 5120;
3039  if (v37 >= 1 && v37 <= 4 && v36 < v38 || v37 == 1)
3040  pActor->pMonsterInfo.uHostilityType =
3042  }
3043 
3044  // If actor afraid: flee or if out of range random move
3045  if (pActor->pActorBuffs[ACTOR_BUFF_AFRAID].Active()) {
3046  if ((signed int)v36 >= 10240)
3047  Actor::AI_RandomMove(actor_id, target_pid, 1024, 0);
3048  else
3049  Actor::AI_Flee(actor_id, target_pid, 0, pDir);
3050  continue;
3051  }
3052 
3053  if (pActor->pMonsterInfo.uHostilityType ==
3055  target_pid) {
3056  if (pActor->pMonsterInfo.uAIType == 1) {
3057  if (pActor->pMonsterInfo.uMovementType ==
3059  Actor::AI_Stand(actor_id, target_pid,
3060  (uint)(pActor->pMonsterInfo.uRecoveryTime *
3061  2.133333333333333),
3062  pDir);
3063  } else {
3064  Actor::AI_Flee(actor_id, target_pid, 0, pDir);
3065  continue;
3066  }
3067  }
3068  if (!(pActor->uAttributes & ACTOR_FLEEING)) {
3069  if (pActor->pMonsterInfo.uAIType == 2 ||
3070  pActor->pMonsterInfo.uAIType == 3) {
3071  if (pActor->pMonsterInfo.uAIType == 2)
3072  v43 =
3073  (double)(signed int)pActor->pMonsterInfo.uHP * 0.2;
3074  if (pActor->pMonsterInfo.uAIType == 3)
3075  v43 =
3076  (double)(signed int)pActor->pMonsterInfo.uHP * 0.1;
3077  v42 = (double)pActor->sCurrentHP;
3078  if (v43 > v42 && (signed int)v36 < 10240) {
3079  Actor::AI_Flee(actor_id, target_pid, 0, pDir);
3080  continue;
3081  }
3082  }
3083  }
3084 
3085  v81 = v36 - pActor->uActorRadius;
3086  if (target_pid_type == OBJECT_Actor)
3087  v81 -= pActors[PID_ID(target_pid)].uActorRadius;
3088  if (v81 < 0) v81 = 0;
3089  // rand();
3090  pActor->uAttributes &= ~ACTOR_UNKNOW5; // ~0x40000
3091  if (v81 < 5120) {
3092  v45 = pActor->special_ability_use_check(actor_id);
3093  if (v45 == 0) {
3094  if (pActor->pMonsterInfo.uMissleAttack1Type) {
3095  if ((int)pActor->pMonsterInfo.uRecoveryTime <= 0) {
3096  Actor::AI_MissileAttack1(actor_id, target_pid,
3097  pDir);
3098  } else if (pActor->pMonsterInfo.uMovementType ==
3100  Actor::AI_Stand(actor_id, target_pid, v47, pDir);
3101  } else {
3102  if (radiusMultiplier * 307.2 > (double)v81)
3103  Actor::AI_Stand(actor_id, target_pid, v47,
3104  pDir);
3105  else
3106  Actor::AI_Pursue1(actor_id, target_pid,
3107  actor_id, v47, pDir);
3108  }
3109  } else {
3110  if ((double)v81 >= radiusMultiplier * 307.2) {
3111  if (pActor->pMonsterInfo.uMovementType ==
3113  Actor::AI_Stand(actor_id, target_pid, v47,
3114  pDir);
3115  } else if (v81 >= 1024) { // monsters
3116  Actor::AI_Pursue3(actor_id, target_pid, 0,
3117  pDir);
3118  } else {
3119  v70 = (signed int)(radiusMultiplier * 307.2);
3120  // monsters
3121  // guard after player runs away
3122  // follow player
3123  Actor::AI_Pursue2(actor_id, target_pid, 0, pDir,
3124  v70);
3125  }
3126  } else if ((signed int)
3127  pActor->pMonsterInfo.uRecoveryTime > 0) {
3128  Actor::AI_Stand(actor_id, target_pid, v47, pDir);
3129  } else {
3130  // monsters
3131  Actor::AI_MeleeAttack(actor_id, target_pid, pDir);
3132  }
3133  }
3134  continue;
3135  } else if (v45 == 2 || v45 == 3) {
3136  if (v45 == 2)
3137  v46 = pActor->pMonsterInfo.uSpell1ID;
3138  else
3139  v46 = pActor->pMonsterInfo.uSpell2ID;
3140  if (v46) {
3141  if ((signed int)pActor->pMonsterInfo.uRecoveryTime <=
3142  0) {
3143  if (v45 == 2)
3144  Actor::AI_SpellAttack1(actor_id, target_pid,
3145  pDir);
3146  else
3147  Actor::AI_SpellAttack2(actor_id, target_pid,
3148  pDir);
3149  } else if (radiusMultiplier * 307.2 > (double)v81 ||
3150  pActor->pMonsterInfo.uMovementType ==
3152  Actor::AI_Stand(actor_id, target_pid, v47, pDir);
3153  } else {
3154  Actor::AI_Pursue1(actor_id, target_pid, actor_id,
3155  v47, pDir);
3156  }
3157  } else {
3158  if ((double)v81 >= radiusMultiplier * 307.2) {
3159  if (pActor->pMonsterInfo.uMovementType ==
3161  Actor::AI_Stand(actor_id, target_pid, v47,
3162  pDir);
3163  } else if (v81 >= 1024) {
3164  Actor::AI_Pursue3(actor_id, target_pid, 256,
3165  pDir);
3166  } else {
3167  v70 = (signed int)(radiusMultiplier * 307.2);
3168  Actor::AI_Pursue2(actor_id, target_pid, 0, pDir,
3169  v70);
3170  }
3171  } else if ((signed int)
3172  pActor->pMonsterInfo.uRecoveryTime > 0) {
3173  Actor::AI_Stand(actor_id, target_pid, v47, pDir);
3174  } else {
3175  Actor::AI_MeleeAttack(actor_id, target_pid, pDir);
3176  }
3177  }
3178  continue;
3179  }
3180  }
3181  }
3182 
3183  if (pActor->pMonsterInfo.uHostilityType !=
3185  !target_pid || v81 >= 5120 || v45 != 1) {
3186  if (pActor->pMonsterInfo.uMovementType ==
3188  Actor::AI_RandomMove(actor_id, 4, 1024, 0);
3189  } else if (pActor->pMonsterInfo.uMovementType ==
3191  Actor::AI_RandomMove(actor_id, 4, 2560, 0);
3192  } else if (pActor->pMonsterInfo.uMovementType ==
3194  Actor::AI_RandomMove(actor_id, 4, 5120, 0);
3195  } else if (pActor->pMonsterInfo.uMovementType ==
3197  Actor::AI_RandomMove(actor_id, 4, 10240, 0);
3198  } else if (pActor->pMonsterInfo.uMovementType ==
3200  Actor::GetDirectionInfo(a1, 4, &v72, 0);
3201  v58 = (uint)(pActor->pMonsterInfo.uRecoveryTime *
3202  2.133333333333333);
3203  Actor::AI_Stand(actor_id, 4, v58, &v72);
3204  }
3205  } else if (!pActor->pMonsterInfo.uMissleAttack2Type) {
3206  if ((double)v81 >= radiusMultiplier * 307.2) {
3207  if (pActor->pMonsterInfo.uMovementType ==
3209  Actor::AI_Stand(actor_id, target_pid, v47, pDir);
3210  } else if (v81 >= 1024) {
3211  Actor::AI_Pursue3(actor_id, target_pid, 256, pDir);
3212  } else {
3213  v70 = (int)(radiusMultiplier * 307.2);
3214  Actor::AI_Pursue2(actor_id, target_pid, 0, pDir, v70);
3215  }
3216  } else if ((signed int)pActor->pMonsterInfo.uRecoveryTime > 0) {
3217  Actor::AI_Stand(actor_id, target_pid, v47, pDir);
3218  } else {
3219  Actor::AI_MeleeAttack(actor_id, target_pid, pDir);
3220  }
3221  } else if ((signed int)pActor->pMonsterInfo.uRecoveryTime > 0) {
3222  if (radiusMultiplier * 307.2 > (double)v81 ||
3223  pActor->pMonsterInfo.uMovementType ==
3225  Actor::AI_Stand(actor_id, target_pid, v47, pDir);
3226  else
3227  Actor::AI_Pursue1(actor_id, target_pid, actor_id, v47, pDir);
3228  } else {
3229  Actor::AI_MissileAttack2(actor_id, target_pid, pDir);
3230  }
3231  }
3232 }

Перекрестные ссылки _SelectTarget(), SpellBuff::Active(), ACTOR_BUFF_AFRAID, ACTOR_BUFF_CHARM, ACTOR_BUFF_PARALYZED, ACTOR_BUFF_SHRINK, ACTOR_BUFF_STONED, ACTOR_BUFF_SUMMONED, ActorNearby(), stru298::Add(), ai_arrays_size, AI_Flee(), AI_MeleeAttack(), AI_MissileAttack1(), AI_MissileAttack2(), ai_near_actors_ids, ai_near_actors_targets_pid, AI_Pursue1(), AI_Pursue2(), AI_Pursue3(), AI_RandomMove(), AI_RangedAttack(), AI_SpellAttack(), AI_SpellAttack1(), AI_SpellAttack2(), AI_Stand(), AI_StandOrBored(), AI_Stun(), stru262_TurnBased::AITurnBasedAction(), Party::armageddon_timer, Party::armageddonDamage, AttackerInfo, AttackingMelee, AttackingRanged1, AttackingRanged2, AttackingRanged3, AttackingRanged4, Party::bTurnBasedModeOn, CalcMagicalDamageToActor(), CanAct(), Condition_Dead, Condition_Eradicated, Condition_Pertified, Player::conditions_times, Dead, Die(), Disabled, DMGT_MAGICAL, Dying, SpellBuff::Expired(), Fidgeting, GetDirectionInfo(), Party::GetPlayingTime(), Party::GivePartyExp(), MonsterInfo::Hostility_Friendly, MonsterInfo::Hostility_Long, SpellBuff::IsBuffExpiredToTime(), LEVEL_Indoor, LEVEL_Outdoor, MakeActorAIList_BLV(), MakeActorAIList_ODM(), MONSTER_MOVEMENT_TYPE_FREE, MONSTER_MOVEMENT_TYPE_LONG, MONSTER_MOVEMENT_TYPE_MEDIUM, MONSTER_MOVEMENT_TYPE_SHORT, MONSTER_MOVEMENT_TYPE_STAIONARY, OBJECT_Actor, OBJECT_Player, pActorBuffs, pActors, stru262_TurnBased::pending_actions, pFactionTable, MonsterStats::pInfos, pMiscTimer, pMonsterInfo, pMonsterList, MonsterList::pMonsters, pMonsterStats, pParty, pPlayers, pTurnEngine, Pursuing, Player::ReceiveDamage(), FactionTable::relations, Removed, sCurrentHP, special_ability_use_check(), Party::sRotationX, Party::sRotationY, Standing, stru_5C6E00, Stunned, Summoned, Tethered, uActorHeight, uActorRadius, uAIState, MonsterInfo::uAIType, uAttributes, uCurrentActionLength, uCurrentActionTime, uCurrentlyLoadedLevelType, AIDirection::uDistance, MonsterInfo::uExp, Party::uFlags, MonsterInfo::uHostilityType, MonsterInfo::uHP, MonsterInfo::uID, stru193_math::uIntegerDoublePi, MonsterInfo::uMissleAttack1Type, MonsterInfo::uMissleAttack2Type, MonsterDesc::uMonsterHeight, MonsterInfo::uMovementType, uNumActors, UpdateAnimation(), MonsterInfo::uRecoveryTime, MonsterInfo::uSpell1ID, MonsterInfo::uSpell2ID, MonsterInfo::uSpellSkillAndMastery1, MonsterInfo::uSpellSkillAndMastery2, Timer::uTimeElapsed и vPosition.

Используется в Application::Game::GameLoop().

+ Граф вызовов:
+ Граф вызова функции:

◆ InitializeActors()

void Actor::InitializeActors ( )
static

См. определение в файле Actor.cpp строка 3334

3334  {
3335  bool bCelestia = false;
3336  bool bPit = false;
3337  bool good = false;
3338  bool evil = false;
3339  if (pCurrentMapName == "d25.blv") { // the Celestia
3340  bCelestia = true;
3341  }
3342  if (pCurrentMapName == "d26.blv") { // the Pit
3343  bPit = true;
3344  }
3345  if (pParty->IsPartyGood()) good = true;
3346  if (pParty->IsPartyEvil()) evil = true;
3347 
3348  logger->Warning(
3349  L"%S %S %u", __FILE__, __FUNCTION__,
3350  __LINE__); // ai_near_actors_targets_pid[i] for AI_Stand seems always
3351  // 0; original code behaviour is identical
3352  for (uint i = 0; i < uNumActors; ++i) {
3353  Actor *actor = &pActors[i];
3354 
3355  if (actor->CanAct() || actor->uAIState == Disabled) {
3356  actor->vPosition.x = actor->vInitialPosition.x;
3357  actor->vPosition.y = actor->vInitialPosition.y;
3358  actor->vPosition.z = actor->vInitialPosition.z;
3359  actor->sCurrentHP = actor->pMonsterInfo.uHP;
3360  if (actor->uAIState != Disabled) {
3362  actor->pMonsterInfo.uRecoveryTime, 0);
3363  }
3364  }
3365 
3367 
3368  if (!bCelestia || good)
3369  if (!bPit || evil)
3370  if (actor->IsPeasant()) actor->ResetAggressor(); // ~0x80000
3371 
3372  actor->ResetHasItem(); // ~0x800000
3373  if (actor->uAttributes & ACTOR_UNKNOW9)
3375  1);
3376  }
3377 }

Перекрестные ссылки _4031C1_update_job_never_gets_called(), ai_near_actors_targets_pid, AI_Stand(), CanAct(), Disabled, MonsterInfo::Hostility_Friendly, Party::IsPartyEvil(), Party::IsPartyGood(), IsPeasant(), logger, pActors, pCurrentMapName, pMonsterInfo, pParty, ResetAggressor(), ResetHasItem(), sCurrentHP, uAIState, uAttributes, Party::uCurrentHour, MonsterInfo::uHostilityType, MonsterInfo::uHP, uNumActors, MonsterInfo::uRecoveryTime, vInitialPosition, vPosition и Log::Warning().

Используется в Application::Game::EventLoop(), Application::Game::GameLoop(), ODM_LoadAndInitialize(), PrepareToLoadBLV() и Rest().

+ Граф вызовов:
+ Граф вызова функции:

◆ SearchAliveActors()

unsigned int Actor::SearchAliveActors ( unsigned int *  pTotalActors)
static

См. определение в файле Actor.cpp строка 3318

3318  {
3319  int v2; // eax@1
3320  unsigned int result; // ebp@1
3321 
3322  v2 = GetAlertStatus();
3323  result = 0;
3324  *pTotalActors = 0;
3325  for (uint i = 0; i < uNumActors; i++) {
3326  if ((pActors[i].uAttributes & ACTOR_UNKNOW7) == v2) {
3327  ++*pTotalActors;
3328  if (pActors[i].IsNotAlive() == 1) ++result;
3329  }
3330  }
3331  return result;
3332 }

Перекрестные ссылки GetAlertStatus(), IsNotAlive(), pActors, uAttributes и uNumActors.

Используется в IsActorAlive().

+ Граф вызовов:
+ Граф вызова функции:

◆ SearchActorByMonsterID()

unsigned int Actor::SearchActorByMonsterID ( unsigned int *  pTotalActors,
int  uMonsterID 
)
static

См. определение в файле Actor.cpp строка 3300

3301  {
3302  int v8; // [sp+Ch] [bp-8h]@1
3303  unsigned int result; // [sp+10h] [bp-4h]@1
3304 
3305  v8 = GetAlertStatus();
3306  *pTotalActors = 0;
3307  result = 0;
3308  for (uint i = 0; i < uNumActors; i++) {
3309  if ((pActors[i].uAttributes & ACTOR_UNKNOW7) == v8 &&
3310  pActors[i].pMonsterInfo.field_33 == uMonsterID) {
3311  ++*pTotalActors;
3312  if (pActors[i].IsNotAlive() == 1) ++result;
3313  }
3314  }
3315  return result;
3316 }

Перекрестные ссылки MonsterInfo::field_33, GetAlertStatus(), IsNotAlive(), pActors, pMonsterInfo, uAttributes и uNumActors.

Используется в IsActorAlive().

+ Граф вызовов:
+ Граф вызова функции:

◆ SearchActorByGroup()

unsigned int Actor::SearchActorByGroup ( unsigned int *  pTotalActors,
unsigned int  uGroup 
)
static

См. определение в файле Actor.cpp строка 3283

3284  {
3285  unsigned int result; // [sp+10h] [bp-4h]@1
3286 
3287  int v8 = GetAlertStatus();
3288  *pTotalActors = 0;
3289  result = 0;
3290  for (uint i = 0; i < uNumActors; i++) {
3291  if ((pActors[i].uAttributes & ACTOR_UNKNOW7) == v8 &&
3292  pActors[i].uGroup == uGroup) {
3293  ++*pTotalActors;
3294  if (pActors[i].IsNotAlive() == 1) ++result;
3295  }
3296  }
3297  return result;
3298 }

Перекрестные ссылки GetAlertStatus(), IsNotAlive(), pActors, uAttributes, uGroup и uNumActors.

Используется в IsActorAlive().

+ Граф вызовов:
+ Граф вызова функции:

◆ SearchActorByID()

unsigned int Actor::SearchActorByID ( unsigned int *  pTotalActors,
unsigned int  a2 
)
static

См. определение в файле Actor.cpp строка 3268

3269  {
3270  // int v4; // eax@1
3271  unsigned int result; // ebx@1
3272 
3273  // v4 = GetAlertStatus();
3274  *pTotalActors = 0;
3275  result = 0;
3276  if ((pActors[a2].uAttributes & ACTOR_UNKNOW7) == GetAlertStatus()) {
3277  *pTotalActors = 1;
3278  if (pActors[a2].IsNotAlive() == 1) result = 1;
3279  }
3280  return result;
3281 }

Перекрестные ссылки GetAlertStatus(), IsNotAlive(), pActors и uAttributes.

Используется в IsActorAlive().

+ Граф вызовов:
+ Граф вызова функции:

◆ LootActor()

void Actor::LootActor ( )

См. определение в файле Actor.cpp строка 4064

4064  {
4065  signed int v2; // edi@1
4066  unsigned __int8 v7; // al@30
4067  char *v9; // [sp-4h] [bp-3Ch]@10
4068  char *v10; // [sp-4h] [bp-3Ch]@31
4069  // char *v11; // [sp-4h] [bp-3Ch]@38
4070  ItemGen Dst; // [sp+Ch] [bp-2Ch]@1
4071  bool itemFound; // [sp+30h] [bp-8h]@1
4072  int v14; // [sp+34h] [bp-4h]@1
4073 
4075  Dst.Reset();
4076  v2 = 0;
4077  itemFound = false;
4078  v14 = 0;
4079  if (!ActorHasItem()) {
4080  for (uchar i = 0; i < this->pMonsterInfo.uTreasureDiceRolls; i++)
4081  v14 += rand() % this->pMonsterInfo.uTreasureDiceSides + 1;
4082  if (v14) {
4083  pParty->PartyFindsGold(v14, 0);
4085  }
4086  } else {
4087  if (this->ActorHasItems[3].uItemID != 0 &&
4088  this->ActorHasItems[3].GetItemEquipType() == EQUIP_GOLD) {
4089  v14 = this->ActorHasItems[3].special_enchantment;
4090  this->ActorHasItems[3].Reset();
4091  if (v14) {
4092  pParty->PartyFindsGold(v14, 0);
4094  }
4095  }
4096  }
4097  if (this->uCarriedItemID) {
4098  Dst.Reset();
4099  Dst.uItemID = this->uCarriedItemID;
4100  v9 = pItemsTable->pItems[Dst.uItemID].pUnidentifiedName;
4101 
4102  if (v14)
4104  else
4106 
4107  if (Dst.GetItemEquipType() == 12) {
4108  Dst.uNumCharges = rand() % 6 + Dst.GetDamageMod() + 1;
4109  Dst.uMaxCharges = Dst.uNumCharges;
4110  }
4111  if (pItemsTable->pItems[Dst.uItemID].uEquipType == 14 &&
4112  Dst.uItemID != 220)
4113  Dst.uEnchantmentType = 2 * rand() % 4 + 2;
4115  if (!pParty->AddItemToParty(&Dst)) pParty->SetHoldingItem(&Dst);
4116  this->uCarriedItemID = 0;
4117  if (this->ActorHasItems[0].uItemID) {
4118  if (!pParty->AddItemToParty(this->ActorHasItems)) {
4121  }
4122  this->ActorHasItems[0].Reset();
4123  }
4124  if (this->ActorHasItems[1].uItemID) {
4125  if (!pParty->AddItemToParty(&this->ActorHasItems[1])) {
4127  pParty->SetHoldingItem(&this->ActorHasItems[1]);
4128  }
4129  this->ActorHasItems[1].Reset();
4130  }
4131  this->Remove();
4132  return;
4133  }
4134  if (this->ActorHasItem()) {
4135  if (this->ActorHasItems[3].uItemID) {
4136  memcpy(&Dst, &this->ActorHasItems[3], sizeof(Dst));
4137  this->ActorHasItems[3].Reset();
4138  // v11 = pItemsTable->pItems[Dst.uItemID].pUnidentifiedName;
4139 
4140  if (v14)
4142  490, v14,
4143  pItemsTable->pItems[Dst.uItemID].pUnidentifiedName));
4144  else
4146  471, pItemsTable->pItems[Dst.uItemID].pUnidentifiedName));
4147 
4148  if (!pParty->AddItemToParty(&Dst)) pParty->SetHoldingItem(&Dst);
4149  itemFound = true;
4150  }
4151  } else {
4152  if (rand() % 100 < this->pMonsterInfo.uTreasureDropChance &&
4153  (v7 = this->pMonsterInfo.uTreasureLevel) != 0) {
4155  &Dst);
4156  v10 = pItemsTable->pItems[Dst.uItemID].pUnidentifiedName;
4157 
4158  if (v14)
4160  490, v14,
4161  v10)); // You found %d gold and an item (%s)! Вы нашли
4162  // ^I[%d] золот^L[ой;ых;ых] и предмет (%s)!
4163  else
4165  471, v10)); // You found %s! Вы нашли ^Pv[%s]!
4166 
4167  if (!pParty->AddItemToParty(&Dst)) pParty->SetHoldingItem(&Dst);
4168  itemFound = true;
4169  }
4170  }
4171  if (this->ActorHasItems[0].uItemID) {
4172  if (!pParty->AddItemToParty(this->ActorHasItems)) {
4175  itemFound = true;
4176  }
4177  this->ActorHasItems[0].Reset();
4178  }
4179  if (this->ActorHasItems[1].uItemID) {
4180  if (!pParty->AddItemToParty(&this->ActorHasItems[1])) {
4182  pParty->SetHoldingItem(&this->ActorHasItems[1]);
4183  itemFound = true;
4184  }
4185  this->ActorHasItems[1].Reset();
4186  }
4187  if (!itemFound || rand() % 100 < 90) // for repeatedly get gold and item
4188  this->Remove();
4189 }

Перекрестные ссылки ActorHasItem(), ActorHasItems, Party::AddItemToParty(), ViewingParams::bRedrawGameUI, EQUIP_GOLD, Localization::FormatString(), GameUI_StatusBar_OnEvent(), ItemsTable::GenerateItem(), ItemGen::GetDamageMod(), ItemGen::GetItemEquipType(), localization, Party::PartyFindsGold(), ItemsTable::pItems, pItemsTable, pMonsterInfo, pParty, Remove(), ItemGen::Reset(), Party::SetHoldingItem(), ItemsTable::SetSpecialBonus(), ItemGen::special_enchantment, Party::sub_421B2C_PlaceInInventory_or_DropPickedItem(), uCarriedItemID, ItemGen::uEnchantmentType, ItemGen::uItemID, ItemGen::uMaxCharges, ItemGen::uNumCharges, MonsterInfo::uTreasureDiceRolls, MonsterInfo::uTreasureDiceSides, MonsterInfo::uTreasureDropChance, MonsterInfo::uTreasureType и viewparams.

+ Граф вызовов:

◆ _427102_IsOkToCastSpell()

bool Actor::_427102_IsOkToCastSpell ( enum SPELL_TYPE  spell)

См. определение в файле Actor.cpp строка 4192

4192  {
4193  switch (spell) {
4194  case SPELL_BODY_POWER_CURE: {
4195  if (this->sCurrentHP >= this->pMonsterInfo.uHP) return false;
4196  return true;
4197  }
4198 
4199  case SPELL_LIGHT_DISPEL_MAGIC: {
4200  for (int i = 0; i < 20; i++) {
4201  if (pParty->pPartyBuffs[i].Active()) return true;
4202  }
4203  for (int i = 1; i <= 4; i++) {
4204  for (int j = 0; j < 22; j++) {
4205  if (pPlayers[i]->pPlayerBuffs[j].Active()) return true;
4206  }
4207  }
4208  return false;
4209  }
4210 
4219  case SPELL_FIRE_HASTE:
4220  return this->pActorBuffs[ACTOR_BUFF_HASTE].Expired();
4221  case SPELL_AIR_SHIELD:
4222  return this->pActorBuffs[ACTOR_BUFF_SHIELD].Expired();
4223  case SPELL_EARTH_STONESKIN:
4224  return this->pActorBuffs[ACTOR_BUFF_STONESKIN].Expired();
4225  case SPELL_SPIRIT_BLESS:
4226  return this->pActorBuffs[ACTOR_BUFF_BLESS].Expired();
4227  case SPELL_SPIRIT_FATE:
4228  return this->pActorBuffs[ACTOR_BUFF_FATE].Expired();
4229  case SPELL_SPIRIT_HEROISM:
4230  return this->pActorBuffs[ACTOR_BUFF_HEROISM].Expired();
4231  default:
4232  return true;
4233  }
4234 }

Перекрестные ссылки ACTOR_BUFF_BLESS, ACTOR_BUFF_DAY_OF_PROTECTION, ACTOR_BUFF_FATE, ACTOR_BUFF_HASTE, ACTOR_BUFF_HEROISM, ACTOR_BUFF_HOUR_OF_POWER, ACTOR_BUFF_PAIN_HAMMERHANDS, ACTOR_BUFF_PAIN_REFLECTION, ACTOR_BUFF_SHIELD, ACTOR_BUFF_STONESKIN, SpellBuff::Expired(), pActorBuffs, pMonsterInfo, pParty, Party::pPartyBuffs, pPlayers, sCurrentHP, SPELL_AIR_SHIELD, SPELL_BODY_HAMMERHANDS, SPELL_BODY_POWER_CURE, SPELL_DARK_PAIN_REFLECTION, SPELL_EARTH_STONESKIN, SPELL_FIRE_HASTE, SPELL_LIGHT_DAY_OF_PROTECTION, SPELL_LIGHT_DISPEL_MAGIC, SPELL_LIGHT_HOUR_OF_POWER, SPELL_SPIRIT_BLESS, SPELL_SPIRIT_FATE, SPELL_SPIRIT_HEROISM и MonsterInfo::uHP.

Используется в special_ability_use_check().

+ Граф вызовов:
+ Граф вызова функции:

◆ special_ability_use_check()

ABILITY_INDEX Actor::special_ability_use_check ( int  a2)

См. определение в файле Actor.cpp строка 4237

4237  {
4238  signed int okToCastSpell1; // ebx@5
4239  signed int okToCastSpell2; // edi@5
4240 
4241  if (this->pMonsterInfo.uSpecialAbilityType == 2 &&
4242  this->pMonsterInfo.uSpecialAbilityDamageDiceBonus < 3 &&
4243  rand() % 100 < 5)
4244  this->SummonMinion(a2);
4245  okToCastSpell1 =
4247  okToCastSpell2 =
4249  if (okToCastSpell1 && this->pMonsterInfo.uSpell1UseChance &&
4250  rand() % 100 < this->pMonsterInfo.uSpell1UseChance)
4251  return ABILITY_SPELL1;
4252  if (okToCastSpell2 && this->pMonsterInfo.uSpell2UseChance &&
4253  rand() % 100 < this->pMonsterInfo.uSpell2UseChance)
4254  return ABILITY_SPELL2;
4255  if (this->pMonsterInfo.uAttack2Chance &&
4256  rand() % 100 < this->pMonsterInfo.uAttack2Chance)
4257  return ABILITY_ATTACK2;
4258  return ABILITY_ATTACK1;
4259 }

Перекрестные ссылки _427102_IsOkToCastSpell(), ABILITY_ATTACK1, ABILITY_ATTACK2, ABILITY_SPELL1, ABILITY_SPELL2, pMonsterInfo, SummonMinion(), MonsterInfo::uAttack2Chance, MonsterInfo::uSpecialAbilityType, MonsterInfo::uSpell1ID, MonsterInfo::uSpell1UseChance, MonsterInfo::uSpell2ID и MonsterInfo::uSpell2UseChance.

Используется в UpdateActorAI().

+ Граф вызовов:
+ Граф вызова функции:

◆ _4273BB_DoesHitOtherActor()

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

См. определение в файле Actor.cpp строка 4262

4262  {
4263  signed int v6; // ebx@1
4264  signed int v7; // esi@1
4265  int armorSum; // ebx@10
4266  signed int a2a; // [sp+18h] [bp+Ch]@1
4267 
4268  v6 = defender->pMonsterInfo.uAC;
4269  v7 = 0;
4270  a2a = 0;
4272  v6 /= 2;
4273  if (defender->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].Active())
4275  if (defender->pActorBuffs[ACTOR_BUFF_STONESKIN].Active() &&
4276  defender->pActorBuffs[ACTOR_BUFF_STONESKIN].uPower > v7)
4277  v7 = defender->pActorBuffs[ACTOR_BUFF_STONESKIN].uPower;
4278  armorSum = v7 + v6;
4279  if (this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].Active())
4281  if (this->pActorBuffs[ACTOR_BUFF_BLESS].Active() &&
4282  this->pActorBuffs[ACTOR_BUFF_BLESS].uPower > a2a)
4283  a2a = this->pActorBuffs[ACTOR_BUFF_BLESS].uPower;
4284  if (this->pActorBuffs[ACTOR_BUFF_FATE].Active()) {
4285  a2a += this->pActorBuffs[ACTOR_BUFF_FATE].uPower;
4287  }
4288  return rand() % (armorSum + 2 * this->pMonsterInfo.uLevel + 10) + a2a + 1 >
4289  armorSum + 5;
4290 }

Перекрестные ссылки SpellBuff::Active(), ACTOR_BUFF_BLESS, ACTOR_BUFF_FATE, ACTOR_BUFF_HOUR_OF_POWER, ACTOR_BUFF_SOMETHING_THAT_HALVES_AC, ACTOR_BUFF_STONESKIN, pActorBuffs, pMonsterInfo, SpellBuff::Reset(), MonsterInfo::uAC, MonsterInfo::uLevel и SpellBuff::uPower.

Используется в ActorDamageFromMonster().

+ Граф вызовов:
+ Граф вызова функции:

◆ ActorHitOrMiss()

bool Actor::ActorHitOrMiss ( Player pPlayer)

См. определение в файле Actor.cpp строка 4293

4293  {
4294  signed int v3; // edi@1
4295  signed int v4; // esi@8
4296  int v5; // esi@8
4297 
4298  v3 = 0;
4299  if (this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].Active())
4301  if (this->pActorBuffs[ACTOR_BUFF_BLESS].Active() &&
4302  this->pActorBuffs[ACTOR_BUFF_BLESS].uPower > v3)
4304  if (this->pActorBuffs[ACTOR_BUFF_FATE].Active()) {
4307  }
4308  v4 = pPlayer->GetActualAC() + 2 * this->pMonsterInfo.uLevel + 10;
4309  v5 = rand() % v4 + 1;
4310  return (v3 + v5 > pPlayer->GetActualAC() + 5);
4311 }

Перекрестные ссылки ACTOR_BUFF_BLESS, ACTOR_BUFF_FATE, ACTOR_BUFF_HOUR_OF_POWER, Player::GetActualAC(), pActorBuffs, pMonsterInfo, SpellBuff::Reset(), MonsterInfo::uLevel и SpellBuff::uPower.

Используется в DamagePlayerFromMonster().

+ Граф вызовов:
+ Граф вызова функции:

◆ CalcMagicalDamageToActor()

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

См. определение в файле Actor.cpp строка 4314

4315  {
4316  int v4; // edx@1
4317  int v5; // ecx@1
4318  signed int v6; // eax@4
4319  signed int result; // eax@17
4320  signed int v8; // esi@18
4321 
4322  v4 = 0;
4323  v5 = 0;
4324  if (this->pActorBuffs[ACTOR_BUFF_HOUR_OF_POWER].Active())
4326  switch (dmgType) {
4327  case DMGT_FIRE:
4328  v6 = this->pMonsterInfo.uResFire;
4329  v4 = v5;
4330  break;
4331  case DMGT_ELECTR:
4332  v6 = this->pMonsterInfo.uResAir;
4333  v4 = v5;
4334  break;
4335  case DMGT_COLD:
4336  v6 = this->pMonsterInfo.uResWater;
4337  v4 = v5;
4338  break;
4339  case DMGT_EARTH:
4340  v6 = this->pMonsterInfo.uResEarth;
4341  v4 = v5;
4342  break;
4343  case DMGT_PHISYCAL:
4344  v6 = this->pMonsterInfo.uResPhysical;
4345  break;
4346  case DMGT_SPIRIT:
4347  v6 = this->pMonsterInfo.uResSpirit;
4348  break;
4349  case DMGT_MIND:
4350  v6 = this->pMonsterInfo.uResMind;
4351  v4 = v5;
4352  break;
4353  case DMGT_BODY:
4354  v6 = this->pMonsterInfo.uResBody;
4355  v4 = v5;
4356  break;
4357  case DMGT_LIGHT:
4358  v6 = this->pMonsterInfo.uResLight;
4359  break;
4360  case DMGT_DARK:
4361  v6 = this->pMonsterInfo.uResDark;
4362  break;
4363  default:
4364  v6 = 0;
4365  break;
4366  }
4367  if (v6 < 200) {
4368  v8 = v4 + v6 + 30;
4369  for (int i = 0; i < 4; i++) {
4370  if (rand() % v8 < 30) break;
4371  incomingDmg /= 2;
4372  }
4373  result = incomingDmg;
4374  } else {
4375  result = 0;
4376  }
4377  return result;
4378 }

Перекрестные ссылки ACTOR_BUFF_HOUR_OF_POWER, DMGT_BODY, DMGT_COLD, DMGT_DARK, DMGT_EARTH, DMGT_ELECTR, DMGT_FIRE, DMGT_LIGHT, DMGT_MIND, DMGT_PHISYCAL, DMGT_SPIRIT, pActorBuffs, pMonsterInfo, SpellBuff::uPower, MonsterInfo::uResAir, MonsterInfo::uResBody, MonsterInfo::uResDark, MonsterInfo::uResEarth, MonsterInfo::uResFire, MonsterInfo::uResLight, MonsterInfo::uResMind, MonsterInfo::uResPhysical, MonsterInfo::uResSpirit и MonsterInfo::uResWater.

Используется в DamageMonsterFromParty(), DamagePlayerFromMonster() и UpdateActorAI().

+ Граф вызова функции:

◆ DoesDmgTypeDoDamage()

bool Actor::DoesDmgTypeDoDamage ( DAMAGE_TYPE  uType)

См. определение в файле Actor.cpp строка 4381

4381  {
4382  signed int resist; // esi@2
4383  bool result; // eax@13
4384 
4385  switch (uType) {
4386  case 0:
4387  resist = this->pMonsterInfo.uResFire;
4388  break;
4389  case 1:
4390  resist = this->pMonsterInfo.uResAir;
4391  break;
4392  case 2:
4393  resist = this->pMonsterInfo.uResWater;
4394  break;
4395  case 3:
4396  resist = this->pMonsterInfo.uResEarth;
4397  break;
4398  case 4:
4399  resist = this->pMonsterInfo.uResPhysical;
4400  break;
4401  case 6:
4402  resist = this->pMonsterInfo.uResSpirit;
4403  break;
4404  case 7:
4405  resist = this->pMonsterInfo.uResMind;
4406  case 8:
4407  resist = this->pMonsterInfo.uResBody;
4408  break;
4409  case 9:
4410  resist = this->pMonsterInfo.uResLight;
4411  break;
4412  case 10:
4413  resist = this->pMonsterInfo.uResDark;
4414  break;
4415  default:
4416  return 1;
4417  }
4418  if (resist < 200)
4419  result = rand() % ((this->pMonsterInfo.uLevel >> 2) + resist + 30) < 30;
4420  else
4421  result = 0;
4422  return result;
4423 }

Перекрестные ссылки pMonsterInfo, MonsterInfo::uLevel, MonsterInfo::uResAir, MonsterInfo::uResBody, MonsterInfo::uResDark, MonsterInfo::uResEarth, MonsterInfo::uResFire, MonsterInfo::uResLight, MonsterInfo::uResMind, MonsterInfo::uResPhysical, MonsterInfo::uResSpirit и MonsterInfo::uResWater.

Используется в DamageMonsterFromParty().

+ Граф вызова функции:

Данные класса

◆ pActorName

char Actor::pActorName[32]

См. определение в файле Actor.h строка 286

Используется в Arena_summon_actor(), DamageMonsterFromParty(), Reset(), SpawnActor(), SpawnEncounter() и SummonMinion().

◆ sNPC_ID

int16_t Actor::sNPC_ID

См. определение в файле Actor.h строка 287

Используется в Application::Game::EventLoop(), EventProcessor(), Game_StartHirelingDialogue(), GameUI_InitializeDialogue() и Reset().

◆ field_22

int16_t Actor::field_22

См. определение в файле Actor.h строка 288

◆ uAttributes

◆ sCurrentHP

◆ field_2A

char Actor::field_2A[2]

См. определение в файле Actor.h строка 291

◆ pMonsterInfo

◆ word_000084_range_attack

int16_t Actor::word_000084_range_attack

См. определение в файле Actor.h строка 293

◆ word_000086_some_monster_id

int16_t Actor::word_000086_some_monster_id

См. определение в файле Actor.h строка 294

Используется в DamageMonsterFromParty(), Reset(), SpawnActor(), SpawnEncounter() и SummonMinion().

◆ uActorRadius

◆ uActorHeight

◆ uMovementSpeed

uint16_t Actor::uMovementSpeed

См. определение в файле Actor.h строка 297

Используется в AI_Flee(), AI_Pursue1(), AI_Pursue2(), AI_Pursue3(), AI_RandomMove(), PrepareSprites(), Reset(), SpawnActor(), SpawnEncounter() и SummonMinion().

◆ vPosition

◆ vVelocity

struct Vec3_short_ Actor::vVelocity

См. определение в файле Actor.h строка 299

Используется в AI_Bored(), DamageMonsterFromParty() и Reset().

◆ uYawAngle

uint16_t Actor::uYawAngle

См. определение в файле Actor.h строка 300

Используется в AI_Bored(), AI_Flee(), AI_Pursue1(), AI_Pursue2(), AI_Pursue3(), AI_RandomMove() и Reset().

◆ uPitchAngle

uint16_t Actor::uPitchAngle

См. определение в файле Actor.h строка 301

Используется в AI_Flee(), AI_Pursue1(), AI_Pursue2(), AI_Pursue3() и Reset().

◆ uSectorID

int16_t Actor::uSectorID

См. определение в файле Actor.h строка 302

Используется в Reset(), SpawnEncounter() и SummonMinion().

◆ uCurrentActionLength

◆ vInitialPosition

struct Vec3_short_ Actor::vInitialPosition

См. определение в файле Actor.h строка 304

Используется в InitializeActors(), Reset(), SpawnActor(), SpawnEncounter() и SummonMinion().

◆ vGuardingPosition

struct Vec3_short_ Actor::vGuardingPosition

См. определение в файле Actor.h строка 305

Используется в Reset().

◆ uTetherDistance

uint16_t Actor::uTetherDistance

См. определение в файле Actor.h строка 306

Используется в Reset(), SpawnActor(), SpawnEncounter() и SummonMinion().

◆ uAIState

◆ uCurrentActionAnimation

uint16_t Actor::uCurrentActionAnimation

См. определение в файле Actor.h строка 308

Используется в Die(), MonsterPopup_Draw(), Reset(), Resurrect() и UpdateAnimation().

◆ uCarriedItemID

uint16_t Actor::uCarriedItemID

См. определение в файле Actor.h строка 309

Используется в GiveItem(), LootActor(), Reset() и Player::StealFromActor().

◆ field_B6

char Actor::field_B6

См. определение в файле Actor.h строка 310

◆ field_B7

char Actor::field_B7

См. определение в файле Actor.h строка 311

◆ uCurrentActionTime

unsigned int Actor::uCurrentActionTime

◆ pSpriteIDs

uint16_t Actor::pSpriteIDs[8]

См. определение в файле Actor.h строка 313

Используется в AI_Bored(), Die(), PrepareSprites(), Reset(), Resurrect() и UpdateAnimation().

◆ pSoundSampleIDs

uint16_t Actor::pSoundSampleIDs[4]

См. определение в файле Actor.h строка 314

Используется в PlaySound() и PrepareSprites().

◆ pActorBuffs

◆ ActorHasItems

struct ItemGen Actor::ActorHasItems[4]

См. определение в файле Actor.h строка 316

Используется в Actor(), GiveItem(), LootActor(), Player::ReceiveSpecialAttackEffect(), SetRandomGoldIfTheresNoItem() и Player::StealFromActor().

◆ uGroup

unsigned int Actor::uGroup

См. определение в файле Actor.h строка 317

Используется в _SelectTarget(), GetActorsRelation(), Reset(), SearchActorByGroup(), SpawnEncounter() и SummonMinion().

◆ uAlly

unsigned int Actor::uAlly

См. определение в файле Actor.h строка 318

Используется в ArePeasantsOfSameFaction(), GetActorsRelation(), IsPeasant(), Reset() и SummonMinion().

◆ pScheduledJobs

struct ActorJob Actor::pScheduledJobs[8]

См. определение в файле Actor.h строка 319

◆ uSummonerID

unsigned int Actor::uSummonerID

См. определение в файле Actor.h строка 320

Используется в Reset() и SummonMinion().

◆ uLastCharacterIDToHit

unsigned int Actor::uLastCharacterIDToHit

См. определение в файле Actor.h строка 321

Используется в _SelectTarget() и Reset().

◆ dword_000334_unique_name

int Actor::dword_000334_unique_name

См. определение в файле Actor.h строка 322

Используется в Reset().

◆ field_338

char Actor::field_338[12]

См. определение в файле Actor.h строка 323


Объявления и описания членов структур находятся в файлах:
MonsterInfo::uMissleAttack1Type
uint8_t uMissleAttack1Type
Definition: Monsters.h:139
SPRITE_PROJECTILE_530
@ SPRITE_PROJECTILE_530
Definition: SpriteObject.h:22
SpriteObject
Definition: SpriteObject.h:189
spell_sprite_mapping
std::array< stru324_spell_id_to_sprite_mapping, 103 > spell_sprite_mapping
Definition: Spells.cpp:35
Actor::pSoundSampleIDs
uint16_t pSoundSampleIDs[4]
Definition: Actor.h:314
MONSTER_OOZE_1
@ MONSTER_OOZE_1
Definition: Monsters.h:26
int32
int int32
Definition: MM7.h:54
ObjectDesc::uSpeed
int16_t uSpeed
Definition: ObjectList.h:31
Player::SetRecoveryTime
void SetRecoveryTime(signed int sRecoveryTime)
Definition: Player.cpp:2593
Player
Definition: Player.h:401
Actor::CanAct
bool CanAct()
Definition: Actor.cpp:157
SPELL_EARTH_STONESKIN
@ SPELL_EARTH_STONESKIN
Definition: Spells.h:53
Actor::vPosition
struct Vec3_short_ vPosition
Definition: Actor.h:298
Player::StealFromActor
int StealFromActor(unsigned int uActorID, int _steal_perm, int reputation)
Definition: Player.cpp:1667
PLAYER_SKILL_BLASTER
@ PLAYER_SKILL_BLASTER
Definition: Player.h:178
uNumActors
size_t uNumActors
Definition: Actor.cpp:39
Player::IsWeak
bool IsWeak() const
Definition: Player.cpp:7412
MONSTER_DEVIL_3
@ MONSTER_DEVIL_3
Definition: Monsters.h:9
DMGT_PHISYCAL
@ DMGT_PHISYCAL
Definition: Items.h:15
Party::vPosition
Vec3_int_ vPosition
Definition: Party.h:250
MONSTER_HARPY_3
@ MONSTER_HARPY_3
Definition: Monsters.h:23
sub_407A1C
bool sub_407A1C(int x, int y, int z, Vec3_int_ v)
Definition: Indoor.cpp:3199
Actor::ActorHasItems
struct ItemGen ActorHasItems[4]
Definition: Actor.h:316
Player::PlayerHitOrMiss
bool PlayerHitOrMiss(Actor *pActor, int distancemod, int skillmod)
Definition: Player.cpp:7600
AttackingRanged2
@ AttackingRanged2
Definition: Actor.h:87
ItemGen::GetDamageMod
unsigned __int8 GetDamageMod()
Definition: Items.cpp:1533
Actor::AI_Stun
static void AI_Stun(unsigned int uActorID, signed int edx0, int arg0)
Definition: Actor.cpp:1815
int_get_vector_length
uint32_t int_get_vector_length(int32_t x, int32_t y, int32_t z)
Definition: VectorTypes.cpp:8
Actor::ResetActive
void ResetActive()
Definition: Actor.h:180
Actor::AI_RandomMove
static void AI_RandomMove(unsigned int uActor_id, unsigned int uTarget_id, int radius, int uActionLength)
Definition: Actor.cpp:1696
MONSTER_DEVIL_1
@ MONSTER_DEVIL_1
Definition: Monsters.h:7
MonsterInfo::uSpell2UseChance
uint8_t uSpell2UseChance
Definition: Monsters.h:148
MonsterInfo::uResBody
uint8_t uResBody
Definition: Monsters.h:156
MONSTER_TROLL_3
@ MONSTER_TROLL_3
Definition: Monsters.h:44
SpriteFrame::hw_sprites
Sprite * hw_sprites[8]
Definition: Sprites.h:46
AttackingMelee
@ AttackingMelee
Definition: Actor.h:77
AIDirection::uDistanceXZ
unsigned int uDistanceXZ
Definition: Actor.h:129
pLevelDecorations
std::array< LevelDecoration, 3000 > pLevelDecorations
Definition: Decoration.cpp:8
stru193_math::uIntegerDoublePi
static const unsigned int uIntegerDoublePi
Definition: OurMath.h:90
DMGT_DARK
@ DMGT_DARK
Definition: Items.h:21
SPRITE_BLASTER_PROJECTILE
@ SPRITE_BLASTER_PROJECTILE
Definition: SpriteObject.h:30
Actor::uActorHeight
uint16_t uActorHeight
Definition: Actor.h:296
Dying
@ Dying
Definition: Actor.h:79
int16_t
signed __int16 int16_t
Definition: SDL_config.h:36
ANIM_GotHit
@ ANIM_GotHit
Definition: Actor.h:103
ACTOR_BUFF_PAIN_REFLECTION
@ ACTOR_BUFF_PAIN_REFLECTION
Definition: Actor.h:58
Actor::uPitchAngle
uint16_t uPitchAngle
Definition: Actor.h:301
Actor::UpdateAnimation
void UpdateAnimation()
Definition: Actor.cpp:2376
Timer::uTimeElapsed
unsigned int uTimeElapsed
Definition: Time.h:133
SpriteObject::uFacing
unsigned __int16 uFacing
Definition: SpriteObject.h:220
Actor::ArePeasantsOfSameFaction
static bool ArePeasantsOfSameFaction(Actor *a1, Actor *a2)
Definition: Actor.cpp:700
Player::GetAttackRecoveryTime
int GetAttackRecoveryTime(bool bRangedAttack)
Definition: Player.cpp:2203
MapStats::pInfos
MapInfo pInfos[77]
Definition: MapInfo.h:79
MonsterInfo::uBaseSpeed
unsigned int uBaseSpeed
Definition: Monsters.h:178
SPRITE_PROJECTILE_535
@ SPRITE_PROJECTILE_535
Definition: SpriteObject.h:24
SPELL_101
@ SPELL_101
Definition: Spells.h:122
Party::GetPlayingTime
GameTime & GetPlayingTime()
Definition: Party.h:230
SPELL_LIGHT_LIGHT_BOLT
@ SPELL_LIGHT_LIGHT_BOLT
Definition: Spells.h:97
stru193_math::uDoublePiMask
static const unsigned int uDoublePiMask
Definition: OurMath.h:91
Actor::AI_StandOrBored
static void AI_StandOrBored(unsigned int uActorID, signed int uObjID, int uActionLength, struct AIDirection *a4)
Definition: Actor.cpp:1100
PLAYER_SKILL_STAFF
@ PLAYER_SKILL_STAFF
Definition: Player.h:171
Vec2::x
T x
Definition: VectorTypes.h:12
ITEM_DRAGON_EYE
@ ITEM_DRAGON_EYE
Definition: Items.h:104
Player::CalculateRangedDamageTo
int CalculateRangedDamageTo(int uMonsterInfoID)
Definition: Player.cpp:1365
Actor::DoesDmgTypeDoDamage
bool DoesDmgTypeDoDamage(DAMAGE_TYPE uType)
Definition: Actor.cpp:4381
SPELL_MIND_PSYCHIC_SHOCK
@ SPELL_MIND_PSYCHIC_SHOCK
Definition: Spells.h:82
pSpriteFrameTable
struct SpriteFrameTable * pSpriteFrameTable
Definition: Sprites.cpp:22
MonsterInfo::uHostilityType
HostilityRadius uHostilityType
Definition: Monsters.h:131
ABILITY_ATTACK1
@ ABILITY_ATTACK1
Definition: Actor.h:31
pSpriteObjects
std::array< SpriteObject, MAX_SPRITE_OBJECTS > pSpriteObjects
Definition: SpriteObject.cpp:34
Actor::dword_000334_unique_name
int dword_000334_unique_name
Definition: Actor.h:322
stru141_actor_collision_object::sMaxZ
int sMaxZ
Definition: Indoor.h:180
SPELL_DARK_PAIN_REFLECTION
@ SPELL_DARK_PAIN_REFLECTION
Definition: Spells.h:115
SpriteObject::field_60_distance_related_prolly_lod
char field_60_distance_related_prolly_lod
Definition: SpriteObject.h:234
Actor::AI_MeleeAttack
static void AI_MeleeAttack(unsigned int uActorID, signed int sTargetPid, struct AIDirection *arg0)
Definition: Actor.cpp:1148
OBJECT_Item
@ OBJECT_Item
Definition: Actor.h:66
ai_arrays_size
int ai_arrays_size
Definition: mm7_data.cpp:503
pMonsterStats
struct MonsterStats * pMonsterStats
Definition: Monsters.cpp:8
OtherOverlayList::_4418B6
int _4418B6(int uOverlayID, int16_t a3, int a4, int a5, int16_t a6)
Definition: Overlays.cpp:32
ItemsTable::SetSpecialBonus
void SetSpecialBonus(ItemGen *pItem)
Definition: Items.cpp:472
Party::uFine
int uFine
Definition: Party.h:324
ItemGen::GetItemEquipType
ITEM_EQUIP_TYPE GetItemEquipType()
Definition: Items.cpp:1504
Party::sRotationX
int sRotationX
Definition: Party.h:252
ai_array_4F5E68
std::array< int, 500 > ai_array_4F5E68
Definition: mm7_data.cpp:500
Party::SetYellowAlert
void SetYellowAlert()
Definition: Party.h:228
MonsterInfo::uAttack1DamageBonus
uint8_t uAttack1DamageBonus
Definition: Monsters.h:138
_449B57_test_bit
bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2)
Definition: Party.cpp:1185
Player::ReceiveDamage
int ReceiveDamage(signed int amount, DAMAGE_TYPE dmg_type)
Definition: Player.cpp:1816
SpellStats::pInfos
SpellInfo pInfos[100]
Definition: Spells.h:192
z
GLdouble GLdouble z
Definition: SDL_opengl_glext.h:407
DecalBuilder::AddBloodsplat
void AddBloodsplat(float x, float y, float z, float r, float g, float b, float radius, int a8, int a9)
Definition: DecalBuilder.cpp:50
DMGT_FIRE
@ DMGT_FIRE
Definition: Items.h:11
ACTOR_BUFF_DAY_OF_PROTECTION
@ ACTOR_BUFF_DAY_OF_PROTECTION
Definition: Actor.h:51
SPELL_LIGHT_HOUR_OF_POWER
@ SPELL_LIGHT_HOUR_OF_POWER
Definition: Spells.h:105
SpellInfo::uSchool
SPELL_SCHOOL uSchool
Definition: Spells.h:183
Actor::AI_Pursue1
static void AI_Pursue1(unsigned int uActorID, unsigned int a2, signed int arg0, signed int uActionLength, struct AIDirection *pDir)
Definition: Actor.cpp:2003
OtherOverlayList::_4418B1
int _4418B1(int a2, int a3, int a4, int a5)
Definition: Overlays.cpp:29
Actor::PlaySound
static void PlaySound(unsigned int uActorID, unsigned int uSoundID)
Definition: Actor.cpp:1974
MapStats::GetMapInfo
MAP_TYPE GetMapInfo(const String &Str2)
Definition: MapInfo.cpp:225
Actor::AI_SpellAttack
static void AI_SpellAttack(unsigned int uActorID, struct AIDirection *pDir, int uSpellID, int a4, unsigned int uSkillLevel)
Definition: Actor.cpp:199
Player::IsUnarmed
bool IsUnarmed()
Definition: Player.cpp:1576
ANIM_Standing
@ ANIM_Standing
Definition: Actor.h:99
ai_array_4F6638_actor_ids
std::array< int, 500 > ai_array_4F6638_actor_ids
Definition: mm7_data.cpp:501
SpellBuff::IsBuffExpiredToTime
bool IsBuffExpiredToTime(GameTime time)
Definition: Spells.cpp:351
SkillToMastery
unsigned int SkillToMastery(unsigned int skill_value)
Definition: Player.cpp:7854
SPELL_LIGHT_DAY_OF_PROTECTION
@ SPELL_LIGHT_DAY_OF_PROTECTION
Definition: Spells.h:104
SPELL_EARTH_ROCK_BLAST
@ SPELL_EARTH_ROCK_BLAST
Definition: Spells.h:56
Actor
Definition: Actor.h:151
Actor::Reset
void Reset()
Definition: Actor.cpp:2443
Party::sEyelevel
int sEyelevel
Definition: Party.h:239
SpriteObject::uSectorID
__int16 uSectorID
Definition: SpriteObject.h:223
SpellBuff::uSkill
unsigned __int16 uSkill
Definition: Spells.h:167
AudioPlayer::PlaySound
void PlaySound(SoundID eSoundID, int pid, unsigned int uNumRepeats, int x, int y, int a7)
Definition: AudioPlayer.cpp:195
BBox_short_::x1
int16_t x1
Definition: VectorTypes.h:114
MonsterInfo::Hostility_Friendly
@ Hostility_Friendly
Definition: Monsters.h:111
MonsterInfo::uSpell1ID
uint8_t uSpell1ID
Definition: Monsters.h:147
engine
std::shared_ptr< Engine > engine
Definition: Engine.cpp:130
Player::CanAct
bool CanAct()
Definition: Player.cpp:549
Actor::vVelocity
struct Vec3_short_ vVelocity
Definition: Actor.h:299
MonsterInfo::uResDark
uint8_t uResDark
Definition: Monsters.h:158
stru193_math::uIntegerHalfPi
static const unsigned int uIntegerHalfPi
Definition: OurMath.h:89
MonsterInfo::uAC
unsigned int uAC
Definition: Monsters.h:176
MonsterInfo::uResLight
uint8_t uResLight
Definition: Monsters.h:157
Actor::uCarriedItemID
uint16_t uCarriedItemID
Definition: Actor.h:309
Actor::AI_MissileAttack1
static void AI_MissileAttack1(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir)
Definition: Actor.cpp:1626
stru262_TurnBased::ApplyPlayerAction
void ApplyPlayerAction()
Definition: TurnEngine.cpp:101
ACTOR_BUFF_HEROISM
@ ACTOR_BUFF_HEROISM
Definition: Actor.h:56
DMGT_SPIRIT
@ DMGT_SPIRIT
Definition: Items.h:17
ANIM_Dying
@ ANIM_Dying
Definition: Actor.h:104
Actor::IsPeasant
bool IsPeasant()
Definition: Actor.cpp:1369
localization
Localization * localization
Definition: Localization.cpp:11
SPELL_BODY_HARM
@ SPELL_BODY_HARM
Definition: Spells.h:88
MonsterInfo::uResFire
uint8_t uResFire
Definition: Monsters.h:150
MonsterInfo::field_3C_some_special_attack
int16_t field_3C_some_special_attack
Definition: Monsters.h:173
Player::CalculateMeleeDamageTo
int CalculateMeleeDamageTo(bool ignoreSkillBonus, bool ignoreOffhand, unsigned int uTargetActorID)
Definition: Player.cpp:1202
MonsterInfo::uAttack2Chance
uint8_t uAttack2Chance
Definition: Monsters.h:140
Actor::ResetAlive
void ResetAlive()
Definition: Actor.h:181
Party::uCurrentHour
unsigned int uCurrentHour
Definition: Party.h:275
MonsterInfo::uTreasureType
uint8_t uTreasureType
Definition: Monsters.h:127
MONSTER_MOVEMENT_TYPE_FREE
@ MONSTER_MOVEMENT_TYPE_FREE
Definition: Monsters.h:64
ObjectList::ObjectIDByItemID
unsigned int ObjectIDByItemID(unsigned int uItemID)
Definition: ObjectList.cpp:7
BBox_short_::y1
int16_t y1
Definition: VectorTypes.h:116
MonsterInfo::uSpecialAbilityDamageDiceBonus
uint8_t uSpecialAbilityDamageDiceBonus
Definition: Monsters.h:166
Actor::CalcMagicalDamageToActor
int CalcMagicalDamageToActor(DAMAGE_TYPE dmgType, int incomingDmg)
Definition: Actor.cpp:4314
MonsterInfo::uAttack1DamageDiceSides
uint8_t uAttack1DamageDiceSides
Definition: Monsters.h:137
ItemGen::_439DF3_get_additional_damage
int _439DF3_get_additional_damage(DAMAGE_TYPE *a2, bool *vampiyr)
Definition: Items.cpp:42
Standing
@ Standing
Definition: Actor.h:75
MONSTER_TROLL_2
@ MONSTER_TROLL_2
Definition: Monsters.h:43
stru141_actor_collision_object::normal
Vec3_int_ normal
Definition: Indoor.h:159
Actor::_4031C1_update_job_never_gets_called
static char _4031C1_update_job_never_gets_called(unsigned int uActorID, signed int a2, int a3)
Definition: Actor.cpp:1754
AttackingRanged4
@ AttackingRanged4
Definition: Actor.h:93
Party::pPlayers
std::array< Player, 4 > pPlayers
Definition: Party.h:310
EQUIP_GOLD
@ EQUIP_GOLD
Definition: Items.h:246
ai_near_actors_targets_pid
std::array< int, 500 > ai_near_actors_targets_pid
Definition: mm7_data.cpp:502
ITEM_EQUIP_TYPE
ITEM_EQUIP_TYPE
Definition: Items.h:226
Player::GetSpecialItemBonus
int GetSpecialItemBonus(ITEM_ENCHANTMENT enchantment)
Definition: Player.cpp:2634
sub_43AE12
double sub_43AE12(signed int a1)
Definition: Actor.cpp:5528
SpriteObject::uType
SPRITE_OBJECT_TYPE uType
Definition: SpriteObject.h:215
ACTOR_BUFF_SLOWED
@ ACTOR_BUFF_SLOWED
Definition: Actor.h:45
pFactionTable
struct FactionTable * pFactionTable
Definition: mm7_data.cpp:672
SPELL_MIND_MIND_BLAST
@ SPELL_MIND_MIND_BLAST
Definition: Spells.h:74
Party::sub_421B2C_PlaceInInventory_or_DropPickedItem
void sub_421B2C_PlaceInInventory_or_DropPickedItem()
Definition: Party.cpp:1048
SOUND_Bless
@ SOUND_Bless
Definition: AudioPlayer.h:100
Player::GetActualAC
int GetActualAC()
Definition: Player.cpp:2452
game_ui_monster_hp_yellow
Image * game_ui_monster_hp_yellow
Definition: UIGame.cpp:62
MonsterInfo::uAttack2DamageBonus
uint8_t uAttack2DamageBonus
Definition: Monsters.h:144
game_ui_monster_hp_green
Image * game_ui_monster_hp_green
Definition: UIGame.cpp:61
OBJECT_Decoration
@ OBJECT_Decoration
Definition: Actor.h:69
MonsterInfo::uTreasureDropChance
uint8_t uTreasureDropChance
Definition: Monsters.h:123
Actor::Die
static void Die(unsigned int uActorID)
Definition: Actor.cpp:1906
AttackingRanged1
@ AttackingRanged1
Definition: Actor.h:78
SPRITE_PROJECTILE_500
@ SPRITE_PROJECTILE_500
Definition: SpriteObject.h:10
SPELL_DARK_SHARPMETAL
@ SPELL_DARK_SHARPMETAL
Definition: Spells.h:113
Actor::uGroup
unsigned int uGroup
Definition: Actor.h:317
SPELL_WATER_ICE_BOLT
@ SPELL_WATER_ICE_BOLT
Definition: Spells.h:40
SPELL_FIRE_METEOR_SHOWER
@ SPELL_FIRE_METEOR_SHOWER
Definition: Spells.h:21
SPEECH_51
@ SPEECH_51
Definition: Player.h:97
ItemGen::Reset
void Reset()
Definition: Items.cpp:133
SPELL_TYPE
SPELL_TYPE
Definition: Spells.h:10
Player::pActiveSkills
std::array< unsigned __int16, 37 > pActiveSkills
Definition: Player.h:711
GameTime::value
int64_t value
Definition: Time.h:99
pPlayers
NZIArray< struct Player *, 5 > pPlayers
Definition: Player.cpp:46
MonsterInfo::uSpecialAbilityDamageDiceSides
uint8_t uSpecialAbilityDamageDiceSides
Definition: Monsters.h:165
SpriteObject::uSpriteFrameID
unsigned __int16 uSpriteFrameID
Definition: SpriteObject.h:224
BBox_short_::z2
int16_t z2
Definition: VectorTypes.h:119
Actor::AI_Stand
static void AI_Stand(unsigned int uActorID, unsigned int object_to_face_pid, unsigned int uActionLength, struct AIDirection *a4)
Definition: Actor.cpp:1109
pIndoor
IndoorLocation * pIndoor
Definition: Indoor.cpp:49
ItemGen::uEnchantmentType
int uEnchantmentType
Definition: Items.h:327
ACTOR_BUFF_AFRAID
@ ACTOR_BUFF_AFRAID
Definition: Actor.h:42
pTurnEngine
struct stru262_TurnBased * pTurnEngine
Definition: TurnEngine.cpp:21
ACTOR_BUFF_FATE
@ ACTOR_BUFF_FATE
Definition: Actor.h:49
Dead
@ Dead
Definition: Actor.h:80
Resurrected
@ Resurrected
Definition: Actor.h:91
ACTOR_BUFF_SHRINK
@ ACTOR_BUFF_SHRINK
Definition: Actor.h:41
Player::GetMainHandItem
ItemGen * GetMainHandItem()
Definition: Player.cpp:7542
Tethered
@ Tethered
Definition: Actor.h:76
result
GLuint64EXT * result
Definition: SDL_opengl_glext.h:9435
pMapStats
struct MapStats * pMapStats
Definition: mm7_data.cpp:20
MonsterInfo::uSpecialAbilityDamageDiceRolls
uint8_t uSpecialAbilityDamageDiceRolls
Definition: Monsters.h:164
SpriteObject::uObjectDescID
unsigned __int16 uObjectDescID
Definition: SpriteObject.h:217
SPELL_FIRE_FIRE_BOLT
@ SPELL_FIRE_FIRE_BOLT
Definition: Spells.h:14
AIDirection
Definition: Actor.h:126
Party::pPartyBuffs
std::array< SpellBuff, 20 > pPartyBuffs
Definition: Party.h:309
Actor::AI_SpellAttack2
static void AI_SpellAttack2(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir)
Definition: Actor.cpp:1412
Actor::uAIState
AIState uAIState
Definition: Actor.h:307
OBJECT_Actor
@ OBJECT_Actor
Definition: Actor.h:67
uLevelMapStatsID
unsigned int uLevelMapStatsID
Definition: mm7_data.cpp:713
Actor::AI_RangedAttack
static void AI_RangedAttack(unsigned int uActorID, struct AIDirection *a2, int type, char a4)
Definition: Actor.cpp:747
SpellBuff::Reset
void Reset()
Definition: Spells.cpp:337
Party::uPartyHeight
unsigned int uPartyHeight
Definition: Party.h:237
ai_near_actors_distances
std::array< int, 500 > ai_near_actors_distances
Definition: mm7_data.cpp:504
MONSTER_MOVEMENT_TYPE_GLOBAL
@ MONSTER_MOVEMENT_TYPE_GLOBAL
Definition: Monsters.h:63
Actor::ApplyFineForKillingPeasant
static void ApplyFineForKillingPeasant(unsigned int uActorID)
Definition: Actor.cpp:1223
SpriteObject::field_61
char field_61
Definition: SpriteObject.h:235
MONSTER_HARPY_2
@ MONSTER_HARPY_2
Definition: Monsters.h:22
Party::AddItemToParty
bool AddItemToParty(ItemGen *pItem)
Definition: Party.cpp:1096
MonsterInfo::uTreasureDiceRolls
uint8_t uTreasureDiceRolls
Definition: Monsters.h:124
pItemsTable
struct ItemsTable * pItemsTable
Definition: Items.cpp:37
Party::PartyFindsGold
void PartyFindsGold(unsigned int uNumGold, int _1_dont_share_with_followers___2_the_same_but_without_a_message__else_normal)
Definition: Party.cpp:976
SPRITE_PROJECTILE_525
@ SPRITE_PROJECTILE_525
Definition: SpriteObject.h:20
decal_builder
static DecalBuilder * decal_builder
Definition: Actor.cpp:35
GetAlertStatus
int GetAlertStatus()
Definition: Indoor.cpp:5287
Actor::StandAwhile
static void StandAwhile(unsigned int uActorID)
Definition: Actor.cpp:1137
Actor::uLastCharacterIDToHit
unsigned int uLastCharacterIDToHit
Definition: Actor.h:321
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
MONSTER_MOVEMENT_TYPE_MEDIUM
@ MONSTER_MOVEMENT_TYPE_MEDIUM
Definition: Monsters.h:61
ItemGen::special_enchantment
ITEM_ENCHANTMENT special_enchantment
Definition: Items.h:330
ItemGen::uMaxCharges
char uMaxCharges
Definition: Items.h:351
IndoorCameraD3D::vPartyPos
Vec3< int > vPartyPos
Definition: IndoorCameraD3D.h:253
AIDirection::uYawAngle
unsigned int uYawAngle
Definition: Actor.h:130
SPELL_DARK_SOULDRINKER
@ SPELL_DARK_SOULDRINKER
Definition: Spells.h:119
MONSTER_SPECIAL_ABILITY_EXPLODE
@ MONSTER_SPECIAL_ABILITY_EXPLODE
Definition: Monsters.h:56
Vec2::y
T y
Definition: VectorTypes.h:13
DMGT_MAGICAL
@ DMGT_MAGICAL
Definition: Items.h:16
SPELL_LASER_PROJECTILE
@ SPELL_LASER_PROJECTILE
Definition: Spells.h:123
DAMAGE_TYPE
DAMAGE_TYPE
Definition: Items.h:10
SpriteObject::vPosition
struct Vec3_int_ vPosition
Definition: SpriteObject.h:218
pParty
Party * pParty
Definition: Party.cpp:30
Image
Definition: Image.h:19
MonsterInfo::uSpecialAbilityType
uint8_t uSpecialAbilityType
Definition: Monsters.h:160
MonsterInfo::uAIType
uint8_t uAIType
Definition: Monsters.h:130
MonsterInfo::uResEarth
uint8_t uResEarth
Definition: Monsters.h:153
Fidgeting
@ Fidgeting
Definition: Actor.h:84
MonsterInfo::uMissleAttack2Type
uint8_t uMissleAttack2Type
Definition: Monsters.h:145
MONSTER_MOVEMENT_TYPE_LONG
@ MONSTER_MOVEMENT_TYPE_LONG
Definition: Monsters.h:62
SPEECH_52
@ SPEECH_52
Definition: Player.h:98
Actor::uCurrentActionTime
unsigned int uCurrentActionTime
Definition: Actor.h:312
ACTOR_BUFF_CHARM
@ ACTOR_BUFF_CHARM
Definition: Actor.h:39
stru141_actor_collision_object::sMinY
int sMinY
Definition: Indoor.h:179
Party::bFlying
unsigned int bFlying
Definition: Party.h:266
MonsterInfo::uResSpirit
uint8_t uResSpirit
Definition: Monsters.h:155
SPRITE_PROJECTILE_510
@ SPRITE_PROJECTILE_510
Definition: SpriteObject.h:14
ACTOR_BUFF_PARALYZED
@ ACTOR_BUFF_PARALYZED
Definition: Actor.h:44
Actor::AI_Pursue2
static void AI_Pursue2(unsigned int uActorID, unsigned int a2, signed int uActionLength, struct AIDirection *pDir, int a5)
Definition: Actor.cpp:2114
MonsterInfo::uSpell1UseChance
uint8_t uSpell1UseChance
Definition: Monsters.h:146
Actor::ResetHostile
void ResetHostile()
Definition: Actor.h:183
SPRITE_PROJECTILE_515
@ SPRITE_PROJECTILE_515
Definition: SpriteObject.h:16
OBJECT_BModel
@ OBJECT_BModel
Definition: Actor.h:70
ITEM_TROLL_BLOOD
@ ITEM_TROLL_BLOOD
Definition: Items.h:102
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
GameTime::FromMinutes
static GameTime FromMinutes(int minutes)
Definition: Time.h:86
MonsterInfo::uResPhysical
uint8_t uResPhysical
Definition: Monsters.h:159
AudioPlayer::PlaySpellSound
void PlaySpellSound(unsigned int spell, unsigned int pid)
Definition: AudioPlayer.cpp:476
MonsterInfo::uSpellSkillAndMastery1
uint16_t uSpellSkillAndMastery1
Definition: Monsters.h:171
ABILITY_SPELL2
@ ABILITY_SPELL2
Definition: Actor.h:34
stru141_actor_collision_object::field_7C
int field_7C
Definition: Indoor.h:172
SPRITE_PROJECTILE_520
@ SPRITE_PROJECTILE_520
Definition: SpriteObject.h:18
viewparams
struct ViewingParams * viewparams
Definition: mm7_data.cpp:22
ItemsTable::GenerateItem
void GenerateItem(int treasure_level, unsigned int uTreasureType, ItemGen *pItem)
Definition: Items.cpp:680
Disabled
@ Disabled
Definition: Actor.h:94
MONSTER_MOVEMENT_TYPE_SHORT
@ MONSTER_MOVEMENT_TYPE_SHORT
Definition: Monsters.h:60
uchar
unsigned char uchar
Definition: MM7.h:44
Condition_Dead
@ Condition_Dead
Definition: Conditions.h:22
Actor::uAttributes
unsigned int uAttributes
Definition: Actor.h:289
MonsterInfo::uID
uint16_t uID
Definition: Monsters.h:169
Actor::special_ability_use_check
ABILITY_INDEX special_ability_use_check(int a2)
Definition: Actor.cpp:4237
ACTOR_BUFF_SOMETHING_THAT_HALVES_AC
@ ACTOR_BUFF_SOMETHING_THAT_HALVES_AC
Definition: Actor.h:46
BBox_short_::y2
int16_t y2
Definition: VectorTypes.h:117
ItemGen::uItemID
int uItemID
Definition: Items.h:326
MonsterInfo::uExp
unsigned int uExp
Definition: Monsters.h:177
SPELL_LIGHT_DISPEL_MAGIC
@ SPELL_LIGHT_DISPEL_MAGIC
Definition: Spells.h:99
ABILITY_SPELL1
@ ABILITY_SPELL1
Definition: Actor.h:33
DMGT_COLD
@ DMGT_COLD
Definition: Items.h:13
ItemGen::GetPlayerSkillType
unsigned char GetPlayerSkillType()
Definition: Items.cpp:1512
v1
GLfloat GLfloat v1
Definition: SDL_opengl_glext.h:694
SpriteObject::spell_id
int spell_id
Definition: SpriteObject.h:228
Actor::uTetherDistance
uint16_t uTetherDistance
Definition: Actor.h:306
SPELL_BODY_HAMMERHANDS
@ SPELL_BODY_HAMMERHANDS
Definition: Spells.h:91
IndoorLocation::dlv
struct DDM_DLV_Header dlv
Definition: Indoor.h:648
Log::Warning
void Warning(const wchar_t *pFormat,...)
Definition: Log.cpp:28
ACTOR_BUFF_HASTE
@ ACTOR_BUFF_HASTE
Definition: Actor.h:57
SOUND_9armageddon01
@ SOUND_9armageddon01
Definition: AudioPlayer.h:104
Actor::Remove
void Remove()
Definition: Actor.cpp:2504
DMGT_LIGHT
@ DMGT_LIGHT
Definition: Items.h:20
MonsterInfo::bQuestMonster
uint16_t bQuestMonster
Definition: Monsters.h:170
_4DF380_hostilityRanges
std::array< uint, 5 > _4DF380_hostilityRanges
Definition: Actor.cpp:43
Actor::GetDirectionInfo
static void GetDirectionInfo(unsigned int uObj1ID, unsigned int uObj2ID, struct AIDirection *pOut, int a4)
Definition: Actor.cpp:890
fixpoint_mul
__int64 fixpoint_mul(int a1, int a2)
Definition: OurMath.cpp:138
pActors
std::array< Actor, 500 > pActors
Definition: Actor.cpp:38
int32_t
signed __int32 int32_t
Definition: SDL_config.h:38
SpriteFrameTable::pSpriteSFrames
SpriteFrame * pSpriteSFrames
Definition: Sprites.h:77
Actor::uActorRadius
uint16_t uActorRadius
Definition: Actor.h:295
MONSTER_OOZE_3
@ MONSTER_OOZE_3
Definition: Monsters.h:28
ITEM_OOZE_ENDOPLASM_VIAL
@ ITEM_OOZE_ENDOPLASM_VIAL
Definition: Items.h:117
PLAYER_SKILL_MACE
@ PLAYER_SKILL_MACE
Definition: Player.h:177
Party::IsPartyGood
bool IsPartyGood()
Definition: Party.cpp:1141
Actor::MakeActorAIList_ODM
static void MakeActorAIList_ODM()
Definition: Actor.cpp:4457
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
SPELL_EARTH_STUN
@ SPELL_EARTH_STUN
Definition: Spells.h:49
Player::pName
char pName[16]
Definition: Player.h:637
SPELL_AIR_SHIELD
@ SPELL_AIR_SHIELD
Definition: Spells.h:30
Party::uFlags
unsigned int uFlags
Definition: Party.h:313
f
GLfloat f
Definition: SDL_opengl_glext.h:1873
ANIM_Dead
@ ANIM_Dead
Definition: Actor.h:105
MonsterStats::pInfos
MonsterInfo pInfos[265]
Definition: Monsters.h:194
type
EGLenum type
Definition: SDL_egl.h:850
Player::GetSpellSchool
unsigned int GetSpellSchool(unsigned int uSpellID)
Definition: Player.cpp:2198
DDM_DLV_Header::uReputation
int uReputation
Definition: Indoor.h:96
SPELL_BODY_POWER_CURE
@ SPELL_BODY_POWER_CURE
Definition: Spells.h:95
Actor::sNPC_ID
int16_t sNPC_ID
Definition: Actor.h:287
MonsterInfo::uAttack2DamageDiceSides
uint8_t uAttack2DamageDiceSides
Definition: Monsters.h:143
Actor::pSpriteIDs
uint16_t pSpriteIDs[8]
Definition: Actor.h:313
stru_50C198
stru319 stru_50C198
Definition: Actor.cpp:41
MonsterDesc::uMonsterRadius
uint16_t uMonsterRadius
Definition: Monsters.h:215
LEVEL_Outdoor
@ LEVEL_Outdoor
Definition: Indoor.h:287
DDM_DLV_Header
Definition: Indoor.h:82
Actor::IsNotAlive
bool IsNotAlive()
Definition: Actor.cpp:166
MonsterInfo::uMovementType
uint8_t uMovementType
Definition: Monsters.h:129
ITEM_GOLD_SMALL
@ ITEM_GOLD_SMALL
Definition: Items.h:97
Actor::uSummonerID
unsigned int uSummonerID
Definition: Actor.h:320
Player::GetMaxHealth
int GetMaxHealth()
Definition: Player.cpp:2354
SOUND_Fate
@ SOUND_Fate
Definition: AudioPlayer.h:101
Actor::ResetHasItem
void ResetHasItem()
Definition: Actor.h:182
ABILITY_ATTACK2
@ ABILITY_ATTACK2
Definition: Actor.h:32
ANIM_AtkMelee
@ ANIM_AtkMelee
Definition: Actor.h:101
MonsterInfo::Hostility_Long
@ Hostility_Long
Definition: Monsters.h:115
int64
ll int64
Definition: MM7.h:57
Actor::AddBloodsplatOnDamageOverlay
static void AddBloodsplatOnDamageOverlay(unsigned int uActorID, int a2, int a3)
Definition: Actor.cpp:1257
Actor::_SelectTarget
static void _SelectTarget(unsigned int uActorID, int *a2, bool can_target_party)
Definition: Actor.cpp:2230
SpellBuff::expire_time
GameTime expire_time
Definition: Spells.h:165
AIDirection::uDistance
unsigned int uDistance
Definition: Actor.h:128
ITEM_ENCHANTMENT
ITEM_ENCHANTMENT
Definition: Items.h:38
pCurrentMapName
String pCurrentMapName
Definition: mm7_data.cpp:712
Actor::uSectorID
int16_t uSectorID
Definition: Actor.h:302
Removed
@ Removed
Definition: Actor.h:86
Interacting
@ Interacting
Definition: Actor.h:85
Actor::_4273BB_DoesHitOtherActor
bool _4273BB_DoesHitOtherActor(Actor *defender, int a3, int a4)
Definition: Actor.cpp:4262
stru141_actor_collision_object::sMaxX
int sMaxX
Definition: Indoor.h:176
flt_6BE3A8_debug_recmod2
float flt_6BE3A8_debug_recmod2
Definition: mm7_data.cpp:717
AIDirection::uPitchAngle
signed int uPitchAngle
Definition: Actor.h:131
stru141_actor_collision_object::sMinX
int sMinX
Definition: Indoor.h:177
PlayerEquipment::uMainHand
unsigned int uMainHand
Definition: Player.h:320
DMGT_ELECTR
@ DMGT_ELECTR
Definition: Items.h:12
Actor::AI_Pursue3
static void AI_Pursue3(unsigned int uActorID, unsigned int a2, signed int uActionLength, struct AIDirection *a4)
Definition: Actor.cpp:2171
game_ui_monster_hp_background
Image * game_ui_monster_hp_background
Definition: UIGame.cpp:64
stru262_TurnBased::AITurnBasedAction
void AITurnBasedAction()
Definition: TurnEngine.cpp:260
DMGT_BODY
@ DMGT_BODY
Definition: Items.h:19
BLVFace::pBounding
struct BBox_short_ pBounding
Definition: Indoor.h:486
pMiscTimer
Timer * pMiscTimer
Definition: Time.cpp:7
stru141_actor_collision_object::sMaxY
int sMaxY
Definition: Indoor.h:178
pSpellStats
struct SpellStats * pSpellStats
Definition: Spells.cpp:32
SpriteFrameTable::InitializeSprite
void InitializeSprite(signed int uSpriteID)
Definition: Sprites.cpp:46
Party::GetPartyReputation
int GetPartyReputation()
Definition: Party.cpp:922
OutdoorLocation::ddm
struct DDM_DLV_Header ddm
Definition: Outdoor.h:131
SPRITE_PROJECTILE_505
@ SPRITE_PROJECTILE_505
Definition: SpriteObject.h:12
FactionTable::relations
char relations[89][89]
Definition: FactionTable.h:8
stru319::_427546
int _427546(int a2)
Definition: Actor.cpp:3862
LEVEL_Indoor
@ LEVEL_Indoor
Definition: Indoor.h:286
Party::GivePartyExp
void GivePartyExp(unsigned int pEXPNum)
Definition: Party.cpp:938
SpriteObject::Create
int Create(int yaw, int pitch, int a4, int a5)
Definition: SpriteObject.cpp:56
SpriteObject::containing_item
struct ItemGen containing_item
Definition: SpriteObject.h:227
SPELL_FIRE_FIREBALL
@ SPELL_FIRE_FIREBALL
Definition: Spells.h:18
stru298::Add
void Add(int16_t uID, int16_t a3, int16_t x, int16_t y, int16_t z, char a7, char a8)
Definition: stru298.cpp:4
MonsterDesc
Definition: Monsters.h:213
EQUIP_TWO_HANDED
@ EQUIP_TWO_HANDED
Definition: Items.h:228
SPRITE_OBJECT_TYPE
SPRITE_OBJECT_TYPE
Definition: SpriteObject.h:5
distance
GLsizei GLsizei GLfloat distance
Definition: SDL_opengl_glext.h:9203
MonsterInfo::uResMind
uint8_t uResMind
Definition: Monsters.h:154
OBJECT_Player
@ OBJECT_Player
Definition: Actor.h:68
Party::bTurnBasedModeOn
bool bTurnBasedModeOn
Definition: Party.h:305
Summoned
@ Summoned
Definition: Actor.h:92
ACTOR_BUFF_HOUR_OF_POWER
@ ACTOR_BUFF_HOUR_OF_POWER
Definition: Actor.h:52
Player::conditions_times
std::array< GameTime, 20 > conditions_times
Definition: Player.h:635
ItemGen::uNumCharges
int uNumCharges
Definition: Items.h:348
SPELL_SPIRIT_BLESS
@ SPELL_SPIRIT_BLESS
Definition: Spells.h:62
MonsterStats::BelongsToSupertype
static bool BelongsToSupertype(unsigned int uMonsterInfoID, enum MONSTER_SUPERTYPE eSupertype)
Definition: Monsters.cpp:1200
SpriteObject::uSoundID
unsigned __int16 uSoundID
Definition: SpriteObject.h:221
SpriteFrameTable::FastFindSprite
int FastFindSprite(const char *pSpriteName)
Definition: Sprites.cpp:243
_4D864C_force_sw_render_rules
char _4D864C_force_sw_render_rules
Definition: mm7_data.cpp:208
ITEM_HARPY_FEATHER
@ ITEM_HARPY_FEATHER
Definition: Items.h:107
Party::armageddon_timer
int armageddon_timer
Definition: Party.h:320
MonsterList::pMonsters
struct MonsterDesc * pMonsters
Definition: Monsters.h:237
MONSTER_TROLL_1
@ MONSTER_TROLL_1
Definition: Monsters.h:42
Actor::vInitialPosition
struct Vec3_short_ vInitialPosition
Definition: Actor.h:304
Player::GetOffHandItem
ItemGen * GetOffHandItem()
Definition: Player.cpp:7540
MonsterInfo::uAttack1DamageDiceRolls
uint8_t uAttack1DamageDiceRolls
Definition: Monsters.h:136
Actor::ResetAnimation
void ResetAnimation()
Definition: Actor.h:178
ACTOR_BUFF_SHIELD
@ ACTOR_BUFF_SHIELD
Definition: Actor.h:53
MONSTER_SUPERTYPE_TREANT
@ MONSTER_SUPERTYPE_TREANT
Definition: Monsters.h:75
MonsterInfo::uResAir
uint8_t uResAir
Definition: Monsters.h:151
MONSTER_OOZE_2
@ MONSTER_OOZE_2
Definition: Monsters.h:27
stru193_math::Atan2
unsigned int Atan2(int x, int y)
Definition: OurMath.cpp:46
SpriteFrame::uAnimLength
int uAnimLength
Definition: Sprites.h:53
pOtherOverlayList
struct OtherOverlayList * pOtherOverlayList
Definition: Overlays.cpp:19
SOUND_Stoneskin
@ SOUND_Stoneskin
Definition: AudioPlayer.h:99
SpellBuff::Expired
bool Expired() const
Definition: Spells.h:163
Actor::ActorEnemy
bool ActorEnemy() const
Definition: Actor.h:185
SPELL_AIR_SPARKS
@ SPELL_AIR_SPARKS
Definition: Spells.h:28
SpriteObject::spell_level
int spell_level
Definition: SpriteObject.h:229
Actor::sCurrentHP
int16_t sCurrentHP
Definition: Actor.h:290
SpellBuff::uCaster
unsigned __int8 uCaster
Definition: Spells.h:169
game_ui_monster_hp_border_right
Image * game_ui_monster_hp_border_right
Definition: UIGame.cpp:66
Actor::AggroSurroundingPeasants
static void AggroSurroundingPeasants(unsigned int uActorID, int a2)
Definition: Actor.cpp:717
ITEM_NULL
@ ITEM_NULL
Definition: Items.h:74
MonsterInfo::uHP
unsigned int uHP
Definition: Monsters.h:175
stru141_actor_collision_object::prolly_normal_d
int prolly_normal_d
Definition: Indoor.h:152
ACTOR_BUFF_STONED
@ ACTOR_BUFF_STONED
Definition: Actor.h:43
pMonsterList
struct MonsterList * pMonsterList
Definition: Monsters.cpp:9
ANIM_Bored
@ ANIM_Bored
Definition: Actor.h:106
SpellBuff::Active
bool Active() const
Definition: Spells.h:162
SpriteObject::spell_target_pid
int spell_target_pid
Definition: SpriteObject.h:233
Actor::Explode
static void Explode(unsigned int uActorID)
Definition: Actor.cpp:850
spell_fx_renderer
static SpellFxRenderer * spell_fx_renderer
Definition: Actor.cpp:36
MONSTER_MOVEMENT_TYPE_STAIONARY
@ MONSTER_MOVEMENT_TYPE_STAIONARY
Definition: Monsters.h:65
SPELL_SPIRIT_FATE
@ SPELL_SPIRIT_FATE
Definition: Spells.h:63
v2
GLfloat GLfloat GLfloat v2
Definition: SDL_opengl_glext.h:695
sub_4070EF_prolly_detect_player
bool sub_4070EF_prolly_detect_player(unsigned int uObjID, unsigned int uObj2ID)
Definition: Actor.cpp:4688
flt_6BE3A4_debug_recmod1
float flt_6BE3A4_debug_recmod1
Definition: mm7_data.cpp:716
Actor::vGuardingPosition
struct Vec3_short_ vGuardingPosition
Definition: Actor.h:305
SPELL_WATER_ACID_BURST
@ SPELL_WATER_ACID_BURST
Definition: Spells.h:43
SPELL_DARK_DRAGON_BREATH
@ SPELL_DARK_DRAGON_BREATH
Definition: Spells.h:117
SPRITE_ARROW_PROJECTILE
@ SPRITE_ARROW_PROJECTILE
Definition: SpriteObject.h:28
ANIM_Walking
@ ANIM_Walking
Definition: Actor.h:100
integer_sqrt
int integer_sqrt(int val)
Definition: OurMath.cpp:164
uint
unsigned int uint
Definition: MM7.h:4
MonsterInfo::uSpell2ID
uint8_t uSpell2ID
Definition: Monsters.h:149
uActiveCharacter
unsigned int uActiveCharacter
Definition: mm7_data.cpp:555
v3
GLfloat GLfloat GLfloat GLfloat v3
Definition: SDL_opengl_glext.h:696
Localization::FormatString
String FormatString(unsigned int index,...) const
Definition: Localization.cpp:17
Party::IsPartyEvil
bool IsPartyEvil()
Definition: Party.cpp:1139
_449B7E_toggle_bit
void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle)
Definition: Party.cpp:1190
ShouldMonsterPlayAttackAnim
bool ShouldMonsterPlayAttackAnim(signed int spell_id)
Definition: Actor.cpp:47
Fleeing
@ Fleeing
Definition: Actor.h:82
Actor::AI_Flee
static void AI_Flee(unsigned int uActorID, signed int edx0, int uActionLength, struct AIDirection *a4)
Definition: Actor.cpp:2070
Actor::AI_MissileAttack2
static void AI_MissileAttack2(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir)
Definition: Actor.cpp:1561
Actor::ResetAggressor
void ResetAggressor()
Definition: Actor.h:184
MapInfo::_steal_perm
int _steal_perm
Definition: MapInfo.h:47
AttackerInfo
stru298 AttackerInfo
Definition: mm7_data.cpp:24
SOUND_94dayofprotection03
@ SOUND_94dayofprotection03
Definition: AudioPlayer.h:103
SpellBuff::uPower
unsigned __int16 uPower
Definition: Spells.h:166
SpriteObject::sub_42F7EB_DropItemAt
static bool sub_42F7EB_DropItemAt(SPRITE_OBJECT_TYPE sprite, int x, int y, int z, int a4, int count, int a7, unsigned __int16 attributes, ItemGen *a9)
Definition: SpriteObject.cpp:937
Actor::GetActorsRelation
signed int GetActorsRelation(Actor *a2)
Definition: Actor.cpp:2319
Actor::MakeActorAIList_BLV
static int MakeActorAIList_BLV()
Definition: Actor.cpp:4556
GameUI_StatusBar_OnEvent
void GameUI_StatusBar_OnEvent(const String &str, unsigned int num_seconds)
Definition: UIStatusBar.cpp:33
stru141_actor_collision_object::direction
Vec3_int_ direction
Definition: Indoor.h:165
SPRITE_OBJECT_EXPLODE
@ SPRITE_OBJECT_EXPLODE
Definition: SpriteObject.h:32
Party::SetHoldingItem
void SetHoldingItem(ItemGen *pItem)
Definition: Party.cpp:150
Player::sHealth
int sHealth
Definition: Player.h:766
Player::PlaySound
void PlaySound(PlayerSpeech speech, int a3)
Definition: Player.cpp:7874
MONSTER_DRAGON_2
@ MONSTER_DRAGON_2
Definition: Monsters.h:11
SpriteObject::spell_skill
int spell_skill
Definition: SpriteObject.h:230
SPELL_EARTH_BLADES
@ SPELL_EARTH_BLADES
Definition: Spells.h:54
stru193_math::Cos
int Cos(int angle)
Definition: OurMath.cpp:28
MONSTER_DEVIL_2
@ MONSTER_DEVIL_2
Definition: Monsters.h:8
MonsterDesc::uMovementSpeed
uint16_t uMovementSpeed
Definition: Monsters.h:216
Actor::uAlly
unsigned int uAlly
Definition: Actor.h:318
Actor::ActorHasItem
bool ActorHasItem() const
Definition: Actor.h:191
SPELL_BOW_ARROW
@ SPELL_BOW_ARROW
Definition: Spells.h:121
stru_5C6E00
struct stru193_math * stru_5C6E00
Definition: mm7_data.cpp:19
MONSTER_HARPY_1
@ MONSTER_HARPY_1
Definition: Monsters.h:21
ViewingParams::bRedrawGameUI
int bRedrawGameUI
Definition: Viewport.h:74
MonsterInfo::field_33
char field_33
Definition: Monsters.h:168
ACTOR_BUFF_SUMMONED
@ ACTOR_BUFF_SUMMONED
Definition: Actor.h:40
SoundID
SoundID
Definition: AudioPlayer.h:10
MonsterInfo::uTreasureDiceSides
uint8_t uTreasureDiceSides
Definition: Monsters.h:125
ANIM_AtkRanged
@ ANIM_AtkRanged
Definition: Actor.h:102
Actor::uCurrentActionLength
uint16_t uCurrentActionLength
Definition: Actor.h:303
Actor::uMovementSpeed
uint16_t uMovementSpeed
Definition: Actor.h:297
AIState
AIState
Definition: Actor.h:74
uCurrentlyLoadedLevelType
LEVEL_TYPE uCurrentlyLoadedLevelType
Definition: Indoor.cpp:52
MonsterInfo::pName
char * pName
Definition: Monsters.h:120
stru_721530
stru141_actor_collision_object stru_721530
Definition: Indoor.cpp:58
Actor::pActorName
char pActorName[32]
Definition: Actor.h:286
ACTOR_BUFF_STONESKIN
@ ACTOR_BUFF_STONESKIN
Definition: Actor.h:54
IndoorLocation::GetSector
int GetSector(int sX, int sY, int sZ)
Definition: Indoor.cpp:1279
IndoorLocation::pFaces
struct BLVFace * pFaces
Definition: Indoor.h:630
SOUND_51heroism03
@ SOUND_51heroism03
Definition: AudioPlayer.h:102
ACTOR_BUFF_BLESS
@ ACTOR_BUFF_BLESS
Definition: Actor.h:55
MonsterInfo::uSpellSkillAndMastery2
uint16_t uSpellSkillAndMastery2
Definition: Monsters.h:172
MONSTER_DRAGON_1
@ MONSTER_DRAGON_1
Definition: Monsters.h:10
ITEM_ENCHANTMENT_OF_FORCE
@ ITEM_ENCHANTMENT_OF_FORCE
Definition: Items.h:56
ObjectList::pObjects
struct ObjectDesc * pObjects
Definition: ObjectList.h:54
stru193_math::Sin
int Sin(int angle)
Definition: OurMath.cpp:133
SPELL_AIR_LIGHNING_BOLT
@ SPELL_AIR_LIGHNING_BOLT
Definition: Spells.h:31
BBox_short_::x2
int16_t x2
Definition: VectorTypes.h:115
pAudioPlayer
AudioPlayer * pAudioPlayer
Definition: AudioPlayer.cpp:20
Actor::uYawAngle
uint16_t uYawAngle
Definition: Actor.h:300
Player::GetActualSkillLevel
int GetActualSkillLevel(PLAYER_SKILL_TYPE uSkillType)
Definition: Player.cpp:3017
Condition_Eradicated
@ Condition_Eradicated
Definition: Conditions.h:24
DMGT_EARTH
@ DMGT_EARTH
Definition: Items.h:14
Player::HasItemEquipped
bool HasItemEquipped(ITEM_EQUIP_TYPE uEquipIndex)
Definition: Player.cpp:1583
Actor::GetObjDescId
static unsigned short GetObjDescId(int spellId)
Definition: Actor.cpp:696
ItemGen
Definition: Items.h:263
Actor::AI_Bored
static void AI_Bored(unsigned int uActorID, unsigned int uObjID, struct AIDirection *a4)
Definition: Actor.cpp:1853
SPRITE_PROJECTILE_540
@ SPRITE_PROJECTILE_540
Definition: SpriteObject.h:26
logger
Log * logger
Definition: IocContainer.cpp:47
CastSpellInfoHelpers::Cancel_Spell_Cast_In_Progress
void Cancel_Spell_Cast_In_Progress()
Definition: CastSpellInfo.cpp:4350
PlayerSpeech
PlayerSpeech
Definition: Player.h:46
Actor::PrepareSprites
void PrepareSprites(char load_sounds_if_bit1_set)
Definition: Actor.cpp:2481
SOUND_Sacrifice2
@ SOUND_Sacrifice2
Definition: AudioPlayer.h:105
PLAYER_BUFF_HAMMERHANDS
@ PLAYER_BUFF_HAMMERHANDS
Definition: Player.h:20
SPELL_DARK_TOXIC_CLOUD
@ SPELL_DARK_TOXIC_CLOUD
Definition: Spells.h:110
ACTOR_BUFF_PAIN_HAMMERHANDS
@ ACTOR_BUFF_PAIN_HAMMERHANDS
Definition: Actor.h:59
Condition_Pertified
@ Condition_Pertified
Definition: Conditions.h:23
pOutdoor
OutdoorLocation * pOutdoor
Definition: Outdoor.cpp:48
MonsterInfo::uAttack2DamageDiceRolls
uint8_t uAttack2DamageDiceRolls
Definition: Monsters.h:142
SpellBuff::Apply
bool Apply(GameTime time, unsigned __int16 uSkillLevel, unsigned __int16 uPower, int uOverlayID, unsigned __int8 caster)
Definition: Spells.cpp:363
SPRITE_PROJECTILE_550
@ SPRITE_PROJECTILE_550
Definition: SpriteObject.h:29
ACTOR_BUFF_BERSERK
@ ACTOR_BUFF_BERSERK
Definition: Actor.h:47
MonsterInfo::uResWater
uint8_t uResWater
Definition: Monsters.h:152
SpriteObject::uAttributes
unsigned __int16 uAttributes
Definition: SpriteObject.h:222
game_ui_monster_hp_red
Image * game_ui_monster_hp_red
Definition: UIGame.cpp:63
BBox_short_::z1
int16_t z1
Definition: VectorTypes.h:118
Actor::uCurrentActionAnimation
uint16_t uCurrentActionAnimation
Definition: Actor.h:308
pIndoorCameraD3D
IndoorCameraD3D * pIndoorCameraD3D
Definition: IndoorCameraD3D.cpp:21
MonsterInfo::uTreasureLevel
uint8_t uTreasureLevel
Definition: Monsters.h:126
Actor::pMonsterInfo
struct MonsterInfo pMonsterInfo
Definition: Actor.h:292
ai_near_actors_ids
std::array< unsigned int, 500 > ai_near_actors_ids
Definition: mm7_data.cpp:505
Actor::ActorNearby
bool ActorNearby() const
Definition: Actor.h:194
stru262_TurnBased::pending_actions
int pending_actions
Definition: TurnEngine.h:81
game_ui_monster_hp_border_left
Image * game_ui_monster_hp_border_left
Definition: UIGame.cpp:65
SPELL_FIRE_HASTE
@ SPELL_FIRE_HASTE
Definition: Spells.h:17
Player::pEquipment
PlayerEquipment pEquipment
Definition: Player.h:769
MONSTER_DRAGON_3
@ MONSTER_DRAGON_3
Definition: Monsters.h:12
MonsterInfo
Definition: Monsters.h:109
SpellFxRenderer::_4A7E89_sparkles_on_actor_after_it_casts_buff
void _4A7E89_sparkles_on_actor_after_it_casts_buff(struct Actor *pActor, unsigned int uDiffuse)
Definition: SpellFxRenderer.cpp:576
BLV_GetFloorLevel
int BLV_GetFloorLevel(int x, int y, int z, unsigned int uSectorID, unsigned int *pFaceID)
Definition: Indoor.cpp:2530
Party::sRotationY
int sRotationY
Definition: Party.h:251
Actor::word_000086_some_monster_id
int16_t word_000086_some_monster_id
Definition: Actor.h:294
MonsterInfo::uFlying
uint8_t uFlying
Definition: Monsters.h:128
stru193_math::uIntegerPi
static const unsigned int uIntegerPi
Definition: OurMath.h:88
String
std::string String
Definition: Strings.h:10
ITEM_DEVIL_ICHOR
@ ITEM_DEVIL_ICHOR
Definition: Items.h:114
AIDirection::vDirection
Vec3_int_ vDirection
Definition: Actor.h:127
Pursuing
@ Pursuing
Definition: Actor.h:81
Actor::AI_SpellAttack1
static void AI_SpellAttack1(unsigned int uActorID, signed int sTargetPid, struct AIDirection *pDir)
Definition: Actor.cpp:1486
GameTime
Definition: Time.h:14
Actor::_427102_IsOkToCastSpell
bool _427102_IsOkToCastSpell(enum SPELL_TYPE spell)
Definition: Actor.cpp:4192
Party::monster_for_hunting_killed
std::array< __int16, 5 > monster_for_hunting_killed
Definition: Party.h:289
Player::pPlayerBuffs
std::array< SpellBuff, 24 > pPlayerBuffs
Definition: Player.h:756
MonsterInfo::uRecoveryTime
signed int uRecoveryTime
Definition: Monsters.h:179
SPELL_FIRE_INCINERATE
@ SPELL_FIRE_INCINERATE
Definition: Spells.h:23
Stunned
@ Stunned
Definition: Actor.h:83
MonsterInfo::uLevel
uint8_t uLevel
Definition: Monsters.h:122
Party::SetRedAlert
void SetRedAlert()
Definition: Party.h:224
pObjectList
struct ObjectList * pObjectList
Definition: ObjectList.cpp:5
SPELL_SPIRIT_HEROISM
@ SPELL_SPIRIT_HEROISM
Definition: Spells.h:67
Party::Invisible
bool Invisible()
Definition: Party.h:217
Party::monster_id_for_hunting
std::array< __int16, 5 > monster_id_for_hunting
Definition: Party.h:288
ItemsTable::pItems
NZIArray< ItemDesc, 800 > pItems
Definition: Items.h:460
SpellBuff::uFlags
unsigned __int8 uFlags
Definition: Spells.h:170
DMGT_MIND
@ DMGT_MIND
Definition: Items.h:18
SOUND_Haste
@ SOUND_Haste
Definition: AudioPlayer.h:96
MonsterDesc::uMonsterHeight
uint16_t uMonsterHeight
Definition: Monsters.h:214
SpriteObject::spell_caster_pid
int spell_caster_pid
Definition: SpriteObject.h:232
Party::armageddonDamage
int armageddonDamage
Definition: Party.h:321
Actor::SummonMinion
void SummonMinion(int summonerId)
Definition: Actor.cpp:2606
stru141_actor_collision_object::pid
unsigned int pid
Definition: Indoor.h:171
AttackingRanged3
@ AttackingRanged3
Definition: Actor.h:88
_43AFE3_calc_spell_damage
int _43AFE3_calc_spell_damage(int spellId, int spellLevel, signed int skillMastery, int currentHp)
Definition: Spells.cpp:745
ACTOR_BUFF_ENSLAVED
@ ACTOR_BUFF_ENSLAVED
Definition: Actor.h:50
stru141_actor_collision_object::sMinZ
int sMinZ
Definition: Indoor.h:181
Actor::pActorBuffs
struct SpellBuff pActorBuffs[22]
Definition: Actor.h:315
render
std::shared_ptr< IRender > render
Definition: RenderOpenGL.cpp:52