aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/def_sethekk_halls.h6
-rw-r--r--src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp24
2 files changed, 27 insertions, 3 deletions
diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/def_sethekk_halls.h b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/def_sethekk_halls.h
index 698571faecc..6156f354d84 100644
--- a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/def_sethekk_halls.h
+++ b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/def_sethekk_halls.h
@@ -5,6 +5,10 @@
#ifndef DEF_SETHEKK_HALLS_H
#define DEF_SETHEKK_HALLS_H
-#define DATA_IKISSDOOREVENT 1
+enum
+{
+ DATA_IKISSDOOREVENT = 1,
+ TYPE_ANZU_ENCOUNTER = 2,
+};
#endif
diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp
index 3406ce263f7..af2d49c4ee2 100644
--- a/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp
+++ b/src/bindings/scripts/scripts/zone/aunchindoun/sethekk_halls/instance_sethekk_halls.cpp
@@ -24,20 +24,37 @@ EndScriptData */
#include "precompiled.h"
#include "def_sethekk_halls.h"
-#define IKISS_DOOR 177203
+enum
+{
+ NPC_ANZU = 23035,
+ IKISS_DOOR = 177203,
+};
struct TRINITY_DLL_DECL instance_sethekk_halls : public ScriptedInstance
{
instance_sethekk_halls(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
+ uint32 AnzuEncounter;
uint64 m_uiIkissDoorGUID;
void Initialize()
{
+ AnzuEncounter = NOT_STARTED;
m_uiIkissDoorGUID = 0;
}
- void OnGameObjectCreate(GameObject *pGo, bool add)
+ void OnCreatureCreate(Creature* pCreature, bool add)
+ {
+ if (pCreature->GetEntry() == NPC_ANZU && AnzuEncounter >= IN_PROGRESS)
+ {
+ pCreature->DealDamage(pCreature, pCreature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
+ pCreature->RemoveCorpse();
+ } else {
+ AnzuEncounter = IN_PROGRESS;
+ }
+ }
+
+ void OnGameObjectCreate(GameObject* pGo, bool add)
{
if (pGo->GetEntry() == IKISS_DOOR)
m_uiIkissDoorGUID = pGo->GetGUID();
@@ -51,6 +68,9 @@ struct TRINITY_DLL_DECL instance_sethekk_halls : public ScriptedInstance
if (data == DONE)
DoUseDoorOrButton(m_uiIkissDoorGUID,DAY*IN_MILISECONDS);
break;
+ case TYPE_ANZU_ENCOUNTER:
+ AnzuEncounter = data;
+ break;
}
}
};