fix(Core/Commands): debug send opcode (#2344)
This commit is contained in:
@@ -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'' не найден в рабочей директории сервера');
|
||||||
@@ -1312,6 +1312,8 @@ enum TrinityStrings
|
|||||||
// Instant Flight
|
// Instant Flight
|
||||||
LANG_TOGGLE_INSTANT_FLIGHT = 30077,
|
LANG_TOGGLE_INSTANT_FLIGHT = 30077,
|
||||||
LANG_INSTANT_FLIGHT_ON = 30078,
|
LANG_INSTANT_FLIGHT_ON = 30078,
|
||||||
LANG_INSTANT_FLIGHT_OFF = 30079
|
LANG_INSTANT_FLIGHT_OFF = 30079,
|
||||||
|
|
||||||
|
LANG_DEBUG_OPCODE_FILE_MISSING = 30080
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -250,8 +250,12 @@ public:
|
|||||||
unit = player;
|
unit = player;
|
||||||
|
|
||||||
std::ifstream ifs("opcode.txt");
|
std::ifstream ifs("opcode.txt");
|
||||||
if (ifs.bad())
|
if (!ifs.is_open())
|
||||||
|
{
|
||||||
|
handler->SendSysMessage(LANG_DEBUG_OPCODE_FILE_MISSING);
|
||||||
|
handler->SetSentErrorMessage(true);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// remove comments from file
|
// remove comments from file
|
||||||
std::stringstream parsedStream;
|
std::stringstream parsedStream;
|
||||||
|
|||||||
Reference in New Issue
Block a user