1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-28 07:07:45 +00:00
sapphire/src/servers/Scripts/common/CmnDefCutSceneReplay.cpp

42 lines
911 B
C++
Raw Normal View History

2018-06-18 13:14:11 +00:00
#include <ScriptObject.h>
2018-03-07 08:14:42 +01:00
#include <Actor/Player.h>
2018-10-28 21:53:21 +01:00
using namespace Core;
class CmnDefCutSceneReplay :
public EventScript
2018-03-07 08:14:42 +01:00
{
public:
CmnDefCutSceneReplay() :
EventScript( 721028 )
{
}
2018-03-07 08:14:42 +01:00
void Scene00000( Entity::Player& player )
{
auto callback = [ this ]( Entity::Player& player, const Event::SceneResult& result )
{
if( result.param2 != 0 )
2018-03-07 08:14:42 +01:00
{
Scene00001( player, result.param2 );
}
};
2018-03-07 08:14:42 +01:00
player.playScene( getId(), 0, HIDE_HOTBAR, 0, 1, callback );
}
2018-03-07 08:14:42 +01:00
void Scene00001( Entity::Player& player, uint16_t returnScene )
{
auto callback = []( Entity::Player& player, const Event::SceneResult& result )
{
// todo: this is fucked
};
2018-03-07 08:14:42 +01:00
player.playScene( getId(), 1, 0xFB2EC8F8, 0, 1, returnScene, callback );
}
2018-03-07 08:14:42 +01:00
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
{
Scene00000( player );
}
2018-03-07 08:14:42 +01:00
};