[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
View File
@@ -15,6 +15,7 @@ void command_reload(Client *c, const Seperator *sep)
bool is_rq_alias = sep->arg[0] && Strings::Contains(command, "#rq");
bool is_aa = !strcasecmp(sep->arg[1], "aa");
bool is_alternate_currencies = !strcasecmp(sep->arg[1], "alternate_currencies");
bool is_base_data = !strcasecmp(sep->arg[1], "base_data");
bool is_blocked_spells = !strcasecmp(sep->arg[1], "blocked_spells");
bool is_commands = !strcasecmp(sep->arg[1], "commands");
bool is_content_flags = !strcasecmp(sep->arg[1], "content_flags");
@@ -46,6 +47,7 @@ void command_reload(Client *c, const Seperator *sep)
if (
!is_aa &&
!is_alternate_currencies &&
!is_base_data &&
!is_blocked_spells &&
!is_commands &&
!is_content_flags &&
@@ -86,6 +88,9 @@ void command_reload(Client *c, const Seperator *sep)
} else if (is_alternate_currencies) {
c->Message(Chat::White, "Attempting to reload Alternate Currencies globally.");
pack = new ServerPacket(ServerOP_ReloadAlternateCurrencies, 0);
} else if (is_base_data) {
c->Message(Chat::White, "Attempting to reload Base Data globally.");
pack = new ServerPacket(ServerOP_ReloadBaseData, 0);
} else if (is_blocked_spells) {
c->Message(Chat::White, "Attempting to reload Blocked Spells globally.");
pack = new ServerPacket(ServerOP_ReloadBlockedSpells, 0);