mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-01 16:37:45 +00:00
Implement SmallTalk (menus not working)
This commit is contained in:
parent
4df4d05b5c
commit
e7fb339eef
1 changed files with 27 additions and 0 deletions
27
src/scripts/common/SmallTalk.cpp
Normal file
27
src/scripts/common/SmallTalk.cpp
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include <ScriptObject.h>
|
||||
#include <Actor/Player.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
class SmallTalk :
|
||||
public Sapphire::ScriptAPI::EventScript
|
||||
{
|
||||
public:
|
||||
SmallTalk() :
|
||||
Sapphire::ScriptAPI::EventScript( 0x000B0000 )
|
||||
{
|
||||
}
|
||||
|
||||
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||
{
|
||||
eventMgr().eventStart( player, actorId, eventId, Event::EventHandler::EventType::Talk, 0, 0 );
|
||||
|
||||
eventMgr().playScene( player, eventId, 0, HIDE_HOTBAR, { 0 },
|
||||
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
eventMgr().eventFinish( player, eventId, 1 );
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( SmallTalk );
|
Loading…
Add table
Reference in a new issue