fix(Core/Commands): debug send opcode (#2344)
This commit is contained in:
parent
6b395e9b70
commit
d4cf4c1fd9
3 changed files with 14 additions and 2 deletions
|
|
@ -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
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue