OregonCore  revision be9e804-git
Your Favourite TBC server
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 Attributes

std::map< uint32, uint32auras
 
bool removeOnChangePet
 
int32 damage
 

Detailed Description

Definition at line 728 of file SpellMgr.h.

Constructor & Destructor Documentation

PetAura::PetAura ( )
inline

Definition at line 731 of file SpellMgr.h.

731 : removeOnChangePet(false), damage(0) { auras.clear(); }
std::map< uint32, uint32 > auras
Definition: SpellMgr.h:770
int32 damage
Definition: SpellMgr.h:772
bool removeOnChangePet
Definition: SpellMgr.h:771
PetAura::PetAura ( uint32  petEntry,
uint32  aura,
bool  _removeOnChangePet,
int  _damage 
)
inline

Definition at line 733 of file SpellMgr.h.

733  :
734  removeOnChangePet(_removeOnChangePet), damage(_damage)
735  {
736  auras[petEntry] = aura;
737  }
std::map< uint32, uint32 > auras
Definition: SpellMgr.h:770
int32 damage
Definition: SpellMgr.h:772
bool removeOnChangePet
Definition: SpellMgr.h:771

Member Function Documentation

void PetAura::AddAura ( uint32  petEntry,
uint32  aura 
)
inline

Definition at line 754 of file SpellMgr.h.

755  {
756  auras[petEntry] = aura;
757  }
std::map< uint32, uint32 > auras
Definition: SpellMgr.h:770
uint32 PetAura::GetAura ( uint32  petEntry) const
inline

Definition at line 739 of file SpellMgr.h.

Referenced by Pet::CastPetAura(), and Unit::RemovePetAura().

740  {
741  std::map<uint32, uint32>::const_iterator itr = auras.find(petEntry);
742  if (itr != auras.end())
743  return itr->second;
744  else
745  {
746  std::map<uint32, uint32>::const_iterator itr = auras.find(0);
747  if (itr != auras.end())
748  return itr->second;
749  else
750  return 0;
751  }
752  }
std::map< uint32, uint32 > auras
Definition: SpellMgr.h:770
int32 PetAura::GetDamage ( ) const
inline

Definition at line 764 of file SpellMgr.h.

Referenced by Pet::CastPetAura().

765  {
766  return damage;
767  }
int32 damage
Definition: SpellMgr.h:772
bool PetAura::IsRemovedOnChangePet ( ) const
inline

Definition at line 759 of file SpellMgr.h.

Referenced by Pet::CastPetAuras().

760  {
761  return removeOnChangePet;
762  }
bool removeOnChangePet
Definition: SpellMgr.h:771

Member Data Documentation

std::map<uint32, uint32> PetAura::auras
private

Definition at line 770 of file SpellMgr.h.

int32 PetAura::damage
private

Definition at line 772 of file SpellMgr.h.

bool PetAura::removeOnChangePet
private

Definition at line 771 of file SpellMgr.h.


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