mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7612] Move SMSG_TRIGGER_CINEMATIC and SMSG_TRIGGER_MOVIE to functions and use its instead explicit packet creating.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
485eb8adb1
commit
02247d411b
5 changed files with 25 additions and 19 deletions
|
|
@ -699,18 +699,10 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
|
||||||
|
|
||||||
if(ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(pCurrChar->getClass()))
|
if(ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(pCurrChar->getClass()))
|
||||||
{
|
{
|
||||||
if(cEntry->CinematicSequence)
|
if (cEntry->CinematicSequence)
|
||||||
{
|
pCurrChar->SendCinematicStart(cEntry->CinematicSequence);
|
||||||
data.Initialize(SMSG_TRIGGER_CINEMATIC, 4);
|
else if (ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(pCurrChar->getRace()))
|
||||||
data << uint32(cEntry->CinematicSequence);
|
pCurrChar->SendCinematicStart(rEntry->CinematicSequence);
|
||||||
SendPacket( &data );
|
|
||||||
}
|
|
||||||
else if(ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(pCurrChar->getRace()))
|
|
||||||
{
|
|
||||||
data.Initialize(SMSG_TRIGGER_CINEMATIC, 4);
|
|
||||||
data << uint32(rEntry->CinematicSequence);
|
|
||||||
SendPacket( &data );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -976,12 +976,9 @@ void GameObject::Use(Unit* user)
|
||||||
|
|
||||||
Player* player = (Player*)user;
|
Player* player = (Player*)user;
|
||||||
|
|
||||||
if(info->camera.cinematicId)
|
if (info->camera.cinematicId)
|
||||||
{
|
player->SendCinematicStart(info->camera.cinematicId);
|
||||||
WorldPacket data(SMSG_TRIGGER_CINEMATIC, 4);
|
|
||||||
data << info->camera.cinematicId;
|
|
||||||
player->GetSession()->SendPacket(&data);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//fishing bobber
|
//fishing bobber
|
||||||
|
|
|
||||||
|
|
@ -5494,6 +5494,20 @@ void Player::SendDirectMessage(WorldPacket *data)
|
||||||
GetSession()->SendPacket(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()
|
void Player::CheckExploreSystem()
|
||||||
{
|
{
|
||||||
if (!isAlive())
|
if (!isAlive())
|
||||||
|
|
|
||||||
|
|
@ -1977,6 +1977,9 @@ class MANGOS_DLL_SPEC Player : public Unit
|
||||||
uint32 GetOldPetSpell() const { return m_oldpetspell; }
|
uint32 GetOldPetSpell() const { return m_oldpetspell; }
|
||||||
void SetOldPetSpell(uint32 petspell) { m_oldpetspell = petspell; }
|
void SetOldPetSpell(uint32 petspell) { m_oldpetspell = petspell; }
|
||||||
|
|
||||||
|
void SendCinematicStart(uint32 CinematicSequenceId);
|
||||||
|
void SendMovieStart(uint32 MovieId);
|
||||||
|
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
/*** INSTANCE SYSTEM ***/
|
/*** INSTANCE SYSTEM ***/
|
||||||
/*********************************************************/
|
/*********************************************************/
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7611"
|
#define REVISION_NR "7612"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue