18 #ifndef BattlePetMgr_h__
19 #define BattlePetMgr_h__
117 std::vector<WorldPackets::BattlePet::BattlePetSlot>
GetSlots()
const {
return _slots; }
124 void SendUpdates(std::vector<BattlePet> pets,
bool petAdded);
131 std::vector<WorldPackets::BattlePet::BattlePetSlot>
_slots;
138 static std::unordered_map<
uint32 , std::unordered_map<BattlePetState , int32 , std::hash<std::underlying_type<BattlePetState>::type> >>
_battlePetSpeciesStates;
143 #endif // BattlePetMgr_h__
Definition: BattlePetMgr.h:56
void AddPet(uint32 species, uint32 creatureId, uint16 breed, uint8 quality, uint16 level=1)
Definition: BattlePetMgr.cpp:310
uint16 GetTrapLevel() const
Definition: BattlePetMgr.h:115
Definition: BattlePetMgr.h:27
void SaveToDB(SQLTransaction &trans)
Definition: BattlePetMgr.cpp:235
Definition: BattlePetMgr.h:80
std::unordered_map< uint64, BattlePet > _pets
Definition: BattlePetMgr.h:130
std::vector< BattlePet > GetLearnedPets() const
Definition: BattlePetMgr.cpp:377
WorldPackets::BattlePet::BattlePet PacketInfo
Definition: BattlePetMgr.h:90
Definition: BattlePetMgr.h:36
std::shared_ptr< PreparedResultSet > PreparedQueryResult
Definition: QueryResult.h:107
static void LoadDefaultPetQualities()
Definition: BattlePetMgr.cpp:125
Definition: BattlePetMgr.h:57
Definition: BattlePetMgr.h:66
BattlePetSaveInfo SaveInfo
Definition: BattlePetMgr.h:91
Definition: BattlePetMgr.h:41
Definition: BattlePetMgr.h:64
static std::unordered_map< uint32, uint8 > _defaultQualityPerSpecies
Definition: BattlePetMgr.h:140
WorldSession * GetOwner() const
Definition: BattlePetMgr.h:113
static uint16 RollPetBreed(uint32 species)
Definition: BattlePetMgr.cpp:154
BattlePetSaveInfo
Definition: BattlePetMgr.h:75
void HealBattlePetsPct(uint8 pct)
Definition: BattlePetMgr.cpp:417
Definition: BattlePetPackets.h:29
Definition: BattlePetMgr.h:46
Definition: BattlePetMgr.h:69
WorldPackets::BattlePet::BattlePetSlot * GetSlot(uint8 slot)
Definition: BattlePetMgr.h:110
Definition: BattlePetMgr.h:44
BattlePetMgr(WorldSession *owner)
Definition: BattlePetMgr.cpp:172
Definition: BattlePetMgr.h:72
Definition: BattlePetMgr.h:62
BattlePetError
Definition: BattlePetMgr.h:33
Definition: BattlePetMgr.h:77
static std::unordered_map< uint32, std::unordered_map< BattlePetState, int32, std::hash< std::underlying_type< BattlePetState >::type > > > _battlePetSpeciesStates
Definition: BattlePetMgr.h:138
Definition: BattlePetMgr.h:63
void LoadFromDB(PreparedQueryResult pets, PreparedQueryResult slots)
Definition: BattlePetMgr.cpp:183
void SendError(BattlePetError error, uint32 creatureId)
Definition: BattlePetMgr.cpp:463
WorldSession * _owner
Definition: BattlePetMgr.h:128
Definition: BattlePetMgr.h:37
Definition: BattlePetMgr.h:60
void RemovePet(ObjectGuid guid)
Definition: BattlePetMgr.cpp:339
Definition: BattlePetMgr.h:65
Definition: BattlePetMgr.h:26
int32_t int32
Definition: Define.h:146
Definition: BattlePetMgr.h:55
Definition: BattlePetMgr.h:67
uint32_t uint32
Definition: Define.h:150
uint64_t uint64
Definition: Define.h:149
Definition: BattlePetMgr.h:42
uint16_t uint16
Definition: Define.h:151
Definition: BattlePetMgr.h:45
uint8 GetPetCount(uint32 species) const
Definition: BattlePetMgr.cpp:353
void UnlockSlot(uint8 slot)
Definition: BattlePetMgr.cpp:363
Definition: BattlePetMgr.h:61
Definition: BattlePetMgr.h:43
std::vector< WorldPackets::BattlePet::BattlePetSlot > GetSlots() const
Definition: BattlePetMgr.h:117
Definition: BattlePetMgr.h:83
Definition: BattlePetMgr.h:79
Definition: BattlePetMgr.h:86
Definition: BattlePetMgr.h:29
void CageBattlePet(ObjectGuid guid)
Definition: BattlePetMgr.cpp:387
std::vector< WorldPackets::BattlePet::BattlePetSlot > _slots
Definition: BattlePetMgr.h:131
Definition: BattlePetPackets.h:48
uint16 _trapLevel
Definition: BattlePetMgr.h:129
static uint8 GetDefaultPetQuality(uint32 species)
Definition: BattlePetMgr.cpp:163
Definition: BattlePetMgr.h:54
static std::unordered_map< uint16, std::unordered_map< BattlePetState, int32, std::hash< std::underlying_type< BattlePetState >::type > > > _battlePetBreedStates
Definition: BattlePetMgr.h:137
Definition: BattlePetMgr.h:70
uint8_t uint8
Definition: Define.h:152
void SummonPet(ObjectGuid guid)
Definition: BattlePetMgr.cpp:437
void CalculateStats()
Definition: BattlePetMgr.cpp:25
static void LoadAvailablePetBreeds()
Definition: BattlePetMgr.cpp:94
Player session in the World.
Definition: WorldSession.h:882
Definition: ObjectGuid.h:189
Definition: BattlePetMgr.h:78
Definition: BattlePetMgr.h:59
BattlePetMisc
Definition: BattlePetMgr.h:24
static std::unordered_map< uint32, std::unordered_set< uint8 > > _availableBreedsPerSpecies
Definition: BattlePetMgr.h:139
void SendUpdates(std::vector< BattlePet > pets, bool petAdded)
Definition: BattlePetMgr.cpp:453
Definition: BattlePetMgr.h:40
BattlePetState
Definition: BattlePetMgr.h:52
Definition: BattlePetMgr.h:35
Definition: BattlePetMgr.h:58
Definition: BattlePetMgr.h:28
BattlePet * GetPet(ObjectGuid guid)
Definition: BattlePetMgr.cpp:301
static void Initialize()
Definition: BattlePetMgr.cpp:79
std::shared_ptr< Transaction > SQLTransaction
Definition: Transaction.h:58