1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57:44 +00:00

Added ItemIcons to quest notice, logic fixes, set Bitflag8 for SubsSea quests

This commit is contained in:
Pinapelz 2023-05-09 00:09:48 -07:00
parent 0a70db8686
commit 6fb07971c7
5 changed files with 19 additions and 7 deletions

View file

@ -8,7 +8,7 @@
#include <Service.h>
// Quest Script: SubSea002_00112
// Quest Name: Suspiciously SoberF
// Quest Name: Suspiciously Sober
// Quest ID: 65648
// Start NPC: 1003604 (Ahldskyf)
// End NPC: 1003275 (Frydwyb)

View file

@ -145,6 +145,7 @@ private:
{
eventMgr().sendEventNotice( player, getId(), 0, 0 );
quest.setUI8AL( 1 );
quest.setBitFlag8( 1, true );
checkQuestCompletion( quest, player, 1 );
}
@ -159,6 +160,7 @@ private:
{
eventMgr().sendEventNotice( player, getId(), 1, 0 );
quest.setUI8BH( 1 );
quest.setBitFlag8( 2, true );
checkQuestCompletion( quest, player, 1 );
}
@ -173,6 +175,7 @@ private:
{
eventMgr().sendEventNotice( player, getId(), 2, 0 );
quest.setUI8BL( 1 );
quest.setBitFlag8( 3, true );
checkQuestCompletion( quest, player, 1 );
}

View file

@ -41,6 +41,7 @@ class SubSea007 : public Sapphire::ScriptAPI::QuestScript
static constexpr auto Actor1 = 1000957; // R'sushmo ( Pos: -49.240898 43.991699 -146.380005 Teri: 128 )
static constexpr auto Actor2 = 1000937; // Godebert ( Pos: -12.222500 44.998798 -251.850006 Teri: 128 )
static constexpr auto Item0 = 2000455;
static constexpr auto Item0Icon = 25906;
public:
SubSea007() : Sapphire::ScriptAPI::QuestScript( 65653 ){};
@ -117,7 +118,7 @@ class SubSea007 : public Sapphire::ScriptAPI::QuestScript
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
{
eventMgr().sendEventNotice( player, getId(), 0, 0 ); // TODO: Show item icon
eventMgr().sendNotice( player, getId(), 0, { Item0Icon } );
quest.setUI8BH( 1 );
quest.setSeq( Seq2 );
}

View file

@ -45,6 +45,7 @@ class SubSea008 : public Sapphire::ScriptAPI::QuestScript
static constexpr auto Actor2 = 1000938; // Ginnade ( Pos: -4.651690 45.018398 -241.815002 Teri: 128 )
static constexpr auto Actor3 = 1000947; // Lyngsath ( Pos: -54.642601 43.991699 -151.201996 Teri: 128 )
static constexpr auto Item0 = 2000451;
static constexpr auto Item0Icon = 25919;
public:
SubSea008() : Sapphire::ScriptAPI::QuestScript( 65654 ){};
@ -58,7 +59,8 @@ class SubSea008 : public Sapphire::ScriptAPI::QuestScript
{
case Actor0:
{
Scene00000( quest, player );
if( quest.getSeq() == Seq0 )
Scene00000( quest, player );
break;
}
case Actor1:
@ -71,12 +73,14 @@ class SubSea008 : public Sapphire::ScriptAPI::QuestScript
}
case Actor2:
{
Scene00003( quest, player );
if( quest.getSeq() == Seq2 )
Scene00003( quest, player );
break;
}
case Actor3:
{
Scene00005( quest, player );
if( quest.getSeq() == Seq2 )
Scene00005( quest, player );
break;
}
}
@ -137,7 +141,7 @@ private:
void Scene00002Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
{
quest.setUI8BL( 1 );
eventMgr().sendEventNotice( player, getId(), 0, 0 ); //TODO: add item icon
eventMgr().sendNotice( player, getId(), 0, { Item0Icon } );
quest.setSeq( Seq2 );
}
@ -167,6 +171,7 @@ private:
{
eventMgr().sendEventNotice( player, getId(), 1, 0 );
quest.setUI8AL( 1 );
quest.setBitFlag8( 1, true );
checkQuestCompletion( quest, player, 1 );
}
@ -197,6 +202,7 @@ private:
{
eventMgr().sendEventNotice( player, getId(), 2, 0 );
quest.setUI8BH( 1 );
quest.setBitFlag8( 2, true );
checkQuestCompletion( quest, player, 1 );
}

View file

@ -64,7 +64,8 @@ class SubSea016 : public Sapphire::ScriptAPI::QuestScript
}
case Actor1:
{
Scene00002( quest, player );
if( quest.getSeq() == Seq1 )
Scene00002( quest, player );
break;
}
}
@ -131,6 +132,7 @@ class SubSea016 : public Sapphire::ScriptAPI::QuestScript
void Scene00003Return( World::Quest& quest, Entity::Player& player, const Event::SceneResult& result )
{
eventMgr().sendEventNotice( player, getId(), 0, 0 );
quest.setBitFlag8( 1, true );
quest.setSeq( SeqFinish );
}