[Base Data] Remove from shared memory and simplify (#4045)

* [Base Data] Remove from shared memory and simplify

- Removes Base Data loading from shared memory and puts it into zone.
- Changes type of `level` and `class` to `uint8_t` from `uint32_t` for consistency since we're renaming fields here anyway.
- Renames `unk1` to `hp_regen` in `base_data` table.
- Renames `unk2` to `end_regen` in `base_data` table.
- These changed fields were already mapped, we just hadn't renamed them for whatever reason.
- Regenerates Base Data repository.
- Adds `#reload base_data` to reload base data in real time.

* Cleanup

* Update shareddb.h

* Cleanup.

* Update shareddb.cpp

* Update main.cpp
This commit is contained in:
Alex King
2024-02-05 18:11:20 -05:00
committed by GitHub
parent b6b779723e
commit 8edf7a07e3
24 changed files with 213 additions and 381 deletions
+5 -23
View File
@@ -30,7 +30,6 @@
#include "items.h"
#include "skill_caps.h"
#include "spells.h"
#include "base_data.h"
#include "../common/content/world_content_service.h"
#include "../common/zone_store.h"
#include "../common/path_manager.h"
@@ -180,22 +179,15 @@ int main(int argc, char **argv)
std::string hotfix_name = "";
bool load_all = true;
bool load_items = false;
bool load_skill_caps = false;
bool load_spells = false;
bool load_bd = false;
bool load_all = true;
bool load_items = false;
bool load_loot = false;
bool load_skill_caps = false;
bool load_spells = false;
if (argc > 1) {
for (int i = 1; i < argc; ++i) {
switch (argv[i][0]) {
case 'b':
if (strcasecmp("base_data", argv[i]) == 0) {
load_bd = true;
load_all = false;
}
break;
case 'i':
if (strcasecmp("items", argv[i]) == 0) {
load_items = true;
@@ -263,16 +255,6 @@ int main(int argc, char **argv)
}
}
if (load_all || load_bd) {
LogInfo("Loading base data");
try {
LoadBaseData(&content_db, hotfix_name);
} catch (std::exception &ex) {
LogError("{}", ex.what());
return 1;
}
}
LogSys.CloseFileLogs();
return 0;
}