mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-04 18:46:37 +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:
@@ -340,9 +340,9 @@ void command_npcedit(Client *c, const Seperator *sep)
|
||||
} else if (!strcasecmp(sep->arg[1], "faction")) {
|
||||
if (sep->IsNumber(2)) {
|
||||
auto npc_faction_id = Strings::ToInt(sep->arg[2]);
|
||||
const NPCFactionList* cf = content_db.GetNPCFactionEntry(npc_faction_id);
|
||||
if (cf) {
|
||||
auto faction_id = cf->primaryfaction;
|
||||
const auto f = zone->GetNPCFaction(npc_faction_id);
|
||||
if (f) {
|
||||
auto faction_id = f->primaryfaction;
|
||||
auto faction_name = content_db.GetFactionName(faction_id);
|
||||
|
||||
n.npc_faction_id = npc_faction_id;
|
||||
|
||||
@@ -21,6 +21,7 @@ void command_reload(Client *c, const Seperator *sep)
|
||||
bool is_data_buckets = !strcasecmp(sep->arg[1], "data_buckets_cache");
|
||||
bool is_doors = !strcasecmp(sep->arg[1], "doors");
|
||||
bool is_dztemplates = !strcasecmp(sep->arg[1], "dztemplates");
|
||||
bool is_factions = !strcasecmp(sep->arg[1], "factions");
|
||||
bool is_ground_spawns = !strcasecmp(sep->arg[1], "ground_spawns");
|
||||
bool is_level_mods = !strcasecmp(sep->arg[1], "level_mods");
|
||||
bool is_logs = !strcasecmp(sep->arg[1], "logs") || is_logs_reload_alias;
|
||||
@@ -50,6 +51,7 @@ void command_reload(Client *c, const Seperator *sep)
|
||||
!is_data_buckets &&
|
||||
!is_doors &&
|
||||
!is_dztemplates &&
|
||||
!is_factions &&
|
||||
!is_ground_spawns &&
|
||||
!is_level_mods &&
|
||||
!is_logs &&
|
||||
@@ -100,6 +102,9 @@ void command_reload(Client *c, const Seperator *sep)
|
||||
} else if (is_dztemplates) {
|
||||
c->Message(Chat::White, "Attempting to reload Dynamic Zone Templates globally.");
|
||||
pack = new ServerPacket(ServerOP_ReloadDzTemplates, 0);
|
||||
} else if (is_factions) {
|
||||
c->Message(Chat::White, "Attempting to reload Factions globally.");
|
||||
pack = new ServerPacket(ServerOP_ReloadFactions, 0);
|
||||
} else if (is_ground_spawns) {
|
||||
c->Message(Chat::White, "Attempting to reload Ground Spawns globally.");
|
||||
pack = new ServerPacket(ServerOP_ReloadGroundSpawns, 0);
|
||||
|
||||
Reference in New Issue
Block a user