From 39369c3bedf5f6c234f5bac2bad547dcea5c2234 Mon Sep 17 00:00:00 2001 From: AriDEV Date: Thu, 23 Nov 2023 14:18:29 +0100 Subject: [PATCH] Scripts: Add Aysa and Lorvo Texts --- sql/updates/world/2023_11_23_world_00.sql | 4 ++ .../scripts/World/areatrigger_scripts.cpp | 46 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 sql/updates/world/2023_11_23_world_00.sql diff --git a/sql/updates/world/2023_11_23_world_00.sql b/sql/updates/world/2023_11_23_world_00.sql new file mode 100644 index 0000000000..29f91a8e3b --- /dev/null +++ b/sql/updates/world/2023_11_23_world_00.sql @@ -0,0 +1,4 @@ +DELETE FROM `creature_text` WHERE `entry` IN (54567, 54943); +INSERT INTO `creature_text` (`entry`, `text`, `type`, `probability`) VALUES +(54567, 'A challenge in compassion and humility. By helping Merchant Lorvo, it would seem you\'ve passed, $c. Master Shang would be pleased.', 12, 100), +(54943, 'Shhhh! Come quietly. She\'s practicing.', 12, 100); diff --git a/src/server/scripts/World/areatrigger_scripts.cpp b/src/server/scripts/World/areatrigger_scripts.cpp index 515a857472..988bcdab4d 100644 --- a/src/server/scripts/World/areatrigger_scripts.cpp +++ b/src/server/scripts/World/areatrigger_scripts.cpp @@ -27,6 +27,51 @@ EndContentData */ #include "ScriptedCreature.h" #include "Player.h" +enum fusPond +{ + QUEST_AYSA_OF_THE_TUSHUI = 29410, + QUEST_MISSING_DRIVER = 29419, + + NPC_AYSA = 54567, + NPC_LORVO = 54943, +}; +//7748 +class AreaTrigger_at_fus_pond : AreaTriggerScript +{ +public: + AreaTrigger_at_fus_pond() : AreaTriggerScript("at_fus_pond") { } + + bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) OVERRIDE + { + if (player->GetQuestStatus(QUEST_AYSA_OF_THE_TUSHUI) == QUEST_STATUS_COMPLETE) + { + std::list lorvos; + player->GetCreatureListWithEntryInGrid(lorvos, NPC_LORVO, 15.0f); + if (!lorvos.empty()) + { + for (std::list::iterator itr = lorvos.begin(); itr != lorvos.end(); ++itr) + { + if ((*itr)->IsAlive() && (*itr)->GetGUIDLow() == 224519) + { + (*itr)->AI()->Talk(0); + return true; + } + } + } + } + + if (player->GetQuestStatus(QUEST_MISSING_DRIVER) == QUEST_STATUS_COMPLETE) + { + if (Creature* aysa = player->FindNearestCreature(NPC_AYSA, 15.0f, true)) + { + aysa->AI()->Talk(0); + return true; + } + } + return false; + } +}; + class AreaTrigger_at_pool_of_reflection : public AreaTriggerScript { public: @@ -506,6 +551,7 @@ class AreaTrigger_at_frostgrips_hollow : public AreaTriggerScript void AddSC_areatrigger_scripts() { + new AreaTrigger_at_fus_pond(); new AreaTrigger_at_pool_of_reflection(); new AreaTrigger_at_the_dawning_valley(); new AreaTrigger_at_coilfang_waterfall();