mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-25 19:17:45 +00:00
Revert "auto skip quests without script"
This reverts commit f427e21942
.
This commit is contained in:
parent
87b49a137c
commit
c37806f34b
2 changed files with 0 additions and 189 deletions
|
@ -1,101 +0,0 @@
|
|||
#include <Actor/Player.h>
|
||||
#include "Manager/EventMgr.h"
|
||||
#include <ScriptObject.h>
|
||||
#include <Service.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
// Quest Script: SubSea050_00462
|
||||
// Quest Name: On to Summerford
|
||||
// Quest ID: 65998
|
||||
// Start NPC: 1000972
|
||||
// End NPC: 1002626
|
||||
|
||||
class SubSea050 : 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
|
||||
{
|
||||
Seq0 = 0,
|
||||
SeqFinish = 255,
|
||||
};
|
||||
|
||||
// Entities found in the script data of the quest
|
||||
static constexpr auto Actor0 = 1000972;
|
||||
static constexpr auto Actor1 = 1002626;
|
||||
static constexpr auto LocActor0 = 1003289;
|
||||
static constexpr auto LocFace0 = 604;
|
||||
static constexpr auto LocFace1 = 617;
|
||||
static constexpr auto LocPosActor0 = 4201224;
|
||||
static constexpr auto LocPosCam1 = 4201231;
|
||||
static constexpr auto LocSe1 = 39;
|
||||
static constexpr auto LocSe2 = 40;
|
||||
|
||||
public:
|
||||
SubSea050() : Sapphire::ScriptAPI::EventScript( 65998 ){};
|
||||
~SubSea050() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Event Handlers
|
||||
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||
{
|
||||
auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||
auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||
|
||||
if( actor == Actor0 )
|
||||
{
|
||||
Scene00000( player );
|
||||
}
|
||||
else if( actor == Actor1 )
|
||||
{
|
||||
Scene00002( player );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Available Scenes in this quest, not necessarly all are used
|
||||
void Scene00000( Entity::Player& player )
|
||||
{
|
||||
player.playScene( getId(), 0, 0,
|
||||
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if( result.param2 == 1 )
|
||||
{
|
||||
player.updateQuest( getId(), Sequence::SeqFinish );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Scene00001( Entity::Player& player )
|
||||
{
|
||||
player.playScene( getId(), 1, HIDE_HOTBAR,
|
||||
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
});
|
||||
}
|
||||
|
||||
void Scene00002( Entity::Player& player )
|
||||
{
|
||||
player.playScene( getId(), 2, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI,
|
||||
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if( result.param2 == 1 )
|
||||
{
|
||||
if( player.giveQuestRewards( getId(), result.param3 ) )
|
||||
{
|
||||
player.finishQuest( getId() );
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( SubSea050 );
|
|
@ -1,88 +0,0 @@
|
|||
#include <Actor/Player.h>
|
||||
#include "Manager/EventMgr.h"
|
||||
#include <ScriptObject.h>
|
||||
#include <Service.h>
|
||||
|
||||
using namespace Sapphire;
|
||||
|
||||
// Quest Script: SubSea051_00463
|
||||
// Quest Name: Dressed to Call
|
||||
// Quest ID: 65999
|
||||
// Start NPC: 1002626
|
||||
// End NPC: 1002626
|
||||
|
||||
class SubSea051 : public Sapphire::ScriptAPI::EventScript
|
||||
{
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// GetQuestUI8AL
|
||||
|
||||
// Steps in this quest ( 0 is before accepting,
|
||||
// 1 is first, 255 means ready for turning it in
|
||||
enum Sequence : uint8_t
|
||||
{
|
||||
Seq0 = 0,
|
||||
SeqFinish = 255,
|
||||
};
|
||||
|
||||
// Entities found in the script data of the quest
|
||||
static constexpr auto Actor0 = 1002626;
|
||||
static constexpr auto Seq0Actor0 = 0;
|
||||
static constexpr auto Seq1Actor0 = 1;
|
||||
|
||||
public:
|
||||
SubSea051() : Sapphire::ScriptAPI::EventScript( 65999 ){};
|
||||
~SubSea051() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Event Handlers
|
||||
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
||||
{
|
||||
//auto& pEventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||
//auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
||||
|
||||
if( player.getQuestSeq( getId() ) == 0 )
|
||||
{
|
||||
Scene00000( player );
|
||||
}
|
||||
else
|
||||
{
|
||||
Scene00001( player );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Available Scenes in this quest, not necessarly all are used
|
||||
void Scene00000( Entity::Player& player )
|
||||
{
|
||||
player.playScene( getId(), 0, 0,
|
||||
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if( result.param2 == 1 )
|
||||
{
|
||||
player.updateQuest( getId(), Sequence::SeqFinish );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Scene00001( Entity::Player& player )
|
||||
{
|
||||
player.playScene( getId(), 1, 0,
|
||||
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if( result.param2 == 1 )
|
||||
{
|
||||
if( player.giveQuestRewards( getId(), result.param3 ) )
|
||||
{
|
||||
player.finishQuest( getId() );
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
EXPOSE_SCRIPT( SubSea051 );
|
Loading…
Add table
Reference in a new issue