1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57:44 +00:00
sapphire/src/scripts/common/CmnDefCutSceneReplay.cpp
2018-12-13 12:40:42 +01:00

42 lines
No EOL
957 B
C++

#include <ScriptObject.h>
#include <Actor/Player.h>
using namespace Sapphire;
class CmnDefCutSceneReplay :
public Sapphire::ScriptAPI::EventScript
{
public:
CmnDefCutSceneReplay() :
Sapphire::ScriptAPI::EventScript( 721028 )
{
}
void Scene00000( Entity::Player& player )
{
auto callback = [ this ]( Entity::Player& player, const Event::SceneResult& result )
{
if( result.param2 != 0 )
{
Scene00001( player, result.param2 );
}
};
player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1, callback );
}
void Scene00001( Entity::Player& player, uint16_t returnScene )
{
auto callback = []( Entity::Player& player, const Event::SceneResult& result )
{
// todo: this is fucked
};
player.playScene( getId(), 1, 0xFB2EC8F8, 0, 1, returnScene, callback );
}
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
{
Scene00000( player );
}
};