[Reload] Add Reload for Maps / Navs (#4816)

This commit is contained in:
Chris Miles 2025-03-29 18:24:17 -05:00 committed by GitHub
parent ca9c1fdd24
commit 82b48fe6e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 0 deletions

View File

@ -22,6 +22,7 @@ namespace ServerReload {
LevelEXPMods, LevelEXPMods,
Logs, Logs,
Loot, Loot,
Maps,
Merchants, Merchants,
NPCEmotes, NPCEmotes,
NPCSpells, NPCSpells,
@ -61,6 +62,7 @@ namespace ServerReload {
"Level EXP Mods", "Level EXP Mods",
"Logs", "Logs",
"Loot", "Loot",
"Maps",
"Merchants", "Merchants",
"NPC Emotes", "NPC Emotes",
"NPC Spells", "NPC Spells",

View File

@ -4599,6 +4599,10 @@ void WorldServer::ProcessReload(const ServerReload::Request& request)
zone->ReloadLootTables(); zone->ReloadLootTables();
break; break;
case ServerReload::Type::Maps:
zone->ReloadMaps();
break;
case ServerReload::Type::Merchants: case ServerReload::Type::Merchants:
entity_list.ReloadMerchants(); entity_list.ReloadMerchants();
break; break;

View File

@ -3288,5 +3288,12 @@ bool Zone::VariableExists(const std::string& variable_name)
return m_zone_variables.find(variable_name) != m_zone_variables.end(); return m_zone_variables.find(variable_name) != m_zone_variables.end();
} }
void Zone::ReloadMaps()
{
zonemap = Map::LoadMapFile(map_name);
watermap = WaterMap::LoadWaterMapfile(map_name);
pathing = IPathfinder::Load(map_name);
}
#include "zone_save_state.cpp" #include "zone_save_state.cpp"
#include "zone_loot.cpp" #include "zone_loot.cpp"

View File

@ -479,6 +479,7 @@ public:
); );
void SaveZoneState(); void SaveZoneState();
static void ClearZoneState(uint32 zone_id, uint32 instance_id); static void ClearZoneState(uint32 zone_id, uint32 instance_id);
void ReloadMaps();
private: private:
bool allow_mercs; bool allow_mercs;