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

Commit

Permalink
Scripts: Added script for quest 'The Passion of Shen-zin Su'
Browse files Browse the repository at this point in the history
  • Loading branch information
AriDEV3 committed Nov 20, 2023
1 parent 443b947 commit 4cef4c4
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sql/updates/world/2023_11_20_world_01.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DELETE FROM `areatrigger_scripts` WHERE `entry`=7835;
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES
(7835, 'at_temple_of_five_dawns');
53 changes: 53 additions & 0 deletions src/server/scripts/Pandaria/zone_wandering_island.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,56 @@
#include "ScriptedGossip.h"
#include "Player.h"

const Position huoPos = { 955.11584f, 3604.04f, 200.71805f, 0.0f };
// at 7835
class AreaTrigger_at_temple_of_five_dawns : AreaTriggerScript
{
public:
AreaTrigger_at_temple_of_five_dawns() : AreaTriggerScript("at_temple_of_five_dawns") { }

bool OnTrigger(Player* player, AreaTriggerEntry const* /*trigger*/) OVERRIDE
{
if (player->GetQuestStatus(29423) == QUEST_STATUS_INCOMPLETE)
{
if (Creature* huo = player->FindNearestCreature(54958, 15.0f, true)) // Check if Huo is with us.
{
if (Creature* master = player->FindNearestCreature(54786, 25.0f, true))
{
master->MonsterSay("Welcome, Huo. The people have missed your warmth.", Language::LANG_UNIVERSAL, player);
master->SendPlaySound(27788, true);
player->KilledMonsterCredit(61128);
huo->GetMotionMaster()->MovePoint(0, huoPos);
huo->DeleteCharmInfo();
huo->DespawnOrUnsummon(60000);
return true;
}
}
}
return false;
}
};

class npc_huo : public CreatureScript
{
public:
npc_huo() : CreatureScript("npc_huo") { }

bool OnQuestAccept(Player* player, Creature* /*creature*/, Quest const* /*quest*/ ) OVERRIDE
{
player->CastSpell(player, 128700);
return true;
}

CreatureAI* GetAI(Creature* creature) const OVERRIDE
{
return new npc_huoAI(creature);
}
struct npc_huoAI : public ScriptedAI
{
npc_huoAI(Creature* creature) : ScriptedAI(creature) { }
};
};

enum CaveOfMeditation
{
SPELL_SUMMON_LI_FEI = 102445, //
Expand All @@ -18,6 +68,7 @@ enum CaveOfMeditation
//SPELL_AYSA_BAR = 116421,
};


/*####
# npc_li_fei
####*/
Expand Down Expand Up @@ -371,6 +422,8 @@ class npc_aysa_cloudsinger : public CreatureScript

void AddSC_wandering_island()
{
new AreaTrigger_at_temple_of_five_dawns();
new npc_huo();
new npc_li_fei();
new npc_aysa_meditation();
new npc_aysa_cloudsinger();
Expand Down

0 comments on commit 4cef4c4

Please sign in to comment.