AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
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, uint32PetAuraMap
 

Private Attributes

PetAuraMap auras
 
bool removeOnChangePet {false}
 
int32 damage {0}
 

Detailed Description

Member Typedef Documentation

◆ PetAuraMap

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

Constructor & Destructor Documentation

◆ PetAura() [1/2]

PetAura::PetAura ( )
inline
476 {
477 auras.clear();
478 }
PetAuraMap auras
Definition: SpellMgr.h:513

References auras.

◆ PetAura() [2/2]

PetAura::PetAura ( uint32  petEntry,
uint32  aura,
bool  _removeOnChangePet,
int  _damage 
)
inline
480 :
481 removeOnChangePet(_removeOnChangePet), damage(_damage)
482 {
483 auras[petEntry] = aura;
484 }
int32 damage
Definition: SpellMgr.h:515
bool removeOnChangePet
Definition: SpellMgr.h:514

References auras.

Member Function Documentation

◆ AddAura()

void PetAura::AddAura ( uint32  petEntry,
uint32  aura 
)
inline
498 {
499 auras[petEntry] = aura;
500 }

References auras.

◆ GetAura()

uint32 PetAura::GetAura ( uint32  petEntry) const
inline
487 {
488 PetAuraMap::const_iterator itr = auras.find(petEntry);
489 if (itr != auras.end())
490 return itr->second;
491 PetAuraMap::const_iterator itr2 = auras.find(0);
492 if (itr2 != auras.end())
493 return itr2->second;
494 return 0;
495 }

References auras.

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

◆ GetDamage()

int32 PetAura::GetDamage ( ) const
inline
508 {
509 return damage;
510 }

References damage.

Referenced by Unit::CastPetAura().

◆ IsRemovedOnChangePet()

bool PetAura::IsRemovedOnChangePet ( ) const
inline
503 {
504 return removeOnChangePet;
505 }

References removeOnChangePet.

Referenced by Pet::CastPetAuras().

Member Data Documentation

◆ auras

PetAuraMap PetAura::auras
private

Referenced by AddAura(), GetAura(), and PetAura().

◆ damage

int32 PetAura::damage {0}
private

Referenced by GetDamage().

◆ removeOnChangePet

bool PetAura::removeOnChangePet {false}
private

Referenced by IsRemovedOnChangePet().