1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-25 11:07:45 +00:00

Delete src/scripts/quest/classquest/GLA directory

This commit is contained in:
Skyliegirl33 2021-09-16 19:02:25 +00:00 committed by GitHub
parent 9622ba7229
commit e70eacde54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 374 deletions

View file

@ -1,65 +0,0 @@
// 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 );

View file

@ -1,118 +0,0 @@
// FFXIVTheMovie.ParserV3.3
// fake IsAnnounce table
#include <Actor/Player.h>
#include <ScriptObject.h>
#include <Service.h>
#include "Manager/TerritoryMgr.h"
#include "Manager/EventMgr.h"
using namespace Sapphire;
class ClsGla011 : public Sapphire::ScriptAPI::EventScript
{
public:
ClsGla011() : Sapphire::ScriptAPI::EventScript( 65821 ){};
~ClsGla011() = default;
//SEQ_0, 1 entries
//SEQ_255, 1 entries
//ACTOR0 = 1002277
//ACTOR1 = 1001739
static constexpr auto CLASSJOB = 1;
//GEARSETUNLOCK = 1905
//LOGMESSAGEMONSTERNOTEPAGEUNLOCK = 1010
//UNLOCKIMAGECLASSGLA = 36
private:
void onProgress( Entity::Player& player, uint64_t param1, uint32_t param2, uint32_t type, uint32_t param3 )
{
switch( player.getQuestSeq( getId() ) )
{
case 0:
{
Scene00000( player ); // Scene00000: Normal(Talk, QuestOffer, QuestAccept, TargetCanMove), id=LULUTSU
break;
}
case 255:
{
Scene00001( player ); // Scene00001: Normal(Talk, YesNo, Message, FadeIn, QuestReward, QuestComplete, TargetCanMove, CanCancel), id=MYLLA
break;
}
default:
{
player.sendUrgent( "Sequence {} not defined.", player.getQuestSeq( getId() ) );
break;
}
}
}
public:
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
{
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
onProgress( player, actorId, actor, 0, 0 );
}
void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override
{
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
onProgress( player, actorId, actor, 1, emoteId );
}
void onBNpcKill( uint32_t npcId, Entity::Player& player ) override
{
onProgress( player, npcId, 0, 2, 0 );
}
void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
{
onProgress( player, param1, param1, 3, 0 );
}
void onEnterTerritory( Sapphire::Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override
{
onProgress( player, param1, param2, 4, 0 );
}
private:
void checkProgressSeq0( Entity::Player& player )
{
player.updateQuest( getId(), 255 );
}
void Scene00000( Entity::Player& player )
{
player.sendDebug( "ClsGla011:65821 calling Scene00000: Normal(Talk, QuestOffer, QuestAccept, TargetCanMove), id=LULUTSU" );
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
{
if( result.param1 > 0 && result.param2 == 1 )
{
checkProgressSeq0( player );
}
};
player.playScene( getId(), 0, HIDE_UI, callback );
}
void Scene00001( Entity::Player& player )
{
player.sendDebug( "ClsGla011:65821 calling Scene00001: Normal(Talk, YesNo, Message, FadeIn, QuestReward, QuestComplete, TargetCanMove, CanCancel), id=MYLLA" );
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.setEquippedMannequin( player.getEquippedMannequin() + 1 );
player.setLevelForClass( 1, static_cast< Common::ClassJob > ( CLASSJOB ) );
}
}
};
player.playScene( getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, callback );
}
};
EXPOSE_SCRIPT( ClsGla011 );

View file

@ -1,191 +0,0 @@
// FFXIVTheMovie.ParserV3.3
#include <Actor/Player.h>
#include <ScriptObject.h>
#include <Service.h>
#include "Manager/TerritoryMgr.h"
#include "Manager/EventMgr.h"
using namespace Sapphire;
class ClsGla020 : public Sapphire::ScriptAPI::EventScript
{
public:
ClsGla020() : Sapphire::ScriptAPI::EventScript( 65789 ){};
~ClsGla020() = default;
//SEQ_0, 1 entries
//SEQ_1, 1 entries
//SEQ_2, 3 entries
//SEQ_255, 1 entries
//ACTOR0 = 1002277
//ACTOR1 = 1001739
//ENEMY0 = 351
//ENEMY1 = 385
//ENEMY2 = 205
//LOGMESSAGEMONSTERNOTEPAGEUNLOCK = 1010
//UNLOCKIMAGEMONSTERNOTE = 32
private:
void onProgress( Entity::Player& player, uint64_t param1, uint32_t param2, uint32_t type, uint32_t param3 )
{
switch( player.getQuestSeq( getId() ) )
{
case 0:
{
Scene00000( player ); // Scene00000: Normal(Talk, YesNo, QuestOffer, QuestAccept, TargetCanMove), id=LULUTSU
break;
}
case 1:
{
Scene00001( player ); // Scene00001: Normal(Talk, YesNo, FadeIn, TargetCanMove, CanCancel), id=MYLLA
break;
}
case 2:
{
if( param1 == 351 || param2 == 351 ) // ENEMY0 = unknown
{
if( player.getQuestUI8AL( getId() ) != 3 )
{
player.setQuestUI8AL( getId(), player.getQuestUI8AL( getId() ) + 1 );
checkProgressSeq2( player );
}
break;
}
if( param1 == 385 || param2 == 385 ) // ENEMY1 = unknown
{
if( player.getQuestUI8BH( getId() ) != 3 )
{
player.setQuestUI8BH( getId(), player.getQuestUI8BH( getId() ) + 1 );
checkProgressSeq2( player );
}
break;
}
if( param1 == 205 || param2 == 205 ) // ENEMY2 = unknown
{
if( player.getQuestUI8BL( getId() ) != 3 )
{
Scene00002( player ); // Scene00002: Normal(None), id=unknown
}
break;
}
break;
}
case 255:
{
Scene00005( player ); // Scene00005: Normal(Talk, Message, QuestReward, QuestComplete, TargetCanMove, SystemTalk), id=MYLLA
break;
}
default:
{
player.sendUrgent( "Sequence {} not defined.", player.getQuestSeq( getId() ) );
break;
}
}
}
public:
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
{
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
onProgress( player, actorId, actor, 0, 0 );
}
void onEmote( uint64_t actorId, uint32_t eventId, uint32_t emoteId, Entity::Player& player ) override
{
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
auto actor = eventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
onProgress( player, actorId, actor, 1, emoteId );
}
void onBNpcKill( uint32_t npcId, Entity::Player& player ) override
{
onProgress( player, npcId, 0, 2, 0 );
}
void onWithinRange( Entity::Player& player, uint32_t eventId, uint32_t param1, float x, float y, float z ) override
{
onProgress( player, param1, param1, 3, 0 );
}
void onEnterTerritory( Sapphire::Entity::Player& player, uint32_t eventId, uint16_t param1, uint16_t param2 ) override
{
onProgress( player, param1, param2, 4, 0 );
}
private:
void checkProgressSeq0( Entity::Player& player )
{
player.updateQuest( getId(), 1 );
}
void checkProgressSeq1( Entity::Player& player )
{
player.updateQuest( getId(), 2 );
}
void checkProgressSeq2( Entity::Player& player )
{
if( player.getQuestUI8AL( getId() ) == 3 )
if( player.getQuestUI8BH( getId() ) == 3 )
if( player.getQuestUI8BL( getId() ) == 3 )
{
player.setQuestUI8AL( getId(), 0 );
player.setQuestUI8BH( getId(), 0 );
player.setQuestUI8BL( getId(), 0 );
player.updateQuest( getId(), 255 );
}
}
void Scene00000( Entity::Player& player )
{
player.sendDebug( "ClsGla020:65789 calling Scene00000: Normal(Talk, YesNo, QuestOffer, QuestAccept, TargetCanMove), id=LULUTSU" );
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
{
if( result.param1 > 0 && result.param2 == 1 )
{
checkProgressSeq0( player );
}
};
player.playScene( getId(), 0, HIDE_UI, callback );
}
void Scene00001( Entity::Player& player )
{
player.sendDebug( "ClsGla020:65789 calling Scene00001: Normal(Talk, YesNo, FadeIn, TargetCanMove, CanCancel), id=MYLLA" );
auto callback = [ & ]( Entity::Player& player, const Event::SceneResult& result )
{
if( result.param1 == 512 || ( result.param1 > 0 && result.param2 == 1 ) )
{
checkProgressSeq1( player );
}
};
player.playScene( getId(), 1, FADE_OUT | CONDITION_CUTSCENE | HIDE_UI, callback );
}
void Scene00002( Entity::Player& player )
{
player.sendDebug( "ClsGla020:65789 calling Scene00002: Normal(None), id=unknown" );
player.setQuestUI8BL( getId(), player.getQuestUI8BL( getId() ) + 1 );
checkProgressSeq2( player );
}
void Scene00005( Entity::Player& player )
{
player.sendDebug( "ClsGla020:65789 calling Scene00005: Normal(Talk, Message, QuestReward, QuestComplete, TargetCanMove, SystemTalk), id=MYLLA" );
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(), 5, HIDE_UI, callback );
}
};
EXPOSE_SCRIPT( ClsGla020 );