mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 22:57:45 +00:00
only spawn/lookup house instance if player chooses to enter
This commit is contained in:
parent
e290febcc4
commit
394d8e2b28
1 changed files with 4 additions and 4 deletions
|
@ -23,6 +23,10 @@ public:
|
|||
|
||||
player.playScene( eventId, 0, 0, [this, eobj]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
// param2 == 1 when player wants to enter house
|
||||
if( result.param2 != 1 )
|
||||
return;
|
||||
|
||||
auto terriMgr = getFramework()->get< Sapphire::World::Manager::TerritoryMgr >();
|
||||
if( !terriMgr )
|
||||
return;
|
||||
|
@ -43,10 +47,6 @@ public:
|
|||
player.sendDebug( "created zone with guid: " + std::to_string( internalZone->getGuId() ) + "\nname: " + internalZone->getName() );
|
||||
}
|
||||
|
||||
// param2 == 1 when player wants to enter house
|
||||
if( result.param2 != 1 )
|
||||
return;
|
||||
|
||||
player.eventFinish( result.eventId, 1 );
|
||||
|
||||
player.setPos( { 0.f, 0.f, 0.f } );
|
||||
|
|
Loading…
Add table
Reference in a new issue