mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-04 01:37:47 +00:00
fick director bgm;
This commit is contained in:
parent
75a2fcbb63
commit
cf2d6108e1
3 changed files with 22 additions and 3 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "Network/PacketWrappers/ServerNoticePacket.h"
|
||||
#include "Network/PacketWrappers/ActorControlPacket.h"
|
||||
#include "Network/PacketWrappers/ActorControlSelfPacket.h"
|
||||
#include "Network/CommonActorControl.h"
|
||||
#include "Network/PacketWrappers/MoveActorPacket.h"
|
||||
#include "Network/PacketWrappers/PlayerSetupPacket.h"
|
||||
#include "Network/PacketWrappers/PlayerSpawnPacket.h"
|
||||
|
@ -844,6 +845,7 @@ void DebugCommandMgr::script( char* data, Entity::Player& player, std::shared_pt
|
|||
|
||||
void DebugCommandMgr::instance( char* data, Entity::Player& player, std::shared_ptr< DebugCommand > command )
|
||||
{
|
||||
auto& server = Common::Service< World::WorldServer >::ref();
|
||||
auto& terriMgr = Common::Service< TerritoryMgr >::ref();
|
||||
auto pCurrentZone = terriMgr.getTerritoryByGuId( player.getTerritoryId() );
|
||||
|
||||
|
@ -1104,6 +1106,14 @@ void DebugCommandMgr::instance( char* data, Entity::Player& player, std::shared_
|
|||
if( auto instance = pCurrentZone->getAsInstanceContent() )
|
||||
instance->setCurrentBGM( bgmId );
|
||||
}
|
||||
else if( subCommand == "dir_update" ) {
|
||||
uint32_t dirType;
|
||||
uint32_t param;
|
||||
sscanf( params.c_str(), "%x %d", &dirType, ¶m );
|
||||
if( auto instance = pCurrentZone->getAsInstanceContent() )
|
||||
server.queueForPlayer( player.getCharacterId(), makeActorControlSelf( player.getId(), Network::ActorControl::DirectorUpdate, instance->getDirectorId(),
|
||||
dirType, param ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerMgr::sendDebug( player, "Unknown sub command." );
|
||||
|
|
|
@ -661,7 +661,7 @@ void Sapphire::InstanceContent::setCurrentBGM( uint16_t bgmIndex )
|
|||
auto player = playerIt.second;
|
||||
server.queueForPlayer( player->getCharacterId(),
|
||||
makeActorControlSelf( player->getId(), DirectorUpdate, getDirectorId(),
|
||||
DirectorEventId::BattleGroundMusic, bgmIndex ) );
|
||||
DirectorEventId::BGM, bgmIndex ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -669,7 +669,7 @@ void Sapphire::InstanceContent::setPlayerBGM( Sapphire::Entity::Player& player,
|
|||
{
|
||||
auto& server = Common::Service< World::WorldServer >::ref();
|
||||
server.queueForPlayer( player.getCharacterId(), makeActorControlSelf( player.getId(), DirectorUpdate, getDirectorId(),
|
||||
DirectorEventId::BattleGroundMusic, bgmId ) );
|
||||
DirectorEventId::BGM, bgmId ) );
|
||||
}
|
||||
|
||||
uint16_t Sapphire::InstanceContent::getCurrentBGM() const
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace Sapphire
|
|||
0x4000000E - INSTANCE_CONTENT_ORDER_SYSTEM_Unknown - no args - some timer set */
|
||||
enum DirectorEventId : uint32_t
|
||||
{
|
||||
// 2.3
|
||||
DEBUG_TimeSync = 0xC0000001,
|
||||
DutyCommence = 0x40000001,
|
||||
DutyComplete = 0x40000002,
|
||||
|
@ -44,7 +45,7 @@ namespace Sapphire
|
|||
SetDutyTime = 0x40000004,
|
||||
LoadingScreen = 0x40000005,
|
||||
Forward = 0x40000006,
|
||||
BattleGroundMusic = 0x40000007,
|
||||
//BattleGroundMusic = 0x40000007,
|
||||
InvalidateTodoList = 0x40000008,
|
||||
VoteState = 0x40000009,
|
||||
VoteStart = 0x4000000A,
|
||||
|
@ -53,6 +54,14 @@ namespace Sapphire
|
|||
FirstTimeNotify = 0x4000000D,
|
||||
TreasureVoteRefresh = 0x4000000E,
|
||||
SetSharedGroupId = 0x4000000F,
|
||||
// 3.3x onwards
|
||||
Sync = 0x80000000,
|
||||
BGM = 0x80000001,
|
||||
SyncDutyTimer = 0x80000003,
|
||||
// some vote stuff here
|
||||
StartEventCutscene = 0x80000008,
|
||||
EndEventCutscene = 0x80000009,
|
||||
StartQTE = 0x8000000A
|
||||
};
|
||||
|
||||
enum EventHandlerOrderId : uint32_t
|
||||
|
|
Loading…
Add table
Reference in a new issue