AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
PetLoadQueryHolder Class Reference
Inheritance diagram for PetLoadQueryHolder:
SQLQueryHolder< T > SQLQueryHolderBase

Public Types

enum  {
  DECLINED_NAMES ,
  AURAS ,
  SPELLS ,
  COOLDOWNS ,
  MAX
}
 

Public Member Functions

 PetLoadQueryHolder (ObjectGuid::LowType ownerGuid, uint32 petNumber)
 
- Public Member Functions inherited from SQLQueryHolder< T >
bool SetPreparedQuery (std::size_t index, PreparedStatement< T > *stmt)
 
- Public Member Functions inherited from SQLQueryHolderBase
 SQLQueryHolderBase ()=default
 
virtual ~SQLQueryHolderBase ()
 
void SetSize (std::size_t size)
 
PreparedQueryResult GetPreparedResult (std::size_t index) const
 
void SetPreparedResult (std::size_t index, PreparedResultSet *result)
 

Additional Inherited Members

- Protected Member Functions inherited from SQLQueryHolderBase
bool SetPreparedQueryImpl (std::size_t index, PreparedStatementBase *stmt)
 

Detailed Description

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
DECLINED_NAMES 
AURAS 
SPELLS 
COOLDOWNS 
MAX 
136 {
138 AURAS,
139 SPELLS,
140 COOLDOWNS,
141
142 MAX
143 };
@ DECLINED_NAMES
Definition: Pet.cpp:137
@ SPELLS
Definition: Pet.cpp:139
@ MAX
Definition: Pet.cpp:142
@ COOLDOWNS
Definition: Pet.cpp:140
@ AURAS
Definition: Pet.cpp:138

Constructor & Destructor Documentation

◆ PetLoadQueryHolder()

PetLoadQueryHolder::PetLoadQueryHolder ( ObjectGuid::LowType  ownerGuid,
uint32  petNumber 
)
inline
146 {
147 SetSize(MAX);
148
150
151 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_DECLINED_NAME);
152 stmt->SetData(0, ownerGuid);
153 stmt->SetData(1, petNumber);
155
156 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_AURA);
157 stmt->SetData(0, petNumber);
158 SetPreparedQuery(AURAS, stmt);
159
160 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_SPELL);
161 stmt->SetData(0, petNumber);
163
164 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_PET_SPELL_COOLDOWN);
165 stmt->SetData(0, petNumber);
167 }
@ CHAR_SEL_PET_AURA
Definition: CharacterDatabase.h:464
@ CHAR_SEL_PET_DECLINED_NAME
Definition: CharacterDatabase.h:481
@ CHAR_SEL_PET_SPELL
Definition: CharacterDatabase.h:465
@ CHAR_SEL_PET_SPELL_COOLDOWN
Definition: CharacterDatabase.h:466
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
Definition: PreparedStatement.h:157
bool SetPreparedQuery(std::size_t index, PreparedStatement< T > *stmt)
Definition: QueryHolder.h:46
Acore::Types::is_default< T > SetData(const uint8 index, T value)
Definition: PreparedStatement.h:77
void SetSize(std::size_t size)
Definition: QueryHolder.cpp:69

References AURAS, CHAR_SEL_PET_AURA, CHAR_SEL_PET_DECLINED_NAME, CHAR_SEL_PET_SPELL, CHAR_SEL_PET_SPELL_COOLDOWN, CharacterDatabase, COOLDOWNS, DECLINED_NAMES, MAX, PreparedStatementBase::SetData(), SQLQueryHolder< T >::SetPreparedQuery(), SQLQueryHolderBase::SetSize(), and SPELLS.