mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Factions] Remove from shared memory and simplify (#3999)
* [Factions] Remove from shared memory and simplify - Removes factions from shared memory and moves to zone based storage of repositories and changes the NPC `faction_list` to also use repositories. - This affects NPC Factions and Faction Associations. * Bug fixes. * Update client.cpp * Update client.cpp * Update client.cpp * Cleanup * Update client.cpp * Update client.cpp * Update client.cpp * Final push * Update CMakeLists.txt * Consolidate reloading. * [Cleanup] PR # 3999 (#4039) * [Fixes for PR # 3999 * [Reload actual in game factions, not just the umbrella data. * syntax * Fix typo * Foix bug where primary_faction not filled in when no hits * Fix typos * Fix splash factions for kills. * Fix typo * Fix more variable names to be accurate * Fix Loads to load new ones as they come in. * Load npc_factions without primary (tasks) and support old task faction * Rename to make way for new LoadFactionAssocition (by faction_id) * Fix some review comments * Add code to load factions for splash tasks and quests. * Fix issue with sign and RewardFaction, fix Log Message --------- Co-authored-by: Paul Coene <noudess@gmail.com>
This commit is contained in:
+22
@@ -38,6 +38,9 @@
|
||||
#include "queryserv.h"
|
||||
#include "../common/discord/discord.h"
|
||||
#include "../common/repositories/dynamic_zone_templates_repository.h"
|
||||
#include "../common/repositories/npc_faction_repository.h"
|
||||
#include "../common/repositories/npc_faction_entries_repository.h"
|
||||
#include "../common/repositories/faction_association_repository.h"
|
||||
|
||||
struct EXPModifier
|
||||
{
|
||||
@@ -407,6 +410,21 @@ public:
|
||||
|
||||
void ReloadContentFlags();
|
||||
|
||||
void LoadNPCFaction(const uint32 npc_faction_id);
|
||||
void LoadNPCFactions(const std::vector<uint32>& npc_faction_ids);
|
||||
void ClearNPCFactions();
|
||||
void ReloadNPCFactions();
|
||||
NpcFactionRepository::NpcFaction* GetNPCFaction(const uint32 npc_faction_id);
|
||||
std::vector<NpcFactionEntriesRepository::NpcFactionEntries> GetNPCFactionEntries(const uint32 npc_faction_id) const;
|
||||
|
||||
void LoadNPCFactionAssociation(const uint32 npc_faction_id);
|
||||
void LoadNPCFactionAssociations(const std::vector<uint32>& npc_faction_ids);
|
||||
void LoadFactionAssociation(const uint32 faction_id);
|
||||
void LoadFactionAssociations(const std::vector<uint32>& faction_ids);
|
||||
void ClearFactionAssociations();
|
||||
void ReloadFactionAssociations();
|
||||
FactionAssociationRepository::FactionAssociation* GetFactionAssociation(const uint32 faction_id);
|
||||
|
||||
private:
|
||||
bool allow_mercs;
|
||||
bool can_bind;
|
||||
@@ -457,6 +475,10 @@ private:
|
||||
Timer qglobal_purge_timer;
|
||||
ZoneSpellsBlocked *blocked_spells;
|
||||
|
||||
// Factions
|
||||
std::vector<NpcFactionRepository::NpcFaction> m_npc_factions = { };
|
||||
std::vector<NpcFactionEntriesRepository::NpcFactionEntries> m_npc_faction_entries = { };
|
||||
std::vector<FactionAssociationRepository::FactionAssociation> m_faction_associations = { };
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user