239 for (
auto itr =
_pets.begin(); itr !=
_pets.end();)
241 switch (itr->second.SaveInfo)
247 stmt->
setUInt32(2, itr->second.PacketInfo.Species);
248 stmt->
setUInt16(3, itr->second.PacketInfo.Breed);
249 stmt->
setUInt16(4, itr->second.PacketInfo.Level);
250 stmt->
setUInt16(5, itr->second.PacketInfo.Exp);
251 stmt->
setUInt32(6, itr->second.PacketInfo.Health);
252 stmt->
setUInt8(7, itr->second.PacketInfo.Quality);
253 stmt->
setUInt16(8, itr->second.PacketInfo.Flags);
254 stmt->
setString(9, itr->second.PacketInfo.Name);
261 stmt->
setUInt16(0, itr->second.PacketInfo.Level);
262 stmt->
setUInt16(1, itr->second.PacketInfo.Exp);
263 stmt->
setUInt32(2, itr->second.PacketInfo.Health);
264 stmt->
setUInt8(3, itr->second.PacketInfo.Quality);
265 stmt->
setUInt16(4, itr->second.PacketInfo.Flags);
266 stmt->
setString(5, itr->second.PacketInfo.Name);
278 itr =
_pets.erase(itr);
295 stmt->
setUInt64(2, slot.Pet.Guid.GetCounter());
Definition: LoginDatabase.h:144
Definition: BattlePetMgr.h:80
std::unordered_map< uint64, BattlePet > _pets
Definition: BattlePetMgr.h:130
void setUInt8(const uint8 index, const uint8 value)
Definition: PreparedStatement.cpp:97
Definition: LoginDatabase.h:141
void setString(const uint8 index, const std::string &value)
Definition: PreparedStatement.cpp:187
uint32 GetBattlenetAccountId() const
Definition: WorldSession.h:925
Definition: PreparedStatement.h:74
Definition: LoginDatabase.h:143
LoginDatabaseWorkerPool LoginDatabase
Accessor to the realm/login database.
Definition: DatabaseEnv.cpp:22
void setBool(const uint8 index, const bool value)
Definition: PreparedStatement.cpp:88
Definition: BattlePetMgr.h:77
WorldSession * _owner
Definition: BattlePetMgr.h:128
Definition: LoginDatabase.h:140
void setUInt16(const uint8 index, const uint16 value)
Definition: PreparedStatement.cpp:106
PreparedStatement * GetPreparedStatement(PreparedStatementIndex index)
Definition: DatabaseWorkerPool.h:263
void setUInt32(const uint8 index, const uint32 value)
Definition: PreparedStatement.cpp:115
Definition: BattlePetMgr.h:79
std::vector< WorldPackets::BattlePet::BattlePetSlot > _slots
Definition: BattlePetMgr.h:131
Definition: BattlePetPackets.h:48
void setUInt64(const uint8 index, const uint64 value)
Definition: PreparedStatement.cpp:124
Definition: LoginDatabase.h:139
Definition: BattlePetMgr.h:78