mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[7616] Implement .debug play cinematic and .debig play movie. Rename .debug playsound to .debug play sound.
This commit is contained in:
parent
678be86d67
commit
dfa2869136
13 changed files with 132 additions and 8 deletions
|
|
@ -212,6 +212,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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue