aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-06-13 09:16:58 +0200
committerjoschiwald <joschiwald.trinity@gmail.com>2017-01-13 00:56:29 +0100
commit9371c5c7d12b721d6d308240e21026f10c165fd1 (patch)
tree485680884d998e8bea1124e2745fe237f216226a /src
parentce9d4fac9b88be4027a729ce19acd2da26da19d4 (diff)
Core/Script: moved SAI to cpp for The Etymidian, closes #17053 (#17330)
(cherry picked from commit f03dc799591afe9421b1970fa9b07465bf6ef312) Rename 9999_99_99_99_world.sql to 2016_06_13_04_world.sql (cherry picked from commit 90ba7fe938241b6900daaef950e89b58da1e514f)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Events/childrens_week.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/server/scripts/Events/childrens_week.cpp b/src/server/scripts/Events/childrens_week.cpp
index 77f114b2b80..ea4382d93e9 100644
--- a/src/server/scripts/Events/childrens_week.cpp
+++ b/src/server/scripts/Events/childrens_week.cpp
@@ -639,6 +639,12 @@ class npc_elder_kekek : public CreatureScript
}
};
+enum TheEtymidian
+{
+ SAY_ACTIVATION = 0,
+ QUEST_THE_ACTIVATION_RUNE = 12547
+};
+
/*######
## npc_the_etymidian
## @todo A red crystal as a gift for the great one should be spawned during the event.
@@ -668,10 +674,20 @@ class npc_the_etymidian : public CreatureScript
Initialize();
}
+ void sQuestReward(Player* /*player*/, Quest const* quest, uint32 /*opt*/) override
+ {
+ if (quest->GetQuestId() != QUEST_THE_ACTIVATION_RUNE)
+ return;
+
+ Talk(SAY_ACTIVATION);
+ }
+
void MoveInLineOfSight(Unit* who) override
{
if (!phase && who && who->GetDistance2d(me) < 10.0f)
+ {
if (Player* player = who->ToPlayer())
+ {
if (player->GetQuestStatus(QUEST_MEETING_A_GREAT_ONE) == QUEST_STATUS_INCOMPLETE)
{
playerGUID = player->GetGUID();
@@ -679,6 +695,8 @@ class npc_the_etymidian : public CreatureScript
if (!orphanGUID.IsEmpty())
phase = 1;
}
+ }
+ }
}
void UpdateAI(uint32 diff) override
@@ -734,7 +752,6 @@ class npc_the_etymidian : public CreatureScript
int8 phase;
ObjectGuid playerGUID;
ObjectGuid orphanGUID;
-
};
CreatureAI* GetAI(Creature* creature) const override