mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 14:07:46 +00:00
Merge pull request #275 from Minoost/actor_rewrite
Implement director wide bgm
This commit is contained in:
commit
e59728f820
1 changed files with 9 additions and 2 deletions
|
@ -396,10 +396,17 @@ void Core::InstanceContent::setCurrentBGM( uint16_t bgmIndex )
|
||||||
{
|
{
|
||||||
m_currentBgm = bgmIndex;
|
m_currentBgm = bgmIndex;
|
||||||
|
|
||||||
// todo: actrl a1 does not override whatever is set with directorplayscene, need to figure out the magic behind it
|
for( const auto& playerIt : m_playerMap )
|
||||||
|
{
|
||||||
|
auto player = playerIt.second;
|
||||||
|
// note: retail do send a BGM_MUTE(1) first before any BGM transition, but YOLO in this case.
|
||||||
|
// also do note that this code can't control the bgm granularly. (i.e. per player for WoD submap.) oops.
|
||||||
|
// player->queuePacket( ActorControlPacket143( player->getId(), DirectorUpdate, getDirectorId(), 0x80000001, 1 ) );
|
||||||
|
player->queuePacket( ActorControlPacket143( player->getId(), DirectorUpdate, getDirectorId(), 0x80000001, bgmIndex ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t Core::InstanceContent::getCurrentBGM() const
|
uint16_t Core::InstanceContent::getCurrentBGM() const
|
||||||
{
|
{
|
||||||
return m_currentBgm;
|
return m_currentBgm;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue