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
331 {
332 return std::ceil(BaseArmor * info->ModArmor);
333 }
float BaseArmor
Definition: CreatureData.h:309

References BaseArmor, and CreatureTemplate::ModArmor.

Referenced by Creature::UpdateEntry().

◆ GenerateBaseDamage()

float CreatureBaseStats::GenerateBaseDamage ( CreatureTemplate const *  info) const
inline
336 {
337 return BaseDamage[info->expansion];
338 }
float BaseDamage[MAX_EXPANSIONS]
Definition: CreatureData.h:312

References BaseDamage, and CreatureTemplate::expansion.

Referenced by Creature::SelectLevel().

◆ GenerateHealth()

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

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

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

◆ GenerateMana()

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

References BaseMana, and CreatureTemplate::ModMana.

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

◆ GetBaseStats()

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

References sObjectMgr.

Member Data Documentation

◆ AttackPower

uint32 CreatureBaseStats::AttackPower

◆ BaseArmor

float CreatureBaseStats::BaseArmor

◆ BaseDamage

◆ BaseHealth

◆ BaseMana

◆ RangedAttackPower

uint32 CreatureBaseStats::RangedAttackPower