TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CreatureBaseStats Struct Reference

#include <Creature.h>

Public Member Functions

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

Static Public Member Functions

static CreatureBaseStats constGetBaseStats (uint8 level, uint8 unitClass)
 

Public Attributes

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

Member Function Documentation

uint32 CreatureBaseStats::GenerateArmor ( CreatureTemplate const info) const
inline
244  {
245  return uint32(ceil(BaseArmor * info->ModArmor));
246  }
uint32 BaseArmor
Definition: Creature.h:222
uint32_t uint32
Definition: g3dmath.h:168
static Vector3int16 ceil(const Vector3 &v)
Definition: Vector3int16.cpp:55

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

float CreatureBaseStats::GenerateBaseDamage ( CreatureTemplate const info) const
inline
249  {
250  return BaseDamage[info->expansion];
251  }
float BaseDamage[MAX_EXPANSIONS]
Definition: Creature.h:225

+ Here is the caller graph for this function:

uint32 CreatureBaseStats::GenerateHealth ( CreatureTemplate const info) const
inline
230  {
231  return uint32(ceil(BaseHealth[info->expansion] * info->ModHealth * info->ModHealthExtra));
232  }
uint32 BaseHealth[MAX_EXPANSIONS]
Definition: Creature.h:220
uint32_t uint32
Definition: g3dmath.h:168
static Vector3int16 ceil(const Vector3 &v)
Definition: Vector3int16.cpp:55

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32 CreatureBaseStats::GenerateMana ( CreatureTemplate const info) const
inline
235  {
236  // Mana can be 0.
237  if (!BaseMana)
238  return 0;
239 
240  return uint32(ceil(BaseMana * info->ModMana * info->ModManaExtra));
241  }
uint32 BaseMana
Definition: Creature.h:221
uint32_t uint32
Definition: g3dmath.h:168
static Vector3int16 ceil(const Vector3 &v)
Definition: Vector3int16.cpp:55

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CreatureBaseStats const * CreatureBaseStats::GetBaseStats ( uint8  level,
uint8  unitClass 
)
static
172 {
173  return sObjectMgr->GetCreatureBaseStats(level, unitClass);
174 }
#define sObjectMgr
Definition: ObjectMgr.h:1567

Member Data Documentation

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

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