Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Scripts: Add Aysa and Lorvo Texts
Browse files Browse the repository at this point in the history
  • Loading branch information
AriDEV3 committed Nov 23, 2023
1 parent 12f2208 commit 39369c3
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sql/updates/world/2023_11_23_world_00.sql
Original file line number Diff line number Diff line change
@@ -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);
46 changes: 46 additions & 0 deletions src/server/scripts/World/areatrigger_scripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Creature*> lorvos;
player->GetCreatureListWithEntryInGrid(lorvos, NPC_LORVO, 15.0f);
if (!lorvos.empty())
{
for (std::list<Creature*>::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:
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 39369c3

Please sign in to comment.