6#ifndef BATTLE_PET_MGR_H
7#define BATTLE_PET_MGR_H
21#define BATTLE_PET_MAX_JOURNAL_SPECIES 3
22#define BATTLE_PET_MAX_JOURNAL_PETS 500
23#define BATTLE_PET_MAX_LOADOUT_SLOTS 3
86 switch (achievementId)
163 uint8 enemyBreed = 0,
uint8 allyFrontPet = 0);
167 uint8 allyFrontPet = 0,
uint8 enemyFrontPet = 3,
193 uint32 allyIncomingDamageReduction,
uint8 allyIncomingDamageReductionRounds,
194 uint32 enemyIncomingDamageReduction,
uint8 enemyIncomingDamageReductionRounds,
206 bool captured =
false);
208 uint16 speciesId,
uint8 quality,
bool won,
bool captured)
const;
BattlePetAchievementSource
@ BATTLE_PET_ACHIEVEMENT_SOURCE_PVP_DUEL
PetBattleRequestFailedReason
@ PET_BATTLE_REQUEST_FAILED_INVALID_TARGET
@ PET_BATTLE_REQUEST_FAILED_NO_PETS
@ PET_BATTLE_REQUEST_FAILED_ALL_PETS_DEAD
uint8 BattlePetLoadoutSlotForAchievement(uint32 achievementId)
@ BATTLE_PET_ABILITY_STRONG_TRAP
@ BATTLE_PET_ABILITY_GM_TRAP
@ BATTLE_PET_ABILITY_TRAP
@ BATTLE_PET_ABILITY_PRISTINE_TRAP
@ SPELL_REVIVE_BATTLE_PETS
@ SPELL_BATTLE_PET_TRAINING_PASSIVE
@ BATTLE_PET_ACHIEVEMENT_JUST_A_PUP
@ BATTLE_PET_ACHIEVEMENT_NEWBIE
#define BATTLE_PET_MAX_LOADOUT_SLOTS
@ BATTLE_PET_LOADOUT_SLOT_NONE
@ BATTLE_PET_LOADOUT_SLOT_1
@ BATTLE_PET_LOADOUT_SLOT_3
@ BATTLE_PET_LOADOUT_SLOT_2
std::set< BattlePet * > BattlePetSet
@ BATTLE_PET_LOADOUT_SLOT_FLAG_SLOT_1
@ BATTLE_PET_LOADOUT_SLOT_FLAG_SLOT_2
@ BATTLE_PET_LOADOUT_SLOT_FLAG_SLOT_3
@ BATTLE_PET_LOADOUT_STRONG_TRAP
@ BATTLE_PET_LOADOUT_PRISTINE_TRAP
@ BATTLE_PET_LOADOUT_SLOT_FLAG_NONE
@ BATTLE_PET_LOADOUT_GM_TRAP
@ BATTLE_PET_LOADOUT_TRAP
uint32 BattlePetTrapAbilityForLoadoutFlags(uint8 flags)
Skyfire::AutoPtr< PreparedResultSet, Skyfire::Mutex > PreparedQueryResult
Skyfire::AutoPtr< Transaction, Skyfire::Mutex > SQLTransaction
bool SetActivePetBattleAllyPet(uint8 petIndex, uint64 petId, uint32 maxHealth, uint32 health)
void ClearActivePetBattleWorldObjectState()
uint8 GetLoadoutFlags() const
bool IsPetBattlePvpQueued() const
uint16 RewardActivePetBattlePet(BattlePet *battlePet, bool awardExperience)
void OnAchievementEarned(uint32 achievementId)
TempSummon * GetCurrentSummon() const
void StartPvpPetBattle(uint64 opponentGuid, uint64 allyPetId, uint32 allyMaxHealth, uint32 allyHealth, uint64 enemyPetId, uint32 enemyMaxHealth, uint32 enemyHealth, uint16 enemySpecies=0, uint8 enemyLevel=0, uint8 enemyQuality=0, uint8 allyFrontPet=0, uint8 enemyFrontPet=3, BattlePetAchievementSource source=BATTLE_PET_ACHIEVEMENT_SOURCE_PVP_DUEL)
bool ApplyBattlePetAbilityInput(uint32 roundId, uint32 damage, uint32 abilityEffectId, uint8 abilitySlot, uint32 abilityId, uint16 abilityCooldown, Skyfire::BattlePetPackets::BattlePetRoundResult &round, Skyfire::BattlePetPackets::BattlePetFinalRound *finalRound=NULL)
uint8 GetActivePetBattleTrapStatus() const
void ClearActivePetBattlePlayerState()
uint32 GetTrapAbility() const
void HideActivePetBattleWorldObject(Creature *creature)
uint32 GetBattlePetCount() const
void SetLoadoutFlag(uint8 flag)
void SetCurrentSummon(TempSummon *summon)
void SendBattlePetJournal()
void Delete(BattlePet *battlePet)
ActivePetBattle const & GetActivePetBattle() const
bool HasLoadoutFlag(uint8 flag) const
void ClearActivePetBattle()
BattlePet * GetFirstAliveLoadoutBattlePet() const
bool m_petBattlePvpQueued
void ResummonLastBattlePet()
void UpdateCapturedBattlePetAchievements(BattlePet const &battlePet)
bool ApplyBattlePetAbilityExchangeInput(uint32 roundId, uint32 allyDamage, uint32 allyAbilityEffectId, uint8 allyAbilitySlot, uint32 allyAbilityId, uint16 allyAbilityCooldown, uint32 enemyDamage, uint32 enemyAbilityEffectId, uint32 allyIncomingDamageReduction, uint8 allyIncomingDamageReductionRounds, uint32 enemyIncomingDamageReduction, uint8 enemyIncomingDamageReductionRounds, Skyfire::BattlePetPackets::BattlePetRoundResult &round, Skyfire::BattlePetPackets::BattlePetFinalRound *finalRound=NULL)
void PersistActivePetBattleHealth()
void SyncAchievementLoadoutRewards()
std::string GetBattlePetSpeciesName(BattlePet const *battlePet) const
uint64 m_activePetBattleWorldObjectGuid
void SendBattlePetSlotUpdate(uint8 slot, bool notification, uint64 id=0)
uint32 GetUniqueBattlePetSpeciesCount() const
bool m_activePetBattleWorldObjectHidden
void UpdateFinishedPetBattleAchievements()
void FinishActivePetBattle(uint8 winner)
bool ApplyBattlePetTrapInput(uint32 roundId, uint32 trapAbilityEffectId, uint32 enemyDamage, uint32 enemyAbilityEffectId, Skyfire::BattlePetPackets::BattlePetRoundResult &round, Skyfire::BattlePetPackets::BattlePetFinalRound &finalRound)
BattlePet * Create(uint16 speciesId)
BattlePetSet m_battlePetSet
void SetCurrentSummonId(uint64 summonId)
uint64 m_loadout[BATTLE_PET_MAX_LOADOUT_SLOTS]
bool ApplyEnemyBattlePetDamage(uint32 damage, uint32 abilityEffectId, Skyfire::BattlePetPackets::BattlePetRoundResult &round)
bool ApplyBattlePetSwapInput(uint32 roundId, uint8 newFrontPet, Skyfire::BattlePetPackets::BattlePetRoundResult &round)
void SendBattlePetJournalLock()
ActivePetBattle m_activePetBattle
bool ApplyAchievementLoadoutReward(uint32 achievementId)
void LoadSlotsFromDb(PreparedQueryResult result)
uint64 GetLoadoutSlot(uint8 slot) const
uint64 GetCurrentSummonId() const
BattlePetAchievementContext BuildActivePetBattleAchievementContext(uint16 speciesId, uint8 quality, bool won, bool captured) const
uint8 GetLoadoutSlotForBattlePet(uint64 id) const
Player * GetOwner() const
bool HasLoadoutSlot(uint8 slot) const
void ApplyActivePetBattleRoundState(Skyfire::BattlePetPackets::BattlePetRoundResult &round) const
void LoadFromDb(PreparedQueryResult result)
BattlePetMgr(Player *owner)
void StartWildPetBattle(uint64 enemyGuid, uint64 allyPetId, uint32 allyMaxHealth, uint32 allyHealth, uint64 enemyPetId, uint32 enemyMaxHealth, uint32 enemyHealth, uint16 enemySpecies=0, uint8 enemyLevel=0, uint8 enemyQuality=0, uint8 enemyBreed=0, uint8 allyFrontPet=0)
void DespawnResolvedWildPetBattleWorldObject()
void SetPetBattlePvpQueued(bool queued)
bool ApplyBattlePetForfeitInput(uint32 roundId, Skyfire::BattlePetPackets::BattlePetFinalRound &finalRound)
void SaveSlotsToDb(SQLTransaction &trans)
BattlePet * GetBattlePet(uint64 id) const
void UpdateBattlePetLevelAchievement(BattlePet const &battlePet, uint8 initialLevel, uint8 finalLevel)
void SetLoadoutSlot(uint8 slot, uint64 id, bool save=false)
void SendBattlePetUpdate(BattlePet *battlePet, bool notification)
bool BuildActivePetBattleFinalRound(bool abandoned, Skyfire::BattlePetPackets::BattlePetFinalRound &finalRound, bool captured=false)
bool CanCreateBattlePet(uint16 speciesId) const
void SendBattlePetDeleted(uint64 id)
bool m_activePetBattlePlayerStateApplied
void UnSummonCurrentBattlePet(bool temporary)
void ApplyActivePetBattlePlayerState(float faceX, float faceY)
void SendPetBattleRequestFailed(uint8 reason)
std::vector< BattlePet * > FindBattlePetNameMatches(std::string const &name) const
bool HasActivePetBattle() const
bool ShouldHideActivePetBattleWorldObject(uint64 guid) const
void HealBattlePets(uint8 percent)
bool HasLoadoutBattlePet() const
void UpdateBattlePetCollectionAchievements(BattlePet const *battlePet=NULL)
bool SelectActivePetBattleFrontPet(uint8 frontPet)
void UnlockLoadoutSlot(uint8 slot)
@ PET_BATTLE_TYPE_PVP_MATCHMAKING
@ PET_BATTLE_TYPE_PVP_DUEL
G3D::Vector3 Positions[2]