[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
This commit is contained in:
1 parent
cb3b6e7c77
commit
24e24d3c02
11 files changed
+128
-6
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user