1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-24 10:37:45 +00:00
sapphire/src/scripts/quest/classquest/GLA/ClsGla001.cpp
Skyliegirl33 5140687677 Gearset handler, mount item action, some GLA starting quests.
This is #732 with 25eaa62fa0 merged, cleaned up and slightly modified to avoid client desync.
2023-02-07 05:15:03 +09:00

65 lines
No EOL
1.7 KiB
C++

// This is an automatically generated C++ script template
// Content needs to be added by hand to make it function
// In order for this script to be loaded, move it to the correct folder in <root>/scripts/
#include <Actor/Player.h>
#include "Manager/EventMgr.h"
#include <ScriptObject.h>
#include <Service.h>
// Quest Script: ClsGla001_00177
// Quest Name: So You Want to Be a Gladiator
// Quest ID: 65713
// Start NPC: 1002277
// End NPC: 1002277
using namespace Sapphire;
class ClsGla001 : public Sapphire::ScriptAPI::EventScript
{
private:
// Basic quest information
// Quest vars / flags used
// Steps in this quest ( 0 is before accepting,
// 1 is first, 255 means ready for turning it in
enum Sequence : uint8_t
{
};
// Entities found in the script data of the quest
public:
ClsGla001() : Sapphire::ScriptAPI::EventScript( 65713 ){};
~ClsGla001() = default;
//////////////////////////////////////////////////////////////////////
// Event Handlers
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
{
Scene00000( player );
}
private:
//////////////////////////////////////////////////////////////////////
// Available Scenes in this quest, not necessarly all are used
void Scene00000( Entity::Player& player )
{
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
{
if( result.param1 > 0 && result.param2 == 1 )
{
if( player.giveQuestRewards( getId(), result.param3 ) )
{
player.finishQuest( getId() );
}
}
};
player.playScene( getId(), 0, HIDE_UI, callback );
}
};
EXPOSE_SCRIPT( ClsGla001 );