mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 09:39:11 +00:00
feat(Core/Maps): Improvements to Cinematic function (#10765)
This commit is contained in:
committed by
GitHub
parent
f3e0d4e402
commit
7ad65752fa
@@ -33,6 +33,7 @@
|
||||
#include "Language.h"
|
||||
#include "Log.h"
|
||||
#include "MapMgr.h"
|
||||
#include "M2Stores.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
@@ -115,7 +116,8 @@ public:
|
||||
// cinematicId - ID from CinematicSequences.dbc
|
||||
static bool HandleDebugPlayCinematicCommand(ChatHandler* handler, uint32 cinematicId)
|
||||
{
|
||||
if (!sCinematicSequencesStore.LookupEntry(cinematicId))
|
||||
CinematicSequencesEntry const* cineSeq = sCinematicSequencesStore.LookupEntry(cinematicId);
|
||||
if (!cineSeq)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_CINEMATIC_NOT_EXIST, cinematicId);
|
||||
handler->SetSentErrorMessage(true);
|
||||
@@ -123,23 +125,19 @@ public:
|
||||
}
|
||||
|
||||
// Dump camera locations
|
||||
if (CinematicSequencesEntry const* cineSeq = sCinematicSequencesStore.LookupEntry(cinematicId))
|
||||
if (std::vector<FlyByCamera> const* flyByCameras = GetFlyByCameras(cineSeq->cinematicCamera))
|
||||
{
|
||||
auto const& itr = sFlyByCameraStore.find(cineSeq->cinematicCamera);
|
||||
if (itr != sFlyByCameraStore.end())
|
||||
handler->PSendSysMessage("Waypoints for sequence %u, camera %u", cinematicId, cineSeq->cinematicCamera);
|
||||
uint32 count = 1;
|
||||
for (FlyByCamera const& cam : *flyByCameras)
|
||||
{
|
||||
handler->PSendSysMessage("Waypoints for sequence %u, camera %u", cinematicId, cineSeq->cinematicCamera);
|
||||
uint32 count = 1;
|
||||
for (FlyByCamera cam : itr->second)
|
||||
{
|
||||
handler->PSendSysMessage("%02u - %7ums [%f, %f, %f] Facing %f (%f degrees)", count, cam.timeStamp, cam.locations.x, cam.locations.y, cam.locations.z, cam.locations.w, cam.locations.w * (180 / M_PI));
|
||||
count++;
|
||||
}
|
||||
handler->PSendSysMessage("%lu waypoints dumped", itr->second.size());
|
||||
handler->PSendSysMessage("%02u - %7ums [%s (%f degrees)]", count, cam.timeStamp, cam.locations.ToString().c_str(), cam.locations.GetOrientation() * (180 / M_PI));
|
||||
++count;
|
||||
}
|
||||
handler->PSendSysMessage("%u waypoints dumped", flyByCameras->size());
|
||||
}
|
||||
|
||||
handler->GetSession()->GetPlayer()->SendCinematicStart(cinematicId);
|
||||
handler->GetPlayer()->SendCinematicStart(cinematicId);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user