Fixed loading player scripts for zones by their zones table name
parameter
This commit is contained in:
parent
baf74d0bdd
commit
25325477ab
@ -1833,7 +1833,7 @@ void World::LoadPlayerScripts() {
|
|||||||
if (entry.is_regular_file() && entry.path().extension() == ".lua") {
|
if (entry.is_regular_file() && entry.path().extension() == ".lua") {
|
||||||
std::string baseName = entry.path().stem().string(); // Strips extension
|
std::string baseName = entry.path().stem().string(); // Strips extension
|
||||||
const std::string filename = entry.path().string();
|
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";
|
std::cout << " - Load File " << filename << " with base name: " << baseName << "\n";
|
||||||
if(zoneID) {
|
if(zoneID) {
|
||||||
AddPlayerScript(zoneID, filename.c_str());
|
AddPlayerScript(zoneID, filename.c_str());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user