2018-11-30 22:52:08 +11:00
|
|
|
#include <ScriptObject.h>
|
|
|
|
#include <Actor/Player.h>
|
|
|
|
|
|
|
|
#include "Actor/EventObject.h"
|
|
|
|
|
|
|
|
using namespace Sapphire;
|
|
|
|
|
|
|
|
class HousingEstateEntranceWarpTaxi :
|
2018-11-30 23:15:58 +11:00
|
|
|
public Sapphire::ScriptAPI::EventObjectScript
|
2018-11-30 22:52:08 +11:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
HousingEstateEntranceWarpTaxi() :
|
2018-11-30 23:15:58 +11:00
|
|
|
Sapphire::ScriptAPI::EventObjectScript( 2002737 )
|
2018-11-30 22:52:08 +11:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2018-11-30 23:15:58 +11:00
|
|
|
void onTalk( uint32_t eventId, Entity::Player& player, Entity::EventObject& eobj ) override
|
2018-11-30 22:52:08 +11:00
|
|
|
{
|
2018-11-30 23:15:58 +11:00
|
|
|
player.sendDebug( "Found plot entrance for plot: " + std::to_string( eobj.getHousingLink() >> 8 ) );
|
2018-11-30 22:52:08 +11:00
|
|
|
|
2018-11-30 23:15:58 +11:00
|
|
|
player.playScene( eventId, 0, 0, []( Entity::Player& player, const Event::SceneResult& result )
|
2018-11-30 22:52:08 +11:00
|
|
|
{
|
|
|
|
if( result.param2 != 1 )
|
|
|
|
return;
|
|
|
|
|
|
|
|
// param2 == 1, zone into instance
|
2018-11-30 23:15:58 +11:00
|
|
|
|
2018-11-30 22:52:08 +11:00
|
|
|
} );
|
|
|
|
}
|
|
|
|
};
|