[7612] Move SMSG_TRIGGER_CINEMATIC and SMSG_TRIGGER_MOVIE to functions and use its instead explicit packet creating. Author: NoFantasy
--HG-- branch : trunk
This commit is contained in:
@@ -711,23 +711,15 @@ 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);
|
||||
|
||||
// send new char string if not empty
|
||||
if (!sWorld.GetNewCharString().empty())
|
||||
chH.PSendSysMessage(sWorld.GetNewCharString().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!pCurrChar->GetMap()->Add(pCurrChar))
|
||||
|
||||
@@ -1050,12 +1050,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
|
||||
|
||||
@@ -5568,6 +5568,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())
|
||||
|
||||
@@ -2001,6 +2001,9 @@ class TRINITY_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 ***/
|
||||
/*********************************************************/
|
||||
|
||||
Reference in New Issue
Block a user