2018-03-07 08:14:42 +01:00
|
|
|
#include <Actor/Player.h>
|
2018-12-23 03:53:08 +01:00
|
|
|
#include "Manager/EventMgr.h"
|
2018-06-18 13:14:11 +00:00
|
|
|
#include <ScriptObject.h>
|
2018-12-23 03:53:08 +01:00
|
|
|
#include "Framework.h"
|
2018-03-07 08:14:42 +01:00
|
|
|
|
|
|
|
// Quest Script: ManWil001_00594
|
|
|
|
// Quest Name: Coming to Ul'dah
|
|
|
|
// Quest ID: 66130
|
|
|
|
// Start NPC: 1003987
|
|
|
|
// End NPC: 1003988
|
|
|
|
|
2018-11-29 16:55:48 +01:00
|
|
|
using namespace Sapphire;
|
2018-10-28 21:53:21 +01:00
|
|
|
|
2018-08-29 21:40:59 +02:00
|
|
|
class ManWil001 :
|
2018-11-13 21:34:44 +11:00
|
|
|
public Sapphire::ScriptAPI::EventScript
|
2018-03-07 08:14:42 +01:00
|
|
|
{
|
|
|
|
private:
|
2018-08-29 21:40:59 +02:00
|
|
|
static constexpr auto SEQ_0 = 0;
|
|
|
|
static constexpr auto SEQ_FINISH = 255;
|
|
|
|
|
|
|
|
static constexpr auto ACTOR0 = 1003987;
|
|
|
|
static constexpr auto ACTOR1 = 1003988;
|
|
|
|
static constexpr auto ACTOR20 = 1001285;
|
|
|
|
static constexpr auto CUT_EVENT = 188;
|
|
|
|
static constexpr auto EOBJECT0 = 2001681;
|
|
|
|
static constexpr auto EOBJECT1 = 2001682;
|
|
|
|
static constexpr auto EOBJECT2 = 2001683;
|
|
|
|
static constexpr auto EOBJECT3 = 2001706;
|
|
|
|
static constexpr auto EVENT_ACTION_SEARCH = 1;
|
|
|
|
static constexpr auto OPENING_EVENT_HANDLER = 1245187;
|
|
|
|
|
|
|
|
void Scene00000( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 0, HIDE_HOTBAR,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
|
|
|
if( result.param2 == 1 )
|
|
|
|
{
|
|
|
|
player.setOpeningSequence( 2 );
|
|
|
|
Scene00001( player );
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scene00001( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 1, 0xF8482EFB,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
|
|
|
Scene00002( player );
|
|
|
|
player.updateQuest( getId(), SEQ_FINISH );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scene00002( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 2, HIDE_HOTBAR,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
2018-12-07 00:06:59 +01:00
|
|
|
player.eventStart( result.actorId, OPENING_EVENT_HANDLER, Event::EventHandler::Nest, 0, 0 );
|
2018-08-29 21:40:59 +02:00
|
|
|
player.playScene( OPENING_EVENT_HANDLER, 0x1E, HIDE_HOTBAR | NO_DEFAULT_CAMERA, 0, 0 );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scene00003( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 3, HIDE_HOTBAR,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 3, NONE, 0, 0 );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scene00004( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 4, 0x2c02,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
|
|
|
Scene00005( player );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scene00005( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 5, INVIS_OTHER_PC,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
|
|
|
if( result.param2 == 1 )
|
|
|
|
{
|
|
|
|
if( player.giveQuestRewards( getId(), 0 ) )
|
|
|
|
player.finishQuest( getId() );
|
|
|
|
}
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scene00006( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 6, HIDE_HOTBAR,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 6, 0, 0, 0 );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scene00007( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 7, HIDE_HOTBAR,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 7, 0, 0, 0 );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scene00008( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 8, HIDE_HOTBAR,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 8, 0, 0, 0 );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scene00009( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 9, HIDE_HOTBAR,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 9, 0, 0, 0 );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scene00010( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 10, HIDE_HOTBAR,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 10, 0, 0, 0 );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scene00011( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 11, HIDE_HOTBAR,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 11, 0, 0, 0 );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scene00012( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 12, HIDE_HOTBAR,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 12, 0, 0, 0 );
|
|
|
|
} );
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scene00013( Entity::Player& player )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 13, HIDE_HOTBAR,
|
|
|
|
[ & ]( Entity::Player& player, const Event::SceneResult& result )
|
|
|
|
{
|
|
|
|
player.playScene( getId(), 13, 0, 0, 0 );
|
|
|
|
} );
|
|
|
|
}
|
2018-03-07 08:14:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
public:
|
2018-08-29 21:40:59 +02:00
|
|
|
ManWil001() :
|
2018-11-13 21:34:44 +11:00
|
|
|
Sapphire::ScriptAPI::EventScript( 66130 )
|
2018-08-29 21:40:59 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void onTalk( uint32_t eventId, Entity::Player& player, uint64_t actorId ) override
|
|
|
|
{
|
2018-12-23 03:53:08 +01:00
|
|
|
auto pEventMgr = m_framework->get< World::Manager::EventMgr >();
|
|
|
|
auto actor = pEventMgr->mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
|
2018-08-29 21:40:59 +02:00
|
|
|
|
|
|
|
if( actor == ACTOR0 )
|
|
|
|
{
|
|
|
|
Scene00000( player );
|
|
|
|
}
|
|
|
|
else if( actor == ACTOR1 )
|
|
|
|
{
|
|
|
|
Scene00004( player );
|
|
|
|
}
|
|
|
|
}
|
2018-03-07 08:14:42 +01:00
|
|
|
};
|