diff --git a/data/sql/updates/pending_db_world/rev_1570916858306186295.sql b/data/sql/updates/pending_db_world/rev_1570916858306186295.sql new file mode 100644 index 000000000..290d2b312 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1570916858306186295.sql @@ -0,0 +1,6 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1570916858306186295'); + +DELETE FROM `trinity_string` WHERE `entry` = 30080; +INSERT INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) +VALUES +(30080,'The file ''opcode.txt'' is missing in the server working directory.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Файл ''opcode.txt'' не найден в рабочей директории сервера'); diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 99d1b7010..3b4438739 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -1312,6 +1312,8 @@ enum TrinityStrings // Instant Flight LANG_TOGGLE_INSTANT_FLIGHT = 30077, LANG_INSTANT_FLIGHT_ON = 30078, - LANG_INSTANT_FLIGHT_OFF = 30079 + LANG_INSTANT_FLIGHT_OFF = 30079, + + LANG_DEBUG_OPCODE_FILE_MISSING = 30080 }; #endif diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index bac6d9f8d..54780b9dc 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -250,8 +250,12 @@ public: unit = player; std::ifstream ifs("opcode.txt"); - if (ifs.bad()) + if (!ifs.is_open()) + { + handler->SendSysMessage(LANG_DEBUG_OPCODE_FILE_MISSING); + handler->SetSentErrorMessage(true); return false; + } // remove comments from file std::stringstream parsedStream;