diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index c2c384ac9..3edc81f15 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -699,18 +699,10 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder) if(ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(pCurrChar->getClass())) { - if(cEntry->CinematicSequence) - { - data.Initialize(SMSG_TRIGGER_CINEMATIC, 4); - data << uint32(cEntry->CinematicSequence); - SendPacket( &data ); - } - else if(ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(pCurrChar->getRace())) - { - data.Initialize(SMSG_TRIGGER_CINEMATIC, 4); - data << uint32(rEntry->CinematicSequence); - SendPacket( &data ); - } + if (cEntry->CinematicSequence) + pCurrChar->SendCinematicStart(cEntry->CinematicSequence); + else if (ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(pCurrChar->getRace())) + pCurrChar->SendCinematicStart(rEntry->CinematicSequence); } } diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index ab98b6e85..d8671b05f 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -976,12 +976,9 @@ void GameObject::Use(Unit* user) Player* player = (Player*)user; - if(info->camera.cinematicId) - { - WorldPacket data(SMSG_TRIGGER_CINEMATIC, 4); - data << info->camera.cinematicId; - player->GetSession()->SendPacket(&data); - } + if (info->camera.cinematicId) + player->SendCinematicStart(info->camera.cinematicId); + return; } //fishing bobber diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 7faf4cdd0..ed5710436 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -5494,6 +5494,20 @@ void Player::SendDirectMessage(WorldPacket *data) GetSession()->SendPacket(data); } +void Player::SendCinematicStart(uint32 CinematicSequenceId) +{ + WorldPacket data(SMSG_TRIGGER_CINEMATIC, 4); + data << uint32(CinematicSequenceId); + SendDirectMessage(&data); +} + +void Player::SendMovieStart(uint32 MovieId) +{ + WorldPacket data(SMSG_TRIGGER_MOVIE, 4); + data << uint32(MovieId); + SendDirectMessage(&data); +} + void Player::CheckExploreSystem() { if (!isAlive()) diff --git a/src/game/Player.h b/src/game/Player.h index 8dc020ec8..cc71fa579 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1977,6 +1977,9 @@ class MANGOS_DLL_SPEC Player : public Unit uint32 GetOldPetSpell() const { return m_oldpetspell; } void SetOldPetSpell(uint32 petspell) { m_oldpetspell = petspell; } + void SendCinematicStart(uint32 CinematicSequenceId); + void SendMovieStart(uint32 MovieId); + /*********************************************************/ /*** INSTANCE SYSTEM ***/ /*********************************************************/ diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 47fc934f9..8355515a6 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7611" + #define REVISION_NR "7612" #endif // __REVISION_NR_H__