From 535b9f55b7cc09074507292951c729fc2d1dfd33 Mon Sep 17 00:00:00 2001 From: DantestyleXD Date: Sun, 28 Jun 2020 03:23:22 +0200 Subject: [PATCH] [ Subquests ] SubFst026 and SubFst041 adjust --- .../quest/subquest/gridania/SubFst026.cpp | 19 +++++++-------- .../quest/subquest/gridania/SubFst041.cpp | 24 +++++++++---------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/scripts/quest/subquest/gridania/SubFst026.cpp b/src/scripts/quest/subquest/gridania/SubFst026.cpp index 8351ea51..13a835e4 100644 --- a/src/scripts/quest/subquest/gridania/SubFst026.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst026.cpp @@ -11,8 +11,6 @@ using namespace Sapphire; // Start NPC: 1000629 // End NPC: 1000629 -//NEED TEST KILLCREDIT - class SubFst026 : public Sapphire::ScriptAPI::EventScript { @@ -55,28 +53,27 @@ public: auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 && !player.hasQuest( getId() ) ) - { Scene00000( player ); - } else if( actor == Actor0 && player.getQuestSeq( getId() ) == SeqFinish ) - { Scene00001( player ); - } } - void onMobKill( Entity::Player& player, uint64_t npcId ) + void onBNpcKill( uint32_t npcId, Entity::Player& player ) override { if( npcId != Enemy0 ) return; - auto currentKC = player.getQuestUI8AL( getId() ) + 1; + auto currentKC = player.getQuestUI8AL( getId() ); - if( currentKC >= 6 ) + if ( currentKC + 1 >= 6 ) + { + player.sendQuestMessage( getId(), 0, 2, currentKC + 1, 6 ); player.updateQuest( getId(), SeqFinish ); + } else { - player.setQuestUI8AL( getId(), currentKC ); - player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); + player.setQuestUI8AL( getId(), currentKC + 1 ); + player.sendQuestMessage( getId(), 0, 2, currentKC + 1, 6 ); } } diff --git a/src/scripts/quest/subquest/gridania/SubFst041.cpp b/src/scripts/quest/subquest/gridania/SubFst041.cpp index 8c3512e4..4cede8e6 100644 --- a/src/scripts/quest/subquest/gridania/SubFst041.cpp +++ b/src/scripts/quest/subquest/gridania/SubFst041.cpp @@ -11,8 +11,6 @@ using namespace Sapphire; // Start NPC: 1000432 // End NPC: 1000411 -//NEED TEST KILLCREDIT - class SubFst041 : public Sapphire::ScriptAPI::EventScript { @@ -38,7 +36,7 @@ private: // Entities found in the script data of the quest static constexpr auto Actor0 = 1000432; static constexpr auto Actor1 = 1000411; - static constexpr auto Enemy0 = 159; + static constexpr auto Enemy0 = 197; //159; WRONG INFO static constexpr auto Item0 = 2000142; static constexpr auto Seq0Actor0 = 0; static constexpr auto Seq2Actor1 = 1; @@ -61,28 +59,30 @@ public: auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); if( actor == Actor0 ) - { Scene00000( player ); - } if( actor == Actor1 ) - { Scene00001( player ); - } } - void onMobKill( Entity::Player& player, uint64_t npcId ) + void onBNpcKill( uint32_t npcId, Entity::Player& player ) override { if( npcId != Enemy0 ) return; - auto currentKC = player.getQuestUI8BH( getId() ) + 1; + auto currentKC = player.getQuestUI8BH( getId() ); - if( currentKC >= 6 ) + if ( currentKC + 1 >= 4 ) + { + player.setQuestUI8AL( getId(), currentKC + 1 ); + player.setQuestUI8BH( getId(), currentKC + 1 ); + player.sendQuestMessage( getId(), 1, 0, 0, 0 ); player.updateQuest( getId(), SeqFinish ); + } else { - player.setQuestUI8BH( getId(), currentKC ); - player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); + player.setQuestUI8AL( getId(), currentKC + 1 ); + player.setQuestUI8BH( getId(), currentKC + 1 ); + player.sendQuestMessage( getId(), 0, 2, currentKC + 1, 4 ); } }