mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-28 07:07:45 +00:00
Merge branch 'develop' of https://github.com/SapphireMordred/Sapphire into develop
This commit is contained in:
commit
7fb68c220c
10 changed files with 75 additions and 166 deletions
|
@ -138,13 +138,33 @@ namespace Sapphire::Network::Packets::Server
|
||||||
char padding;
|
char padding;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Structural representation of the packet sent by the server
|
||||||
|
* to display a server notice message
|
||||||
|
*/
|
||||||
|
struct FFXIVIpcServerNoticeShort : FFXIVIpcBasePacket< ServerNoticeShort >
|
||||||
|
{
|
||||||
|
// these are actually display flags
|
||||||
|
/* 0000 */ uint8_t padding;
|
||||||
|
// 0 = chat log
|
||||||
|
// 2 = nothing
|
||||||
|
// 4 = on screen message
|
||||||
|
// 5 = on screen message + chat log
|
||||||
|
char message[538];
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Structural representation of the packet sent by the server
|
* Structural representation of the packet sent by the server
|
||||||
* to display a server notice message
|
* to display a server notice message
|
||||||
*/
|
*/
|
||||||
struct FFXIVIpcServerNotice : FFXIVIpcBasePacket< ServerNotice >
|
struct FFXIVIpcServerNotice : FFXIVIpcBasePacket< ServerNotice >
|
||||||
{
|
{
|
||||||
|
// these are actually display flags
|
||||||
/* 0000 */ uint8_t padding;
|
/* 0000 */ uint8_t padding;
|
||||||
|
// 0 = chat log
|
||||||
|
// 2 = nothing
|
||||||
|
// 4 = on screen message
|
||||||
|
// 5 = on screen message + chat log
|
||||||
char message[775];
|
char message[775];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <ScriptObject.h>
|
#include <ScriptObject.h>
|
||||||
#include <Territory/QuestBattle.h>
|
#include <Territory/QuestBattle.h>
|
||||||
|
#include <Actor/Player.h>
|
||||||
|
|
||||||
using namespace Sapphire;
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
@ -28,6 +29,12 @@ public:
|
||||||
ChasingShadows() : Sapphire::ScriptAPI::QuestBattleScript( 11 )
|
ChasingShadows() : Sapphire::ScriptAPI::QuestBattleScript( 11 )
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
void onPlayerSetup( Sapphire::QuestBattle& instance, Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.setRot( 3.f );
|
||||||
|
player.setPos( { 323.f, -1.28f, -320.f } );
|
||||||
|
}
|
||||||
|
|
||||||
void onInit( QuestBattle& instance ) override
|
void onInit( QuestBattle& instance ) override
|
||||||
{
|
{
|
||||||
instance.registerEObj( "unknown_0", 2005192, 5760474, 4, { -51.493111f, 0.309087f, 71.436897f }, 1.000000f, -0.000006f );
|
instance.registerEObj( "unknown_0", 2005192, 5760474, 4, { -51.493111f, 0.309087f, 71.436897f }, 1.000000f, -0.000006f );
|
||||||
|
|
|
@ -1030,45 +1030,6 @@ void Sapphire::World::Manager::DebugCommandMgr::questBattle( char* data, Entity:
|
||||||
else
|
else
|
||||||
player.sendDebug( "Failed to create instance with id#{0}", contentFinderConditionId );
|
player.sendDebug( "Failed to create instance with id#{0}", contentFinderConditionId );
|
||||||
}
|
}
|
||||||
else if( subCommand == "bind" )
|
|
||||||
{
|
|
||||||
uint32_t instanceId;
|
|
||||||
sscanf( params.c_str(), "%d", &instanceId );
|
|
||||||
|
|
||||||
auto instance = pTeriMgr->getInstanceZonePtr( instanceId );
|
|
||||||
if( instance )
|
|
||||||
{
|
|
||||||
auto pInstanceContent = instance->getAsQuestBattle();
|
|
||||||
pInstanceContent->bindPlayer( player.getId() );
|
|
||||||
player.sendDebug(
|
|
||||||
"Now bound to instance with id: " + std::to_string( pInstanceContent->getGuId() ) +
|
|
||||||
" -> " + pInstanceContent->getName() );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
player.sendDebug( "Unknown instance with id#{0}", instanceId );
|
|
||||||
}
|
|
||||||
else if( subCommand == "unbind" )
|
|
||||||
{
|
|
||||||
uint32_t instanceId;
|
|
||||||
sscanf( params.c_str(), "%d", &instanceId );
|
|
||||||
|
|
||||||
auto instance = pTeriMgr->getInstanceZonePtr( instanceId );
|
|
||||||
if( !instance )
|
|
||||||
{
|
|
||||||
player.sendDebug( "Unknown instance with id#{0} ", instanceId );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
auto pInstanceContent = instance->getAsQuestBattle();
|
|
||||||
if( pInstanceContent->isPlayerBound( player.getId() ) )
|
|
||||||
{
|
|
||||||
pInstanceContent->unbindPlayer( player.getId() );
|
|
||||||
player.sendDebug( "Now unbound from instance with id#{0} -> {1}", pInstanceContent->getGuId(), pInstanceContent->getName() );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
player.sendDebug( "Player not bound to instance with id#{0}", instanceId );
|
|
||||||
|
|
||||||
}
|
|
||||||
else if( subCommand == "createzone" || subCommand == "crz" )
|
else if( subCommand == "createzone" || subCommand == "crz" )
|
||||||
{
|
{
|
||||||
uint32_t zoneId;
|
uint32_t zoneId;
|
||||||
|
|
|
@ -174,7 +174,7 @@ void Sapphire::Network::GameConnection::eventHandlerEnterTerritory( FrameworkPtr
|
||||||
|
|
||||||
std::string objName = pEventMgr->getEventName( eventId );
|
std::string objName = pEventMgr->getEventName( eventId );
|
||||||
|
|
||||||
player.sendDebug( "Calling: {0}.{1} - {2}", objName, eventName, eventId && 0xFFFF );
|
player.sendDebug( "Calling: {0}.{1} - {2}", objName, eventName, eventId & 0xFFFF );
|
||||||
|
|
||||||
if( auto instance = player.getCurrentInstance() )
|
if( auto instance = player.getCurrentInstance() )
|
||||||
{
|
{
|
||||||
|
|
|
@ -201,6 +201,10 @@ namespace Sapphire::ScriptAPI
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QuestBattleScript::onPlayerSetup( Sapphire::QuestBattle& instance, Entity::Player& player )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void QuestBattleScript::onInit( QuestBattle& instance )
|
void QuestBattleScript::onInit( QuestBattle& instance )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,6 +239,8 @@ namespace Sapphire::ScriptAPI
|
||||||
public:
|
public:
|
||||||
explicit QuestBattleScript( uint32_t questBattleId );
|
explicit QuestBattleScript( uint32_t questBattleId );
|
||||||
|
|
||||||
|
virtual void onPlayerSetup( Sapphire::QuestBattle& instance, Entity::Player& player );
|
||||||
|
|
||||||
virtual void onInit( Sapphire::QuestBattle& instance );
|
virtual void onInit( Sapphire::QuestBattle& instance );
|
||||||
|
|
||||||
virtual void onUpdate( Sapphire::QuestBattle& instance, uint32_t currTime );
|
virtual void onUpdate( Sapphire::QuestBattle& instance, uint32_t currTime );
|
||||||
|
|
|
@ -462,6 +462,18 @@ bool Sapphire::Scripting::ScriptMgr::onInstanceEnterTerritory( InstanceContentPt
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Sapphire::Scripting::ScriptMgr::onPlayerSetup( QuestBattle& instance, Entity::Player& player )
|
||||||
|
{
|
||||||
|
auto script = m_nativeScriptMgr->getScript< Sapphire::ScriptAPI::QuestBattleScript >( instance.getDirectorId() );
|
||||||
|
if( script )
|
||||||
|
{
|
||||||
|
script->onPlayerSetup( instance, player );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bool Sapphire::Scripting::ScriptMgr::onInstanceInit( QuestBattlePtr instance )
|
bool Sapphire::Scripting::ScriptMgr::onInstanceInit( QuestBattlePtr instance )
|
||||||
{
|
{
|
||||||
auto script = m_nativeScriptMgr->getScript< Sapphire::ScriptAPI::QuestBattleScript >( instance->getDirectorId() );
|
auto script = m_nativeScriptMgr->getScript< Sapphire::ScriptAPI::QuestBattleScript >( instance->getDirectorId() );
|
||||||
|
|
|
@ -100,6 +100,8 @@ namespace Sapphire::Scripting
|
||||||
onInstanceEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1,
|
onInstanceEnterTerritory( InstanceContentPtr instance, Entity::Player& player, uint32_t eventId, uint16_t param1,
|
||||||
uint16_t param2 );
|
uint16_t param2 );
|
||||||
|
|
||||||
|
bool onPlayerSetup( QuestBattle& instance, Entity::Player& player );
|
||||||
|
|
||||||
bool onInstanceInit( QuestBattlePtr instance );
|
bool onInstanceInit( QuestBattlePtr instance );
|
||||||
|
|
||||||
bool onInstanceUpdate( QuestBattlePtr instance, uint32_t currTime );
|
bool onInstanceUpdate( QuestBattlePtr instance, uint32_t currTime );
|
||||||
|
|
|
@ -74,6 +74,8 @@ void Sapphire::QuestBattle::onPlayerZoneIn( Entity::Player& player )
|
||||||
Logger::debug( "QuestBattle::onPlayerZoneIn: Zone#{0}|{1}, Entity#{2}",
|
Logger::debug( "QuestBattle::onPlayerZoneIn: Zone#{0}|{1}, Entity#{2}",
|
||||||
getGuId(), getTerritoryTypeId(), player.getId() );
|
getGuId(), getTerritoryTypeId(), player.getId() );
|
||||||
|
|
||||||
|
m_pPlayer = player.getAsPlayer();
|
||||||
|
|
||||||
// mark player as "bound by duty"
|
// mark player as "bound by duty"
|
||||||
player.setStateFlag( PlayerStateFlag::BoundByDuty );
|
player.setStateFlag( PlayerStateFlag::BoundByDuty );
|
||||||
|
|
||||||
|
@ -92,24 +94,26 @@ void Sapphire::QuestBattle::onLeaveTerritory( Entity::Player& player )
|
||||||
clearDirector( player );
|
clearDirector( player );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Sapphire::QuestBattle::onEnterSceneFinish( Entity::Player& player )
|
||||||
|
{
|
||||||
|
player.eventStart( player.getId(), getDirectorId(), Event::EventHandler::GameProgress, 1, 0 );
|
||||||
|
player.playScene( getDirectorId(), 60000, 0x40000 /*unmapped*/ );
|
||||||
|
setSequence( 2 );
|
||||||
|
}
|
||||||
|
|
||||||
void Sapphire::QuestBattle::onUpdate( uint32_t currTime )
|
void Sapphire::QuestBattle::onUpdate( uint32_t currTime )
|
||||||
{
|
{
|
||||||
switch( m_state )
|
switch( m_state )
|
||||||
{
|
{
|
||||||
case Created:
|
case Created:
|
||||||
{
|
{
|
||||||
if( m_boundPlayerId == 0 )
|
if( !m_pPlayer )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto it = m_playerMap.find( m_boundPlayerId );
|
if( !m_pPlayer->isLoadingComplete() ||
|
||||||
if( it == m_playerMap.end() )
|
!m_pPlayer->isDirectorInitialized() ||
|
||||||
return;
|
!m_pPlayer->isOnEnterEventDone() ||
|
||||||
|
m_pPlayer->hasStateFlag( PlayerStateFlag::WatchingCutscene ) )
|
||||||
auto player = it->second;
|
|
||||||
if( !player->isLoadingComplete() ||
|
|
||||||
!player->isDirectorInitialized() ||
|
|
||||||
!player->isOnEnterEventDone() ||
|
|
||||||
player->hasStateFlag( PlayerStateFlag::WatchingCutscene ) )
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( m_instanceCommenceTime == 0 )
|
if( m_instanceCommenceTime == 0 )
|
||||||
|
@ -120,19 +124,13 @@ void Sapphire::QuestBattle::onUpdate( uint32_t currTime )
|
||||||
else if( Util::getTimeMs() < m_instanceCommenceTime )
|
else if( Util::getTimeMs() < m_instanceCommenceTime )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// TODO: we do not have a list of players for questbattles... just one
|
onEnterSceneFinish( *m_pPlayer );
|
||||||
for( const auto& playerIt : m_playerMap )
|
|
||||||
{
|
|
||||||
auto pPlayer = playerIt.second;
|
|
||||||
pPlayer->sendDebug( " ALL DONE LOADING " );
|
|
||||||
}
|
|
||||||
|
|
||||||
m_state = DutyInProgress;
|
m_state = DutyInProgress;
|
||||||
m_instanceExpireTime = Util::getTimeSeconds() + ( m_pBattleDetails->timeLimit * 60u );
|
m_instanceExpireTime = Util::getTimeSeconds() + ( m_pBattleDetails->timeLimit * 60u );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
case DutyReset:
|
case DutyReset:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -141,7 +139,6 @@ void Sapphire::QuestBattle::onUpdate( uint32_t currTime )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
case DutyFinished:
|
case DutyFinished:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -237,59 +234,35 @@ void Sapphire::QuestBattle::setVar( uint8_t index, uint8_t value )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo: genericise this?
|
sendDirectorVars( *m_pPlayer );
|
||||||
for( const auto& playerIt : m_playerMap )
|
|
||||||
{
|
|
||||||
sendDirectorVars( *playerIt.second );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::QuestBattle::setSequence( uint8_t value )
|
void Sapphire::QuestBattle::setSequence( uint8_t value )
|
||||||
{
|
{
|
||||||
setDirectorSequence( value );
|
setDirectorSequence( value );
|
||||||
|
sendDirectorVars( *m_pPlayer );
|
||||||
for( const auto& playerIt : m_playerMap )
|
|
||||||
{
|
|
||||||
sendDirectorVars( *playerIt.second );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::QuestBattle::setBranch( uint8_t value )
|
void Sapphire::QuestBattle::setBranch( uint8_t value )
|
||||||
{
|
{
|
||||||
setDirectorBranch( value );
|
setDirectorBranch( value );
|
||||||
|
sendDirectorVars( *m_pPlayer );
|
||||||
|
|
||||||
for( const auto& playerIt : m_playerMap )
|
|
||||||
{
|
|
||||||
sendDirectorVars( *playerIt.second );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::QuestBattle::startQte()
|
void Sapphire::QuestBattle::startQte()
|
||||||
{
|
{
|
||||||
for( const auto& playerIt : m_playerMap )
|
m_pPlayer->queuePacket( makeActorControl143( m_pPlayer->getId(), DirectorUpdate, getDirectorId(), 0x8000000A ) );
|
||||||
{
|
|
||||||
auto player = playerIt.second;
|
|
||||||
player->queuePacket( makeActorControl143( player->getId(), DirectorUpdate, getDirectorId(), 0x8000000A ) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::QuestBattle::startEventCutscene()
|
void Sapphire::QuestBattle::startEventCutscene()
|
||||||
{
|
{
|
||||||
// TODO: lock player movement
|
m_pPlayer->queuePacket( makeActorControl143( m_pPlayer->getId(), DirectorUpdate, getDirectorId(), 0x80000008 ) );
|
||||||
for( const auto& playerIt : m_playerMap )
|
|
||||||
{
|
|
||||||
auto player = playerIt.second;
|
|
||||||
player->queuePacket( makeActorControl143( player->getId(), DirectorUpdate, getDirectorId(), 0x80000008 ) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::QuestBattle::endEventCutscene()
|
void Sapphire::QuestBattle::endEventCutscene()
|
||||||
{
|
{
|
||||||
for( const auto& playerIt : m_playerMap )
|
m_pPlayer->queuePacket( makeActorControl143( m_pPlayer->getId(), DirectorUpdate, getDirectorId(), 0x80000009 ) );
|
||||||
{
|
|
||||||
auto player = playerIt.second;
|
|
||||||
player->queuePacket( makeActorControl143( player->getId(), DirectorUpdate, getDirectorId(), 0x80000009 ) );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::QuestBattle::onRegisterEObj( Entity::EventObjectPtr object )
|
void Sapphire::QuestBattle::onRegisterEObj( Entity::EventObjectPtr object )
|
||||||
|
@ -315,14 +288,10 @@ Sapphire::Event::Director::DirectorState Sapphire::QuestBattle::getState() const
|
||||||
|
|
||||||
void Sapphire::QuestBattle::onBeforePlayerZoneIn( Sapphire::Entity::Player& player )
|
void Sapphire::QuestBattle::onBeforePlayerZoneIn( Sapphire::Entity::Player& player )
|
||||||
{
|
{
|
||||||
// remove any players from the instance who aren't bound on zone in
|
|
||||||
if( !isPlayerBound( player.getId() ) )
|
|
||||||
player.exitInstance();
|
|
||||||
|
|
||||||
// TODO: let script set start position??
|
|
||||||
player.setRot( PI );
|
player.setRot( PI );
|
||||||
player.setPos( { 0.f, 0.f, 0.f } );
|
player.setPos( { 0.f, 0.f, 0.f } );
|
||||||
|
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
|
||||||
|
pScriptMgr->onPlayerSetup( *this, player );
|
||||||
|
|
||||||
player.resetObjSpawnIndex();
|
player.resetObjSpawnIndex();
|
||||||
}
|
}
|
||||||
|
@ -366,56 +335,6 @@ Sapphire::QuestBattle::onEnterTerritory( Entity::Player& player, uint32_t eventI
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::QuestBattle::setCurrentBGM( uint16_t bgmIndex )
|
|
||||||
{
|
|
||||||
m_currentBgm = bgmIndex;
|
|
||||||
|
|
||||||
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(
|
|
||||||
makeActorControl143( player->getId(), DirectorUpdate, getDirectorId(), 0x80000001, bgmIndex ) );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Sapphire::QuestBattle::setPlayerBGM( Sapphire::Entity::Player& player, uint16_t bgmId )
|
|
||||||
{
|
|
||||||
player.queuePacket( makeActorControl143( player.getId(), DirectorUpdate, getDirectorId(), 0x80000001, bgmId ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t Sapphire::QuestBattle::getCurrentBGM() const
|
|
||||||
{
|
|
||||||
return m_currentBgm;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Sapphire::QuestBattle::bindPlayer( uint32_t playerId )
|
|
||||||
{
|
|
||||||
// if player already bound, return false
|
|
||||||
if( m_boundPlayerId != 0 )
|
|
||||||
return false;
|
|
||||||
|
|
||||||
m_boundPlayerId = playerId;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Sapphire::QuestBattle::isPlayerBound( uint32_t playerId ) const
|
|
||||||
{
|
|
||||||
return m_boundPlayerId == playerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Sapphire::QuestBattle::unbindPlayer( uint32_t playerId )
|
|
||||||
{
|
|
||||||
if( m_boundPlayerId != playerId )
|
|
||||||
return;
|
|
||||||
|
|
||||||
auto it = m_playerMap.find( playerId );
|
|
||||||
if( it != m_playerMap.end() )
|
|
||||||
it->second->exitInstance();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Sapphire::QuestBattle::clearDirector( Entity::Player& player )
|
void Sapphire::QuestBattle::clearDirector( Entity::Player& player )
|
||||||
{
|
{
|
||||||
sendDirectorClear( player );
|
sendDirectorClear( player );
|
||||||
|
|
|
@ -47,6 +47,8 @@ namespace Sapphire
|
||||||
|
|
||||||
void onRegisterEObj( Entity::EventObjectPtr object ) override;
|
void onRegisterEObj( Entity::EventObjectPtr object ) override;
|
||||||
|
|
||||||
|
void onEnterSceneFinish( Entity::Player& player );
|
||||||
|
|
||||||
void setVar( uint8_t index, uint8_t value );
|
void setVar( uint8_t index, uint8_t value );
|
||||||
|
|
||||||
void setSequence( uint8_t value );
|
void setSequence( uint8_t value );
|
||||||
|
@ -61,15 +63,6 @@ namespace Sapphire
|
||||||
|
|
||||||
void clearDirector( Entity::Player& player );
|
void clearDirector( Entity::Player& player );
|
||||||
|
|
||||||
/*! set the current bgm index (inside bgm.exd) */
|
|
||||||
void setCurrentBGM( uint16_t bgmId );
|
|
||||||
|
|
||||||
/*! set the current bgm for a specific player */
|
|
||||||
void setPlayerBGM( Entity::Player& player, uint16_t bgmId );
|
|
||||||
|
|
||||||
/*! get the currently playing bgm index */
|
|
||||||
uint16_t getCurrentBGM() const;
|
|
||||||
|
|
||||||
Event::Director::DirectorState getState() const;
|
Event::Director::DirectorState getState() const;
|
||||||
|
|
||||||
std::shared_ptr< Sapphire::Data::QuestBattle > getQuestBattleDetails() const;
|
std::shared_ptr< Sapphire::Data::QuestBattle > getQuestBattleDetails() const;
|
||||||
|
@ -78,15 +71,6 @@ namespace Sapphire
|
||||||
|
|
||||||
Entity::EventObjectPtr getEObjByName( const std::string& name );
|
Entity::EventObjectPtr getEObjByName( const std::string& name );
|
||||||
|
|
||||||
/*! binds a player to the instance */
|
|
||||||
bool bindPlayer( uint32_t playerId );
|
|
||||||
|
|
||||||
/*! removes bind of player from the instance */
|
|
||||||
void unbindPlayer( uint32_t playerId );
|
|
||||||
|
|
||||||
/*! return true if the player is bound to the instance */
|
|
||||||
bool isPlayerBound( uint32_t playerId ) const;
|
|
||||||
|
|
||||||
/*! number of milliseconds after all players are ready for the instance to commence (spawn circle removed) */
|
/*! number of milliseconds after all players are ready for the instance to commence (spawn circle removed) */
|
||||||
const uint32_t instanceStartDelay = 1250;
|
const uint32_t instanceStartDelay = 1250;
|
||||||
|
|
||||||
|
@ -94,16 +78,14 @@ namespace Sapphire
|
||||||
std::shared_ptr< Sapphire::Data::QuestBattle > m_pBattleDetails;
|
std::shared_ptr< Sapphire::Data::QuestBattle > m_pBattleDetails;
|
||||||
uint32_t m_questBattleId;
|
uint32_t m_questBattleId;
|
||||||
Event::Director::DirectorState m_state;
|
Event::Director::DirectorState m_state;
|
||||||
uint16_t m_currentBgm;
|
|
||||||
|
|
||||||
int64_t m_instanceExpireTime;
|
int64_t m_instanceExpireTime;
|
||||||
uint64_t m_instanceCommenceTime;
|
uint64_t m_instanceCommenceTime;
|
||||||
|
|
||||||
std::map< std::string, Entity::EventObjectPtr > m_eventObjectMap;
|
std::map< std::string, Entity::EventObjectPtr > m_eventObjectMap;
|
||||||
std::unordered_map< uint32_t, Entity::EventObjectPtr > m_eventIdToObjectMap;
|
std::unordered_map< uint32_t, Entity::EventObjectPtr > m_eventIdToObjectMap;
|
||||||
std::set< uint32_t > m_spawnedPlayers;
|
Entity::PlayerPtr m_pPlayer;
|
||||||
|
|
||||||
uint32_t m_boundPlayerId;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue