feat(Core/Pets): Management refactoring (#9712)

* feat(Core/Pets): rework managment

* 1

* 2

* 3

* 4

* 5

* cs pet

* check before ressurect

* pet DECLINED_NAMES

* display

- https://github.com/azerothcore/azerothcore-wotlk/issues/9297

* ArenaSpectator

* 1
This commit is contained in:
Kargatum
2021-12-31 04:45:13 +07:00
committed by GitHub
parent 24ab99919a
commit e12494d993
24 changed files with 1173 additions and 1208 deletions

View File

@@ -159,6 +159,7 @@ DBCStorage <StableSlotPricesEntry> sStableSlotPricesStore(StableSlotPricesfmt);
DBCStorage <SummonPropertiesEntry> sSummonPropertiesStore(SummonPropertiesfmt);
DBCStorage <TalentEntry> sTalentStore(TalentEntryfmt);
TalentSpellPosMap sTalentSpellPosMap;
std::unordered_set<uint32> sPetTalentSpells;
DBCStorage <TalentTabEntry> sTalentTabStore(TalentTabEntryfmt);
// store absolute bit position for first rank for talent inspect
@@ -474,10 +475,23 @@ void LoadDBCStores(const std::string& dataPath)
// create talent spells set
for (TalentEntry const* talentInfo : sTalentStore)
{
TalentTabEntry const* talentTab = sTalentTabStore.LookupEntry(talentInfo->TalentTab);
for (uint8 j = 0; j < MAX_TALENT_RANK; ++j)
{
if (talentInfo->RankID[j])
{
sTalentSpellPosMap[talentInfo->RankID[j]] = TalentSpellPos(talentInfo->TalentID, j);
if (talentTab && talentTab->petTalentMask)
{
sPetTalentSpells.insert(talentInfo->RankID[j]);
}
}
}
}
// prepare fast data access to bit pos of talent ranks for use at inspecting
{
// now have all max ranks (and then bit amount used for store talent ranks in inspect)

View File

@@ -23,6 +23,7 @@
#include "DBCStructure.h"
#include <list>
#include <unordered_map>
#include <unordered_set>
typedef std::list<uint32> SimpleFactionsList;
typedef std::vector<FlyByCamera> FlyByCameraCollection;
@@ -155,6 +156,7 @@ extern DBCStorage <SpellItemEnchantmentEntry> sSpellItemEnchantmentStore;
extern DBCStorage <SpellItemEnchantmentConditionEntry> sSpellItemEnchantmentConditionStore;
extern SpellCategoryStore sSpellsByCategoryStore;
extern PetFamilySpellsStore sPetFamilySpellsStore;
extern std::unordered_set<uint32> sPetTalentSpells;
extern DBCStorage <SpellRadiusEntry> sSpellRadiusStore;
extern DBCStorage <SpellRangeEntry> sSpellRangeStore;
extern DBCStorage <SpellRuneCostEntry> sSpellRuneCostStore;