TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PetAura Class Reference

#include <SpellMgr.h>

Public Member Functions

 PetAura ()
 
 PetAura (uint32 petEntry, uint32 aura, bool _removeOnChangePet, int _damage)
 
uint32 GetAura (uint32 petEntry) const
 
void AddAura (uint32 petEntry, uint32 aura)
 
bool IsRemovedOnChangePet () const
 
int32 GetDamage () const
 

Private Types

typedef std::unordered_map
< uint32, uint32
PetAuraMap
 

Private Attributes

PetAuraMap auras
 
bool removeOnChangePet
 
int32 damage
 

Member Typedef Documentation

typedef std::unordered_map<uint32, uint32> PetAura::PetAuraMap
private

Constructor & Destructor Documentation

PetAura::PetAura ( )
inline
439 : removeOnChangePet(false), damage(0) { }
int32 damage
Definition: SpellMgr.h:476
bool removeOnChangePet
Definition: SpellMgr.h:475
PetAura::PetAura ( uint32  petEntry,
uint32  aura,
bool  _removeOnChangePet,
int  _damage 
)
inline
441  :
442  removeOnChangePet(_removeOnChangePet), damage(_damage)
443  {
444  auras[petEntry] = aura;
445  }
PetAuraMap auras
Definition: SpellMgr.h:474
int32 damage
Definition: SpellMgr.h:476
bool removeOnChangePet
Definition: SpellMgr.h:475

Member Function Documentation

void PetAura::AddAura ( uint32  petEntry,
uint32  aura 
)
inline
459  {
460  auras[petEntry] = aura;
461  }
PetAuraMap auras
Definition: SpellMgr.h:474
uint32 PetAura::GetAura ( uint32  petEntry) const
inline
448  {
449  PetAuraMap::const_iterator itr = auras.find(petEntry);
450  if (itr != auras.end())
451  return itr->second;
452  PetAuraMap::const_iterator itr2 = auras.find(0);
453  if (itr2 != auras.end())
454  return itr2->second;
455  return 0;
456  }
PetAuraMap auras
Definition: SpellMgr.h:474

+ Here is the caller graph for this function:

int32 PetAura::GetDamage ( ) const
inline
469  {
470  return damage;
471  }
int32 damage
Definition: SpellMgr.h:476

+ Here is the caller graph for this function:

bool PetAura::IsRemovedOnChangePet ( ) const
inline
464  {
465  return removeOnChangePet;
466  }
bool removeOnChangePet
Definition: SpellMgr.h:475

+ Here is the caller graph for this function:

Member Data Documentation

PetAuraMap PetAura::auras
private
int32 PetAura::damage
private
bool PetAura::removeOnChangePet
private

The documentation for this class was generated from the following file: