diff options
author | megamage <none@none> | 2009-04-05 16:58:20 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-05 16:58:20 -0500 |
commit | 24e24d3c023f31f0363e55fda413181ca9f73439 (patch) | |
tree | bbfe929fe9a016848213eae11e60c9c99fb9247c /src/game/Debugcmds.cpp | |
parent | cb3b6e7c773ec8a979f6f08a5d2d60b9602c2bc1 (diff) |
[7616] Implement .debug play cinematic and .debig play movie. Rename .debug playsound to .debug play sound. Author: VladimirMangos
*Note: some conflicts of string.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Debugcmds.cpp')
-rw-r--r-- | src/game/Debugcmds.cpp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/game/Debugcmds.cpp b/src/game/Debugcmds.cpp index 3bd630f799b..e50ca1677de 100644 --- a/src/game/Debugcmds.cpp +++ b/src/game/Debugcmds.cpp @@ -242,6 +242,54 @@ bool ChatHandler::HandleDebugUpdateWorldStateCommand(const char* args) return true; } +bool ChatHandler::HandleDebugPlayCinematicCommand(const char* args) +{ + // USAGE: .debug play cinematic #cinematicid + // #cinematicid - ID decimal number from CinemaicSequences.dbc (1st column) + if( !*args ) + { + SendSysMessage(LANG_BAD_VALUE); + SetSentErrorMessage(true); + return false; + } + + uint32 dwId = atoi((char*)args); + + if(!sCinematicSequencesStore.LookupEntry(dwId)) + { + PSendSysMessage(LANG_CINEMATIC_NOT_EXIST, dwId); + SetSentErrorMessage(true); + return false; + } + + m_session->GetPlayer()->SendCinematicStart(dwId); + return true; +} + +bool ChatHandler::HandleDebugPlayMovieCommand(const char* args) +{ + // USAGE: .debug play movie #movieid + // #movieid - ID decimal number from Movie.dbc (1st column) + if( !*args ) + { + SendSysMessage(LANG_BAD_VALUE); + SetSentErrorMessage(true); + return false; + } + + uint32 dwId = atoi((char*)args); + + if(!sMovieStore.LookupEntry(dwId)) + { + PSendSysMessage(LANG_MOVIE_NOT_EXIST, dwId); + SetSentErrorMessage(true); + return false; + } + + m_session->GetPlayer()->SendMovieStart(dwId); + return true; +} + //Play sound bool ChatHandler::HandleDebugPlaySoundCommand(const char* args) { |