mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-29 07:37:45 +00:00
Move questbattle opening scene into the script
This commit is contained in:
parent
e4b919e319
commit
c7023fb6a3
3 changed files with 9 additions and 12 deletions
|
@ -49,13 +49,17 @@ public:
|
||||||
void onEnterTerritory( QuestBattle& instance, Entity::Player& player, uint32_t eventId, uint16_t param1,
|
void onEnterTerritory( QuestBattle& instance, Entity::Player& player, uint32_t eventId, uint16_t param1,
|
||||||
uint16_t param2 ) override
|
uint16_t param2 ) override
|
||||||
{
|
{
|
||||||
|
player.playScene( instance.getDirectorId(), 1,
|
||||||
|
NO_DEFAULT_CAMERA | CONDITION_CUTSCENE | SILENT_ENTER_TERRI_ENV |
|
||||||
|
HIDE_HOTBAR | SILENT_ENTER_TERRI_BGM | SILENT_ENTER_TERRI_SE |
|
||||||
|
DISABLE_STEALTH | 0x00100000 | LOCK_HUD | LOCK_HOTBAR |
|
||||||
|
// todo: wtf is 0x00100000
|
||||||
|
DISABLE_CANCEL_EMOTE, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void onDutyComplete( QuestBattle& instance, Entity::Player& player ) override
|
void onDutyComplete( QuestBattle& instance, Entity::Player& player ) override
|
||||||
{
|
{
|
||||||
player.updateQuest( instance.getQuestId(), 2 );
|
player.updateQuest( instance.getQuestId(), 2 );
|
||||||
player.exitInstance();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -520,7 +520,7 @@ void Sapphire::World::Manager::TerritoryMgr::updateTerritoryInstances( uint64_t
|
||||||
auto diff = std::difftime( tickCount, zone->getLastActivityTime() );
|
auto diff = std::difftime( tickCount, zone->getLastActivityTime() );
|
||||||
|
|
||||||
// todo: make this timeout configurable, though should be pretty relaxed in any case
|
// todo: make this timeout configurable, though should be pretty relaxed in any case
|
||||||
if( diff > 6000 )
|
if( diff > 60000 )
|
||||||
{
|
{
|
||||||
Logger::info( "Removing HousingInteriorTerritory#{0} - has been inactive for 60 seconds", zone->getGuId() );
|
Logger::info( "Removing HousingInteriorTerritory#{0} - has been inactive for 60 seconds", zone->getGuId() );
|
||||||
|
|
||||||
|
@ -544,7 +544,7 @@ void Sapphire::World::Manager::TerritoryMgr::updateTerritoryInstances( uint64_t
|
||||||
auto diff = std::difftime( tickCount, zone->getLastActivityTime() );
|
auto diff = std::difftime( tickCount, zone->getLastActivityTime() );
|
||||||
|
|
||||||
// todo: make this timeout configurable, though should be pretty relaxed in any case
|
// todo: make this timeout configurable, though should be pretty relaxed in any case
|
||||||
if( diff > 6000 )
|
if( diff > 60000 )
|
||||||
{
|
{
|
||||||
Logger::info( "Removing QuestBattle#{0} - has been inactive for 60 seconds", zone->getGuId() );
|
Logger::info( "Removing QuestBattle#{0} - has been inactive for 60 seconds", zone->getGuId() );
|
||||||
|
|
||||||
|
|
|
@ -315,14 +315,6 @@ Sapphire::QuestBattle::onEnterTerritory( Entity::Player& player, uint32_t eventI
|
||||||
{
|
{
|
||||||
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
|
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
|
||||||
pScriptMgr->onInstanceEnterTerritory( getAsQuestBattle(), player, eventId, param1, param2 );
|
pScriptMgr->onInstanceEnterTerritory( getAsQuestBattle(), player, eventId, param1, param2 );
|
||||||
|
|
||||||
// TODO: this may or may not be correct for questbattles
|
|
||||||
player.playScene( getDirectorId(), 1, NO_DEFAULT_CAMERA | CONDITION_CUTSCENE | SILENT_ENTER_TERRI_ENV |
|
|
||||||
HIDE_HOTBAR | SILENT_ENTER_TERRI_BGM | SILENT_ENTER_TERRI_SE |
|
|
||||||
DISABLE_STEALTH | 0x00100000 | LOCK_HUD | LOCK_HOTBAR |
|
|
||||||
// todo: wtf is 0x00100000
|
|
||||||
DISABLE_CANCEL_EMOTE, 0 );
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::QuestBattle::clearDirector( Entity::Player& player )
|
void Sapphire::QuestBattle::clearDirector( Entity::Player& player )
|
||||||
|
@ -349,6 +341,7 @@ void Sapphire::QuestBattle::success()
|
||||||
player.eventFinish( getDirectorId(), 1 );
|
player.eventFinish( getDirectorId(), 1 );
|
||||||
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
|
auto pScriptMgr = m_pFw->get< Scripting::ScriptMgr >();
|
||||||
pScriptMgr->onDutyComplete( getAsQuestBattle(), *m_pPlayer );
|
pScriptMgr->onDutyComplete( getAsQuestBattle(), *m_pPlayer );
|
||||||
|
player.exitInstance();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
} );
|
} );
|
||||||
|
|
Loading…
Add table
Reference in a new issue