diff --git a/scripts/server/startup.js b/scripts/server/startup.js index ef3e3a6b..2b14dbae 100644 --- a/scripts/server/startup.js +++ b/scripts/server/startup.js @@ -59,7 +59,7 @@ function initServerScripts() { // =========================================================================== function checkForHashingModule() { - if(typeof module.hashing == "undefined") { + if (typeof module.hashing == "undefined") { return false; } return true; @@ -68,7 +68,7 @@ function checkForHashingModule() { // =========================================================================== function checkForMySQLModule() { - if(typeof module.mysql == "undefined") { + if (typeof module.mysql == "undefined") { return false; } @@ -78,7 +78,7 @@ function checkForMySQLModule() { // =========================================================================== function checkForSMTPModule() { - if(typeof module.smtp == "undefined") { + if (typeof module.smtp == "undefined") { return false; } @@ -90,19 +90,19 @@ function checkForSMTPModule() { function checkForAllRequiredModules() { logToConsole(LOG_DEBUG, "[VRR.Startup]: Checking for required modules ..."); - if(!checkForHashingModule()) { + if (!checkForHashingModule()) { logToConsole(LOG_WARN, "[VRR.Startup]: Hashing module is not loaded!"); logToConsole(LOG_WARN, "[VRR.Startup]: This resource will now shutdown."); thisResource.stop(); } - if(!checkForMySQLModule()) { + if (!checkForMySQLModule()) { logToConsole(LOG_WARN, "[VRR.Startup]: MySQL module is not loaded!"); logToConsole(LOG_WARN, "[VRR.Startup]: This resource will now shutdown."); thisResource.stop(); } - if(!checkForSMTPModule()) { + if (!checkForSMTPModule()) { logToConsole(LOG_WARN, "[VRR.Startup]: SMTP Email module is not loaded!"); logToConsole(LOG_WARN, "[VRR.Startup]: Email features will NOT be available!"); } @@ -120,6 +120,8 @@ function loadServerDataFromDatabase() { getServerData().localeStrings = loadAllLocaleStrings(); getServerData().allowedSkins = getAllowedSkins(getGame()); + getServerData().itemTypes = loadItemTypesFromDatabase(); + // Translation Cache getServerData().cachedTranslations = new Array(getGlobalConfig().locale.locales.length); getServerData().cachedTranslationFrom = new Array(getGlobalConfig().locale.locales.length); @@ -127,8 +129,7 @@ function loadServerDataFromDatabase() { getServerData().cachedTranslations.fill(getServerData().cachedTranslationFrom); // Only load these if the server isn't a testing/dev server - if(!getServerConfig().devServer) { - getServerData().itemTypes = loadItemTypesFromDatabase(); + if (!getServerConfig().devServer) { getServerData().items = loadItemsFromDatabase(); getServerData().businesses = loadBusinessesFromDatabase(); getServerData().houses = loadHousesFromDatabase();