Fixed loading player scripts for zones by their zones table name parameter

This commit is contained in:
Emagi 2025-08-02 15:42:36 -04:00
parent baf74d0bdd
commit 25325477ab

View File

@ -1833,7 +1833,7 @@ void World::LoadPlayerScripts() {
if (entry.is_regular_file() && entry.path().extension() == ".lua") {
std::string baseName = entry.path().stem().string(); // Strips extension
const std::string filename = entry.path().string();
int32 zoneID = database.GetZoneID(filename.c_str());
int32 zoneID = database.GetZoneID(baseName.c_str());
std::cout << " - Load File " << filename << " with base name: " << baseName << "\n";
if(zoneID) {
AddPlayerScript(zoneID, filename.c_str());