|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <BattlePetMgr.h>
Private Member Functions | |
| bool | ApplyAchievementLoadoutReward (uint32 achievementId) |
| void | ApplyActivePetBattleRoundState (Skyfire::BattlePetPackets::BattlePetRoundResult &round) const |
| void | ClearActivePetBattlePlayerState () |
| void | ClearActivePetBattleWorldObjectState () |
| void | DespawnResolvedWildPetBattleWorldObject () |
| uint32 | GetUniqueBattlePetSpeciesCount () const |
| void | PersistActivePetBattleHealth () |
| uint16 | RewardActivePetBattlePet (BattlePet *battlePet, bool awardExperience) |
| void | SyncAchievementLoadoutRewards () |
| void | UpdateBattlePetCollectionAchievements (BattlePet const *battlePet=NULL) |
| void | UpdateCapturedBattlePetAchievements (BattlePet const &battlePet) |
| void | UpdateFinishedPetBattleAchievements () |
Private Attributes | |
| ActivePetBattle | m_activePetBattle |
| bool | m_activePetBattlePlayerStateApplied |
| uint64 | m_activePetBattleWorldObjectGuid = 0 |
| bool | m_activePetBattleWorldObjectHidden = false |
| BattlePetSet | m_battlePetSet |
| uint64 | m_loadout [BATTLE_PET_MAX_LOADOUT_SLOTS] = { } |
| uint8 | m_loadoutFlags |
| bool | m_loadoutSave |
| Player * | m_owner |
| bool | m_petBattlePvpQueued = false |
| TempSummon * | m_summon |
| uint64 | m_summonId |
| uint64 | m_summonLastId |
Definition at line 110 of file BattlePetMgr.h.
|
inline |
Definition at line 113 of file BattlePetMgr.h.
References m_activePetBattlePlayerStateApplied, m_loadoutFlags, m_loadoutSave, m_owner, m_summon, m_summonId, and m_summonLastId.
| BattlePetMgr::~BattlePetMgr | ( | ) |
Definition at line 88 of file BattlePetMgr.cpp.
References m_battlePetSet.
|
private |
Definition at line 539 of file BattlePetMgr.cpp.
References BATTLE_PET_LOADOUT_SLOT_NONE, BattlePetLoadoutSlotForAchievement(), HasLoadoutSlot(), and UnlockLoadoutSlot().
Referenced by OnAchievementEarned(), and SyncAchievementLoadoutRewards().
| void BattlePetMgr::ApplyActivePetBattlePlayerState | ( | float | faceX, |
| float | faceY ) |
Definition at line 708 of file BattlePetMgr.cpp.
References m_activePetBattlePlayerStateApplied, m_owner, SPELL_AURA_MOUNTED, UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC, UNIT_FLAG_PACIFIED, and UNIT_STATE_ROOT.
Referenced by WorldSession::HandleBattlePetWildRequest().
|
private |
Definition at line 992 of file BattlePetMgr.cpp.
References GetActivePetBattleTrapStatus(), PET_BATTLE_TRAP_STATUS_UNAVAILABLE, and Skyfire::BattlePetPackets::BattlePetRoundResult::TrapStatus.
Referenced by ApplyBattlePetAbilityExchangeInput(), ApplyBattlePetAbilityInput(), ApplyBattlePetSwapInput(), ApplyBattlePetTrapInput(), and ApplyEnemyBattlePetDamage().
| bool BattlePetMgr::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 ) |
Definition at line 861 of file BattlePetMgr.cpp.
References ActivePetBattleTurn::Accepted, Skyfire::BattlePetPackets::AppendRoundCooldowns(), ApplyActivePetBattleRoundState(), Skyfire::BattlePetPackets::BATTLE_PET_ROUND_INPUT_FLAG_SELECT_NEW_FRONT_PET, BuildActivePetBattleFinalRound(), Skyfire::BattlePetPackets::BuildDamageEffect(), ActivePetBattleTurn::CasterPet, Skyfire::BattlePetPackets::BattlePetRoundResult::Effects, ActivePetBattleTurn::HasFinalRound, ActivePetBattleTurn::HasRoundResult, Skyfire::BattlePetPackets::BattlePetRoundResult::InputFlags, m_activePetBattle, PersistActivePetBattleHealth(), ActivePetBattleTurn::RemainingHealth, ActivePetBattleTurn::RequiresFrontPet, Skyfire::BattlePetPackets::BattlePetRoundResult::RoundID, and ActivePetBattleTurn::TargetPet.
Referenced by WorldSession::HandleBattlePetInput().
| bool BattlePetMgr::ApplyBattlePetAbilityInput | ( | uint32 | roundId, |
| uint32 | damage, | ||
| uint32 | abilityEffectId, | ||
| uint8 | abilitySlot, | ||
| uint32 | abilityId, | ||
| uint16 | abilityCooldown, | ||
| Skyfire::BattlePetPackets::BattlePetRoundResult & | round, | ||
| Skyfire::BattlePetPackets::BattlePetFinalRound * | finalRound = NULL ) |
Definition at line 839 of file BattlePetMgr.cpp.
References ActivePetBattleTurn::Abandoned, ActivePetBattleTurn::Accepted, ApplyActivePetBattleRoundState(), BuildActivePetBattleFinalRound(), Skyfire::BattlePetPackets::BuildRoundResultFromTurn(), ActivePetBattleTurn::HasFinalRound, ActivePetBattleTurn::HasRoundResult, m_activePetBattle, and PersistActivePetBattleHealth().
| bool BattlePetMgr::ApplyBattlePetForfeitInput | ( | uint32 | roundId, |
| Skyfire::BattlePetPackets::BattlePetFinalRound & | finalRound ) |
Definition at line 921 of file BattlePetMgr.cpp.
References ActivePetBattleTurn::Abandoned, ActivePetBattleTurn::Accepted, BuildActivePetBattleFinalRound(), ActivePetBattleTurn::HasFinalRound, m_activePetBattle, and PersistActivePetBattleHealth().
Referenced by WorldSession::HandleBattlePetInput(), WorldSession::HandleBattlePetQuitNotify(), and WorldSession::HandleBattlePetRequestUpdate().
| bool BattlePetMgr::ApplyBattlePetSwapInput | ( | uint32 | roundId, |
| uint8 | newFrontPet, | ||
| Skyfire::BattlePetPackets::BattlePetRoundResult & | round ) |
Definition at line 909 of file BattlePetMgr.cpp.
References ActivePetBattleTurn::Accepted, ApplyActivePetBattleRoundState(), Skyfire::BattlePetPackets::BuildRoundResultFromTurn(), ActivePetBattleTurn::HasRoundResult, and m_activePetBattle.
Referenced by WorldSession::HandleBattlePetInput(), and WorldSession::HandleBattlePetInputFirstPet().
| bool BattlePetMgr::ApplyBattlePetTrapInput | ( | uint32 | roundId, |
| uint32 | trapAbilityEffectId, | ||
| uint32 | enemyDamage, | ||
| uint32 | enemyAbilityEffectId, | ||
| Skyfire::BattlePetPackets::BattlePetRoundResult & | round, | ||
| Skyfire::BattlePetPackets::BattlePetFinalRound & | finalRound ) |
Definition at line 932 of file BattlePetMgr.cpp.
References ActivePetBattleTurn::Accepted, Skyfire::BattlePetPackets::AppendRoundCooldowns(), ApplyActivePetBattleRoundState(), Skyfire::BattlePetPackets::BATTLE_PET_ROUND_INPUT_FLAG_SELECT_NEW_FRONT_PET, BattlePetCapturedLevel(), BuildActivePetBattleFinalRound(), Skyfire::BattlePetPackets::BuildCatchEffect(), Skyfire::BattlePetPackets::BuildDamageEffect(), ActivePetBattleTurn::Captured, ActivePetBattleTurn::CasterPet, Create(), Skyfire::BattlePetPackets::BattlePetRoundResult::DeadPets, Skyfire::BattlePetPackets::BattlePetRoundResult::Effects, GetActivePetBattleTrapStatus(), GetTrapAbility(), ActivePetBattleTurn::HasFinalRound, ActivePetBattleTurn::HasRoundResult, Skyfire::BattlePetPackets::BattlePetRoundResult::InputFlags, m_activePetBattle, Skyfire::BattlePetPackets::MarkRoundResultAsCatchOrKill(), PersistActivePetBattleHealth(), PET_BATTLE_TRAP_STATUS_ACTIVE, ActivePetBattleTurn::RemainingHealth, ActivePetBattleTurn::RequiresFrontPet, roll_chance_f(), ActivePetBattleTurn::RoundID, Skyfire::BattlePetPackets::BattlePetRoundResult::RoundID, ActivePetBattleTurn::TargetDied, ActivePetBattleTurn::TargetPet, and UpdateCapturedBattlePetAchievements().
Referenced by WorldSession::HandleBattlePetInput().
| bool BattlePetMgr::ApplyEnemyBattlePetDamage | ( | uint32 | damage, |
| uint32 | abilityEffectId, | ||
| Skyfire::BattlePetPackets::BattlePetRoundResult & | round ) |
Definition at line 827 of file BattlePetMgr.cpp.
References ActivePetBattleTurn::Accepted, ApplyActivePetBattleRoundState(), Skyfire::BattlePetPackets::BuildRoundResultFromTurn(), ActivePetBattleTurn::HasRoundResult, and m_activePetBattle.
| BattlePetAchievementContext BattlePetMgr::BuildActivePetBattleAchievementContext | ( | uint16 | speciesId, |
| uint8 | quality, | ||
| bool | won, | ||
| bool | captured ) const |
Definition at line 1055 of file BattlePetMgr.cpp.
References BattlePetSpeciesFamilyMask(), BattlePetAchievementContext::Captured, BattlePetAchievementContext::FamilyMask, BattlePetAchievementContext::HealthPercent, m_activePetBattle, BattlePetAchievementContext::Quality, BattlePetAchievementContext::Source, BattlePetAchievementContext::Species, and BattlePetAchievementContext::Won.
Referenced by battlepet_commandscript::HandleBattlePetDebugCommand(), UpdateCapturedBattlePetAchievements(), and UpdateFinishedPetBattleAchievements().
| bool BattlePetMgr::BuildActivePetBattleFinalRound | ( | bool | abandoned, |
| Skyfire::BattlePetPackets::BattlePetFinalRound & | finalRound, | ||
| bool | captured = false ) |
Definition at line 1156 of file BattlePetMgr.cpp.
References Skyfire::BattlePetPackets::BattlePetFinalRoundPet::AwardedXP, ActivePetBattle::BATTLE_PET_MAX_ACTIVE_TEAM_PETS, Skyfire::BattlePetPackets::BuildFinalRoundState(), Skyfire::BattlePetPackets::BattlePetFinalRoundPet::Caged, Skyfire::BattlePetPackets::BattlePetFinalRoundPet::Captured, GetBattlePet(), BattlePet::GetCurrentHealth(), BattlePet::GetLevel(), BattlePet::GetMaxHealth(), BattlePet::GetXp(), Skyfire::BattlePetPackets::BattlePetFinalRoundPet::InitialLevel, m_activePetBattle, Skyfire::BattlePetPackets::BattlePetFinalRoundPet::MaxHealth, Skyfire::BattlePetPackets::BattlePetFinalRoundPet::NewLevel, Skyfire::BattlePetPackets::BattlePetFinalRoundPet::Pboid, PET_BATTLE_WINNER_ALLY, PET_BATTLE_WINNER_ENEMY, Skyfire::BattlePetPackets::BattlePetFinalRound::PvPBattle, Skyfire::BattlePetPackets::BattlePetFinalRoundPet::RemainingHealth, RewardActivePetBattlePet(), Skyfire::BattlePetPackets::BattlePetFinalRoundPet::SeenAction, UpdateBattlePetLevelAchievement(), UpdateFinishedPetBattleAchievements(), Skyfire::BattlePetPackets::BattlePetFinalRound::Winners, and Skyfire::BattlePetPackets::BattlePetFinalRoundPet::Xp.
Referenced by ApplyBattlePetAbilityExchangeInput(), ApplyBattlePetAbilityInput(), ApplyBattlePetForfeitInput(), and ApplyBattlePetTrapInput().
| bool BattlePetMgr::CanCreateBattlePet | ( | uint16 | speciesId | ) | const |
Definition at line 613 of file BattlePetMgr.cpp.
References BATTLE_PET_FLAG_UNIQUE, BATTLE_PET_MAX_JOURNAL_PETS, BATTLE_PET_MAX_JOURNAL_SPECIES, BattlePetSpeciesHasFlag(), GetBattlePetCount(), m_battlePetSet, BattlePetSpeciesEntry::NpcId, sBattlePetSpeciesStore, and sObjectMgr.
Referenced by Create(), and GetActivePetBattleTrapStatus().
| void BattlePetMgr::ClearActivePetBattle | ( | ) |
Definition at line 722 of file BattlePetMgr.cpp.
References ClearActivePetBattlePlayerState(), ClearActivePetBattleWorldObjectState(), DespawnResolvedWildPetBattleWorldObject(), m_activePetBattle, m_petBattlePvpQueued, and PersistActivePetBattleHealth().
|
private |
Definition at line 787 of file BattlePetMgr.cpp.
References m_activePetBattlePlayerStateApplied, m_owner, UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_NPC, UNIT_FLAG_PACIFIED, and UNIT_STATE_ROOT.
Referenced by ClearActivePetBattle().
|
private |
Definition at line 771 of file BattlePetMgr.cpp.
References ObjectAccessor::GetCreature(), m_activePetBattleWorldObjectGuid, m_activePetBattleWorldObjectHidden, and m_owner.
Referenced by ClearActivePetBattle().
Definition at line 572 of file BattlePetMgr.cpp.
References CONFIG_BATTLE_PET_INITIAL_LEVEL, Create(), sObjectMgr, and sWorld.
Referenced by ApplyBattlePetTrapInput(), Create(), Create(), and WorldSession::HandleBattlePetLearn().
| BattlePet * BattlePetMgr::Create | ( | uint16 | speciesId, |
| uint8 | level, | ||
| uint8 | quality, | ||
| bool | notification = true ) |
Definition at line 579 of file BattlePetMgr.cpp.
References Create(), and sObjectMgr.
| BattlePet * BattlePetMgr::Create | ( | uint16 | speciesId, |
| uint8 | level, | ||
| uint8 | quality, | ||
| uint8 | breed, | ||
| bool | notification = true ) |
Definition at line 584 of file BattlePetMgr.cpp.
References BATTLE_PET_MAX_LEVEL, CanCreateBattlePet(), ITEM_QUALITY_LEGENDARY, ITEM_QUALITY_NORMAL, m_battlePetSet, sBattlePetBreedSet, SendBattlePetUpdate(), sObjectMgr, and UpdateBattlePetCollectionAchievements().
| void BattlePetMgr::Delete | ( | BattlePet * | battlePet | ) |
Definition at line 635 of file BattlePetMgr.cpp.
References BATTLE_PET_DB_STATE_DELETE, BATTLE_PET_LOADOUT_SLOT_NONE, BattlePet::GetDbState(), BattlePet::GetId(), GetLoadoutSlotForBattlePet(), SendBattlePetDeleted(), SendBattlePetSlotUpdate(), BattlePet::SetDbState(), SetLoadoutSlot(), and UpdateBattlePetCollectionAchievements().
Referenced by WorldSession::HandleBattlePetDelete().
|
private |
Definition at line 732 of file BattlePetMgr.cpp.
References ObjectAccessor::GetCreature(), JUST_DIED, m_activePetBattle, m_activePetBattleWorldObjectGuid, m_activePetBattleWorldObjectHidden, m_owner, PET_BATTLE_WINNER_ALLY, and sBattlePetSpawnMgr.
Referenced by ClearActivePetBattle().
| std::vector< BattlePet * > BattlePetMgr::FindBattlePetNameMatches | ( | std::string const & | name | ) | const |
Definition at line 350 of file BattlePetMgr.cpp.
References BATTLE_PET_DB_STATE_DELETE, GetBattlePetSpeciesName(), BattlePet::GetDbState(), BattlePet::GetNickname(), and m_battlePetSet.
| void BattlePetMgr::FinishActivePetBattle | ( | uint8 | winner | ) |
Definition at line 1021 of file BattlePetMgr.cpp.
References m_activePetBattle.
|
inline |
Definition at line 179 of file BattlePetMgr.h.
References m_activePetBattle.
Referenced by battlepet_commandscript::HandleBattlePetDebugCommand(), WorldSession::HandleBattlePetInput(), WorldSession::HandleBattlePetInputFirstPet(), WorldSession::HandleBattlePetQuitNotify(), and WorldSession::HandleBattlePetRequestUpdate().
| uint8 BattlePetMgr::GetActivePetBattleTrapStatus | ( | ) | const |
Definition at line 801 of file BattlePetMgr.cpp.
References BATTLE_PET_FLAG_NOT_TAMEABLE, BattlePetSpeciesHasFlag(), CanCreateBattlePet(), GetTrapAbility(), m_activePetBattle, and PET_BATTLE_TRAP_STATUS_UNAVAILABLE.
Referenced by ApplyActivePetBattleRoundState(), ApplyBattlePetTrapInput(), WorldSession::HandleBattlePetInputFirstPet(), and WorldSession::HandleBattlePetWildRequest().
Definition at line 302 of file BattlePetMgr.cpp.
References m_battlePetSet.
Referenced by BuildActivePetBattleFinalRound(), Spell::EffectSummonType(), GetFirstAliveLoadoutBattlePet(), battlepet_commandscript::HandleBattlePetDebugCommand(), WorldSession::HandleBattlePetDelete(), WorldSession::HandleBattlePetModifyName(), WorldSession::HandleBattlePetQueryName(), WorldSession::HandleBattlePetSetBattleSlot(), WorldSession::HandleBattlePetSetFlags(), WorldSession::HandleBattlePetSummonCompanion(), WorldSession::HandleBattlePetWildRequest(), HasLoadoutBattlePet(), LoadSlotsFromDb(), and ResummonLastBattlePet().
| uint32 BattlePetMgr::GetBattlePetCount | ( | ) | const |
Definition at line 311 of file BattlePetMgr.cpp.
References BATTLE_PET_DB_STATE_DELETE, BattlePet::GetDbState(), BattlePet::GetSpecies(), and m_battlePetSet.
Referenced by CanCreateBattlePet(), and battlepet_commandscript::HandleBattlePetDebugCommand().
Definition at line 327 of file BattlePetMgr.cpp.
References BATTLE_PET_DB_STATE_DELETE, BattlePet::GetDbState(), BattlePet::GetSpecies(), and m_battlePetSet.
| std::string BattlePetMgr::GetBattlePetSpeciesName | ( | BattlePet const * | battlePet | ) | const |
Definition at line 344 of file BattlePetMgr.cpp.
References CreatureTemplate::Name.
Referenced by FindBattlePetNameMatches().
|
inline |
Definition at line 128 of file BattlePetMgr.h.
References m_summon.
Referenced by WorldSession::HandleBattlePetModifyName().
|
inline |
Definition at line 127 of file BattlePetMgr.h.
References m_summonId.
Referenced by Spell::EffectSummonType(), battlepet_commandscript::HandleBattlePetDebugCommand(), WorldSession::HandleBattlePetModifyName(), WorldSession::HandleBattlePetQueryName(), and WorldSession::HandleBattlePetSummonCompanion().
| BattlePet * BattlePetMgr::GetFirstAliveLoadoutBattlePet | ( | ) | const |
Definition at line 505 of file BattlePetMgr.cpp.
References BATTLE_PET_MAX_LOADOUT_SLOTS, GetBattlePet(), BattlePet::GetCurrentHealth(), and GetLoadoutSlot().
Referenced by WorldSession::HandleBattlePetWildRequest().
|
inline |
Definition at line 149 of file BattlePetMgr.h.
References m_loadoutFlags.
Referenced by battlepet_commandscript::HandleBattlePetDebugCommand(), and SaveSlotsToDb().
Definition at line 467 of file BattlePetMgr.cpp.
References HasLoadoutSlot(), and m_loadout.
Referenced by GetFirstAliveLoadoutBattlePet(), GetLoadoutSlotForBattlePet(), battlepet_commandscript::HandleBattlePetDebugCommand(), WorldSession::HandleBattlePetSetBattleSlot(), WorldSession::HandleBattlePetWildRequest(), HasLoadoutBattlePet(), SaveSlotsToDb(), and SendBattlePetJournal().
Definition at line 419 of file BattlePetMgr.cpp.
References BATTLE_PET_LOADOUT_SLOT_NONE, BATTLE_PET_MAX_LOADOUT_SLOTS, and GetLoadoutSlot().
Referenced by Delete(), WorldSession::HandleBattlePetDelete(), and WorldSession::HandleBattlePetSetBattleSlot().
|
inline |
Definition at line 119 of file BattlePetMgr.h.
References m_owner.
| uint32 BattlePetMgr::GetTrapAbility | ( | ) | const |
Definition at line 530 of file BattlePetMgr.cpp.
References BATTLE_PET_ABILITY_GM_TRAP, BATTLE_PET_ABILITY_TRAP, BattlePetTrapAbilityForLoadoutFlags(), m_loadoutFlags, and m_owner.
Referenced by ApplyBattlePetTrapInput(), GetActivePetBattleTrapStatus(), battlepet_commandscript::HandleBattlePetDebugCommand(), WorldSession::HandleBattlePetInput(), WorldSession::HandleBattlePetWildRequest(), and LoadSlotsFromDb().
|
private |
Definition at line 1039 of file BattlePetMgr.cpp.
References BATTLE_PET_DB_STATE_DELETE, BattlePet::GetDbState(), BattlePet::GetSpecies(), and m_battlePetSet.
Referenced by UpdateBattlePetCollectionAchievements().
|
inline |
Definition at line 176 of file BattlePetMgr.h.
References m_activePetBattle.
Referenced by battlepet_commandscript::HandleBattlePetDebugCommand(), WorldSession::HandleBattlePetFinalNotify(), WorldSession::HandleBattlePetInput(), WorldSession::HandleBattlePetInputFirstPet(), WorldSession::HandleBattlePetQuitNotify(), and WorldSession::HandleBattlePetRequestUpdate().
| bool BattlePetMgr::HasLoadoutBattlePet | ( | ) | const |
Definition at line 493 of file BattlePetMgr.cpp.
References BATTLE_PET_MAX_LOADOUT_SLOTS, GetBattlePet(), and GetLoadoutSlot().
Referenced by WorldSession::HandleBattlePetWildRequest().
|
inline |
Definition at line 148 of file BattlePetMgr.h.
References m_loadoutFlags.
Referenced by HasLoadoutSlot(), LoadSlotsFromDb(), and SetLoadoutFlag().
| bool BattlePetMgr::HasLoadoutSlot | ( | uint8 | slot | ) | const |
Definition at line 475 of file BattlePetMgr.cpp.
References BATTLE_PET_LOADOUT_SLOT_1, BATTLE_PET_LOADOUT_SLOT_2, BATTLE_PET_LOADOUT_SLOT_3, BATTLE_PET_LOADOUT_SLOT_FLAG_SLOT_1, BATTLE_PET_LOADOUT_SLOT_FLAG_SLOT_2, BATTLE_PET_LOADOUT_SLOT_FLAG_SLOT_3, BATTLE_PET_MAX_LOADOUT_SLOTS, HasLoadoutFlag(), and m_loadoutFlags.
Referenced by ApplyAchievementLoadoutReward(), GetLoadoutSlot(), battlepet_commandscript::HandleBattlePetDebugCommand(), WorldSession::HandleBattlePetSetBattleSlot(), LoadSlotsFromDb(), SendBattlePetJournal(), SetLoadoutSlot(), and UnlockLoadoutSlot().
| void BattlePetMgr::HealBattlePets | ( | uint8 | percent | ) |
Definition at line 658 of file BattlePetMgr.cpp.
References BATTLE_PET_DB_STATE_DELETE, BattlePetHealthFromPercent(), BattlePet::GetDbState(), BattlePet::GetMaxHealth(), m_battlePetSet, SendBattlePetUpdate(), and BattlePet::SetCurrentHealth().
Referenced by Spell::EffectHealBattlePetPct(), and battlepet_commandscript::HandleBattlePetHealCommand().
| void BattlePetMgr::HideActivePetBattleWorldObject | ( | Creature * | creature | ) |
Definition at line 698 of file BattlePetMgr.cpp.
References Object::GetGUID(), m_activePetBattle, m_activePetBattleWorldObjectGuid, m_activePetBattleWorldObjectHidden, and m_owner.
Referenced by WorldSession::HandleBattlePetWildRequest().
|
inline |
Definition at line 177 of file BattlePetMgr.h.
References m_petBattlePvpQueued.
Referenced by battlepet_commandscript::HandleBattlePetDebugCommand(), and WorldSession::HandleBattlePetRequestUpdate().
| void BattlePetMgr::LoadFromDb | ( | PreparedQueryResult | result | ) |
Definition at line 96 of file BattlePetMgr.cpp.
References BATTLE_PET_MAX_LEVEL, Field::GetString(), Field::GetUInt16(), Field::GetUInt32(), Field::GetUInt64(), Field::GetUInt8(), ITEM_QUALITY_LEGENDARY, m_battlePetSet, sBattlePetBreedSet, sBattlePetSpeciesStore, SF_LOG_ERROR, and UpdateBattlePetCollectionAchievements().
| void BattlePetMgr::LoadSlotsFromDb | ( | PreparedQueryResult | result | ) |
Definition at line 229 of file BattlePetMgr.cpp.
References BATTLE_PET_LOADOUT_SLOT_1, BATTLE_PET_LOADOUT_SLOT_2, BATTLE_PET_LOADOUT_SLOT_3, BATTLE_PET_LOADOUT_SLOT_FLAG_NONE, BATTLE_PET_LOADOUT_SLOT_FLAG_SLOT_2, BATTLE_PET_LOADOUT_TRAP, GetBattlePet(), GetTrapAbility(), Field::GetUInt64(), Field::GetUInt8(), HasLoadoutFlag(), HasLoadoutSlot(), m_loadoutFlags, m_loadoutSave, m_owner, PLAYER_FIELD_PLAYER_FLAGS, PLAYER_FLAGS_BATTLE_PET_ENABLED, SetLoadoutFlag(), SetLoadoutSlot(), SF_LOG_ERROR, SPELL_BATTLE_PET_TRAINING_PASSIVE, SPELL_REVIVE_BATTLE_PETS, SPELL_TRACK_PETS, and SyncAchievementLoadoutRewards().
| void BattlePetMgr::OnAchievementEarned | ( | uint32 | achievementId | ) |
Definition at line 566 of file BattlePetMgr.cpp.
References ApplyAchievementLoadoutReward(), and SaveToDb().
|
private |
Definition at line 999 of file BattlePetMgr.cpp.
References BATTLE_PET_DB_STATE_DELETE, BattlePet::GetDbState(), BattlePet::GetId(), BattlePet::GetMaxHealth(), m_activePetBattle, m_battlePetSet, and BattlePet::SetCurrentHealth().
Referenced by ApplyBattlePetAbilityExchangeInput(), ApplyBattlePetAbilityInput(), ApplyBattlePetForfeitInput(), ApplyBattlePetTrapInput(), ClearActivePetBattle(), and SaveToDb().
| void BattlePetMgr::ResummonLastBattlePet | ( | ) |
Definition at line 394 of file BattlePetMgr.cpp.
References BattlePetGetSummonSpell(), GetBattlePet(), BattlePet::GetSpecies(), m_owner, m_summonId, and m_summonLastId.
Referenced by WorldSession::HandleMoveTeleportAck(), and WorldSession::HandleMoveWorldportAckOpcode().
|
private |
Definition at line 1027 of file BattlePetMgr.cpp.
References BattlePet::AddExperience(), BATTLE_PET_MAX_LEVEL, BattlePetExperienceReward(), BattlePet::GetLevel(), and m_activePetBattle.
Referenced by BuildActivePetBattleFinalRound().
| void BattlePetMgr::SaveSlotsToDb | ( | SQLTransaction & | trans | ) |
Definition at line 282 of file BattlePetMgr.cpp.
References BATTLE_PET_LOADOUT_SLOT_1, BATTLE_PET_LOADOUT_SLOT_2, BATTLE_PET_LOADOUT_SLOT_3, CHAR_DEL_ACCOUNT_BATTLE_PET_SLOTS, CHAR_INS_ACCOUNT_BATTLE_PET_SLOTS, CharacterDatabase, GetLoadoutFlags(), GetLoadoutSlot(), m_loadoutSave, m_owner, PreparedStatement::setUInt32(), PreparedStatement::setUInt64(), and PreparedStatement::setUInt8().
Referenced by SaveToDb().
| void BattlePetMgr::SaveToDb | ( | ) |
Definition at line 222 of file BattlePetMgr.cpp.
References CharacterDatabase, and SaveToDb().
Referenced by Spell::EffectBattlePetsUnlock(), Spell::EffectHealBattlePetPct(), WorldSession::HandleBattlePetDelete(), battlepet_commandscript::HandleBattlePetHealCommand(), WorldSession::HandleBattlePetLearn(), battlepet_commandscript::HandleBattlePetLevelupCommand(), WorldSession::HandleBattlePetModifyName(), WorldSession::HandleBattlePetSetBattleSlot(), WorldSession::HandleBattlePetSetFlags(), OnAchievementEarned(), SaveToDb(), and SyncAchievementLoadoutRewards().
| void BattlePetMgr::SaveToDb | ( | SQLTransaction & | trans | ) |
Definition at line 154 of file BattlePetMgr.cpp.
References BATTLE_PET_DB_STATE_DELETE, BATTLE_PET_DB_STATE_NONE, BATTLE_PET_DB_STATE_SAVE, CHAR_DEL_ACCOUNT_BATTLE_PET, CHAR_INS_ACCOUNT_BATTLE_PET, CharacterDatabase, BattlePet::GetBreed(), BattlePet::GetCurrentHealth(), BattlePet::GetDbState(), BattlePet::GetFlags(), BattlePet::GetId(), BattlePet::GetLevel(), BattlePet::GetMaxHealth(), BattlePet::GetNickname(), BattlePet::GetPower(), BattlePet::GetQuality(), BattlePet::GetSpecies(), BattlePet::GetSpeed(), BattlePet::GetTimestamp(), BattlePet::GetXp(), m_battlePetSet, m_owner, PersistActivePetBattleHealth(), SaveSlotsToDb(), BattlePet::SetDbState(), PreparedStatement::setString(), PreparedStatement::setUInt16(), PreparedStatement::setUInt32(), PreparedStatement::setUInt64(), and PreparedStatement::setUInt8().
| bool BattlePetMgr::SelectActivePetBattleFrontPet | ( | uint8 | frontPet | ) |
Definition at line 822 of file BattlePetMgr.cpp.
References m_activePetBattle.
Referenced by WorldSession::HandleBattlePetInputFirstPet(), and WorldSession::HandleBattlePetWildRequest().
| void BattlePetMgr::SendBattlePetDeleted | ( | uint64 | id | ) |
Definition at line 1218 of file BattlePetMgr.cpp.
References m_owner, SMSG_BATTLE_PET_DELETED, ByteBuffer::WriteGuidBytes(), and ByteBuffer::WriteGuidMask().
Referenced by Delete().
| void BattlePetMgr::SendBattlePetJournal | ( | ) |
Definition at line 1244 of file BattlePetMgr.cpp.
References ByteBuffer::append(), BATTLE_PET_DB_STATE_DELETE, BATTLE_PET_MAX_LOADOUT_SLOTS, ByteBuffer::bitwpos(), CreatureTemplate::Entry, ByteBuffer::FlushBits(), BattlePet::GetBreed(), BattlePet::GetCurrentHealth(), BattlePet::GetDbState(), BattlePet::GetFlags(), BattlePet::GetId(), BattlePet::GetLevel(), GetLoadoutSlot(), BattlePet::GetMaxHealth(), BattlePet::GetNickname(), BattlePet::GetPower(), BattlePet::GetQuality(), BattlePet::GetSpecies(), BattlePet::GetSpeed(), BattlePet::GetXp(), HasLoadoutSlot(), m_battlePetSet, m_owner, CreatureTemplate::Modelid1, ByteBuffer::PutBits(), SMSG_BATTLE_PET_JOURNAL, ByteBuffer::WriteBit(), ByteBuffer::WriteBits(), ByteBuffer::WriteByteSeq(), and ByteBuffer::WriteString().
Referenced by WorldSession::HandleBattlePetRequestJournal().
| void BattlePetMgr::SendBattlePetJournalLock | ( | ) |
Definition at line 1229 of file BattlePetMgr.cpp.
References m_owner, and SMSG_BATTLE_PET_JOURNAL_LOCK_ACQUIRED.
Referenced by WorldSession::HandleBattlePetRequestJournal().
Definition at line 1360 of file BattlePetMgr.cpp.
References ByteBuffer::FlushBits(), m_owner, SMSG_BATTLE_PET_SLOT_UPDATE, ByteBuffer::WriteBit(), ByteBuffer::WriteBits(), and ByteBuffer::WriteByteSeq().
Referenced by Delete(), WorldSession::HandleBattlePetSetBattleSlot(), and UnlockLoadoutSlot().
| void BattlePetMgr::SendBattlePetUpdate | ( | BattlePet * | battlePet, |
| bool | notification ) |
Definition at line 1401 of file BattlePetMgr.cpp.
References CreatureTemplate::Entry, ByteBuffer::FlushBits(), BattlePet::GetBreed(), BattlePet::GetCurrentHealth(), BattlePet::GetFlags(), BattlePet::GetId(), BattlePet::GetLevel(), BattlePet::GetMaxHealth(), BattlePet::GetNickname(), BattlePet::GetPower(), BattlePet::GetQuality(), BattlePet::GetSpecies(), BattlePet::GetSpeed(), BattlePet::GetXp(), m_owner, CreatureTemplate::Modelid1, SMSG_BATTLE_PET_PET_UPDATES, ByteBuffer::WriteBit(), ByteBuffer::WriteBits(), ByteBuffer::WriteByteSeq(), and ByteBuffer::WriteString().
Referenced by Create(), battlepet_commandscript::HandleBattlePetHealCommand(), battlepet_commandscript::HandleBattlePetLevelupCommand(), WorldSession::HandleBattlePetSetFlags(), and HealBattlePets().
| void BattlePetMgr::SendPetBattleRequestFailed | ( | uint8 | reason | ) |
Definition at line 1238 of file BattlePetMgr.cpp.
References Skyfire::BattlePetPackets::BuildRequestFailedPacket(), and m_owner.
Referenced by WorldSession::HandleBattlePetWildRequest().
| bool BattlePetMgr::SetActivePetBattleAllyPet | ( | uint8 | petIndex, |
| uint64 | petId, | ||
| uint32 | maxHealth, | ||
| uint32 | health ) |
Definition at line 817 of file BattlePetMgr.cpp.
References m_activePetBattle.
Referenced by WorldSession::HandleBattlePetWildRequest().
|
inline |
Definition at line 130 of file BattlePetMgr.h.
References m_summon.
Referenced by Spell::EffectSummonType().
|
inline |
Definition at line 129 of file BattlePetMgr.h.
References m_summonId.
Referenced by WorldSession::HandleBattlePetSummonCompanion().
| void BattlePetMgr::SetLoadoutFlag | ( | uint8 | flag | ) |
Definition at line 521 of file BattlePetMgr.cpp.
References HasLoadoutFlag(), m_loadoutFlags, and m_loadoutSave.
Referenced by LoadSlotsFromDb(), and UnlockLoadoutSlot().
Definition at line 456 of file BattlePetMgr.cpp.
References HasLoadoutSlot(), m_loadout, and m_loadoutSave.
Referenced by Delete(), WorldSession::HandleBattlePetSetBattleSlot(), LoadSlotsFromDb(), and UnlockLoadoutSlot().
|
inline |
Definition at line 178 of file BattlePetMgr.h.
References m_petBattlePvpQueued.
Referenced by WorldSession::HandlePetBattleQueueProposeMatchResult().
|
inline |
Definition at line 170 of file BattlePetMgr.h.
References m_activePetBattleWorldObjectGuid, and m_activePetBattleWorldObjectHidden.
| void BattlePetMgr::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 ) |
Definition at line 687 of file BattlePetMgr.cpp.
References m_activePetBattle, and m_petBattlePvpQueued.
| void BattlePetMgr::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 ) |
Definition at line 678 of file BattlePetMgr.cpp.
References m_activePetBattle, and m_petBattlePvpQueued.
Referenced by WorldSession::HandleBattlePetWildRequest().
|
private |
Definition at line 552 of file BattlePetMgr.cpp.
References ApplyAchievementLoadoutReward(), BATTLE_PET_ACHIEVEMENT_JUST_A_PUP, BATTLE_PET_ACHIEVEMENT_NEWBIE, m_owner, and SaveToDb().
Referenced by LoadSlotsFromDb().
| void BattlePetMgr::UnlockLoadoutSlot | ( | uint8 | slot | ) |
Definition at line 428 of file BattlePetMgr.cpp.
References BATTLE_PET_LOADOUT_SLOT_1, BATTLE_PET_LOADOUT_SLOT_2, BATTLE_PET_LOADOUT_SLOT_3, BATTLE_PET_LOADOUT_SLOT_FLAG_SLOT_1, BATTLE_PET_LOADOUT_SLOT_FLAG_SLOT_2, BATTLE_PET_LOADOUT_SLOT_FLAG_SLOT_3, BATTLE_PET_LOADOUT_TRAP, BATTLE_PET_MAX_LOADOUT_SLOTS, HasLoadoutSlot(), SendBattlePetSlotUpdate(), SetLoadoutFlag(), and SetLoadoutSlot().
Referenced by ApplyAchievementLoadoutReward(), and Spell::EffectBattlePetsUnlock().
| void BattlePetMgr::UnSummonCurrentBattlePet | ( | bool | temporary | ) |
Definition at line 382 of file BattlePetMgr.cpp.
References m_summon, m_summonId, and m_summonLastId.
Referenced by Battleground::AddPlayer(), WorldSession::HandleBattlePetSummonCompanion(), Player::RemoveFromWorld(), and Player::TeleportTo().
|
private |
Definition at line 1069 of file BattlePetMgr.cpp.
References ACHIEVEMENT_CRITERIA_TYPE_COLLECT_BATTLE_PET, ACHIEVEMENT_CRITERIA_TYPE_COLLECT_BATTLE_PET_SPECIES, ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL, ACHIEVEMENT_CRITERIA_TYPE_OWN_BATTLE_PET_COUNT, BATTLE_PET_DB_STATE_DELETE, BattlePetGetSummonSpell(), BattlePetSpeciesNpcId(), BattlePet::GetDbState(), BattlePet::GetSpecies(), GetUniqueBattlePetSpeciesCount(), m_battlePetSet, and m_owner.
Referenced by Create(), Delete(), and LoadFromDb().
| void BattlePetMgr::UpdateBattlePetLevelAchievement | ( | BattlePet const & | battlePet, |
| uint8 | initialLevel, | ||
| uint8 | finalLevel ) |
Definition at line 1127 of file BattlePetMgr.cpp.
References ACHIEVEMENT_CRITERIA_TYPE_REACH_BATTLE_PET_LEVEL, BattlePetSpeciesFamilyMask(), BattlePet::GetSpecies(), and m_owner.
Referenced by BuildActivePetBattleFinalRound(), and battlepet_commandscript::HandleBattlePetLevelupCommand().
|
private |
Definition at line 1111 of file BattlePetMgr.cpp.
References ACHIEVEMENT_CRITERIA_TYPE_CAPTURE_BATTLE_PET, ACHIEVEMENT_CRITERIA_TYPE_CAPTURE_BATTLE_PET2, BuildActivePetBattleAchievementContext(), BattlePetAchievementContext::FamilyMask, BattlePet::GetQuality(), BattlePet::GetSpecies(), BattlePetAchievementContext::IsValid(), m_owner, BattlePetAchievementContext::Payload(), and BattlePetAchievementContext::Species.
Referenced by ApplyBattlePetTrapInput().
|
private |
Definition at line 1137 of file BattlePetMgr.cpp.
References ACHIEVEMENT_CRITERIA_TYPE_WIN_PET_BATTLE, BuildActivePetBattleAchievementContext(), BattlePetAchievementContext::FamilyMask, BattlePetAchievementContext::IsValid(), m_activePetBattle, m_owner, BattlePetAchievementContext::Payload(), PET_BATTLE_WINNER_ALLY, and BattlePetAchievementContext::Species.
Referenced by BuildActivePetBattleFinalRound().
|
private |
Definition at line 242 of file BattlePetMgr.h.
Referenced by ApplyBattlePetAbilityExchangeInput(), ApplyBattlePetAbilityInput(), ApplyBattlePetForfeitInput(), ApplyBattlePetSwapInput(), ApplyBattlePetTrapInput(), ApplyEnemyBattlePetDamage(), BuildActivePetBattleAchievementContext(), BuildActivePetBattleFinalRound(), ClearActivePetBattle(), DespawnResolvedWildPetBattleWorldObject(), FinishActivePetBattle(), GetActivePetBattle(), GetActivePetBattleTrapStatus(), HasActivePetBattle(), HideActivePetBattleWorldObject(), PersistActivePetBattleHealth(), RewardActivePetBattlePet(), SelectActivePetBattleFrontPet(), SetActivePetBattleAllyPet(), StartPvpPetBattle(), StartWildPetBattle(), and UpdateFinishedPetBattleAchievements().
|
private |
Definition at line 243 of file BattlePetMgr.h.
Referenced by ApplyActivePetBattlePlayerState(), BattlePetMgr(), and ClearActivePetBattlePlayerState().
|
private |
Definition at line 245 of file BattlePetMgr.h.
Referenced by ClearActivePetBattleWorldObjectState(), DespawnResolvedWildPetBattleWorldObject(), HideActivePetBattleWorldObject(), and ShouldHideActivePetBattleWorldObject().
|
private |
Definition at line 244 of file BattlePetMgr.h.
Referenced by ClearActivePetBattleWorldObjectState(), DespawnResolvedWildPetBattleWorldObject(), HideActivePetBattleWorldObject(), and ShouldHideActivePetBattleWorldObject().
|
private |
Definition at line 233 of file BattlePetMgr.h.
Referenced by CanCreateBattlePet(), Create(), FindBattlePetNameMatches(), GetBattlePet(), GetBattlePetCount(), GetBattlePetCount(), GetUniqueBattlePetSpeciesCount(), HealBattlePets(), LoadFromDb(), PersistActivePetBattleHealth(), SaveToDb(), SendBattlePetJournal(), UpdateBattlePetCollectionAchievements(), and ~BattlePetMgr().
|
private |
Definition at line 241 of file BattlePetMgr.h.
Referenced by GetLoadoutSlot(), and SetLoadoutSlot().
|
private |
Definition at line 240 of file BattlePetMgr.h.
Referenced by BattlePetMgr(), GetLoadoutFlags(), GetTrapAbility(), HasLoadoutFlag(), HasLoadoutSlot(), LoadSlotsFromDb(), and SetLoadoutFlag().
|
private |
Definition at line 239 of file BattlePetMgr.h.
Referenced by BattlePetMgr(), LoadSlotsFromDb(), SaveSlotsToDb(), SetLoadoutFlag(), and SetLoadoutSlot().
|
private |
Definition at line 232 of file BattlePetMgr.h.
Referenced by ApplyActivePetBattlePlayerState(), BattlePetMgr(), ClearActivePetBattlePlayerState(), ClearActivePetBattleWorldObjectState(), DespawnResolvedWildPetBattleWorldObject(), GetOwner(), GetTrapAbility(), HideActivePetBattleWorldObject(), LoadSlotsFromDb(), ResummonLastBattlePet(), SaveSlotsToDb(), SaveToDb(), SendBattlePetDeleted(), SendBattlePetJournal(), SendBattlePetJournalLock(), SendBattlePetSlotUpdate(), SendBattlePetUpdate(), SendPetBattleRequestFailed(), SyncAchievementLoadoutRewards(), UpdateBattlePetCollectionAchievements(), UpdateBattlePetLevelAchievement(), UpdateCapturedBattlePetAchievements(), and UpdateFinishedPetBattleAchievements().
|
private |
Definition at line 246 of file BattlePetMgr.h.
Referenced by ClearActivePetBattle(), IsPetBattlePvpQueued(), SetPetBattlePvpQueued(), StartPvpPetBattle(), and StartWildPetBattle().
|
private |
Definition at line 235 of file BattlePetMgr.h.
Referenced by BattlePetMgr(), GetCurrentSummon(), SetCurrentSummon(), and UnSummonCurrentBattlePet().
|
private |
Definition at line 236 of file BattlePetMgr.h.
Referenced by BattlePetMgr(), GetCurrentSummonId(), ResummonLastBattlePet(), SetCurrentSummonId(), and UnSummonCurrentBattlePet().
|
private |
Definition at line 237 of file BattlePetMgr.h.
Referenced by BattlePetMgr(), ResummonLastBattlePet(), and UnSummonCurrentBattlePet().