diff options
| author | r00ty-tc <r00ty-tc@users.noreply.github.com> | 2016-04-27 16:53:18 +0200 |
|---|---|---|
| committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-02-19 14:47:20 +0100 |
| commit | 8a71e4255ed253b7c4c8fe184c5f43f03d2b1b88 (patch) | |
| tree | 64b46c140d229da43df21707c3b94e88dcda9008 /src/server/scripts/Commands | |
| parent | 438d090c8db0ede966093f8bc9cf7f1e63b4b65e (diff) | |
[Core/Maps] Activate creatures and objects during opening cinematics and other flyby cameras (sunwell etc).
Requires re-running map extractor to extract camera m2 files from data
files. These are very small.
Diffstat (limited to 'src/server/scripts/Commands')
| -rw-r--r-- | src/server/scripts/Commands/cs_debug.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp index d4be66d1373..a56e687757c 100644 --- a/src/server/scripts/Commands/cs_debug.cpp +++ b/src/server/scripts/Commands/cs_debug.cpp @@ -32,6 +32,7 @@ EndScriptData */ #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "GossipDef.h" +#include "M2Stores.h" #include "Transport.h" #include "Language.h" #include "MapManager.h" @@ -123,13 +124,28 @@ public: uint32 id = atoi((char*)args); - if (!sCinematicSequencesStore.LookupEntry(id)) + CinematicSequencesEntry const* cineSeq = sCinematicSequencesStore.LookupEntry(id); + if (!cineSeq) { handler->PSendSysMessage(LANG_CINEMATIC_NOT_EXIST, id); handler->SetSentErrorMessage(true); return false; } + // Dump camera locations + std::unordered_map<uint32, FlyByCameraCollection>::const_iterator itr = sFlyByCameraStore.find(cineSeq->Camera[0]); + if (itr != sFlyByCameraStore.end()) + { + handler->PSendSysMessage("Waypoints for sequence %u, camera %u", id, cineSeq->Camera[0]); + 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("%u waypoints dumped", itr->second.size()); + } + handler->GetSession()->GetPlayer()->SendCinematicStart(id); return true; } |
