feat(Core/Creatures): implement a sparring system (#19824)

This commit is contained in:
Grimdhex
2025-01-26 09:40:37 +01:00
committed by GitHub
parent 2b4a6cc902
commit edf2959a26
8 changed files with 114 additions and 1 deletions

View File

@@ -751,6 +751,8 @@ public:
typedef std::map<uint32, uint32> CharacterConversionMap;
typedef std::unordered_map<ObjectGuid::LowType, std::vector<float>> CreatureSparringContainer;
GameObjectTemplate const* GetGameObjectTemplate(uint32 entry);
bool IsGameObjectStaticTransport(uint32 entry);
[[nodiscard]] GameObjectTemplateContainer const* GetGameObjectTemplates() const { return &_gameObjectTemplateStore; }
@@ -1028,6 +1030,7 @@ public:
void LoadCreatureQuestItems();
void LoadTempSummons();
void LoadCreatures();
void LoadCreatureSparring();
void LoadLinkedRespawn();
bool SetCreatureLinkedRespawn(ObjectGuid::LowType guid, ObjectGuid::LowType linkedGuid);
void LoadCreatureAddons();
@@ -1201,6 +1204,9 @@ public:
if (itr == _creatureDataStore.end()) return nullptr;
return &itr->second;
}
[[nodiscard]] CreatureSparringContainer const& GetSparringData() const { return _creatureSparringStore; }
CreatureData& NewOrExistCreatureData(ObjectGuid::LowType spawnId) { return _creatureDataStore[spawnId]; }
void DeleteCreatureData(ObjectGuid::LowType spawnId);
[[nodiscard]] ObjectGuid GetLinkedRespawnGuid(ObjectGuid guid) const
@@ -1526,6 +1532,8 @@ private:
PageTextContainer _pageTextStore;
InstanceTemplateContainer _instanceTemplateStore;
CreatureSparringContainer _creatureSparringStore;
private:
void LoadScripts(ScriptsType type);
void LoadQuestRelationsHelper(QuestRelations& map, std::string const& table, bool starter, bool go);