mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-30 16:17:46 +00:00
sendEventNotice has been moved from player to eventMgr, reformatted scripts
This commit is contained in:
parent
d6dd81ad1b
commit
9f83094c43
33 changed files with 1386 additions and 1348 deletions
|
@ -30,7 +30,7 @@ public:
|
|||
{
|
||||
if( player.isAetheryteRegistered( eventId & 0xFFFF ) )
|
||||
{
|
||||
eventMgr().playScene( player, eventId, 2, 0, [this]( Entity::Player& player, const Event::SceneResult& result )
|
||||
eventMgr().playScene( player, eventId, 2, 0, [ this ]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
auto destination = result.getResult( 0 );
|
||||
if( result.numOfResults == 1 && destination != 0 )
|
||||
|
@ -60,12 +60,12 @@ public:
|
|||
if( player.isAetheryteRegistered( eventId & 0xFFFF ) )
|
||||
{
|
||||
// eventParam4 (or params[1] if using EventPlay8, which is actually used on retail) anything bigger than 1 will show select instance menu item
|
||||
eventMgr().playScene( player, eventId, 0, 1, { 1, 2 }, [this]( Entity::Player& player, const Event::SceneResult& result )
|
||||
eventMgr().playScene( player, eventId, 0, 1, { 1, 2 }, [ this ]( Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if( result.numOfResults == 1 ) // set homepoint
|
||||
{
|
||||
player.setHomepoint( result.eventId & 0xFFFF );
|
||||
player.sendEventNotice( result.eventId, 2, 0xEA, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, result.eventId, 2, 0xEA, 0, 0 );
|
||||
}
|
||||
else if( result.numOfResults == 2 ) // aethernet access
|
||||
{
|
||||
|
@ -90,17 +90,17 @@ public:
|
|||
else
|
||||
{
|
||||
eventMgr().eventActionStart( player, eventId, ACTION_ATTUNE,
|
||||
[this]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
[ this ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
player.registerAetheryte( eventId & 0xFFFF );
|
||||
|
||||
if( player.isActionLearned( Common::UnlockEntry::Teleport ) )
|
||||
{
|
||||
player.sendEventNotice( eventId, 0, 2, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, eventId, 0, 2, 0, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendEventNotice( eventId, 0, 1, 1, 0 );
|
||||
eventMgr().sendEventNotice( player, eventId, 0, 1, 1, 0 );
|
||||
player.learnAction( Common::UnlockEntry::Teleport );
|
||||
}
|
||||
},
|
||||
|
|
|
@ -69,11 +69,11 @@ private:
|
|||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player, uint32_t varIdx )
|
||||
{
|
||||
if( varIdx == 3 )
|
||||
player.sendEventNotice( getId(), 1, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 0, 0, 0 );
|
||||
else if( varIdx == 2 )
|
||||
player.sendEventNotice( getId(), 2, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 0, 0, 0 );
|
||||
else
|
||||
player.sendEventNotice( getId(), 0, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0, 0, 0 );
|
||||
|
||||
auto var_attuned = quest.getUI8AL();
|
||||
auto var_class = quest.getUI8BH();
|
||||
|
@ -199,7 +199,7 @@ public:
|
|||
// attune
|
||||
auto event = [ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
player.sendEventNotice( 0x050002, 0, 1, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
|
||||
player.registerAetheryte( 2 );
|
||||
player.learnAction( Common::UnlockEntry::Return );
|
||||
|
||||
|
|
|
@ -59,7 +59,9 @@ private:
|
|||
static constexpr auto UnlockDesion = 14;
|
||||
|
||||
public:
|
||||
ManFst003() : Sapphire::ScriptAPI::QuestScript( 65659 ){};
|
||||
ManFst003() : Sapphire::ScriptAPI::QuestScript( 65659 )
|
||||
{};
|
||||
|
||||
~ManFst003() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -75,7 +77,7 @@ public:
|
|||
eventMgr().eventActionStart( player, 0x050002, 0x13,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
player.sendEventNotice( 0x050002, 0, 1, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
|
||||
player.registerAetheryte( 2 );
|
||||
player.learnAction( Common::UnlockEntry::Return );
|
||||
Scene00051( quest, player );
|
||||
|
@ -107,15 +109,15 @@ private:
|
|||
|
||||
if( varIdx == 3 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 1, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 0, 0, 0 );
|
||||
}
|
||||
else if( varIdx == 2 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 2, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 0, 0, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendEventNotice( getId(), 0, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
auto QUEST_VAR_ATTUNE = quest.getUI8AL();
|
||||
|
|
|
@ -59,7 +59,9 @@ private:
|
|||
static constexpr auto UnlockDesion = 14;
|
||||
|
||||
public:
|
||||
ManFst004() : Sapphire::ScriptAPI::QuestScript( 65660 ){};
|
||||
ManFst004() : Sapphire::ScriptAPI::QuestScript( 65660 )
|
||||
{};
|
||||
|
||||
~ManFst004() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -78,7 +80,7 @@ public:
|
|||
eventMgr().eventActionStart( player, 0x050002, 0x13,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
player.sendEventNotice( 0x050002, 0, 1, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
|
||||
player.registerAetheryte( 2 );
|
||||
player.learnAction( Common::UnlockEntry::Return );
|
||||
Scene00051( quest, player );
|
||||
|
@ -104,15 +106,15 @@ private:
|
|||
{
|
||||
if( varIdx == 3 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 1, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 0, 0, 0 );
|
||||
}
|
||||
else if( varIdx == 2 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 2, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 0, 0, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendEventNotice( getId(), 0, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
auto QUEST_VAR_ATTUNE = quest.getUI8AL();
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
eventMgr().eventActionStart( player, 0x050002, 0x13,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
player.sendEventNotice( 0x050002, 0, 1, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
|
||||
player.registerAetheryte( 2 );
|
||||
player.learnAction( Common::UnlockEntry::Return );
|
||||
Scene00002( player );
|
||||
|
@ -83,15 +83,15 @@ private:
|
|||
{
|
||||
if( varIdx == 1 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 1, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 0, 0, 0 );
|
||||
}
|
||||
else if( varIdx == 2 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 2, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 0, 0, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendEventNotice( getId(), 0, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
auto pQuest = player.getQuest( getId() );
|
||||
|
|
|
@ -70,7 +70,7 @@ public:
|
|||
eventMgr().eventActionStart( player, 0x050002, 0x13,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
player.sendEventNotice( 0x050002, 0, 1, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
|
||||
player.registerAetheryte( 2 );
|
||||
player.learnAction( Common::UnlockEntry::Return );
|
||||
Scene00002( player );
|
||||
|
@ -97,15 +97,15 @@ private:
|
|||
{
|
||||
if( varIdx == 1 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 1, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 0, 0, 0 );
|
||||
}
|
||||
else if( varIdx == 2 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 2, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 0, 0, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendEventNotice( getId(), 0, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
auto questId = getId();
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
eventMgr().eventActionStart( player, 0x050002, 0x13,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
player.sendEventNotice( 0x050002, 0, 1, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
|
||||
player.registerAetheryte( 2 );
|
||||
player.learnAction( Common::UnlockEntry::Return );
|
||||
Scene00001( quest, player );
|
||||
|
@ -103,15 +103,15 @@ private:
|
|||
{
|
||||
if( varIdx == 1 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 1, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 0, 0, 0 );
|
||||
}
|
||||
else if( varIdx == 2 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 2, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 0, 0, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendEventNotice( getId(), 0, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
auto QUEST_VAR_ATTUNE = quest.getUI8AL();
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
eventMgr().eventActionStart( player, 0x050002, 0x13,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
player.sendEventNotice( 0x050002, 0, 1, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
|
||||
player.registerAetheryte( 2 );
|
||||
player.learnAction( Common::UnlockEntry::Return );
|
||||
Scene00001( player );
|
||||
|
@ -103,15 +103,15 @@ private:
|
|||
{
|
||||
if( varIdx == 1 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 1, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 0, 0, 0 );
|
||||
}
|
||||
else if( varIdx == 2 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 2, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 0, 0, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendEventNotice( getId(), 0, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
auto pQuest = player.getQuest( getId() );
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
eventMgr().eventActionStart( player, 0x050002, 0x13,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
player.sendEventNotice( 0x050002, 0, 1, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, 0x050002, 0, 1, 0, 0 );
|
||||
player.registerAetheryte( 2 );
|
||||
player.learnAction( Common::UnlockEntry::Return );
|
||||
Scene00001( player );
|
||||
|
@ -103,15 +103,15 @@ private:
|
|||
{
|
||||
if( varIdx == 1 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 1, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 0, 0, 0 );
|
||||
}
|
||||
else if( varIdx == 2 )
|
||||
{
|
||||
player.sendEventNotice( getId(), 2, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 0, 0, 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
player.sendEventNotice( getId(), 0, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0, 0, 0 );
|
||||
}
|
||||
|
||||
auto pQuest = player.getQuest( getId() );
|
||||
|
|
|
@ -143,23 +143,23 @@ class ClsArc004 : public Sapphire::ScriptAPI::QuestScript
|
|||
}
|
||||
case Eobject3:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x0A,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x0A,
|
||||
[&]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00013(quest, player);
|
||||
player.sendEventNotice(getId(), 2, 2, 0, 0);
|
||||
Scene00013( quest, player );
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 2, 0, 0 );
|
||||
},
|
||||
nullptr, 0);
|
||||
break;
|
||||
}
|
||||
case Eobject4:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[&]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00015(quest, player);
|
||||
Scene00015( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -169,20 +169,20 @@ class ClsArc004 : public Sapphire::ScriptAPI::QuestScript
|
|||
private:
|
||||
|
||||
|
||||
void checkQuestCompletion(World::Quest& quest, Entity::Player& player)
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
auto currentCC = quest.getUI8AL();
|
||||
|
||||
player.sendEventNotice(getId(), 1, 2, currentCC + 1, 3);
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 2, currentCC + 1, 3 );
|
||||
|
||||
if (currentCC + 1 >= 3)
|
||||
if( currentCC + 1 >= 3 )
|
||||
{
|
||||
quest.setSeq(Seq3);
|
||||
quest.setUI8AL(0);
|
||||
quest.setSeq( Seq3 );
|
||||
quest.setUI8AL( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
quest.setUI8AL(currentCC + 1);
|
||||
quest.setUI8AL( currentCC + 1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ class ClsArc004 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
Scene00001(quest, player);
|
||||
Scene00001( quest, player );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -224,8 +224,8 @@ class ClsArc004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
player.sendEventNotice(getId(), 0, 2, 0, 0);
|
||||
quest.setSeq(Seq2);
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, 0, 0 );
|
||||
quest.setSeq( Seq2 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -263,8 +263,8 @@ class ClsArc004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setBitFlag8(3, true);
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8( 3, true );
|
||||
checkQuestCompletion( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -384,7 +384,7 @@ class ClsArc004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00015Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00016(quest, player);
|
||||
Scene00016( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -396,12 +396,13 @@ class ClsArc004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00016Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if (result.getResult(0) == 1) {
|
||||
quest.setSeq(Seq5);
|
||||
if( result.getResult( 0) == 1 )
|
||||
{
|
||||
quest.setSeq( Seq5 );
|
||||
auto& pTeriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
|
||||
eventMgr().eventFinish(player, result.eventId, 0);
|
||||
pTeriMgr.createAndJoinQuestBattle(player, Questbattle0);
|
||||
eventMgr().eventFinish( player, result.eventId, 0 );
|
||||
pTeriMgr.createAndJoinQuestBattle( player, Questbattle0 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -426,8 +427,8 @@ class ClsArc004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00018Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
player.sendEventNotice(getId(), 4, 2, 0, 0);
|
||||
quest.setSeq(SeqFinish);
|
||||
eventMgr().sendEventNotice( player, getId(), 4, 2, 0, 0 );
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -18,7 +18,7 @@ using namespace Sapphire;
|
|||
|
||||
class ClsArc005 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
|
@ -59,41 +59,43 @@ class ClsArc005 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto Questbattle0 = 4;
|
||||
static constexpr auto Territorytype0 = 230;
|
||||
|
||||
public:
|
||||
ClsArc005() : Sapphire::ScriptAPI::QuestScript( 65607 ){};
|
||||
public:
|
||||
ClsArc005() : Sapphire::ScriptAPI::QuestScript( 65607 )
|
||||
{};
|
||||
|
||||
~ClsArc005() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Event Handlers
|
||||
void onTalk( World::Quest& quest, Entity::Player& player, uint64_t actorId ) override
|
||||
void onTalk( World::Quest &quest, Entity::Player &player, uint64_t actorId ) override
|
||||
{
|
||||
switch( actorId )
|
||||
{
|
||||
case Actor0:
|
||||
{
|
||||
if (!player.hasQuest(getId()))
|
||||
Scene00000(quest, player);
|
||||
else if (quest.getSeq() == SeqFinish)
|
||||
Scene00010(quest, player);
|
||||
if( !player.hasQuest( getId()))
|
||||
Scene00000( quest, player );
|
||||
else if( quest.getSeq() == SeqFinish )
|
||||
Scene00010( quest, player );
|
||||
|
||||
break;
|
||||
}
|
||||
case Actor1:
|
||||
{
|
||||
if (quest.getSeq() == Seq1)
|
||||
Scene00002(quest, player);
|
||||
if( quest.getSeq() == Seq1 )
|
||||
Scene00002( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor2:
|
||||
{
|
||||
if (quest.getSeq() == Seq2)
|
||||
Scene00003(quest, player);
|
||||
if( quest.getSeq() == Seq2 )
|
||||
Scene00003( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor3:
|
||||
{
|
||||
if (quest.getSeq() == Seq4)
|
||||
Scene00006(quest, player);
|
||||
if( quest.getSeq() == Seq4 )
|
||||
Scene00006( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor4:
|
||||
|
@ -110,161 +112,162 @@ class ClsArc005 : public Sapphire::ScriptAPI::QuestScript
|
|||
}
|
||||
case Eobject0:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x0A,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x0A,
|
||||
[ & ]( Entity::Player &player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00004(quest, player);
|
||||
player.sendEventNotice(getId(), 2, 2, 0, 0);
|
||||
Scene00004( quest, player );
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 2, 0, 0 );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Available Scenes in this quest, not necessarly all are used
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00000( World::Quest& quest, Entity::Player& player )
|
||||
void Scene00000( World::Quest &quest, Entity::Player &player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 0, HIDE_HOTBAR, bindSceneReturn( &ClsArc005::Scene00000Return ) );
|
||||
}
|
||||
|
||||
void Scene00000Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
void Scene00000Return( World::Quest &quest, Entity::Player &player, const Event::SceneResult &result )
|
||||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
Scene00001(quest, player);
|
||||
Scene00001( quest, player );
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00001( World::Quest& quest, Entity::Player& player )
|
||||
void Scene00001( World::Quest &quest, Entity::Player &player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 1, HIDE_HOTBAR, bindSceneReturn( &ClsArc005::Scene00001Return ) );
|
||||
}
|
||||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
void Scene00001Return( World::Quest &quest, Entity::Player &player, const Event::SceneResult &result )
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00002( World::Quest& quest, Entity::Player& player )
|
||||
void Scene00002( World::Quest &quest, Entity::Player &player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 2, HIDE_HOTBAR, bindSceneReturn( &ClsArc005::Scene00002Return ) );
|
||||
}
|
||||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
void Scene00002Return( World::Quest &quest, Entity::Player &player, const Event::SceneResult &result )
|
||||
{
|
||||
player.sendEventNotice(getId(), 0, 2, 0, 0);
|
||||
quest.setSeq(Seq2);
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, 0, 0 );
|
||||
quest.setSeq( Seq2 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00003( World::Quest& quest, Entity::Player& player )
|
||||
void Scene00003( World::Quest &quest, Entity::Player &player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 3, HIDE_HOTBAR, bindSceneReturn( &ClsArc005::Scene00003Return ) );
|
||||
}
|
||||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
void Scene00003Return( World::Quest &quest, Entity::Player &player, const Event::SceneResult &result )
|
||||
{
|
||||
player.sendEventNotice(getId(), 1, 2, 0, 0);
|
||||
quest.setSeq(Seq3);
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 2, 0, 0 );
|
||||
quest.setSeq( Seq3 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00004( World::Quest& quest, Entity::Player& player )
|
||||
void Scene00004( World::Quest &quest, Entity::Player &player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 4, HIDE_HOTBAR, bindSceneReturn( &ClsArc005::Scene00004Return ) );
|
||||
}
|
||||
|
||||
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
void Scene00004Return( World::Quest &quest, Entity::Player &player, const Event::SceneResult &result )
|
||||
{
|
||||
Scene00005(quest, player);
|
||||
Scene00005( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00005( World::Quest& quest, Entity::Player& player )
|
||||
void Scene00005( World::Quest &quest, Entity::Player &player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 5, SET_EOBJ_BASE | HIDE_HOTBAR | INVIS_EOBJ, bindSceneReturn( &ClsArc005::Scene00005Return ) );
|
||||
}
|
||||
|
||||
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
void Scene00005Return( World::Quest &quest, Entity::Player &player, const Event::SceneResult &result )
|
||||
{
|
||||
quest.setSeq(Seq4);
|
||||
quest.setSeq( Seq4 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00006( World::Quest& quest, Entity::Player& player )
|
||||
void Scene00006( World::Quest &quest, Entity::Player &player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 6, HIDE_HOTBAR, bindSceneReturn( &ClsArc005::Scene00006Return ) );
|
||||
}
|
||||
|
||||
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
void Scene00006Return( World::Quest &quest, Entity::Player &player, const Event::SceneResult &result )
|
||||
{
|
||||
Scene00007(quest, player);
|
||||
Scene00007( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00007( World::Quest& quest, Entity::Player& player )
|
||||
void Scene00007( World::Quest &quest, Entity::Player &player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 7, HIDE_HOTBAR, bindSceneReturn( &ClsArc005::Scene00007Return ) );
|
||||
}
|
||||
|
||||
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
void Scene00007Return( World::Quest &quest, Entity::Player &player, const Event::SceneResult &result )
|
||||
{
|
||||
if (result.getResult(0) == 1) {
|
||||
quest.setSeq(SeqFinish);
|
||||
auto& pTeriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
quest.setSeq( SeqFinish );
|
||||
auto &pTeriMgr = Common::Service< Sapphire::World::Manager::TerritoryMgr >::ref();
|
||||
|
||||
eventMgr().eventFinish(player, result.eventId, 0);
|
||||
pTeriMgr.createAndJoinQuestBattle(player, Questbattle0);
|
||||
eventMgr().eventFinish( player, result.eventId, 0 );
|
||||
pTeriMgr.createAndJoinQuestBattle( player, Questbattle0 );
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00008( World::Quest& quest, Entity::Player& player )
|
||||
void Scene00008( World::Quest &quest, Entity::Player &player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 8, HIDE_HOTBAR, bindSceneReturn( &ClsArc005::Scene00008Return ) );
|
||||
}
|
||||
|
||||
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
void Scene00008Return( World::Quest &quest, Entity::Player &player, const Event::SceneResult &result )
|
||||
{
|
||||
//Empty
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00009( World::Quest& quest, Entity::Player& player )
|
||||
void Scene00009( World::Quest &quest, Entity::Player &player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 9, HIDE_HOTBAR, bindSceneReturn( &ClsArc005::Scene00009Return ) );
|
||||
}
|
||||
|
||||
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
void Scene00009Return( World::Quest &quest, Entity::Player &player, const Event::SceneResult &result )
|
||||
{
|
||||
//Empty
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
void Scene00010( World::Quest& quest, Entity::Player& player )
|
||||
void Scene00010( World::Quest &quest, Entity::Player &player )
|
||||
{
|
||||
eventMgr().playQuestScene( player, getId(), 10, HIDE_HOTBAR, bindSceneReturn( &ClsArc005::Scene00010Return ) );
|
||||
}
|
||||
|
||||
void Scene00010Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
void Scene00010Return( World::Quest &quest, Entity::Player &player, const Event::SceneResult &result )
|
||||
{
|
||||
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubFst004 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// UI8AL
|
||||
|
@ -45,8 +45,10 @@ class SubFst004 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto Seq2Actor2Npctradeno = 99;
|
||||
static constexpr auto Seq2Actor2Npctradeok = 100;
|
||||
|
||||
public:
|
||||
SubFst004() : Sapphire::ScriptAPI::QuestScript( 65563 ){};
|
||||
public:
|
||||
SubFst004() : Sapphire::ScriptAPI::QuestScript( 65563 )
|
||||
{};
|
||||
|
||||
~SubFst004() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -74,7 +76,7 @@ class SubFst004 : public Sapphire::ScriptAPI::QuestScript
|
|||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Available Scenes in this quest, not necessarly all are used
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -101,7 +103,7 @@ class SubFst004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
player.sendEventNotice( getId(), 0, 2, 21002, 0);
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, 21002, 0 );
|
||||
quest.setUI8BH( 1 );
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
|
@ -115,7 +117,7 @@ class SubFst004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if( result.getResult( 0) == 1)
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
Scene00100( quest, player );
|
||||
else
|
||||
Scene00099( quest, player );
|
||||
|
|
|
@ -104,7 +104,7 @@ private:
|
|||
void Scene00001Return( World::Quest &quest, Entity::Player &player, const Event::SceneResult &result )
|
||||
{
|
||||
quest.setUI8BH( 1 );
|
||||
player.sendEventNotice( getId(), 0, 0, 0, 0 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0, 0, 0 );
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubFst013 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// UI8AL
|
||||
|
@ -59,8 +59,10 @@ class SubFst013 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto Seq5Actor1Emoteok = 96;
|
||||
static constexpr auto Seq6Actor0 = 6;
|
||||
|
||||
public:
|
||||
SubFst013() : Sapphire::ScriptAPI::QuestScript( 65576 ){};
|
||||
public:
|
||||
SubFst013() : Sapphire::ScriptAPI::QuestScript( 65576 )
|
||||
{};
|
||||
|
||||
~SubFst013() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -71,37 +73,37 @@ class SubFst013 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
if (quest.getSeq() == Seq2)
|
||||
Scene00002(quest, player);
|
||||
else if (quest.getSeq() == Seq4)
|
||||
Scene00004(quest, player);
|
||||
else if (quest.getSeq() == SeqFinish)
|
||||
Scene00006(quest, player);
|
||||
if( quest.getSeq() == Seq2 )
|
||||
Scene00002( quest, player );
|
||||
else if( quest.getSeq() == Seq4 )
|
||||
Scene00004( quest, player );
|
||||
else if( quest.getSeq() == SeqFinish )
|
||||
Scene00006( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor1: // talking to Aunillie while on quest
|
||||
{
|
||||
Scene00003(quest, player);
|
||||
Scene00003( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void onEmote(World::Quest& quest, uint64_t actorId, uint32_t emoteId, Sapphire::Entity::Player& player) override
|
||||
void onEmote( World::Quest& quest, uint64_t actorId, uint32_t emoteId, Sapphire::Entity::Player& player ) override
|
||||
{
|
||||
if (actorId != Actor1)
|
||||
if( actorId != Actor1 )
|
||||
return;
|
||||
|
||||
if (emoteId == 5 && quest.getSeq() == Seq1)
|
||||
Scene00100(quest, player);
|
||||
else if (emoteId == 18 && quest.getSeq() == Seq3)
|
||||
Scene00098(quest, player);
|
||||
else if (emoteId == 11 && quest.getSeq() == Seq5)
|
||||
Scene00096(quest, player);
|
||||
if( emoteId == 5 && quest.getSeq() == Seq1 )
|
||||
Scene00100( quest, player );
|
||||
else if( emoteId == 18 && quest.getSeq() == Seq3 )
|
||||
Scene00098( quest, player );
|
||||
else if( emoteId == 11 && quest.getSeq() == Seq5 )
|
||||
Scene00096( quest, player );
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Available Scenes in this quest, not necessarly all are used
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -115,7 +117,7 @@ class SubFst013 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,7 +142,7 @@ class SubFst013 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq(Seq3);
|
||||
quest.setSeq( Seq3 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -164,7 +166,7 @@ class SubFst013 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq(Seq5);
|
||||
quest.setSeq( Seq5 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -217,8 +219,8 @@ class SubFst013 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00096Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq(SeqFinish);
|
||||
player.sendEventNotice(getId(), 4, 2, 0, 0);
|
||||
quest.setSeq( SeqFinish );
|
||||
eventMgr().sendEventNotice( player, getId(), 4, 2, 0, 0 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -242,7 +244,7 @@ class SubFst013 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00098Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq(Seq4);
|
||||
quest.setSeq( Seq4 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -266,8 +268,8 @@ class SubFst013 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00100Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq(Seq2);
|
||||
player.sendEventNotice(getId(), 0, 2, 0, 0);
|
||||
quest.setSeq( Seq2 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, 0, 0 );
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
|
@ -46,8 +46,10 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto EventActionSearch = 1;
|
||||
static constexpr auto Item0 = 2000084;
|
||||
|
||||
public:
|
||||
SubFst014() : Sapphire::ScriptAPI::QuestScript( 65577 ){};
|
||||
public:
|
||||
SubFst014() : Sapphire::ScriptAPI::QuestScript( 65577 )
|
||||
{};
|
||||
|
||||
~SubFst014() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -58,90 +60,90 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
if (!player.hasQuest(getId()))
|
||||
Scene00000(quest, player);
|
||||
else if (quest.getSeq() == SeqFinish)
|
||||
Scene00007(quest, player);
|
||||
if( !player.hasQuest( getId() ) )
|
||||
Scene00000( quest, player );
|
||||
else if( quest.getSeq() == SeqFinish )
|
||||
Scene00007( quest, player );
|
||||
break;
|
||||
}
|
||||
|
||||
case Eobject0:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00001(quest, player);
|
||||
Scene00001( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject1:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00002(quest, player);
|
||||
Scene00002( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject2:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00003(quest, player);
|
||||
Scene00003( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject3:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00004(quest, player);
|
||||
Scene00004( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject4:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00005(quest, player);
|
||||
Scene00005( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject5:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00006(quest, player);
|
||||
Scene00006( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
void checkQuestCompletion(World::Quest& quest, Entity::Player& player)
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
auto currentCC = quest.getUI8AL();
|
||||
|
||||
player.sendEventNotice(getId(), 0, 2, currentCC + 1, 6);
|
||||
quest.setUI8AL(currentCC + 1);
|
||||
quest.setUI8BH(currentCC + 1);
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, currentCC + 1, 6 );
|
||||
quest.setUI8AL( currentCC + 1 );
|
||||
quest.setUI8BH( currentCC + 1 );
|
||||
|
||||
if (currentCC + 1 >= 6)
|
||||
if( currentCC + 1 >= 6 )
|
||||
{
|
||||
quest.setSeq(SeqFinish);
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -157,7 +159,7 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -170,7 +172,7 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00100(quest, player);
|
||||
Scene00100( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -182,7 +184,7 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00098(quest, player);
|
||||
Scene00098( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -194,7 +196,7 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00096(quest, player);
|
||||
Scene00096( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -206,7 +208,7 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00094(quest, player);
|
||||
Scene00094( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -218,7 +220,7 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00092(quest, player);
|
||||
Scene00092( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -230,7 +232,7 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00090(quest, player);
|
||||
Scene00090( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -242,8 +244,8 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if (result.getResult(0) == 1)
|
||||
Scene00088(quest, player);
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
Scene00088( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -296,8 +298,8 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00090Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(6, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 6, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -321,8 +323,8 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00092Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(5, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 5, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -346,8 +348,8 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00094Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(4, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 4, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -371,8 +373,8 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00096Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(3, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 3, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -396,8 +398,8 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00098Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(2, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 2, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -422,8 +424,8 @@ class SubFst014 : public Sapphire::ScriptAPI::QuestScript
|
|||
void Scene00100Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(1, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 1, true );
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
|
@ -44,8 +44,10 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto Eobject5 = 2000025;
|
||||
static constexpr auto EventActionSearch = 1;
|
||||
|
||||
public:
|
||||
SubFst015() : Sapphire::ScriptAPI::QuestScript( 65578 ){};
|
||||
public:
|
||||
SubFst015() : Sapphire::ScriptAPI::QuestScript( 65578 )
|
||||
{};
|
||||
|
||||
~SubFst015() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -56,92 +58,92 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
if (!player.hasQuest(getId()))
|
||||
Scene00000(quest, player);
|
||||
if( !player.hasQuest( getId() ) )
|
||||
Scene00000( quest, player );
|
||||
else
|
||||
Scene00007(quest, player);
|
||||
Scene00007( quest, player );
|
||||
break;
|
||||
}
|
||||
|
||||
case Eobject0:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00001(quest, player);
|
||||
Scene00001( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject1:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00002(quest, player);
|
||||
Scene00002( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject2:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00003(quest, player);
|
||||
Scene00003( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject3:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00004(quest, player);
|
||||
Scene00004( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject4:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00005(quest, player);
|
||||
Scene00005( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject5:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00006(quest, player);
|
||||
Scene00006( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
void checkQuestCompletion(World::Quest& quest, Entity::Player& player)
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
auto currentCC = quest.getUI8AL();
|
||||
|
||||
player.sendEventNotice(getId(), 0, 2, currentCC + 1, 6);
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, currentCC + 1, 6 );
|
||||
|
||||
if (currentCC + 1 >= 6)
|
||||
if( currentCC + 1 >= 6 )
|
||||
{
|
||||
quest.setSeq(SeqFinish);
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
else
|
||||
{
|
||||
quest.setUI8AL(currentCC + 1);
|
||||
quest.setUI8AL( currentCC + 1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,7 +160,7 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -171,7 +173,7 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00100(quest, player);
|
||||
Scene00100( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -183,7 +185,7 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00098(quest, player);
|
||||
Scene00098( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -195,7 +197,7 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00096(quest, player);
|
||||
Scene00096( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -207,7 +209,7 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00094(quest, player);
|
||||
Scene00094( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -219,7 +221,7 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00092(quest, player);
|
||||
Scene00092( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -231,7 +233,7 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00090(quest, player);
|
||||
Scene00090( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -272,8 +274,8 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00090Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(6, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 6, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -297,8 +299,8 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00092Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(5, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 5, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -322,8 +324,8 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00094Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(4, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 4, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -347,8 +349,8 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00096Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(3, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 3, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -372,8 +374,8 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00098Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(2, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 2, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -397,8 +399,8 @@ class SubFst015 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00100Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(1, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 1, true );
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubFst030 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// UI8AL
|
||||
|
@ -55,8 +55,10 @@ class SubFst030 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto Seq3Actor2Npctradeok = 98;
|
||||
static constexpr auto Seq4Actor0 = 4;
|
||||
|
||||
public:
|
||||
SubFst030() : Sapphire::ScriptAPI::QuestScript( 65709 ){};
|
||||
public:
|
||||
SubFst030() : Sapphire::ScriptAPI::QuestScript( 65709 )
|
||||
{};
|
||||
|
||||
~SubFst030() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -67,37 +69,37 @@ class SubFst030 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
if (!player.hasQuest(getId()))
|
||||
Scene00000(quest, player);
|
||||
if( !player.hasQuest( getId() ) )
|
||||
Scene00000( quest, player );
|
||||
else
|
||||
Scene00004(quest, player);
|
||||
Scene00004( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor1:
|
||||
{
|
||||
Scene00001(quest, player);
|
||||
Scene00001( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor2:
|
||||
{
|
||||
Scene00003(quest, player);
|
||||
Scene00003( quest, player );
|
||||
break;
|
||||
}
|
||||
case Eobject0:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x06,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x06,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00002(quest, player);
|
||||
Scene00002( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Available Scenes in this quest, not necessarly all are used
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -111,7 +113,7 @@ class SubFst030 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -124,8 +126,8 @@ class SubFst030 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq(Seq2);
|
||||
player.sendEventNotice(getId(), 0, 2, 0, 0);
|
||||
quest.setSeq( Seq2 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, 0, 0 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -137,7 +139,7 @@ class SubFst030 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00100(quest, player);
|
||||
Scene00100( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -149,10 +151,10 @@ class SubFst030 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if (result.getResult(0) == 1)
|
||||
Scene00098(quest, player);
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
Scene00098( quest, player );
|
||||
else
|
||||
Scene00097(quest, player);
|
||||
Scene00097( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -194,8 +196,8 @@ class SubFst030 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00098Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq(SeqFinish);
|
||||
player.sendEventNotice(getId(), 2, 2, 0, 0);
|
||||
quest.setSeq( SeqFinish );
|
||||
eventMgr().sendEventNotice( player, getId(), 2, 2, 0, 0 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -220,10 +222,10 @@ class SubFst030 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00100Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq(Seq3);
|
||||
player.sendEventNotice(getId(), 1, 2, 0, 0);
|
||||
quest.setUI8FL(1);
|
||||
quest.setUI8BH(1);
|
||||
quest.setSeq( Seq3 );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 2, 0, 0 );
|
||||
quest.setUI8FL( 1 );
|
||||
quest.setUI8BH( 1 );
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubFst043 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
|
@ -49,8 +49,10 @@ class SubFst043 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto Seq1Eobject1Eventactionok = 98;
|
||||
static constexpr auto Seq2Actor1 = 3;
|
||||
|
||||
public:
|
||||
SubFst043() : Sapphire::ScriptAPI::QuestScript( 65735 ){};
|
||||
public:
|
||||
SubFst043() : Sapphire::ScriptAPI::QuestScript( 65735 )
|
||||
{};
|
||||
|
||||
~SubFst043() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -61,54 +63,54 @@ class SubFst043 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
Scene00000(quest, player);
|
||||
Scene00000( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor1:
|
||||
{
|
||||
if (quest.getSeq() == SeqFinish)
|
||||
Scene00003(quest, player);
|
||||
if( quest.getSeq() == SeqFinish )
|
||||
Scene00003( quest, player );
|
||||
break;
|
||||
}
|
||||
case Eobject0:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), EventActionProcessMiddle,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), EventActionProcessMiddle,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00001(quest, player);
|
||||
Scene00001( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject1:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), EventActionProcessMiddle,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), EventActionProcessMiddle,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00002(quest, player);
|
||||
Scene00002( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
void checkQuestCompletion(World::Quest& quest, Entity::Player& player)
|
||||
private:
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
auto credit = quest.getUI8AL();
|
||||
|
||||
if (credit + 1 >= 2)
|
||||
if( credit + 1 >= 2 )
|
||||
{
|
||||
quest.setUI8AL(credit + 1);
|
||||
player.sendEventNotice(getId(), 0, 2, credit + 1, 2);
|
||||
quest.setSeq(SeqFinish);
|
||||
quest.setUI8AL( credit + 1 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, credit + 1, 2 );
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
else
|
||||
{
|
||||
quest.setUI8AL( credit + 1);
|
||||
player.sendEventNotice(getId(), 0, 2, credit + 1, 2);
|
||||
quest.setUI8AL( credit + 1 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, credit + 1, 2 );
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -124,7 +126,7 @@ class SubFst043 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,7 +139,7 @@ class SubFst043 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00100(quest, player);
|
||||
Scene00100( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -149,7 +151,7 @@ class SubFst043 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00098(quest, player);
|
||||
Scene00098( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -190,8 +192,8 @@ class SubFst043 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00098Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(2, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 2, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -215,8 +217,8 @@ class SubFst043 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00100Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(1, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 1, true );
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubFst046 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
|
@ -46,8 +46,10 @@ class SubFst046 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto Seq1Actor3 = 3;
|
||||
static constexpr auto Seq2Actor0 = 4;
|
||||
|
||||
public:
|
||||
SubFst046() : Sapphire::ScriptAPI::QuestScript( 65746 ){};
|
||||
public:
|
||||
SubFst046() : Sapphire::ScriptAPI::QuestScript( 65746 )
|
||||
{};
|
||||
|
||||
~SubFst046() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -58,47 +60,47 @@ class SubFst046 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
if (!player.hasQuest(getId()))
|
||||
Scene00000(quest, player);
|
||||
else if (quest.getSeq() == SeqFinish)
|
||||
Scene00004(quest, player);
|
||||
if( !player.hasQuest( getId() ) )
|
||||
Scene00000( quest, player );
|
||||
else if( quest.getSeq() == SeqFinish )
|
||||
Scene00004( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor1:
|
||||
{
|
||||
Scene00001(quest, player);
|
||||
Scene00001( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor2:
|
||||
{
|
||||
Scene00002(quest, player);
|
||||
Scene00002( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor3:
|
||||
{
|
||||
Scene00003(quest, player);
|
||||
Scene00003( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
void checkQuestCompletion(World::Quest& quest, Entity::Player& player)
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
auto credit = quest.getUI8AL();
|
||||
|
||||
if (credit + 1 >= 3)
|
||||
if( credit + 1 >= 3 )
|
||||
{
|
||||
quest.setUI8AL(credit + 1);
|
||||
player.sendEventNotice(getId(), 0, 0, credit + 1, 3);
|
||||
quest.setSeq(SeqFinish);
|
||||
quest.setUI8AL( credit + 1 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0, credit + 1, 3 );
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
else
|
||||
{
|
||||
quest.setUI8AL(credit + 1);
|
||||
player.sendEventNotice(getId(), 0, 0, credit + 1, 3);
|
||||
quest.setUI8AL( credit + 1 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 0, credit + 1, 3 );
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -114,7 +116,7 @@ class SubFst046 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -127,8 +129,8 @@ class SubFst046 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(1, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 1, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -140,8 +142,8 @@ class SubFst046 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(2, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 2, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -153,8 +155,8 @@ class SubFst046 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(3, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 3, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubFst048 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
|
@ -45,8 +45,10 @@ class SubFst048 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto Seq1Actor3 = 3;
|
||||
static constexpr auto Seq2Actor0 = 4;
|
||||
|
||||
public:
|
||||
SubFst048() : Sapphire::ScriptAPI::QuestScript( 65911 ){};
|
||||
public:
|
||||
SubFst048() : Sapphire::ScriptAPI::QuestScript( 65911 )
|
||||
{};
|
||||
|
||||
~SubFst048() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -57,46 +59,46 @@ class SubFst048 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
if (!player.hasQuest(getId()))
|
||||
Scene00000(quest, player);
|
||||
else if (quest.getSeq() == SeqFinish)
|
||||
Scene00004(quest, player);
|
||||
if( !player.hasQuest( getId() ) )
|
||||
Scene00000( quest, player );
|
||||
else if( quest.getSeq() == SeqFinish )
|
||||
Scene00004( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor1:
|
||||
{
|
||||
Scene00001(quest, player);
|
||||
Scene00001( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor2:
|
||||
{
|
||||
Scene00002(quest, player);
|
||||
Scene00002( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor3:
|
||||
{
|
||||
Scene00003(quest, player);
|
||||
Scene00003( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
void checkQuestCompletion(World::Quest& quest, Entity::Player& player)
|
||||
private:
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
auto credit = quest.getUI8AL();
|
||||
|
||||
if (credit + 1 >= 3)
|
||||
if( credit + 1 >= 3 )
|
||||
{
|
||||
quest.setUI8AL(credit + 1);
|
||||
player.sendEventNotice(getId(), 0, 2, credit + 1, 3);
|
||||
quest.setSeq(SeqFinish);
|
||||
quest.setUI8AL( credit + 1 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, credit + 1, 3 );
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
else
|
||||
{
|
||||
quest.setUI8AL(credit + 1);
|
||||
player.sendEventNotice(getId(), 0, 2, credit + 1, 3);
|
||||
quest.setUI8AL( credit + 1 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, credit + 1, 3 );
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -112,7 +114,7 @@ class SubFst048 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -125,8 +127,8 @@ class SubFst048 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(1, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 1, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -138,8 +140,8 @@ class SubFst048 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(2, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 2, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -151,8 +153,8 @@ class SubFst048 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(3, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 3, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
|
@ -54,8 +54,10 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto Quest1 = 65645;
|
||||
static constexpr auto Territorytype0 = 129;
|
||||
|
||||
public:
|
||||
SubSea001() : Sapphire::ScriptAPI::QuestScript( 65647 ){};
|
||||
public:
|
||||
SubSea001() : Sapphire::ScriptAPI::QuestScript( 65647 )
|
||||
{};
|
||||
|
||||
~SubSea001() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -66,82 +68,82 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
Scene00000(quest, player);
|
||||
Scene00000( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor1:
|
||||
{
|
||||
Scene00002(quest, player);
|
||||
Scene00002( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor2:
|
||||
{
|
||||
Scene00016(quest, player);
|
||||
Scene00016( quest, player );
|
||||
break;
|
||||
}
|
||||
case Eobject0:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x0E,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x0E,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00003(quest, player);
|
||||
Scene00003( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
|
||||
break;
|
||||
}
|
||||
case Eobject1:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x0E,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x0E,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00005(quest, player);
|
||||
Scene00005( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
|
||||
break;
|
||||
}
|
||||
case Eobject2:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x0E,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x0E,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00007(quest, player);
|
||||
Scene00007( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
|
||||
break;
|
||||
}
|
||||
case Eobject3:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x0E,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x0E,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00009(quest, player);
|
||||
Scene00009( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
|
||||
break;
|
||||
}
|
||||
case Eobject4:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x0E,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x0E,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00011(quest, player);
|
||||
Scene00011( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
|
||||
break;
|
||||
}
|
||||
case Eobject5:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x0E,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x0E,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00013(quest, player);
|
||||
Scene00013( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -149,25 +151,25 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
|
||||
void checkQuestCompletion(World::Quest& quest, Entity::Player& player)
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
auto currentCC = quest.getUI8BH();
|
||||
|
||||
player.sendEventNotice(getId(), 1, 3, currentCC + 1, 6);
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 3, currentCC + 1, 6 );
|
||||
|
||||
if (currentCC + 1 >= 6)
|
||||
if( currentCC + 1 >= 6 )
|
||||
{
|
||||
quest.setSeq(SeqFinish);
|
||||
quest.setUI8BH(currentCC + 1);
|
||||
quest.setUI8AL(currentCC + 1);
|
||||
quest.setSeq( SeqFinish );
|
||||
quest.setUI8BH( currentCC + 1 );
|
||||
quest.setUI8AL( currentCC + 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
quest.setUI8BH(currentCC + 1);
|
||||
quest.setUI8AL(currentCC + 1);
|
||||
quest.setUI8BH( currentCC + 1 );
|
||||
quest.setUI8AL( currentCC + 1 );
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -183,7 +185,7 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -209,13 +211,13 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if (player.hasQuest(Quest0) || player.hasQuest(Quest1))
|
||||
if( player.hasQuest( Quest0 ) || player.hasQuest( Quest1 ) )
|
||||
{
|
||||
if (result.getResult(0) == 1)
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
{
|
||||
quest.setSeq(Seq2);
|
||||
player.changePosition(10, 21, 13, -2);
|
||||
player.forceZoneing(Territorytype0); //Teleport to real Limsa
|
||||
quest.setSeq( Seq2 );
|
||||
player.changePosition( 10, 21, 13, -2 );
|
||||
player.forceZoneing( Territorytype0 ); //Teleport to real Limsa
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -233,7 +235,7 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00004(quest, player);
|
||||
Scene00004( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -245,8 +247,8 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(1, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 1, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -258,7 +260,7 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00006(quest, player);
|
||||
Scene00006( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -270,8 +272,8 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(2, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 2, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -283,7 +285,7 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00008(quest, player);
|
||||
Scene00008( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -295,8 +297,8 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(3, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 3, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -308,7 +310,7 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00010(quest, player);
|
||||
Scene00010( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -320,8 +322,8 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00010Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(4, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 4, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -333,7 +335,7 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00011Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00012(quest, player);
|
||||
Scene00012( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -345,8 +347,8 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00012Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(5, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 5, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -358,7 +360,7 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00013Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00014(quest, player);
|
||||
Scene00014( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -370,8 +372,8 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00014Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(6, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 6, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -396,7 +398,7 @@ class SubSea001 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00016Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00017(quest, player);
|
||||
Scene00017( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubWil004 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
|
@ -48,8 +48,10 @@ class SubWil004 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto EventActionSearch = 1;
|
||||
static constexpr auto Item0 = 2000137;
|
||||
|
||||
public:
|
||||
SubWil004() : Sapphire::ScriptAPI::QuestScript( 65689 ){};
|
||||
public:
|
||||
SubWil004() : Sapphire::ScriptAPI::QuestScript( 65689 )
|
||||
{};
|
||||
|
||||
~SubWil004() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -60,75 +62,75 @@ class SubWil004 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
Scene00000(quest, player);
|
||||
Scene00000( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor1:
|
||||
{
|
||||
Scene00001(quest, player);
|
||||
Scene00001( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor2:
|
||||
{
|
||||
Scene00008(quest, player);
|
||||
Scene00008( quest, player );
|
||||
break;
|
||||
}
|
||||
case Eobject0:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00003(quest, player);
|
||||
Scene00003( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject1:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00005(quest, player);
|
||||
Scene00005( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
case Eobject2:
|
||||
{
|
||||
eventMgr().eventActionStart(player, getId(), 0x01,
|
||||
[&](Entity::Player& player, uint32_t eventId, uint64_t additional)
|
||||
eventMgr().eventActionStart( player, getId(), 0x01,
|
||||
[ & ]( Entity::Player& player, uint32_t eventId, uint64_t additional )
|
||||
{
|
||||
Scene00007(quest, player);
|
||||
Scene00007( quest, player );
|
||||
},
|
||||
nullptr, 0);
|
||||
nullptr, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
|
||||
void checkQuestCompletion(World::Quest& quest, Entity::Player& player)
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
auto currentCC = quest.getUI8AL();
|
||||
auto currentQC = quest.getUI8BH();
|
||||
|
||||
player.sendEventNotice(getId(), 1, 3, currentCC + 1, 3);
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 3, currentCC + 1, 3 );
|
||||
|
||||
if (currentCC + 1 >= 3)
|
||||
if( currentCC + 1 >= 3 )
|
||||
{
|
||||
quest.setSeq(SeqFinish);
|
||||
quest.setUI8AH(currentCC + 1);
|
||||
quest.setUI8AL(currentCC + 1);
|
||||
quest.setUI8BH(0);
|
||||
quest.setSeq( SeqFinish );
|
||||
quest.setUI8AH( currentCC + 1 );
|
||||
quest.setUI8AL( currentCC + 1 );
|
||||
quest.setUI8BH( 0 );
|
||||
}
|
||||
else
|
||||
{
|
||||
quest.setUI8AH(currentCC + 1);
|
||||
quest.setUI8AL(currentCC + 1);
|
||||
quest.setUI8BH(currentQC - 1);
|
||||
quest.setUI8AH( currentCC + 1 );
|
||||
quest.setUI8AL( currentCC + 1 );
|
||||
quest.setUI8BH( currentQC - 1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -145,7 +147,7 @@ class SubWil004 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,9 +160,9 @@ class SubWil004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq(Seq2);
|
||||
player.sendEventNotice(getId(), 0, 2, 0, 0);
|
||||
quest.setUI8BH(3);
|
||||
quest.setSeq( Seq2 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, 0, 0 );
|
||||
quest.setUI8BH( 3 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -172,7 +174,7 @@ class SubWil004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00003(quest, player);
|
||||
Scene00003( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -184,8 +186,8 @@ class SubWil004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(1, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 1, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -197,7 +199,7 @@ class SubWil004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00005(quest, player);
|
||||
Scene00005( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -209,8 +211,8 @@ class SubWil004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(2, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 2, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -222,7 +224,7 @@ class SubWil004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00007(quest, player);
|
||||
Scene00007( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -234,8 +236,8 @@ class SubWil004 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(3, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 3, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubWil006 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// UI8AL
|
||||
|
@ -40,8 +40,10 @@ class SubWil006 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto Actor2 = 1001299;
|
||||
static constexpr auto Item0 = 2000201;
|
||||
|
||||
public:
|
||||
SubWil006() : Sapphire::ScriptAPI::QuestScript( 65701 ){};
|
||||
public:
|
||||
SubWil006() : Sapphire::ScriptAPI::QuestScript( 65701 )
|
||||
{};
|
||||
|
||||
~SubWil006() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -52,24 +54,24 @@ class SubWil006 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
Scene00000(quest, player);
|
||||
Scene00000( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor1:
|
||||
{
|
||||
Scene00001(quest, player);
|
||||
Scene00001( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor2:
|
||||
{
|
||||
Scene00004(quest, player);
|
||||
Scene00004( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Available Scenes in this quest, not necessarly all are used
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -83,8 +85,8 @@ class SubWil006 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setUI8BH(1);
|
||||
quest.setSeq( Seq1 );
|
||||
quest.setUI8BH( 1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,10 +99,10 @@ class SubWil006 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if (result.getResult(0) == 1)
|
||||
Scene00002(quest, player);
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
Scene00002( quest, player );
|
||||
else
|
||||
Scene00003(quest, player);
|
||||
Scene00003( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -112,8 +114,8 @@ class SubWil006 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq(SeqFinish);
|
||||
player.sendEventNotice(getId(), 0, 2, 0, 0);
|
||||
quest.setSeq( SeqFinish );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, 0, 0 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubWil007 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
|
@ -45,8 +45,10 @@ class SubWil007 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto Actor5 = 1001698;
|
||||
static constexpr auto FirstQuest = 66130;
|
||||
|
||||
public:
|
||||
SubWil007() : Sapphire::ScriptAPI::QuestScript( 65703 ){};
|
||||
public:
|
||||
SubWil007() : Sapphire::ScriptAPI::QuestScript( 65703 )
|
||||
{};
|
||||
|
||||
~SubWil007() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -57,88 +59,88 @@ class SubWil007 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
if (!player.hasQuest(getId()))
|
||||
Scene00000(quest, player);
|
||||
else if (quest.getSeq() == SeqFinish)
|
||||
Scene00020(quest, player);
|
||||
if( !player.hasQuest( getId() ) )
|
||||
Scene00000( quest, player );
|
||||
else if( quest.getSeq() == SeqFinish )
|
||||
Scene00020( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor1:
|
||||
{
|
||||
Scene00005(quest, player);
|
||||
Scene00005( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor2:
|
||||
{
|
||||
Scene00008(quest, player);
|
||||
Scene00008( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor3:
|
||||
{
|
||||
Scene00011(quest, player);
|
||||
Scene00011( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor4:
|
||||
{
|
||||
Scene00014(quest, player);
|
||||
Scene00014( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor5:
|
||||
{
|
||||
Scene00017(quest, player);
|
||||
Scene00017( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void onEmote(World::Quest& quest, uint64_t actorId, uint32_t emoteId, Entity::Player& player) override
|
||||
void onEmote( World::Quest& quest, uint64_t actorId, uint32_t emoteId, Entity::Player& player ) override
|
||||
{
|
||||
if (emoteId != 41)
|
||||
if( emoteId != 41 )
|
||||
return;
|
||||
|
||||
if (actorId == Actor0 && quest.getSeq() == Seq1)
|
||||
if( actorId == Actor0 && quest.getSeq() == Seq1 )
|
||||
{
|
||||
Scene00003(quest, player);
|
||||
Scene00003( quest, player );
|
||||
}
|
||||
else if (actorId == Actor1 && quest.getSeq() == Seq2)
|
||||
else if( actorId == Actor1 && quest.getSeq() == Seq2 )
|
||||
{
|
||||
Scene00006(quest, player);
|
||||
Scene00006( quest, player );
|
||||
}
|
||||
else if (actorId == Actor2 && quest.getSeq() == Seq2)
|
||||
else if( actorId == Actor2 && quest.getSeq() == Seq2 )
|
||||
{
|
||||
Scene00009(quest, player);
|
||||
Scene00009( quest, player );
|
||||
}
|
||||
else if (actorId == Actor3 && quest.getSeq() == Seq2)
|
||||
else if( actorId == Actor3 && quest.getSeq() == Seq2 )
|
||||
{
|
||||
Scene00012(quest, player);
|
||||
Scene00012( quest, player );
|
||||
}
|
||||
else if (actorId == Actor4 && quest.getSeq() == Seq2)
|
||||
else if( actorId == Actor4 && quest.getSeq() == Seq2 )
|
||||
{
|
||||
Scene00015(quest, player);
|
||||
Scene00015( quest, player );
|
||||
}
|
||||
else if (actorId == Actor5 && quest.getSeq() == Seq2)
|
||||
else if( actorId == Actor5 && quest.getSeq() == Seq2 )
|
||||
{
|
||||
Scene00018(quest, player);
|
||||
Scene00018( quest, player );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
|
||||
void checkQuestCompletion(World::Quest& quest, Entity::Player& player)
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
auto currentQC = quest.getUI8AL() + 1;
|
||||
|
||||
if (currentQC >= 5)
|
||||
if( currentQC >= 5 )
|
||||
{
|
||||
quest.setSeq(SeqFinish);
|
||||
player.sendEventNotice(getId(), 1, 2, currentQC, 5);
|
||||
quest.setSeq( SeqFinish );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 2, currentQC, 5 );
|
||||
}
|
||||
else
|
||||
{
|
||||
quest.setUI8AL(currentQC);
|
||||
player.sendEventNotice(getId(), 1, 2, currentQC, 5);
|
||||
quest.setUI8AL( currentQC );
|
||||
eventMgr().sendEventNotice( player, getId(), 1, 2, currentQC, 5 );
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -154,7 +156,7 @@ class SubWil007 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
Scene00001(quest, player);
|
||||
Scene00001( quest, player );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -167,7 +169,7 @@ class SubWil007 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -191,8 +193,8 @@ class SubWil007 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq(Seq2);
|
||||
player.sendEventNotice(getId(), 0, 1, 0, 0);
|
||||
quest.setSeq( Seq2 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 1, 0, 0 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -228,8 +230,8 @@ class SubWil007 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00006Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(1, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 1, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -265,8 +267,8 @@ class SubWil007 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00009Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(2, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 2, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -302,8 +304,8 @@ class SubWil007 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00012Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(3, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 3, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -339,8 +341,8 @@ class SubWil007 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00015Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(4, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 4, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -376,8 +378,8 @@ class SubWil007 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00018Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(5, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 5, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
|
@ -45,8 +45,10 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto EventActionSearch = 1;
|
||||
static constexpr auto Item0 = 2000198;
|
||||
|
||||
public:
|
||||
SubWil018() : Sapphire::ScriptAPI::QuestScript( 65932 ){};
|
||||
public:
|
||||
SubWil018() : Sapphire::ScriptAPI::QuestScript( 65932 )
|
||||
{};
|
||||
|
||||
~SubWil018() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -57,59 +59,59 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
if (!player.hasQuest(getId()))
|
||||
Scene00000(quest, player);
|
||||
if( !player.hasQuest( getId() ) )
|
||||
Scene00000( quest, player );
|
||||
else
|
||||
Scene00016(quest, player);
|
||||
Scene00016( quest, player );
|
||||
break;
|
||||
}
|
||||
case Eobject0:
|
||||
{
|
||||
Scene00001(quest, player);
|
||||
Scene00001( quest, player );
|
||||
break;
|
||||
}
|
||||
case Eobject1:
|
||||
{
|
||||
Scene00004(quest, player);
|
||||
Scene00004( quest, player );
|
||||
break;
|
||||
}
|
||||
case Eobject2:
|
||||
{
|
||||
Scene00007(quest, player);
|
||||
Scene00007( quest, player );
|
||||
break;
|
||||
}
|
||||
case Eobject3:
|
||||
{
|
||||
Scene00010(quest, player);
|
||||
Scene00010( quest, player );
|
||||
break;
|
||||
}
|
||||
case Eobject4:
|
||||
{
|
||||
Scene00013(quest, player);
|
||||
Scene00013( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
void checkQuestCompletion(World::Quest& quest, Entity::Player& player)
|
||||
void checkQuestCompletion( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
auto currentCC = quest.getUI8AL();
|
||||
|
||||
player.sendEventNotice(getId(), 0, 3, currentCC + 1, 5);
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 3, currentCC + 1, 5 );
|
||||
|
||||
if (currentCC + 1 >= 5)
|
||||
if( currentCC + 1 >= 5 )
|
||||
{
|
||||
quest.setSeq(SeqFinish);
|
||||
quest.setUI8BH(currentCC + 1);
|
||||
quest.setUI8AL(currentCC + 1);
|
||||
quest.setSeq( SeqFinish );
|
||||
quest.setUI8BH( currentCC + 1 );
|
||||
quest.setUI8AL( currentCC + 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
quest.setUI8BH(currentCC + 1);
|
||||
quest.setUI8AL(currentCC + 1);
|
||||
quest.setUI8BH( currentCC + 1 );
|
||||
quest.setUI8AL( currentCC + 1 );
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -125,7 +127,7 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,7 +140,7 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00002(quest, player);
|
||||
Scene00002( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -150,8 +152,8 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(1, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 1, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -175,7 +177,7 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00004Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00005(quest, player);
|
||||
Scene00005( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -187,8 +189,8 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00005Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(2, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 2, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -212,7 +214,7 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00007Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00008(quest, player);
|
||||
Scene00008( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -224,8 +226,8 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00008Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(3, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 3, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -249,7 +251,7 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00010Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00011(quest, player);
|
||||
Scene00011( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -261,8 +263,8 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00011Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(4, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 4, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -286,7 +288,7 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00013Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
Scene00014(quest, player);
|
||||
Scene00014( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -298,8 +300,8 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00014Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
checkQuestCompletion(quest, player);
|
||||
quest.setBitFlag8(5, true);
|
||||
checkQuestCompletion( quest, player );
|
||||
quest.setBitFlag8( 5, true );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -323,10 +325,10 @@ class SubWil018 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00016Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if (result.getResult(0) == 1)
|
||||
Scene00017(quest, player);
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
Scene00017( quest, player );
|
||||
else
|
||||
Scene00018(quest, player);
|
||||
Scene00018( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubWil020 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// BitFlag8
|
||||
|
@ -49,8 +49,10 @@ class SubWil020 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto Actor8 = 1003899;
|
||||
static constexpr auto Actor9 = 1001945;
|
||||
|
||||
public:
|
||||
SubWil020() : Sapphire::ScriptAPI::QuestScript( 65929 ){};
|
||||
public:
|
||||
SubWil020() : Sapphire::ScriptAPI::QuestScript( 65929 )
|
||||
{};
|
||||
|
||||
~SubWil020() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -62,89 +64,89 @@ class SubWil020 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
Scene00000(quest, player);
|
||||
Scene00000( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor1:
|
||||
{
|
||||
if (!quest.getBitFlag8(1))
|
||||
Scene00001(quest, player);
|
||||
if( !quest.getBitFlag8( 1 ) )
|
||||
Scene00001( quest, player );
|
||||
else
|
||||
Scene00002(quest, player);
|
||||
Scene00002( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor2:
|
||||
{
|
||||
if (!quest.getBitFlag8(2))
|
||||
Scene00003(quest, player);
|
||||
if( !quest.getBitFlag8( 2 ) )
|
||||
Scene00003( quest, player );
|
||||
else
|
||||
Scene00004(quest, player);
|
||||
Scene00004( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor3:
|
||||
{
|
||||
if (!quest.getBitFlag8(3))
|
||||
Scene00005(quest, player);
|
||||
if( !quest.getBitFlag8( 3 ) )
|
||||
Scene00005( quest, player );
|
||||
else
|
||||
Scene00006(quest, player);
|
||||
Scene00006( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor4:
|
||||
{
|
||||
if (!quest.getBitFlag8(4))
|
||||
Scene00007(quest, player);
|
||||
if( !quest.getBitFlag8( 4 ) )
|
||||
Scene00007( quest, player );
|
||||
else
|
||||
Scene00008(quest, player);
|
||||
Scene00008( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor5:
|
||||
{
|
||||
if (!quest.getBitFlag8(5))
|
||||
Scene00009(quest, player);
|
||||
if( !quest.getBitFlag8( 5 ) )
|
||||
Scene00009( quest, player );
|
||||
else
|
||||
Scene00010(quest, player);
|
||||
Scene00010( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor6:
|
||||
{
|
||||
if (!quest.getBitFlag8(6))
|
||||
Scene00011(quest, player);
|
||||
if( !quest.getBitFlag8( 6 ) )
|
||||
Scene00011( quest, player );
|
||||
else
|
||||
Scene00012(quest, player);
|
||||
Scene00012( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor7:
|
||||
{
|
||||
if (!quest.getBitFlag8(7))
|
||||
Scene00013(quest, player);
|
||||
if( !quest.getBitFlag8( 7 ) )
|
||||
Scene00013( quest, player );
|
||||
else
|
||||
Scene00014(quest, player);
|
||||
Scene00014( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor8:
|
||||
{
|
||||
if (!quest.getBitFlag8(0))
|
||||
Scene00015(quest, player);
|
||||
if( !quest.getBitFlag8( 0 ) )
|
||||
Scene00015( quest, player );
|
||||
else
|
||||
Scene00016(quest, player);
|
||||
Scene00016( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor9:
|
||||
{
|
||||
Scene00017(quest, player);
|
||||
Scene00017( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
|
||||
void checkQuestProgression(World::Quest& quest, Entity::Player& player)
|
||||
void checkQuestProgression( World::Quest& quest, Entity::Player& player )
|
||||
{
|
||||
if (quest.getUI8AL() == 6 && quest.getUI8BH() == 2)
|
||||
if( quest.getUI8AL() == 6 && quest.getUI8BH() == 2 )
|
||||
{
|
||||
quest.setSeq(SeqFinish);
|
||||
quest.setSeq( SeqFinish );
|
||||
}
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -160,7 +162,7 @@ class SubWil020 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,10 +177,10 @@ class SubWil020 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
auto hustCount = quest.getUI8AL();
|
||||
hustCount += 1;
|
||||
quest.setUI8AL(hustCount);
|
||||
player.sendEventNotice(getId(), 0, 2, hustCount, 6);
|
||||
quest.setBitFlag8(1, true);
|
||||
checkQuestProgression(quest, player);
|
||||
quest.setUI8AL( hustCount );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, hustCount, 6 );
|
||||
quest.setBitFlag8( 1, true );
|
||||
checkQuestProgression( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -192,10 +194,10 @@ class SubWil020 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
auto hustCount = quest.getUI8AL();
|
||||
hustCount += 1;
|
||||
quest.setUI8AL(hustCount);
|
||||
player.sendEventNotice(getId(), 0, 2, hustCount, 6);
|
||||
quest.setBitFlag8(2, true);
|
||||
checkQuestProgression(quest, player);
|
||||
quest.setUI8AL( hustCount );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, hustCount, 6 );
|
||||
quest.setBitFlag8( 2, true );
|
||||
checkQuestProgression( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -209,10 +211,10 @@ class SubWil020 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
auto hustCount = quest.getUI8AL();
|
||||
hustCount += 1;
|
||||
quest.setUI8AL(hustCount);
|
||||
player.sendEventNotice(getId(), 0, 2, hustCount, 6);
|
||||
quest.setBitFlag8(3, true);
|
||||
checkQuestProgression(quest, player);
|
||||
quest.setUI8AL( hustCount );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, hustCount, 6 );
|
||||
quest.setBitFlag8( 3, true );
|
||||
checkQuestProgression( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -226,10 +228,10 @@ class SubWil020 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
auto hustCount = quest.getUI8AL();
|
||||
hustCount += 1;
|
||||
quest.setUI8AL(hustCount);
|
||||
player.sendEventNotice(getId(), 0, 2, hustCount, 6);
|
||||
quest.setBitFlag8(4, true);
|
||||
checkQuestProgression(quest, player);
|
||||
quest.setUI8AL( hustCount );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, hustCount, 6 );
|
||||
quest.setBitFlag8( 4, true );
|
||||
checkQuestProgression( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -243,10 +245,10 @@ class SubWil020 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
auto hustCount = quest.getUI8AL();
|
||||
hustCount += 1;
|
||||
quest.setUI8AL(hustCount);
|
||||
player.sendEventNotice(getId(), 0, 2, hustCount, 6);
|
||||
quest.setBitFlag8(5, true);
|
||||
checkQuestProgression(quest, player);
|
||||
quest.setUI8AL( hustCount );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, hustCount, 6 );
|
||||
quest.setBitFlag8( 5, true );
|
||||
checkQuestProgression( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -260,10 +262,10 @@ class SubWil020 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
auto hustCount = quest.getUI8AL();
|
||||
hustCount += 1;
|
||||
quest.setUI8AL(hustCount);
|
||||
player.sendEventNotice(getId(), 0, 2, hustCount, 6);
|
||||
quest.setBitFlag8(6, true);
|
||||
checkQuestProgression(quest, player);
|
||||
quest.setUI8AL( hustCount );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, hustCount, 6 );
|
||||
quest.setBitFlag8( 6, true );
|
||||
checkQuestProgression( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -277,10 +279,10 @@ class SubWil020 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
auto hustCount = quest.getUI8AL();
|
||||
hustCount += 1;
|
||||
quest.setUI8AL(hustCount);
|
||||
player.sendEventNotice(getId(), 0, 2, hustCount, 6);
|
||||
quest.setBitFlag8(7, true);
|
||||
checkQuestProgression(quest, player);
|
||||
quest.setUI8AL( hustCount );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, hustCount, 6 );
|
||||
quest.setBitFlag8( 7, true );
|
||||
checkQuestProgression( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -294,10 +296,10 @@ class SubWil020 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
auto hustCount = quest.getUI8AL();
|
||||
hustCount += 1;
|
||||
quest.setUI8AL(hustCount);
|
||||
player.sendEventNotice(getId(), 0, 2, hustCount, 6);
|
||||
quest.setBitFlag8(8, true);
|
||||
checkQuestProgression(quest, player);
|
||||
quest.setUI8AL( hustCount );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, hustCount, 6 );
|
||||
quest.setBitFlag8( 8, true );
|
||||
checkQuestProgression( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -17,7 +17,7 @@ using namespace Sapphire;
|
|||
|
||||
class SubWil029 : public Sapphire::ScriptAPI::QuestScript
|
||||
{
|
||||
private:
|
||||
private:
|
||||
// Basic quest information
|
||||
// Quest vars / flags used
|
||||
// UI8AL
|
||||
|
@ -40,8 +40,10 @@ class SubWil029 : public Sapphire::ScriptAPI::QuestScript
|
|||
static constexpr auto Actor2 = 1001992;
|
||||
static constexpr auto Item0 = 2000410;
|
||||
|
||||
public:
|
||||
SubWil029() : Sapphire::ScriptAPI::QuestScript( 65926 ){};
|
||||
public:
|
||||
SubWil029() : Sapphire::ScriptAPI::QuestScript( 65926 )
|
||||
{};
|
||||
|
||||
~SubWil029() = default;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -52,24 +54,24 @@ class SubWil029 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
case Actor0:
|
||||
{
|
||||
Scene00000(quest, player);
|
||||
Scene00000( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor1:
|
||||
{
|
||||
Scene00001(quest, player);
|
||||
Scene00001( quest, player );
|
||||
break;
|
||||
}
|
||||
case Actor2:
|
||||
{
|
||||
Scene00002(quest, player);
|
||||
Scene00002( quest, player );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Available Scenes in this quest, not necessarly all are used
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -83,7 +85,7 @@ class SubWil029 : public Sapphire::ScriptAPI::QuestScript
|
|||
{
|
||||
if( result.getResult( 0 ) == 1 ) // accept quest
|
||||
{
|
||||
quest.setSeq(Seq1);
|
||||
quest.setSeq( Seq1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,9 +98,9 @@ class SubWil029 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00001Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
quest.setSeq(SeqFinish);
|
||||
quest.setUI8BH(1);
|
||||
player.sendEventNotice(getId(), 0, 2, 0, 0);
|
||||
quest.setSeq( SeqFinish );
|
||||
quest.setUI8BH( 1 );
|
||||
eventMgr().sendEventNotice( player, getId(), 0, 2, 0, 0 );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -110,10 +112,10 @@ class SubWil029 : public Sapphire::ScriptAPI::QuestScript
|
|||
|
||||
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
|
||||
{
|
||||
if (result.getResult(0) == 1)
|
||||
Scene00003(quest, player);
|
||||
if( result.getResult( 0 ) == 1 )
|
||||
Scene00003( quest, player );
|
||||
else
|
||||
Scene00004(quest, player);
|
||||
Scene00004( quest, player );
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -582,9 +582,6 @@ namespace Sapphire::Entity
|
|||
/*! send the entire inventory sequence */
|
||||
void sendInventory();
|
||||
|
||||
/*! send a quest specific message */
|
||||
void sendEventNotice( uint32_t questId, int8_t noticeId, uint8_t numOfArgs, uint32_t var1, uint32_t var2 );
|
||||
|
||||
/*! returns true if loading is complete ( 0x69 has been received ) */
|
||||
bool isLoadingComplete() const;
|
||||
|
||||
|
|
|
@ -142,12 +142,6 @@ void Sapphire::Entity::Player::addQuestTracking( uint8_t idx )
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
Sapphire::Entity::Player::sendEventNotice( uint32_t questId, int8_t noticeId, uint8_t numOfArgs, uint32_t var1, uint32_t var2 )
|
||||
{
|
||||
queuePacket( std::make_shared< Notice2Packet >( getAsPlayer(), questId, noticeId, numOfArgs, var1, var2 ) );
|
||||
}
|
||||
|
||||
void Sapphire::Entity::Player::updateQuestsCompleted( uint32_t questId )
|
||||
{
|
||||
uint8_t index = questId / 8;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "Network/PacketWrappers/EventStartPacket.h"
|
||||
#include "Network/PacketWrappers/EventPlayPacket.h"
|
||||
#include "Network/PacketWrappers/EventFinishPacket.h"
|
||||
#include "Network/PacketWrappers/Notice2Packet.h"
|
||||
|
||||
#include "Territory/Territory.h"
|
||||
#include "Territory/InstanceContent.h"
|
||||
|
@ -739,3 +740,10 @@ Sapphire::Event::EventHandlerPtr EventMgr::bootstrapSceneEvent( Entity::Player&
|
|||
|
||||
return pEvent;
|
||||
}
|
||||
|
||||
void EventMgr::sendEventNotice( Entity::Player& player, uint32_t questId, int8_t noticeId, uint8_t numOfArgs, uint32_t var1, uint32_t var2 )
|
||||
{
|
||||
auto noticePacket = std::make_shared< Notice2Packet >( player.getId(), questId, noticeId, numOfArgs, var1, var2 );
|
||||
auto& server = Common::Service< World::WorldServer >::ref();
|
||||
server.queueForPlayer( player.getCharacterId(), noticePacket );
|
||||
}
|
||||
|
|
|
@ -65,6 +65,8 @@ namespace Sapphire::World::Manager
|
|||
|
||||
bool sendEventPlay( Entity::Player& player, uint32_t eventid, uint32_t scene, uint32_t flags );
|
||||
|
||||
void sendEventNotice( Entity::Player& player, uint32_t eventId, int8_t noticeId, uint8_t numOfArgs = 0, uint32_t var1 = 0, uint32_t var2 = 0 );
|
||||
|
||||
/*! setup the event and return a ptr to it */
|
||||
Event::EventHandlerPtr bootstrapSceneEvent( Entity::Player& player, uint32_t eventId, uint32_t flags );
|
||||
};
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define _QUESTMESSAGE_H
|
||||
|
||||
#include <Network/GamePacket.h>
|
||||
#include "Actor/Player.h"
|
||||
#include "Forwards.h"
|
||||
|
||||
namespace Sapphire::Network::Packets::WorldPackets::Server
|
||||
|
@ -14,20 +13,19 @@ namespace Sapphire::Network::Packets::WorldPackets::Server
|
|||
class Notice2Packet : public ZoneChannelPacket< FFXIVIpcNotice2 >
|
||||
{
|
||||
public:
|
||||
Notice2Packet( Entity::GameObjectPtr pActor, uint32_t questId, int8_t msgId,
|
||||
uint8_t type = 0, uint32_t var1 = 0, uint32_t var2 = 0 ) :
|
||||
ZoneChannelPacket< FFXIVIpcNotice2 >( pActor->getId(), pActor->getId() )
|
||||
Notice2Packet( uint32_t entityId, uint32_t questId, int8_t msgId, uint8_t numOfArgs = 0, uint32_t var1 = 0, uint32_t var2 = 0 ) :
|
||||
ZoneChannelPacket< FFXIVIpcNotice2 >( entityId, entityId )
|
||||
{
|
||||
initialize( questId, msgId, type, var1, var2 );
|
||||
initialize( questId, msgId, numOfArgs, var1, var2 );
|
||||
};
|
||||
|
||||
private:
|
||||
void initialize( uint32_t questId, int8_t msgId, uint8_t type, uint32_t var1, uint32_t var2 )
|
||||
void initialize( uint32_t questId, int8_t msgId, uint8_t numOfArgs, uint32_t var1, uint32_t var2 )
|
||||
{
|
||||
m_data.handlerId = questId;
|
||||
m_data.noticeId = msgId;
|
||||
// todo: not correct
|
||||
m_data.numOfArgs = type;
|
||||
m_data.numOfArgs = numOfArgs;
|
||||
m_data.args[0] = var1;
|
||||
m_data.args[1] = var2;
|
||||
};
|
||||
|
|
|
@ -177,7 +177,8 @@ void Sapphire::QuestBattle::onFinishLoading( Entity::Player& player )
|
|||
|
||||
void Sapphire::QuestBattle::onInitDirector( Entity::Player& player )
|
||||
{
|
||||
player.sendEventNotice( getDirectorId(), 0, 2, Util::getTimeSeconds(), 0x0708 );
|
||||
auto& eventMgr = Common::Service< World::Manager::EventMgr >::ref();
|
||||
eventMgr.sendEventNotice( player, getDirectorId(), 0, 2, Util::getTimeSeconds(), 0x0708 );
|
||||
sendDirectorVars( player );
|
||||
player.setDirectorInitialized( true );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue