From bce9df158f64cf2fefe684d5f5eab0c1c461b3d5 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Wed, 10 May 2023 13:27:51 -0700 Subject: [PATCH] Added ItemIcons to quest notices with multiple vars --- .../questbattles/UnderneaththeSultantree.cpp | 16 ++++++++-------- src/scripts/quest/classquest/MIN/ClsMin580.cpp | 3 ++- .../subquest/blackshroud_central/SubFst033.cpp | 3 ++- .../subquest/blackshroud_central/SubFst052.cpp | 4 +++- .../subquest/blackshroud_central/SubFst067.cpp | 3 ++- .../subquest/blackshroud_north/GaiUsa803.cpp | 3 ++- .../quest/subquest/lanoscea_outer/GaiUsb406.cpp | 8 +++++++- .../subquest/thanalan_central/SubWil070.cpp | 3 ++- 8 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src/scripts/instances/questbattles/UnderneaththeSultantree.cpp b/src/scripts/instances/questbattles/UnderneaththeSultantree.cpp index 7d4d61a8..135be4b5 100644 --- a/src/scripts/instances/questbattles/UnderneaththeSultantree.cpp +++ b/src/scripts/instances/questbattles/UnderneaththeSultantree.cpp @@ -142,8 +142,8 @@ public: if( pair1Spawnd == 0 && bossHpPercent <= 70 ) { instance.setDirectorVar( SET_1_SPAWNED, 1 ); - auto a2 = instance.createBNpcFromLayoutId(INIT_POP_01_01, 1440, Common::BNpcType::Enemy); - auto a3 = instance.createBNpcFromLayoutId( INIT_POP_01_02, 1440, Common::BNpcType::Enemy ); + auto a2 = instance.createBNpcFromLayoutId( INIT_POP_01_01, 1440 /*TODO: Find the right value*/, Common::BNpcType::Enemy ); + auto a3 = instance.createBNpcFromLayoutId( INIT_POP_01_02, 1440 /*TODO: Find the right value*/, Common::BNpcType::Enemy ); a2->setFlag( Entity::NoDeaggro ); a3->setFlag( Entity::NoDeaggro ); @@ -158,10 +158,10 @@ public: if( pair2Spawnd == 0 && bossHpPercent <= 40 ) { instance.setDirectorVar( SET_2_SPAWNED, 1 ); - auto a2 = instance.createBNpcFromLayoutId( INIT_POP_02_01, 1440, Common::BNpcType::Enemy ); - auto a3 = instance.createBNpcFromLayoutId( INIT_POP_02_02, 1440, Common::BNpcType::Enemy ); - auto a4 = instance.createBNpcFromLayoutId( INIT_POP_02_03, 1440, Common::BNpcType::Enemy ); - auto a5 = instance.createBNpcFromLayoutId( INIT_POP_02_04, 1440, Common::BNpcType::Enemy ); + auto a2 = instance.createBNpcFromLayoutId( INIT_POP_02_01, 1440 /*TODO: Find the right value*/, Common::BNpcType::Enemy ); + auto a3 = instance.createBNpcFromLayoutId( INIT_POP_02_02, 1440 /*TODO: Find the right value*/, Common::BNpcType::Enemy ); + auto a4 = instance.createBNpcFromLayoutId( INIT_POP_02_03, 1440 /*TODO: Find the right value*/, Common::BNpcType::Enemy ); + auto a5 = instance.createBNpcFromLayoutId( INIT_POP_02_04, 1440 /*TODO: Find the right value*/, Common::BNpcType::Enemy ); a2->setFlag( Entity::NoDeaggro ); a3->setFlag( Entity::NoDeaggro ); a4->setFlag( Entity::NoDeaggro ); @@ -213,8 +213,8 @@ public: void onDutyCommence( QuestBattle& instance, Entity::Player& player ) override { // TODO: Change to correct HP values - auto boss = instance.createBNpcFromLayoutId( INIT_POP_BOSS, 10571, Common::BNpcType::Enemy ); - auto thancred = instance.createBNpcFromLayoutId( INIT_P_POP_01, 27780, Common::BNpcType::Friendly ); + auto boss = instance.createBNpcFromLayoutId( INIT_POP_BOSS, 10571 /*TODO: Find the right value*/, Common::BNpcType::Enemy ); + auto thancred = instance.createBNpcFromLayoutId( INIT_P_POP_01, 27780 /*TODO: Find the right value*/, Common::BNpcType::Friendly ); boss->setFlag( Entity::NoDeaggro ); thancred->setFlag( Entity::NoDeaggro ); diff --git a/src/scripts/quest/classquest/MIN/ClsMin580.cpp b/src/scripts/quest/classquest/MIN/ClsMin580.cpp index 9505ca2f..716fc951 100644 --- a/src/scripts/quest/classquest/MIN/ClsMin580.cpp +++ b/src/scripts/quest/classquest/MIN/ClsMin580.cpp @@ -64,6 +64,7 @@ private: static constexpr auto Eobject2 = 2005950; static constexpr auto EventActionGatherMiddle = 7; static constexpr auto Item0 = 2001728; + static constexpr auto Item0Icon = 21223; static constexpr auto LocActor1 = 1013860; static constexpr auto LocActor2 = 1013870; static constexpr auto LocActor3 = 1013871; @@ -207,7 +208,7 @@ public: private: void checkQuestCompletion( World::Quest& quest, Entity::Player& player ) { - eventMgr().sendEventNotice( player, getId(), 1, 2, quest.getUI8AL(), 3 );//TODO: Item Icon, probably + eventMgr().sendNotice( player, getId(), 1, { quest.getUI8AL(), 3, Item0Icon } ); if( quest.getUI8AL() >= 3 ) { diff --git a/src/scripts/quest/subquest/blackshroud_central/SubFst033.cpp b/src/scripts/quest/subquest/blackshroud_central/SubFst033.cpp index 05dafa7b..eb6b8abb 100644 --- a/src/scripts/quest/subquest/blackshroud_central/SubFst033.cpp +++ b/src/scripts/quest/subquest/blackshroud_central/SubFst033.cpp @@ -54,6 +54,7 @@ private: static constexpr auto Eobject1 = 2000017;//Decaying Tree (South) static constexpr auto Eobject2 = 2000018;//Decaying Tree (East) static constexpr auto Item0 = 2000061; + static constexpr auto Item0Icon = 20661; static constexpr auto Seq0Actor0 = 0; static constexpr auto Seq1Eobject0 = 1; static constexpr auto Seq1Eobject0Useitemno = 99; @@ -184,7 +185,7 @@ public: private: void checkQuestCompletion( World::Quest& quest, Entity::Player& player ) { - eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AH(), 3 );//TODO: Probably needs item icon + eventMgr().sendNotice( player, getId(), 0, { quest.getUI8AH(), 3, Item0Icon } ); if( quest.getUI8AH() >= 3 ) { diff --git a/src/scripts/quest/subquest/blackshroud_central/SubFst052.cpp b/src/scripts/quest/subquest/blackshroud_central/SubFst052.cpp index ed0a3e02..f91b170a 100644 --- a/src/scripts/quest/subquest/blackshroud_central/SubFst052.cpp +++ b/src/scripts/quest/subquest/blackshroud_central/SubFst052.cpp @@ -45,6 +45,8 @@ private: static constexpr auto Enemy0 = 54;//Hornet Swarm (INCORRECT: 57) static constexpr auto Item0 = 2000099; static constexpr auto Item1 = 2000094; + static constexpr auto Item0Icon = 22623; + static constexpr auto Item1Icon = 24403; static constexpr auto Seq0Actor0 = 0; static constexpr auto Seq2Actor0 = 1; static constexpr auto Seq2Actor0Npctradeno = 99; @@ -88,7 +90,7 @@ public: { quest.setUI8BH( quest.getUI8BH() + 1 ); quest.setUI8AL( quest.getUI8AL() + 1 ); - eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AL(), 4 );//TODO: Probably needs item icon + eventMgr().sendNotice( player, getId(), 0, { quest.getUI8AL(), 4, Item0Icon } ); // item Icon 2 missing if( quest.getUI8AL() >= 4 ) { diff --git a/src/scripts/quest/subquest/blackshroud_central/SubFst067.cpp b/src/scripts/quest/subquest/blackshroud_central/SubFst067.cpp index 6433ed1d..a8c3da0f 100644 --- a/src/scripts/quest/subquest/blackshroud_central/SubFst067.cpp +++ b/src/scripts/quest/subquest/blackshroud_central/SubFst067.cpp @@ -53,6 +53,7 @@ private: static constexpr auto Eventrange0 = 3841476; static constexpr auto EventActionSearch = 1; static constexpr auto Item0 = 2000192; + static constexpr auto Item0Icon = 22627; public: SubFst067() : Sapphire::ScriptAPI::QuestScript( 65919 ){}; @@ -182,7 +183,7 @@ public: private: void checkQuestCompletion( World::Quest& quest, Entity::Player& player ) { - eventMgr().sendEventNotice( player, getId(), 1, 2, quest.getUI8AL(), 3 );//TODO: Item Icon + eventMgr().sendNotice( player, getId(), 1, { quest.getUI8AL(), 3, Item0Icon } ); if( quest.getUI8AL() >= 3 ) { quest.setUI8AL( 0 ); diff --git a/src/scripts/quest/subquest/blackshroud_north/GaiUsa803.cpp b/src/scripts/quest/subquest/blackshroud_north/GaiUsa803.cpp index 15fcf1da..341a8e8b 100644 --- a/src/scripts/quest/subquest/blackshroud_north/GaiUsa803.cpp +++ b/src/scripts/quest/subquest/blackshroud_north/GaiUsa803.cpp @@ -55,6 +55,7 @@ private: static constexpr auto EventActionSearchMiddle = 3; static constexpr auto Item0 = 2000616; static constexpr auto Item1 = 2000617; + static constexpr auto Item1Icon = 20005; public: GaiUsa803() : Sapphire::ScriptAPI::QuestScript( 66323 ){}; @@ -140,7 +141,7 @@ public: private: void checkQuestCompletion( World::Quest& quest, Entity::Player& player ) { - eventMgr().sendEventNotice( player, getId(), 1, 2, quest.getUI8AH(), 5 );//TODO:Show Item Icon + eventMgr().sendNotice( player, getId(), 1, { quest.getUI8AH(), 5, Item1Icon } ); if( quest.getUI8AH() >= 5 ) { quest.setUI8BH( quest.getUI8DH() ); diff --git a/src/scripts/quest/subquest/lanoscea_outer/GaiUsb406.cpp b/src/scripts/quest/subquest/lanoscea_outer/GaiUsb406.cpp index 176978e3..17913967 100644 --- a/src/scripts/quest/subquest/lanoscea_outer/GaiUsb406.cpp +++ b/src/scripts/quest/subquest/lanoscea_outer/GaiUsb406.cpp @@ -55,6 +55,8 @@ private: static constexpr auto EventActionSearch = 1; static constexpr auto Item0 = 2000669; static constexpr auto Item1 = 2000929; + static constexpr auto Item0Icon = 27241; + static constexpr auto Item1Icon = 22301; public: GaiUsb406() : Sapphire::ScriptAPI::QuestScript( 66398 ){}; @@ -143,7 +145,11 @@ private: { if( quest.getSeq() == Seq1 ) { - eventMgr().sendEventNotice( player, getId(), type, 2, ( type == 0 ) ? quest.getUI8AL() : quest.getUI8BH(), 3 ); //TODO: Item Icons + if( type == 0 ) + eventMgr().sendNotice( player, getId(), type, { quest.getUI8AL(), 3, Item1Icon } ); + else + eventMgr().sendNotice( player, getId(), type, { quest.getUI8BH(), 3, Item0Icon } ); + if( quest.getUI8BL() >= 3 && quest.getUI8CH() >= 3 ) { quest.setUI8BH( quest.getUI8BL() ); diff --git a/src/scripts/quest/subquest/thanalan_central/SubWil070.cpp b/src/scripts/quest/subquest/thanalan_central/SubWil070.cpp index eb43c410..92b69313 100644 --- a/src/scripts/quest/subquest/thanalan_central/SubWil070.cpp +++ b/src/scripts/quest/subquest/thanalan_central/SubWil070.cpp @@ -42,6 +42,7 @@ class SubWil070 : public Sapphire::ScriptAPI::QuestScript static constexpr auto Actor3 = 1001465; // Solid Trunk ( Pos: -90.043503 -11.398500 -53.666000 Teri: 141 ) static constexpr auto Actor4 = 1001466; // Ricard ( Pos: -89.735001 -11.350000 -51.539902 Teri: 141 ) static constexpr auto Item0 = 2000234; + static constexpr auto Item0Icon = 26153; static constexpr auto Seq0Actor0 = 0; static constexpr auto Seq1Actor1 = 1; static constexpr auto Seq1Actor2 = 2; @@ -110,7 +111,7 @@ class SubWil070 : public Sapphire::ScriptAPI::QuestScript if (quest.getUI8AL() == 4) quest.setSeq( SeqFinish ); } - eventMgr().sendEventNotice( player, getId(), 0, 2, quest.getUI8AL(), 4 ); // TODO: Add item icon (Oily Order Slip) + eventMgr().sendNotice( player, getId(), 0, { quest.getUI8AL(), 4, Item0Icon } ); } ////////////////////////////////////////////////////////////////////// // Available Scenes in this quest, not necessarly all are used