AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
CreatureBaseStats Struct Reference

#include "CreatureData.h"

Public Member Functions

uint32 GenerateHealth (CreatureTemplate const *info) const
 
uint32 GenerateMana (CreatureTemplate const *info) const
 
float GenerateArmor (CreatureTemplate const *info) const
 
float GenerateBaseDamage (CreatureTemplate const *info) const
 

Static Public Member Functions

static CreatureBaseStats const * GetBaseStats (uint8 level, uint8 unitClass)
 

Public Attributes

uint32 BaseHealth [MAX_EXPANSIONS]
 
uint32 BaseMana
 
float BaseArmor
 
uint32 AttackPower
 
uint32 RangedAttackPower
 
float BaseDamage [MAX_EXPANSIONS]
 

Detailed Description

Member Function Documentation

◆ GenerateArmor()

float CreatureBaseStats::GenerateArmor ( CreatureTemplate const *  info) const
inline
328 {
329 return std::ceil(BaseArmor * info->ModArmor);
330 }
float BaseArmor
Definition: CreatureData.h:306

References BaseArmor, and CreatureTemplate::ModArmor.

Referenced by Creature::UpdateEntry().

◆ GenerateBaseDamage()

float CreatureBaseStats::GenerateBaseDamage ( CreatureTemplate const *  info) const
inline
333 {
334 return BaseDamage[info->expansion];
335 }
float BaseDamage[MAX_EXPANSIONS]
Definition: CreatureData.h:309

References BaseDamage, and CreatureTemplate::expansion.

Referenced by Creature::SelectLevel().

◆ GenerateHealth()

uint32 CreatureBaseStats::GenerateHealth ( CreatureTemplate const *  info) const
inline
314 {
315 return uint32(std::ceil(BaseHealth[info->expansion] * info->ModHealth));
316 }
std::uint32_t uint32
Definition: Define.h:107
uint32 BaseHealth[MAX_EXPANSIONS]
Definition: CreatureData.h:304

References BaseHealth, CreatureTemplate::expansion, and CreatureTemplate::ModHealth.

Referenced by ObjectMgr::AddCreData(), and Creature::SelectLevel().

◆ GenerateMana()

uint32 CreatureBaseStats::GenerateMana ( CreatureTemplate const *  info) const
inline
319 {
320 // Mana can be 0.
321 if (!BaseMana)
322 return 0;
323
324 return uint32(std::ceil(BaseMana * info->ModMana));
325 }
uint32 BaseMana
Definition: CreatureData.h:305

References BaseMana, and CreatureTemplate::ModMana.

Referenced by ObjectMgr::AddCreData(), and Creature::SelectLevel().

◆ GetBaseStats()

CreatureBaseStats const * CreatureBaseStats::GetBaseStats ( uint8  level,
uint8  unitClass 
)
static
247{
248 return sObjectMgr->GetCreatureBaseStats(level, unitClass);
249}
#define sObjectMgr
Definition: ObjectMgr.h:1635

References sObjectMgr.

Member Data Documentation

◆ AttackPower

uint32 CreatureBaseStats::AttackPower

◆ BaseArmor

float CreatureBaseStats::BaseArmor

◆ BaseDamage

◆ BaseHealth

◆ BaseMana

◆ RangedAttackPower

uint32 CreatureBaseStats::RangedAttackPower