mirror of
https://github.com/mangosfour/server.git
synced 2025-12-20 07:37:02 +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
|
|
@ -105,6 +105,14 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand debugPlayCommandTable[] =
|
||||
{
|
||||
{ "cinematic", SEC_MODERATOR, false, &ChatHandler::HandleDebugPlayCinematicCommand, "", NULL },
|
||||
{ "movie", SEC_MODERATOR, false, &ChatHandler::HandleDebugPlayMovieCommand, "", NULL },
|
||||
{ "sound", SEC_MODERATOR, false, &ChatHandler::HandleDebugPlaySoundCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
static ChatCommand debugSendCommandTable[] =
|
||||
{
|
||||
{ "buyerror", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendBuyErrorCommand, "", NULL },
|
||||
|
|
@ -131,7 +139,7 @@ ChatCommand * ChatHandler::getCommandTable()
|
|||
{ "lootrecipient", SEC_GAMEMASTER, false, &ChatHandler::HandleDebugGetLootRecipient, "", NULL },
|
||||
{ "getvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugGetValue, "", NULL },
|
||||
{ "Mod32Value", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugMod32Value, "", NULL },
|
||||
{ "playsound", SEC_MODERATOR, false, &ChatHandler::HandleDebugPlaySoundCommand, "", NULL },
|
||||
{ "play", SEC_MODERATOR, false, NULL, "", debugPlayCommandTable },
|
||||
{ "send", SEC_ADMINISTRATOR, false, NULL, "", debugSendCommandTable },
|
||||
{ "setitemflag", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetItemFlagCommand, "", NULL },
|
||||
{ "setvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetValue, "", NULL },
|
||||
|
|
|
|||
|
|
@ -118,13 +118,16 @@ class ChatHandler
|
|||
bool HandleDebugGetLootRecipient(const char * args);
|
||||
bool HandleDebugGetValue(const char* args);
|
||||
bool HandleDebugMod32Value(const char* args);
|
||||
bool HandleDebugPlaySoundCommand(const char* args);
|
||||
bool HandleDebugSetValue(const char* args);
|
||||
bool HandleDebugSetItemFlagCommand(const char * args);
|
||||
bool HandleDebugSpawnVehicle(const char * args);
|
||||
bool HandleDebugUpdate(const char* args);
|
||||
bool HandleDebugUpdateWorldStateCommand(const char* args);
|
||||
|
||||
bool HandleDebugPlayCinematicCommand(const char* args);
|
||||
bool HandleDebugPlayMovieCommand(const char* args);
|
||||
bool HandleDebugPlaySoundCommand(const char* args);
|
||||
|
||||
bool HandleDebugSendBuyErrorCommand(const char* args);
|
||||
bool HandleDebugSendChannelNotifyCommand(const char* args);
|
||||
bool HandleDebugSendChatMsgCommand(const char* args);
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ DBCStorage <CharTitlesEntry> sCharTitlesStore(CharTitlesEntryfmt);
|
|||
DBCStorage <ChatChannelsEntry> sChatChannelsStore(ChatChannelsEntryfmt);
|
||||
DBCStorage <ChrClassesEntry> sChrClassesStore(ChrClassesEntryfmt);
|
||||
DBCStorage <ChrRacesEntry> sChrRacesStore(ChrRacesEntryfmt);
|
||||
DBCStorage <CinematicSequencesEntry> sCinematicSequencesStore(CinematicSequencesEntryfmt);
|
||||
DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore(CreatureDisplayInfofmt);
|
||||
DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore(CreatureFamilyfmt);
|
||||
DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore(CreatureSpellDatafmt);
|
||||
|
|
@ -76,7 +77,9 @@ DBCStorage <GtOCTRegenHPEntry> sGtOCTRegenHPStore(GtOCTRegenHPfmt);
|
|||
//DBCStorage <GtOCTRegenMPEntry> sGtOCTRegenMPStore(GtOCTRegenMPfmt); -- not used currently
|
||||
DBCStorage <GtRegenHPPerSptEntry> sGtRegenHPPerSptStore(GtRegenHPPerSptfmt);
|
||||
DBCStorage <GtRegenMPPerSptEntry> sGtRegenMPPerSptStore(GtRegenMPPerSptfmt);
|
||||
|
||||
DBCStorage <HolidaysEntry> sHolidaysStore(Holidaysfmt);
|
||||
|
||||
DBCStorage <ItemEntry> sItemStore(Itemfmt);
|
||||
DBCStorage <ItemBagFamilyEntry> sItemBagFamilyStore(ItemBagFamilyfmt);
|
||||
//DBCStorage <ItemCondExtCostsEntry> sItemCondExtCostsStore(ItemCondExtCostsEntryfmt);
|
||||
|
|
@ -91,6 +94,7 @@ DBCStorage <LockEntry> sLockStore(LockEntryfmt);
|
|||
|
||||
DBCStorage <MailTemplateEntry> sMailTemplateStore(MailTemplateEntryfmt);
|
||||
DBCStorage <MapEntry> sMapStore(MapEntryfmt);
|
||||
DBCStorage <MovieEntry> sMovieStore(MovieEntryfmt);
|
||||
|
||||
DBCStorage <QuestSortEntry> sQuestSortStore(QuestSortEntryfmt);
|
||||
|
||||
|
|
@ -197,7 +201,7 @@ void LoadDBCStores(const std::string& dataPath)
|
|||
{
|
||||
std::string dbcPath = dataPath+"dbc/";
|
||||
|
||||
const uint32 DBCFilesCount = 75;
|
||||
const uint32 DBCFilesCount = 77;
|
||||
|
||||
barGoLink bar( DBCFilesCount );
|
||||
|
||||
|
|
@ -234,6 +238,7 @@ void LoadDBCStores(const std::string& dataPath)
|
|||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChatChannelsStore, dbcPath,"ChatChannels.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChrClassesStore, dbcPath,"ChrClasses.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sChrRacesStore, dbcPath,"ChrRaces.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCinematicSequencesStore, dbcPath,"CinematicSequences.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureDisplayInfoStore, dbcPath,"CreatureDisplayInfo.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureFamilyStore, dbcPath,"CreatureFamily.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sCreatureSpellDataStore, dbcPath,"CreatureSpellData.dbc");
|
||||
|
|
@ -284,6 +289,7 @@ void LoadDBCStores(const std::string& dataPath)
|
|||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sLockStore, dbcPath,"Lock.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMailTemplateStore, dbcPath,"MailTemplate.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMapStore, dbcPath,"Map.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sMovieStore, dbcPath,"Movie.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sQuestSortStore, dbcPath,"QuestSort.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sRandomPropertiesPointsStore, dbcPath,"RandPropPoints.dbc");
|
||||
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sScalingStatDistributionStore, dbcPath,"ScalingStatDistribution.dbc");
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ extern DBCStorage <CharStartOutfitEntry> sCharStartOutfitStore;
|
|||
extern DBCStorage <CharTitlesEntry> sCharTitlesStore;
|
||||
extern DBCStorage <ChrClassesEntry> sChrClassesStore;
|
||||
extern DBCStorage <ChrRacesEntry> sChrRacesStore;
|
||||
extern DBCStorage <CinematicSequencesEntry> sCinematicSequencesStore;
|
||||
extern DBCStorage <CreatureDisplayInfoEntry> sCreatureDisplayInfoStore;
|
||||
extern DBCStorage <CreatureFamilyEntry> sCreatureFamilyStore;
|
||||
extern DBCStorage <CreatureSpellDataEntry> sCreatureSpellDataStore;
|
||||
|
|
@ -108,6 +109,7 @@ extern DBCStorage <ItemSetEntry> sItemSetStore;
|
|||
extern DBCStorage <LockEntry> sLockStore;
|
||||
extern DBCStorage <MailTemplateEntry> sMailTemplateStore;
|
||||
extern DBCStorage <MapEntry> sMapStore;
|
||||
extern DBCStorage <MovieEntry> sMovieStore;
|
||||
extern DBCStorage <QuestSortEntry> sQuestSortStore;
|
||||
extern DBCStorage <RandomPropertiesPointsEntry> sRandomPropertiesPointsStore;
|
||||
extern DBCStorage <ScalingStatDistributionEntry> sScalingStatDistributionStore;
|
||||
|
|
|
|||
|
|
@ -648,6 +648,27 @@ struct ChrRacesEntry
|
|||
uint32 addon; // 68 (0 - original race, 1 - tbc addon, ...)
|
||||
};
|
||||
|
||||
/* not used
|
||||
struct CinematicCameraEntry
|
||||
{
|
||||
uint32 id; // 0 index
|
||||
char* filename; // 1
|
||||
uint32 soundid; // 2 in SoundEntries.dbc or 0
|
||||
float start_x; // 3
|
||||
float start_y; // 4
|
||||
float start_z; // 5
|
||||
float unk6; // 6 speed?
|
||||
};
|
||||
*/
|
||||
|
||||
struct CinematicSequencesEntry
|
||||
{
|
||||
uint32 Id; // 0 index
|
||||
//uint32 unk1; // 1 always 0
|
||||
//uint32 cinematicCamera; // 2 id in CinematicCamera.dbc
|
||||
// 3-9 always 0
|
||||
};
|
||||
|
||||
struct CreatureDisplayInfoEntry
|
||||
{
|
||||
uint32 Displayid; // 0 m_ID
|
||||
|
|
@ -1077,6 +1098,13 @@ struct MapEntry
|
|||
}
|
||||
};
|
||||
|
||||
struct MovieEntry
|
||||
{
|
||||
uint32 Id; // 0 index
|
||||
//char* filename; // 1
|
||||
//uint32 unk2; // 2 always 100
|
||||
};
|
||||
|
||||
struct QuestSortEntry
|
||||
{
|
||||
uint32 id; // 0 m_ID
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ const char ChatChannelsEntryfmt[]="iixssssssssssssssssxxxxxxxxxxxxxxxxxx";
|
|||
// ChatChannelsEntryfmt, index not used (more compact store)
|
||||
const char ChrClassesEntryfmt[]="nxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixii";
|
||||
const char ChrRacesEntryfmt[]="nxixiixxixxxxissssssssssssssssxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxi";
|
||||
const char CinematicSequencesEntryfmt[]="nxxxxxxxxx";
|
||||
const char CreatureDisplayInfofmt[]="nxxxfxxxxxxxxxxx";
|
||||
const char CreatureFamilyfmt[]="nfifiiiiixssssssssssssssssxx";
|
||||
const char CreatureSpellDatafmt[]="nxxxxxxxx";
|
||||
|
|
@ -70,6 +71,7 @@ const char ItemSetEntryfmt[]="dssssssssssssssssxxxxxxxxxxxxxxxxxxiiiiiiiiiiiiiii
|
|||
const char LockEntryfmt[]="niiiiiiiiiiiiiiiiiiiiiiiixxxxxxxx";
|
||||
const char MailTemplateEntryfmt[]="nxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
|
||||
const char MapEntryfmt[]="nxixssssssssssssssssxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxixxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxiffiixxix";
|
||||
const char MovieEntryfmt[]="nxx";
|
||||
const char QuestSortEntryfmt[]="nxxxxxxxxxxxxxxxxx";
|
||||
const char RandomPropertiesPointsfmt[]="niiiiiiiiiiiiiii";
|
||||
const char ScalingStatDistributionfmt[]="niiiiiiiiiiiiiiiiiiiii";
|
||||
|
|
|
|||
|
|
@ -765,7 +765,12 @@ enum MangosStrings
|
|||
LANG_RESET_PET_TALENTS_ONLINE = 1127,
|
||||
// Room for more level 3 1128-1199 not used
|
||||
|
||||
// FREE IDS 1200-9999
|
||||
// Debug commands
|
||||
LANG_CINEMATIC_NOT_EXIST = 1200,
|
||||
LANG_MOVIE_NOT_EXIST = 1201,
|
||||
// Room for more debug 1202-1299 not used
|
||||
|
||||
// FREE IDS 1300-9999
|
||||
|
||||
// Use for not-in-offcial-sources patches
|
||||
// 10000-10999
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "7615"
|
||||
#define REVISION_NR "7616"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue