mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 11:28:25 +00:00
[Feature] Faction Association (#2408)
* Add faction logging category Probably should use this for more things * Add FactionAssociation struct This is simply just a struct that contains an array of faction ids and multiplier. This can hold a maximum of 10 entries (Seru hit is 8, so 2 extra) this can be raised if need be. * Add database changes and other data point changes This is all the database changes and loading changes Included is an optional SQL that will be used as a starting point, there is likely errors or typos, but we will fix those as they are discovered. * Add Client::RewardFaction function This just takes the faction ID and the magnitude of the primary faction hit and calculates the rest. The minimum change will be either 1 or -1. We stop processing after we see an ID of 0 and assume there will be no later entries. The primary faction ID will always receive a hit even if there is no faction association entries * Add users of RewardFaction to NPC death, tasks, and QuestRewards This will only use the new system if the magnitude is set, otherwise we will just use the old system still * Add quest system calls and lua QuestReward support * Add #factionassociation command This just calls RewardFaction, mostly useful for debugging
This commit is contained in:
committed by
GitHub
parent
efe1879115
commit
2b4e555eae
+23
-7
@@ -27,6 +27,7 @@
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/eqemu_exception.h"
|
||||
#include "../common/strings.h"
|
||||
#include "faction_association.h"
|
||||
#include "items.h"
|
||||
#include "npc_faction.h"
|
||||
#include "loot.h"
|
||||
@@ -181,13 +182,14 @@ int main(int argc, char **argv)
|
||||
|
||||
std::string hotfix_name = "";
|
||||
|
||||
bool load_all = true;
|
||||
bool load_items = false;
|
||||
bool load_factions = false;
|
||||
bool load_loot = false;
|
||||
bool load_skill_caps = false;
|
||||
bool load_spells = false;
|
||||
bool load_bd = false;
|
||||
bool load_all = true;
|
||||
bool load_items = false;
|
||||
bool load_factions = false;
|
||||
bool load_faction_assoc = false;
|
||||
bool load_loot = false;
|
||||
bool load_skill_caps = false;
|
||||
bool load_spells = false;
|
||||
bool load_bd = false;
|
||||
|
||||
if (argc > 1) {
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
@@ -229,6 +231,10 @@ int main(int argc, char **argv)
|
||||
load_spells = true;
|
||||
load_all = false;
|
||||
}
|
||||
else if (strcasecmp("faction_assoc", argv[i]) == 0) {
|
||||
load_faction_assoc = true;
|
||||
load_all = false;
|
||||
}
|
||||
break;
|
||||
case '-': {
|
||||
auto split = Strings::Split(argv[i], '=');
|
||||
@@ -300,6 +306,16 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
if (load_all || load_faction_assoc) {
|
||||
LogInfo("Loading faction associations");
|
||||
try {
|
||||
LoadFactionAssociation(&content_db, hotfix_name);
|
||||
} catch(std::exception &ex) {
|
||||
LogError("{}", ex.what());
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (load_all || load_bd) {
|
||||
LogInfo("Loading base data");
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user