mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 14:57:44 +00:00
auto hide entrance circle
This commit is contained in:
parent
ec0335b64a
commit
39e379747d
2 changed files with 17 additions and 2 deletions
|
@ -36,7 +36,8 @@ Core::InstanceContent::InstanceContent( boost::shared_ptr< Core::Data::InstanceC
|
||||||
m_instanceContentInfo( pInstanceContent ),
|
m_instanceContentInfo( pInstanceContent ),
|
||||||
m_instanceContentId( instanceContentId ),
|
m_instanceContentId( instanceContentId ),
|
||||||
m_state( Created ),
|
m_state( Created ),
|
||||||
m_pEntranceEObj( nullptr )
|
m_pEntranceEObj( nullptr ),
|
||||||
|
m_instanceCommenceTime( 0 )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -107,10 +108,19 @@ void Core::InstanceContent::onUpdate( uint32_t currTime )
|
||||||
{
|
{
|
||||||
if( !playerIt.second->isLoadingComplete() ||
|
if( !playerIt.second->isLoadingComplete() ||
|
||||||
!playerIt.second->isDirectorInitialized() ||
|
!playerIt.second->isDirectorInitialized() ||
|
||||||
!playerIt.second->isOnEnterEventDone() )
|
!playerIt.second->isOnEnterEventDone() ||
|
||||||
|
playerIt.second->hasStateFlag( PlayerStateFlag::WatchingCutscene ) )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( m_instanceCommenceTime == 0 )
|
||||||
|
{
|
||||||
|
m_instanceCommenceTime = Util::getTimeMs() + INSTANCE_COMMENCE_DELAY;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if( Util::getTimeMs() < m_instanceCommenceTime )
|
||||||
|
return;
|
||||||
|
|
||||||
for( const auto& playerIt : m_playerMap )
|
for( const auto& playerIt : m_playerMap )
|
||||||
{
|
{
|
||||||
auto pPlayer = playerIt.second;
|
auto pPlayer = playerIt.second;
|
||||||
|
@ -119,6 +129,7 @@ void Core::InstanceContent::onUpdate( uint32_t currTime )
|
||||||
getDirectorId(), 0x40000001, m_instanceContentInfo->timeLimitmin * 60u ) );
|
getDirectorId(), 0x40000001, m_instanceContentInfo->timeLimitmin * 60u ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_pEntranceEObj->setState( 7 );
|
||||||
m_state = DutyInProgress;
|
m_state = DutyInProgress;
|
||||||
m_instanceExpireTime = Util::getTimeSeconds() + ( m_instanceContentInfo->timeLimitmin * 60u );
|
m_instanceExpireTime = Util::getTimeSeconds() + ( m_instanceContentInfo->timeLimitmin * 60u );
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -22,6 +22,9 @@ public:
|
||||||
DutyFinished
|
DutyFinished
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*! number of milliseconds after all players are ready for the instance to commence (spawn circle removed) */
|
||||||
|
const uint32_t INSTANCE_COMMENCE_DELAY = 1250;
|
||||||
|
|
||||||
InstanceContent( boost::shared_ptr< Core::Data::InstanceContent > pInstanceContent,
|
InstanceContent( boost::shared_ptr< Core::Data::InstanceContent > pInstanceContent,
|
||||||
uint32_t guId,
|
uint32_t guId,
|
||||||
const std::string& internalName,
|
const std::string& internalName,
|
||||||
|
@ -59,6 +62,7 @@ private:
|
||||||
InstanceContentState m_state;
|
InstanceContentState m_state;
|
||||||
|
|
||||||
int64_t m_instanceExpireTime;
|
int64_t m_instanceExpireTime;
|
||||||
|
int64_t m_instanceCommenceTime;
|
||||||
|
|
||||||
Entity::EventObjectPtr m_pEntranceEObj;
|
Entity::EventObjectPtr m_pEntranceEObj;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue