mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-30 08:07:46 +00:00
encounter status control;
This commit is contained in:
parent
f8b0cfb05b
commit
69b767177e
2 changed files with 5 additions and 1 deletions
|
@ -67,6 +67,6 @@ namespace Sapphire
|
|||
std::set< Entity::PlayerPtr > m_playerList;
|
||||
std::unordered_map< uint32_t, Entity::BNpcPtr > m_bnpcs;
|
||||
InstanceContentPtr m_pInstance;
|
||||
EncounterFightStatus m_status;
|
||||
EncounterFightStatus m_status{ EncounterFightStatus::IDLE };
|
||||
};
|
||||
}
|
|
@ -64,6 +64,8 @@ namespace Sapphire
|
|||
|
||||
void init() override
|
||||
{
|
||||
m_status = EncounterFightStatus::IDLE;
|
||||
|
||||
m_stateStack = std::make_shared< EncounterState::StateStack >();
|
||||
|
||||
// todo: i don't like this
|
||||
|
@ -87,6 +89,8 @@ namespace Sapphire
|
|||
{
|
||||
auto ifritInitState = std::make_shared< IfritStateOne >( shared_from_this() );
|
||||
addState( ifritInitState );
|
||||
|
||||
m_status = EncounterFightStatus::ACTIVE;
|
||||
}
|
||||
|
||||
void update( double deltaTime ) override
|
||||
|
|
Loading…
Add table
Reference in a new issue