mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 13:47:23 +01:00
[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))
|
||||
|
||||
Reference in New Issue
Block a user