TrinityCore
Loading...
Searching...
No Matches
PetStable Class Reference

#include <PetDefines.h>

Classes

struct  PetInfo
 

Public Member Functions

PetInfo * GetCurrentPet ()
 
PetInfo const * GetCurrentPet () const
 
Optional< uint32 > GetCurrentActivePetIndex () const
 
void SetCurrentActivePetIndex (uint32 index)
 
Optional< uint32 > GetCurrentUnslottedPetIndex () const
 
void SetCurrentUnslottedPetIndex (uint32 index)
 

Public Attributes

Optional< uint32 > CurrentPetIndex
 
std::array< Optional< PetInfo >, MAX_ACTIVE_PETS > ActivePets
 
std::array< Optional< PetInfo >, MAX_PET_STABLES > StabledPets
 
std::vector< PetInfo > UnslottedPets
 

Static Private Attributes

static constexpr uint32 UnslottedPetIndexMask = 0x80000000
 

Detailed Description

Definition at line 144 of file PetDefines.h.

Member Function Documentation

◆ GetCurrentActivePetIndex()

Optional< uint32 > PetStable::GetCurrentActivePetIndex ( ) const
inline

◆ GetCurrentPet() [1/2]

PetInfo * PetStable::GetCurrentPet ( )
inline

◆ GetCurrentPet() [2/2]

PetInfo const * PetStable::GetCurrentPet ( ) const
inline

◆ GetCurrentUnslottedPetIndex()

Optional< uint32 > PetStable::GetCurrentUnslottedPetIndex ( ) const
inline

Definition at line 190 of file PetDefines.h.

References CurrentPetIndex, and UnslottedPetIndexMask.

Referenced by GetCurrentPet().

◆ SetCurrentActivePetIndex()

void PetStable::SetCurrentActivePetIndex ( uint32  index)
inline

Definition at line 189 of file PetDefines.h.

References CurrentPetIndex.

Referenced by Unit::InitTamedPet(), and Pet::LoadPetFromDB().

◆ SetCurrentUnslottedPetIndex()

void PetStable::SetCurrentUnslottedPetIndex ( uint32  index)
inline

Definition at line 191 of file PetDefines.h.

References CurrentPetIndex, and UnslottedPetIndexMask.

Referenced by Pet::LoadPetFromDB(), and Player::SummonPet().

Member Data Documentation

◆ ActivePets

◆ CurrentPetIndex

◆ StabledPets

std::array<Optional<PetInfo>, MAX_PET_STABLES> PetStable::StabledPets

Definition at line 170 of file PetDefines.h.

Referenced by Pet::GetLoadPetInfo(), and Player::SetPetSlot().

◆ UnslottedPetIndexMask

constexpr uint32 PetStable::UnslottedPetIndexMask = 0x80000000
staticconstexprprivate

◆ UnslottedPets

std::vector<PetInfo> PetStable::UnslottedPets

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