|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include "BattlePet.h"#include "Common.h"#include "DB2fmt.h"#include "DB2Stores.h"#include "DB2Utility.h"#include "DBCStores.h"#include "Log.h"#include "World.h"Go to the source code of this file.
Macros | |
| #define | BATTLE_PET_MAIN_STAT_DIV 200.0f |
| #define | BATTLE_PET_MAIN_STAT_OFFSET 1600.0f |
| #define | BATTLE_PET_MAIN_STAT_VALUE 8.0f |
Typedefs | |
| typedef std::map< uint32, DB2StorageBase * > | DB2StorageMap |
| typedef std::list< std::string > | DB2StoreProblemList |
Functions | |
| float | BattlePetBreedMainStatModifier (uint16 stateId, uint8 breedId) |
| uint32 | BattlePetGetSpeciesAbility (uint16 speciesId, uint8 abilitySlot, uint16 flags, uint8 level) |
| uint32 | BattlePetGetSummonSpell (uint16 speciesId) |
| bool | BattlePetHasSpeciesAbility (uint16 speciesId, uint8 abilitySlot, bool alternateAbility, uint8 level) |
| float | BattlePetQualityMultiplier (uint8 quality) |
| bool | BattlePetSpeciesHasFlag (uint16 speciesId, uint16 flag) |
| float | BattlePetSpeciesMainStat (uint16 stateId, uint16 speciesId) |
| DB2StorageBase const * | GetDB2Storage (uint32 type) |
| template<class T> | |
| void | LoadDB2 (uint32 &availableDb2Locales, DB2StoreProblemList &errlist, DB2Storage< T > &storage, std::string const &db2_path, std::string const &filename) |
| static bool | LoadDB2_assert_print (uint32 fsize, uint32 rsize, std::string const &filename) |
| void | LoadDB2Stores (std::string const &dataPath) |
| #define BATTLE_PET_MAIN_STAT_DIV 200.0f |
Definition at line 228 of file DB2Stores.cpp.
Referenced by BattlePetBreedMainStatModifier(), and BattlePetSpeciesMainStat().
| #define BATTLE_PET_MAIN_STAT_OFFSET 1600.0f |
Definition at line 229 of file DB2Stores.cpp.
Referenced by BattlePetBreedMainStatModifier().
| #define BATTLE_PET_MAIN_STAT_VALUE 8.0f |
Definition at line 227 of file DB2Stores.cpp.
Referenced by BattlePetSpeciesMainStat().
| typedef std::map<uint32 , DB2StorageBase*> DB2StorageMap |
Definition at line 56 of file DB2Stores.cpp.
| typedef std::list<std::string> DB2StoreProblemList |
Definition at line 54 of file DB2Stores.cpp.
Definition at line 251 of file DB2Stores.cpp.
References BATTLE_PET_MAIN_STAT_DIV, BATTLE_PET_MAIN_STAT_OFFSET, BATTLE_PET_STATE_STAT_POWER, BATTLE_PET_STATE_STAT_SPEED, BATTLE_PET_STATE_STAT_STAMINA, BattlePetBreedStateEntry::BreedId, sBattlePetBreedStateStore, BattlePetBreedStateEntry::StateId, and BattlePetBreedStateEntry::Value.
Referenced by BattlePetPowerFromBattleState(), and BattlePet::CalculateStats().
| uint32 BattlePetGetSpeciesAbility | ( | uint16 | speciesId, |
| uint8 | abilitySlot, | ||
| uint16 | flags, | ||
| uint8 | level ) |
Definition at line 334 of file DB2Stores.cpp.
References BattlePetSpeciesXAbilityEntry::AbilityId, BATTLE_PET_ABILITY_SLOT_COUNT, BATTLE_PET_JOURNAL_FLAG_ABILITY_1, BattlePetSpeciesXAbilityEntry::RequiredLevel, sBattlePetSpeciesXAbilityBySpeciesStore, and BattlePetSpeciesXAbilityEntry::SlotId.
Referenced by Skyfire::BattlePetPackets::BuildInitialUpdatePetData(), and WorldSession::HandleBattlePetInput().
Definition at line 294 of file DB2Stores.cpp.
References sBattlePetSpeciesStore, and BattlePetSpeciesEntry::SpellId.
Referenced by WorldSession::HandleBattlePetSummonCompanion(), BattlePetMgr::ResummonLastBattlePet(), and BattlePetMgr::UpdateBattlePetCollectionAchievements().
| bool BattlePetHasSpeciesAbility | ( | uint16 | speciesId, |
| uint8 | abilitySlot, | ||
| bool | alternateAbility, | ||
| uint8 | level ) |
Definition at line 312 of file DB2Stores.cpp.
References BattlePetSpeciesXAbilityEntry::AbilityId, BATTLE_PET_ABILITY_SLOT_COUNT, BattlePetSpeciesXAbilityEntry::RequiredLevel, sBattlePetSpeciesXAbilityBySpeciesStore, and BattlePetSpeciesXAbilityEntry::SlotId.
Referenced by WorldSession::HandleBattlePetSetFlags().
| float BattlePetQualityMultiplier | ( | uint8 | quality | ) |
Definition at line 271 of file DB2Stores.cpp.
References ITEM_QUALITY_EPIC, ITEM_QUALITY_LEGENDARY, ITEM_QUALITY_NORMAL, ITEM_QUALITY_RARE, ITEM_QUALITY_UNCOMMON, and sBattlePetQualityMultiplierStore.
Referenced by BattlePetPowerFromBattleState(), and BattlePet::CalculateStats().
Definition at line 303 of file DB2Stores.cpp.
References BattlePetSpeciesEntry::Flags, and sBattlePetSpeciesStore.
Referenced by BattlePetMgr::CanCreateBattlePet(), BattlePetMgr::GetActivePetBattleTrapStatus(), WorldSession::HandleBattlePetDelete(), WorldSession::HandleBattlePetSetBattleSlot(), and ObjectMgr::LoadQuestObjectives().
Definition at line 231 of file DB2Stores.cpp.
References BATTLE_PET_MAIN_STAT_DIV, BATTLE_PET_MAIN_STAT_VALUE, BATTLE_PET_STATE_STAT_POWER, BATTLE_PET_STATE_STAT_SPEED, BATTLE_PET_STATE_STAT_STAMINA, BattlePetSpeciesStateEntry::Modifier, sBattlePetSpeciesStateStore, BattlePetSpeciesStateEntry::SpeciesId, and BattlePetSpeciesStateEntry::StateId.
Referenced by BattlePetPowerFromBattleState(), and BattlePet::CalculateStats().
| DB2StorageBase const * GetDB2Storage | ( | uint32 | type | ) |
Definition at line 218 of file DB2Stores.cpp.
References DB2Stores.
Referenced by WorldSession::HandleRequestHotfix().
|
inline |
Definition at line 70 of file DB2Stores.cpp.
References ASSERT, DB2FilesCount, DB2Stores, DB2Storage< T >::GetFieldCount(), DB2Storage< T >::GetFormat(), DB2FileLoader::GetFormatRecordSize(), DB2StorageBase::GetHash(), DB2Storage< T >::Load(), LoadDB2_assert_print(), DB2Storage< T >::LoadStringsFrom(), localeNames, sWorld, and TOTAL_LOCALES.
Referenced by LoadDB2Stores().
| void LoadDB2Stores | ( | std::string const & | dataPath | ) |
Definition at line 115 of file DB2Stores.cpp.
References BattlePetAbilityTurnEntry::AbilityId, DB2FilesCount, BattlePetAbilityTurnEntry::Id, LoadDB2(), sBattlePetAbilityEffectByTurnStore, sBattlePetAbilityEffectStore, sBattlePetAbilityStateStore, sBattlePetAbilityStore, sBattlePetAbilityTurnByAbilityStore, sBattlePetAbilityTurnStore, sBattlePetBreedQualityStore, sBattlePetBreedSet, sBattlePetBreedStateStore, sBattlePetEffectPropertiesStore, sBattlePetItemXSpeciesStore, sBattlePetQualityMultiplierStore, sBattlePetSpeciesStateStore, sBattlePetSpeciesStore, sBattlePetSpeciesXAbilityBySpeciesStore, sBattlePetSpeciesXAbilityStore, sBattlePetStateStore, sBroadcastTextStore, SF_LOG_ERROR, SF_LOG_INFO, sItemCurrencyCostStore, sItemExtendedCostStore, sItemSparseStore, sItemStore, sItemToBattlePetStore, sKeyChainStore, BattlePetSpeciesXAbilityEntry::SpeciesId, sSceneScriptPackageStore, sSpellReagentsStore, BattlePetAbilityEffectEntry::TurnEntryId, and BattlePetAbilityTurnEntry::TurnIndex.
Referenced by World::SetInitialWorldSettings().
| uint32 DB2FilesCount = 0 |
Definition at line 59 of file DB2Stores.cpp.
Referenced by LoadDB2(), and LoadDB2Stores().
| DB2StorageMap DB2Stores |
Definition at line 57 of file DB2Stores.cpp.
Referenced by GetDB2Storage(), and LoadDB2().
| BattlePetAbilityEffectByTurnStore sBattlePetAbilityEffectByTurnStore |
Definition at line 50 of file DB2Stores.cpp.
Referenced by LoadDB2Stores().
| DB2Storage< BattlePetAbilityEffectEntry > sBattlePetAbilityEffectStore(BattlePetAbilityEffectfmt) | ( | BattlePetAbilityEffectfmt | ) |
Referenced by LoadDB2Stores().
| DB2Storage< BattlePetAbilityStateEntry > sBattlePetAbilityStateStore(BattlePetAbilityStatefmt) | ( | BattlePetAbilityStatefmt | ) |
Referenced by LoadDB2Stores().
| DB2Storage< BattlePetAbilityEntry > sBattlePetAbilityStore(BattlePetAbilityfmt) | ( | BattlePetAbilityfmt | ) |
| BattlePetAbilityTurnByAbilityStore sBattlePetAbilityTurnByAbilityStore |
Definition at line 49 of file DB2Stores.cpp.
Referenced by BattlePetAbilityEffectForAbility(), and LoadDB2Stores().
| DB2Storage< BattlePetAbilityTurnEntry > sBattlePetAbilityTurnStore(BattlePetAbilityTurnfmt) | ( | BattlePetAbilityTurnfmt | ) |
Referenced by LoadDB2Stores().
| DB2Storage< BattlePetBreedQualityEntry > sBattlePetBreedQualityStore(BattlePetBreedQualityfmt) | ( | BattlePetBreedQualityfmt | ) |
Referenced by AchievementMgr< T >::AdditionalRequirementsSatisfied(), and LoadDB2Stores().
| BattlePetBreedSet sBattlePetBreedSet |
Definition at line 47 of file DB2Stores.cpp.
Referenced by BattlePetMgr::Create(), ObjectMgr::LoadBattlePetBreedData(), LoadDB2Stores(), and BattlePetMgr::LoadFromDb().
| DB2Storage< BattlePetBreedStateEntry > sBattlePetBreedStateStore(BattlePetBreedStatefmt) | ( | BattlePetBreedStatefmt | ) |
Referenced by BattlePetBreedMainStatModifier(), and LoadDB2Stores().
| DB2Storage< BattlePetEffectPropertiesEntry > sBattlePetEffectPropertiesStore(BattlePetEffectPropertiesfmt) | ( | BattlePetEffectPropertiesfmt | ) |
Referenced by LoadDB2Stores().
| BattlePetItemXSpeciesStore sBattlePetItemXSpeciesStore |
Definition at line 48 of file DB2Stores.cpp.
Referenced by Player::CastItemUseSpell(), WorldSession::HandleBattlePetLearn(), ObjectMgr::LoadBattlePetItemToSpeciesData(), and LoadDB2Stores().
| BattlePetQualityMultiplierStore sBattlePetQualityMultiplierStore |
Definition at line 51 of file DB2Stores.cpp.
Referenced by BattlePetQualityMultiplier(), and LoadDB2Stores().
| DB2Storage< BattlePetSpeciesStateEntry > sBattlePetSpeciesStateStore(BattlePetSpeciesStatefmt) | ( | BattlePetSpeciesStatefmt | ) |
Referenced by BattlePetSpeciesMainStat(), and LoadDB2Stores().
| DB2Storage< BattlePetSpeciesEntry > sBattlePetSpeciesStore(BattlePetSpeciesfmt) | ( | BattlePetSpeciesfmt | ) |
Referenced by BattlePetGetSummonSpell(), BattlePetSpeciesFamilyMask(), BattlePetSpeciesHasFlag(), BattlePetSpeciesNpcId(), BattlePetMgr::CanCreateBattlePet(), WorldSession::HandleBattlePetQueryName(), ObjectMgr::LoadBattlePetBreedData(), ObjectMgr::LoadBattlePetItemToSpeciesData(), ObjectMgr::LoadBattlePetQualityData(), LoadDB2Stores(), BattlePetSpawnMgr::LoadFromDB(), BattlePetMgr::LoadFromDb(), ObjectMgr::LoadQuestObjectives(), and BattlePetWildZonePool::SpawnReplacement().
| BattlePetSpeciesXAbilityBySpeciesStore sBattlePetSpeciesXAbilityBySpeciesStore |
Definition at line 52 of file DB2Stores.cpp.
Referenced by BattlePetGetSpeciesAbility(), BattlePetHasSpeciesAbility(), and LoadDB2Stores().
| DB2Storage< BattlePetSpeciesXAbilityEntry > sBattlePetSpeciesXAbilityStore(BattlePetSpeciesXAbilityfmt) | ( | BattlePetSpeciesXAbilityfmt | ) |
Referenced by LoadDB2Stores().
| DB2Storage< BattlePetStateEntry > sBattlePetStateStore(BattlePetStatefmt) | ( | BattlePetStatefmt | ) |
Referenced by LoadDB2Stores().
| DB2Storage< BroadcastTextEntry > sBroadcastTextStore(BroadcastTextfmt) | ( | BroadcastTextfmt | ) |
Referenced by LoadDB2Stores().
| DB2Storage< ItemCurrencyCostEntry > sItemCurrencyCostStore(ItemCurrencyCostfmt) | ( | ItemCurrencyCostfmt | ) |
Referenced by FillDisenchantFields(), and LoadDB2Stores().
| DB2Storage< ItemExtendedCostEntry > sItemExtendedCostStore(ItemExtendedCostEntryfmt) | ( | ItemExtendedCostEntryfmt | ) |
Referenced by LoadDB2Stores(), and ObjectMgr::LoadItemTemplates().
| DB2Storage< ItemToBattlePetEntry > sItemToBattlePetStore(ItemToBattlePetfmt) | ( | ItemToBattlePetfmt | ) |
Referenced by LoadDB2Stores().
| DB2Storage< KeyChainEntry > sKeyChainStore(KeyChainfmt) | ( | KeyChainfmt | ) |
Referenced by LoadDB2Stores().
| DB2Storage< SceneScriptPackageEntry > sSceneScriptPackageStore(SceneScriptPackagefmt) | ( | SceneScriptPackagefmt | ) |
Referenced by AuraEffect::HandlePlayScene(), and LoadDB2Stores().
| DB2Storage< SpellReagentsEntry > sSpellReagentsStore(SpellReagentsfmt) | ( | SpellReagentsfmt | ) |
Referenced by SpellInfo::GetSpellReagents(), and LoadDB2Stores().