1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-10 20:47:46 +00:00

[ Subquests ] SubFst026 and SubFst041 adjust

This commit is contained in:
DantestyleXD 2020-06-28 03:23:22 +02:00
parent acc2c18c95
commit 535b9f55b7
2 changed files with 20 additions and 23 deletions

View file

@ -11,8 +11,6 @@ using namespace Sapphire;
// Start NPC: 1000629 // Start NPC: 1000629
// End NPC: 1000629 // End NPC: 1000629
//NEED TEST KILLCREDIT
class SubFst026 : class SubFst026 :
public Sapphire::ScriptAPI::EventScript public Sapphire::ScriptAPI::EventScript
{ {
@ -55,28 +53,27 @@ public:
auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
if( actor == Actor0 && !player.hasQuest( getId() ) ) if( actor == Actor0 && !player.hasQuest( getId() ) )
{
Scene00000( player ); Scene00000( player );
}
else if( actor == Actor0 && player.getQuestSeq( getId() ) == SeqFinish ) else if( actor == Actor0 && player.getQuestSeq( getId() ) == SeqFinish )
{
Scene00001( player ); Scene00001( player );
} }
}
void onMobKill( Entity::Player& player, uint64_t npcId ) void onBNpcKill( uint32_t npcId, Entity::Player& player ) override
{ {
if( npcId != Enemy0 ) if( npcId != Enemy0 )
return; 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 ); player.updateQuest( getId(), SeqFinish );
}
else else
{ {
player.setQuestUI8AL( getId(), currentKC ); player.setQuestUI8AL( getId(), currentKC + 1 );
player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); player.sendQuestMessage( getId(), 0, 2, currentKC + 1, 6 );
} }
} }

View file

@ -11,8 +11,6 @@ using namespace Sapphire;
// Start NPC: 1000432 // Start NPC: 1000432
// End NPC: 1000411 // End NPC: 1000411
//NEED TEST KILLCREDIT
class SubFst041 : class SubFst041 :
public Sapphire::ScriptAPI::EventScript public Sapphire::ScriptAPI::EventScript
{ {
@ -38,7 +36,7 @@ private:
// Entities found in the script data of the quest // Entities found in the script data of the quest
static constexpr auto Actor0 = 1000432; static constexpr auto Actor0 = 1000432;
static constexpr auto Actor1 = 1000411; 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 Item0 = 2000142;
static constexpr auto Seq0Actor0 = 0; static constexpr auto Seq0Actor0 = 0;
static constexpr auto Seq2Actor1 = 1; static constexpr auto Seq2Actor1 = 1;
@ -61,28 +59,30 @@ public:
auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) ); auto actor = pEventMgr.mapEventActorToRealActor( static_cast< uint32_t >( actorId ) );
if( actor == Actor0 ) if( actor == Actor0 )
{
Scene00000( player ); Scene00000( player );
}
if( actor == Actor1 ) if( actor == Actor1 )
{
Scene00001( player ); Scene00001( player );
} }
}
void onMobKill( Entity::Player& player, uint64_t npcId ) void onBNpcKill( uint32_t npcId, Entity::Player& player ) override
{ {
if( npcId != Enemy0 ) if( npcId != Enemy0 )
return; 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 ); player.updateQuest( getId(), SeqFinish );
}
else else
{ {
player.setQuestUI8BH( getId(), currentKC ); player.setQuestUI8AL( getId(), currentKC + 1 );
player.sendQuestMessage( getId(), 0, 2, currentKC, 6 ); player.setQuestUI8BH( getId(), currentKC + 1 );
player.sendQuestMessage( getId(), 0, 2, currentKC + 1, 4 );
} }
} }