From 074f8b9907f2b8a482856433fc03604a3efc4dfc Mon Sep 17 00:00:00 2001 From: Anubisss Date: Sun, 12 Apr 2009 00:40:59 +0200 Subject: *Rename Azjol-Nerub to azjol_nerub. --HG-- branch : trunk rename : src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_amanitar.cpp => src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_amanitar.cpp rename : src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_elder_nadox.cpp => src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_elder_nadox.cpp rename : src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_herald_volazj.cpp => src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_herald_volazj.cpp rename : src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_jedoga_shadowseeker.cpp => src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp rename : src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_prince_taldaram.cpp => src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp rename : src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/def_ahnkahet.h => src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/def_ahnkahet.h rename : src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/instance_ahnkahet.cpp => src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/instance_ahnkahet.cpp rename : src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_anubarak.cpp => src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_anubarak.cpp rename : src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_hadronox.cpp => src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_hadronox.cpp rename : src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp => src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp rename : src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/def_azjol_nerub.h => src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/def_azjol_nerub.h rename : src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/instance_azjol_nerub.cpp => src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp --- src/bindings/scripts/CMakeLists.txt | 24 +-- src/bindings/scripts/VC71/71ScriptDev2.vcproj | 24 +-- src/bindings/scripts/VC80/80ScriptDev2.vcproj | 24 +-- src/bindings/scripts/VC90/90ScriptDev2.vcproj | 24 +-- .../zone/Azjol-Nerub/ahnkahet/boss_amanitar.cpp | 79 --------- .../zone/Azjol-Nerub/ahnkahet/boss_elder_nadox.cpp | 117 ------------- .../Azjol-Nerub/ahnkahet/boss_herald_volazj.cpp | 111 ------------ .../ahnkahet/boss_jedoga_shadowseeker.cpp | 109 ------------ .../Azjol-Nerub/ahnkahet/boss_prince_taldaram.cpp | 109 ------------ .../zone/Azjol-Nerub/ahnkahet/def_ahnkahet.h | 33 ---- .../Azjol-Nerub/ahnkahet/instance_ahnkahet.cpp | 194 --------------------- .../zone/Azjol-Nerub/azjol_nerub/boss_anubarak.cpp | 112 ------------ .../zone/Azjol-Nerub/azjol_nerub/boss_hadronox.cpp | 114 ------------ .../azjol_nerub/boss_krikthir_the_gatewatcher.cpp | 101 ----------- .../zone/Azjol-Nerub/azjol_nerub/def_azjol_nerub.h | 29 --- .../azjol_nerub/instance_azjol_nerub.cpp | 180 ------------------- .../zone/azjol_nerub/ahnkahet/boss_amanitar.cpp | 79 +++++++++ .../zone/azjol_nerub/ahnkahet/boss_elder_nadox.cpp | 117 +++++++++++++ .../azjol_nerub/ahnkahet/boss_herald_volazj.cpp | 111 ++++++++++++ .../ahnkahet/boss_jedoga_shadowseeker.cpp | 109 ++++++++++++ .../azjol_nerub/ahnkahet/boss_prince_taldaram.cpp | 109 ++++++++++++ .../zone/azjol_nerub/ahnkahet/def_ahnkahet.h | 33 ++++ .../azjol_nerub/ahnkahet/instance_ahnkahet.cpp | 194 +++++++++++++++++++++ .../zone/azjol_nerub/azjol_nerub/boss_anubarak.cpp | 112 ++++++++++++ .../zone/azjol_nerub/azjol_nerub/boss_hadronox.cpp | 114 ++++++++++++ .../azjol_nerub/boss_krikthir_the_gatewatcher.cpp | 101 +++++++++++ .../zone/azjol_nerub/azjol_nerub/def_azjol_nerub.h | 29 +++ .../azjol_nerub/instance_azjol_nerub.cpp | 180 +++++++++++++++++++ 28 files changed, 1336 insertions(+), 1336 deletions(-) delete mode 100644 src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_amanitar.cpp delete mode 100644 src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_elder_nadox.cpp delete mode 100644 src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_herald_volazj.cpp delete mode 100644 src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_jedoga_shadowseeker.cpp delete mode 100644 src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_prince_taldaram.cpp delete mode 100644 src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/def_ahnkahet.h delete mode 100644 src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/instance_ahnkahet.cpp delete mode 100644 src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_anubarak.cpp delete mode 100644 src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_hadronox.cpp delete mode 100644 src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp delete mode 100644 src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/def_azjol_nerub.h delete mode 100644 src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/instance_azjol_nerub.cpp create mode 100644 src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_amanitar.cpp create mode 100644 src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_elder_nadox.cpp create mode 100644 src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_herald_volazj.cpp create mode 100644 src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp create mode 100644 src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp create mode 100644 src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/def_ahnkahet.h create mode 100644 src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/instance_ahnkahet.cpp create mode 100644 src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_anubarak.cpp create mode 100644 src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_hadronox.cpp create mode 100644 src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp create mode 100644 src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/def_azjol_nerub.h create mode 100644 src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp (limited to 'src/bindings/scripts') diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt index 184d826d15e..fd941cd8164 100644 --- a/src/bindings/scripts/CMakeLists.txt +++ b/src/bindings/scripts/CMakeLists.txt @@ -408,18 +408,18 @@ SET(trinityscript_LIB_SRCS scripts/zone/nexus/oculus/boss_varos.cpp scripts/zone/nexus/oculus/boss_eregos.cpp scripts/zone/nexus/oculus/def_oculus.h - scripts/zone/Azjol-Nerub/azjol_nerub/instance_azjol_nerub.cpp - scripts/zone/Azjol-Nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp - scripts/zone/Azjol-Nerub/azjol_nerub/boss_hadronox.cpp - scripts/zone/Azjol-Nerub/azjol_nerub/boss_anubarak.cpp - scripts/zone/Azjol-Nerub/azjol_nerub/def_azjol_nerub.h - scripts/zone/Azjol-Nerub/ahnkahet/instance_ahnkahet.cpp - scripts/zone/Azjol-Nerub/ahnkahet/boss_prince_taldaram.cpp - scripts/zone/Azjol-Nerub/ahnkahet/boss_elder_nadox.cpp - scripts/zone/Azjol-Nerub/ahnkahet/boss_jedoga_shadowseeker.cpp - scripts/zone/Azjol-Nerub/ahnkahet/boss_herald_volazj.cpp - scripts/zone/Azjol-Nerub/ahnkahet/boss_amanitar.cpp - scripts/zone/Azjol-Nerub/ahnkahet/def_ahnkahet.h + scripts/zone/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp + scripts/zone/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp + scripts/zone/azjol_nerub/azjol_nerub/boss_hadronox.cpp + scripts/zone/azjol_nerub/azjol_nerub/boss_anubarak.cpp + scripts/zone/azjol_nerub/azjol_nerub/def_azjol_nerub.h + scripts/zone/azjol_nerub/ahnkahet/instance_ahnkahet.cpp + scripts/zone/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp + scripts/zone/azjol_nerub/ahnkahet/boss_elder_nadox.cpp + scripts/zone/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp + scripts/zone/azjol_nerub/ahnkahet/boss_herald_volazj.cpp + scripts/zone/azjol_nerub/ahnkahet/boss_amanitar.cpp + scripts/zone/azjol_nerub/ahnkahet/def_ahnkahet.h scripts/zone/draktharon_keep/instance_drak_tharon_keep.cpp scripts/zone/draktharon_keep/boss_trollgore.cpp scripts/zone/draktharon_keep/boss_novos.cpp diff --git a/src/bindings/scripts/VC71/71ScriptDev2.vcproj b/src/bindings/scripts/VC71/71ScriptDev2.vcproj index a80a48666f2..ef03a6069ec 100644 --- a/src/bindings/scripts/VC71/71ScriptDev2.vcproj +++ b/src/bindings/scripts/VC71/71ScriptDev2.vcproj @@ -632,31 +632,31 @@ Name="Ahn'kahet" > @@ -664,23 +664,23 @@ Name="Azjol-Nerub" > diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index 8bef86e0f96..8fd97430dbc 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -809,31 +809,31 @@ Name="Ahn'kahet" > @@ -841,23 +841,23 @@ Name="Azjol-Nerub" > diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj index 719b3587c1a..57b7db8f253 100644 --- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj +++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj @@ -816,31 +816,31 @@ Name="Ahn'kahet" > @@ -848,23 +848,23 @@ Name="Azjol-Nerub" > diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_amanitar.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_amanitar.cpp deleted file mode 100644 index 9431880921c..00000000000 --- a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_amanitar.cpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (C) 2009 Trinity - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* Script Data Start -SDName: boss_amanitar -SDAuthor: LordVanMartin -SD%Complete: 0 -SDComment: Only appears in heroic mode -SDCategory: Ahn'kahet -Script Data End */ - -/*** SQL START *** -update creature_template set scriptname = 'boss_amanitar' where entry = ''; -*** SQL END ***/ - -#include "precompiled.h" -#include "def_ahnkahet.h" - -#define SPELL_BASH 57094 -#define SPELL_ENTANGLING_ROOTS 57095 -#define SPELL_MINI 57055 -#define SPELL_VENOM_BOLT_VOLLEY 57088 - -struct TRINITY_DLL_DECL boss_amanitarAI : public ScriptedAI -{ - boss_amanitarAI(Creature *c) : ScriptedAI(c) {} - - void Reset() {} - - void Aggro(Unit* who) {} - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if(!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* killer) {} - - void KilledUnit(Unit *victim) - { - if (victim == m_creature) - return; - } -}; - -CreatureAI* GetAI_boss_amanitar(Creature *_Creature) -{ - return new boss_amanitarAI (_Creature); -} - -void AddSC_boss_amanitar() -{ - Script *newscript; - - newscript = new Script; - newscript->Name="boss_amanitar"; - newscript->GetAI = GetAI_boss_amanitar; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_elder_nadox.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_elder_nadox.cpp deleted file mode 100644 index 468aa8e10a7..00000000000 --- a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_elder_nadox.cpp +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright (C) 2009 Trinity - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_elder_nadox -SDAuthor: LordVanMartin -SD%Complete: 0 -SDComment: -SDCategory: Ahn'kahet -EndScriptData */ - -/*** SQL START *** -update creature_template set scriptname = 'boss_nadox' where entry = ''; -*** SQL END ***/ - -#include "precompiled.h" -#include "def_ahnkahet.h" - -#define SPELL_BROOD_PLAGUE 56130 -#define H_SPELL_BROOD_PLAGUE 59467 -#define SPELL_BROOD_RAGE 59465 //--> Heroic -- Enrages a Swarmer, increasing size and damage done. - -#define MOB_AHNKAHAR_SWARMER 30178 -#define SPELL_SUMMON_SWARMERS 56119//2x 30178 - -#define MOB_AHNKAHAR_SWARMER 30178 -#define SPELL_SUMMON_SWARM_GUARD 56120//1x 30176 -#define SPELL_DEADLY_POISON 56145// Proc trigger -#define H_SPELL_DEADLY_POISON 59479// Proc trigger -#define SPELL_GUARDIAN_AURA 56151 - -//randomly summons NPC 30178 and 30176 they can cast Sprint (56354) - -//Yell -#define SAY_AGGRO -1619014 -#define SAY_SLAY_1 -1619015 -#define SAY_SLAY_2 -1619016 -#define SAY_SLAY_3 -1619017 -#define SAY_DEATH -1619018 -#define SAY_EGG_SAC_1 -1619019 -#define SAY_EGG_SAC_2 -1619020 - -struct TRINITY_DLL_DECL boss_nadoxAI : public ScriptedAI -{ - boss_nadoxAI(Creature *c) : ScriptedAI(c) {} - - uint32 plague, - summon; - - void Reset() {} - - void Aggro(Unit* who) - { - DoScriptText(SAY_AGGRO, m_creature); - } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if(!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* killer) - { - DoScriptText(SAY_DEATH, m_creature); - } - - void KilledUnit(Unit *victim) - { - if (victim == m_creature) - return; - - switch(rand()%3) - { - case 0: DoScriptText(SAY_SLAY_1, m_creature);break; - case 1: DoScriptText(SAY_SLAY_2, m_creature);break; - case 2: DoScriptText(SAY_SLAY_3, m_creature);break; - } - } - - void summon_swarmer(){} - void summon_guardian(){} -}; - -CreatureAI* GetAI_boss_nadox(Creature *_Creature) -{ - return new boss_nadoxAI (_Creature); -} - -void AddSC_boss_nadox() -{ - Script *newscript; - - newscript = new Script; - newscript->Name="boss_nadox"; - newscript->GetAI = GetAI_boss_nadox; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_herald_volazj.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_herald_volazj.cpp deleted file mode 100644 index 8e0b1a4744d..00000000000 --- a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_herald_volazj.cpp +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (C) 2009 Trinity - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_herald_volazj -SDAuthor: LordVanMartin -SD%Complete: 0 -SDComment: -SDCategory: Ahn'kahet -EndScriptData */ - -/*** SQL START *** -update creature_template set scriptname = 'boss_volazj' where entry = ''; -*** SQL END ***/ - -#include "precompiled.h" -#include "def_ahnkahet.h" - -//Spells -#define SPELL_INSANITY 57496 //Dummy -#define INSANITY_VISUAL 57561 -#define SPELL_MIND_FLAY_N 57941 -#define SPELL_MIND_FLAY_H 59974 -#define SPELL_SHADOW_BOLT_VOLLEY_1 57942 -#define SPELL_SHADOW_BOLT_VOLLEY_2 59975 -#define SPELL_SHIVER_N 57949 -#define SPELL_SHIVER_H 59978 - -//Yell -#define SAY_AGGRO -1619030 -#define SAY_SLAY_1 -1619031 -#define SAY_SLAY_2 -1619032 -#define SAY_SLAY_3 -1619033 -#define SAY_DEATH_1 -1619034 -#define SAY_DEATH_2 -1619035 -#define SAY_PHASE -1619036 - -struct TRINITY_DLL_DECL boss_volazjAI : public ScriptedAI -{ - boss_volazjAI(Creature *c) : ScriptedAI(c) {} - - uint32 phase; - - void Reset() {} - void Aggro(Unit* who) - { - DoScriptText(SAY_AGGRO, m_creature); - } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if(!UpdateVictim()) - return; - - phase =1; - - DoMeleeAttackIfReady(); - } - void JustDied(Unit* killer) - { - if(phase == 1) - DoScriptText(SAY_DEATH_1, m_creature); - else - DoScriptText(SAY_DEATH_2, m_creature); - } - - void KilledUnit(Unit *victim) - { - if (victim == m_creature) - return; - - switch(rand()%3) - { - case 0: DoScriptText(SAY_SLAY_1, m_creature);break; - case 1: DoScriptText(SAY_SLAY_2, m_creature);break; - case 2: DoScriptText(SAY_SLAY_3, m_creature);break; - } - } -}; - -CreatureAI* GetAI_boss_volazj(Creature *_Creature) -{ - return new boss_volazjAI (_Creature); -} - -void AddSC_boss_volazj() -{ - Script *newscript; - - newscript = new Script; - newscript->Name="boss_volazj"; - newscript->GetAI = GetAI_boss_volazj; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_jedoga_shadowseeker.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_jedoga_shadowseeker.cpp deleted file mode 100644 index 145c017679e..00000000000 --- a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_jedoga_shadowseeker.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) 2009 Trinity - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_jedoga_shadowseeker -SDAuthor: LordVanMartin -SD%Complete: 0 -SDComment: -SDCategory: Ahn'kahet -EndScriptData */ - -/*** SQL START *** -update creature_template set scriptname = 'boss_jedoga' where entry = ''; -*** SQL END ***/ - -#include "precompiled.h" -#include "def_ahnkahet.h" - -#define SPELL_CYCLONE_STRIKE 56855 -#define H_SPELL_CYCLONE_STRIKE 60030//kein unterschied zu 56855 außer das 60030 1,5sec cast ist -#define SPELL_LIGHTNING_BOLT 56891 -#define H_SPELL_LIGHTNING_BOLT 60032 -#define SPELL_THUNDERSHOCK 56926//AOE works -#define H_SPELL_THUNDERSHOCK 60029//AOE works -#define SPELL_GIFT_OF_THE_HERALD 56219//triggert if sucessfull sacreficed - -#define SAY_AGGRO -1619000 -#define SAY_C_SACRIFICE_1 -1619001 -#define SAY_C_SACRIFICE_2 -1619002 -#define SAY_SACRIFICE_1 -1619003 -#define SAY_SACRIFICE_2 -1619004 -#define SAY_SLAY_1 -1619005 -#define SAY_SLAY_2 -1619006 -#define SAY_SLAY_3 -1619007 -#define SAY_DEATH -1619008 -#define SAY_PREACHING_1 -1619009 -#define SAY_PREACHING_2 -1619010 -#define SAY_PREACHING_3 -1619011 -#define SAY_PREACHING_4 -1619012 -#define SAY_PREACHING_5 -1619013 - -struct TRINITY_DLL_DECL boss_jedogaAI : public ScriptedAI -{ - boss_jedogaAI(Creature *c) : ScriptedAI(c) {} - - void Reset() {} - void Aggro(Unit* who) - { - DoScriptText(SAY_AGGRO, m_creature); - } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if(!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* killer) - { - DoScriptText(SAY_DEATH, m_creature); - } - - void KilledUnit(Unit *victim) - { - if (victim == m_creature) - return; - - switch(rand()%3) - { - case 0: DoScriptText(SAY_SLAY_1, m_creature);break; - case 1: DoScriptText(SAY_SLAY_2, m_creature);break; - case 2: DoScriptText(SAY_SLAY_3, m_creature);break; - } - } -}; - -CreatureAI* GetAI_boss_jedoga(Creature *_Creature) -{ - return new boss_jedogaAI (_Creature); -} - -void AddSC_boss_jedoga() -{ - Script *newscript; - - newscript = new Script; - newscript->Name="boss_jedoga"; - newscript->GetAI = GetAI_boss_jedoga; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_prince_taldaram.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_prince_taldaram.cpp deleted file mode 100644 index 36e68862f0c..00000000000 --- a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/boss_prince_taldaram.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (C) 2009 Trinity - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_prince_taldaram -SDAuthor: LordVanMartin -SD%Complete: 0 -SDComment: -SDCategory: Ahn'kahet -EndScriptData */ - -#include "precompiled.h" -#include "def_ahnkahet.h" - -#define SPELL_BLOODTHIRST 55968 //Trigger Spell + add aura -#define SPELL_CONJURE_FLAME_SPHERE 55931 - -#define SPELL_FLAME_SPHERE_SUMMON_1 55895// 1x 30106 -#define H_SPELL_FLAME_SPHERE_SUMMON_1 59511// 1x 31686 -#define H_SPELL_FLAME_SPHERE_SUMMON_2 59512// 1x 31687 -#define SPELL_FLAME_SPHERE_SPAWN_EFFEKT 55891 -#define SPELL_FLAME_SPHERE_VISUAL 55928 -#define SPELL_FLAME_SPHERE_PERIODIC 55926 -#define H_SPELL_FLAME_SPHERE_PERIODIC 59508 -#define SPELL_FLAME_SPHERE_DEATH_EFFEKT 55947 - -#define SPELL_EMBRACE_OF_THE_VAMPYR 55959 -#define H_SPELL_EMBRACE_OF_THE_VAMPYR 59513 - -#define SPELL_VANISH 55964 - -//Yell -#define SAY_AGGRO -1619021 -#define SAY_SLAY_1 -1619022 -#define SAY_SLAY_2 -1619023 -#define SAY_SLAY_3 -1619024 -#define SAY_DEATH -1619025 -#define SAY_FEED_1 -1619026 -#define SAY_FEED_2 -1619027 -#define SAY_VANISH_1 -1619028 -#define SAY_VANISH_2 -1619029 - -struct TRINITY_DLL_DECL boss_taldaramAI : public ScriptedAI -{ - boss_taldaramAI(Creature *c) : ScriptedAI(c) {} - - void Reset() {} - void Aggro(Unit* who) - { - DoScriptText(SAY_AGGRO, m_creature); - } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if(!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - void JustDied(Unit* killer) - { - DoScriptText(SAY_DEATH, m_creature); - } - - void KilledUnit(Unit *victim) - { - if (victim == m_creature) - return; - - switch(rand()%3) - { - case 0: DoScriptText(SAY_SLAY_1, m_creature);break; - case 1: DoScriptText(SAY_SLAY_2, m_creature);break; - case 2: DoScriptText(SAY_SLAY_3, m_creature);break; - } - } -}; - -CreatureAI* GetAI_boss_taldaram(Creature *_Creature) -{ - return new boss_taldaramAI (_Creature); -} - -void AddSC_boss_taldaram() -{ - Script *newscript; - - newscript = new Script; - newscript->Name="boss_taldaram"; - newscript->GetAI = GetAI_boss_taldaram; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/def_ahnkahet.h b/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/def_ahnkahet.h deleted file mode 100644 index 97c0db55d72..00000000000 --- a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/def_ahnkahet.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (C) 2009 Trinity - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef DEF_AHNKAHET_H -#define DEF_AHNKAHET_H - -#define DATA_ELDER_NADOX 1 -#define DATA_PRINCE_TALDARAM 2 -#define DATA_JEDOGA_SHADOWSEEKER 3 -#define DATA_HERALD_VOLAZJ 4 -#define DATA_AMANITAR 5 - -#define DATA_ELDER_NADOX_EVENT 6 -#define DATA_PRINCE_TALDARAM_EVENT 7 -#define DATA_JEDOGA_SHADOWSEEKER_EVENT 8 -#define DATA_HERALD_VOLAZJ_EVENT 9 -#define DATA_AMANITAR_EVENT 10 -#endif diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/instance_ahnkahet.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/instance_ahnkahet.cpp deleted file mode 100644 index 41cb91f86b7..00000000000 --- a/src/bindings/scripts/scripts/zone/Azjol-Nerub/ahnkahet/instance_ahnkahet.cpp +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (C) 2009 Trinity - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: Instance_Azjol_Nerub -SD%Complete: 0 -SDComment: -SDCategory: Azjol Nerub -EndScriptData */ - -#include "precompiled.h" -#include "def_ahnkahet.h" - -#define ENCOUNTERS 5 - -/* Ahn'kahet encounters: -0 - Elder Nadox -1 - Prince Taldaram -2 - Jedoga Shadowseeker -3 - Herald Volazj -4 - Amanitar (Heroic only) -*/ - -struct TRINITY_DLL_DECL instance_ahnkahet : public ScriptedInstance -{ - instance_ahnkahet(Map *Map) : ScriptedInstance(Map) {Initialize();}; - - uint64 Elder_Nadox; - uint64 Prince_Taldaram; - uint64 Jedoga_Shadowseeker; - uint64 Herald_Volazj; - uint64 Amanitar; - - uint32 Encounters[ENCOUNTERS]; - - void Initialize() - { - Elder_Nadox =0; - Prince_Taldaram =0; - Jedoga_Shadowseeker =0; - Herald_Volazj =0; - Amanitar =0; - - for(uint8 i = 0; i < ENCOUNTERS; ++i) - Encounters[i] = NOT_STARTED; - } - - bool IsEncounterInProgress() const - { - for(uint8 i = 0; i < ENCOUNTERS; ++i) - if(Encounters[i] == IN_PROGRESS) return true; - - return false; - } - - - void OnCreatureCreate(Creature *creature, uint32 creature_entry) - { - switch(creature_entry) - { - case 29309: Elder_Nadox = creature->GetGUID(); break; - case 29308: Prince_Taldaram = creature->GetGUID(); break; - case 29310: Jedoga_Shadowseeker = creature->GetGUID(); break; - case 29311: Herald_Volazj = creature->GetGUID(); break; - case 30258: Amanitar = creature->GetGUID(); break; - } - } - - uint64 GetData64(uint32 identifier) - { - switch(identifier) - { - case DATA_ELDER_NADOX: return Elder_Nadox; - case DATA_PRINCE_TALDARAM: return Prince_Taldaram; - case DATA_JEDOGA_SHADOWSEEKER: return Jedoga_Shadowseeker; - case DATA_HERALD_VOLAZJ: return Herald_Volazj; - case DATA_AMANITAR: return Amanitar; - } - return 0; - } - - void SetData(uint32 type, uint32 data) - { - switch(type) - { - case DATA_ELDER_NADOX_EVENT: - Encounters[0] = data;break; - case DATA_PRINCE_TALDARAM_EVENT: - Encounters[1] = data; break; - case DATA_JEDOGA_SHADOWSEEKER_EVENT: - Encounters[2] = data; break; - case DATA_HERALD_VOLAZJ: - Encounters[3] = data; break; - case DATA_AMANITAR: - Encounters[4] = data; break; - } - - if (data == DONE) - { - SaveToDB(); - } - } - - uint32 GetData(uint32 type) - { - switch(type) - { - case DATA_ELDER_NADOX_EVENT: return Encounters[0]; - case DATA_PRINCE_TALDARAM_EVENT: return Encounters[1]; - case DATA_JEDOGA_SHADOWSEEKER_EVENT: return Encounters[2]; - case DATA_HERALD_VOLAZJ: return Encounters[3]; - case DATA_AMANITAR: return Encounters[4]; - } - return 0; - } - - const char* Save() - { - OUT_SAVE_INST_DATA; - - std::string str_data; - - std::ostringstream saveStream; - saveStream << "A K " << Encounters[0] << " " << Encounters[1] << " " - << Encounters[2] << Encounters[3] << Encounters[4]; - - str_data = saveStream.str(); - - OUT_SAVE_INST_DATA_COMPLETE; - return str_data.c_str(); - } - - void Load(const char* in) - { - if (!in) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(in); - - char dataHead1, dataHead2; - uint16 data0,data1,data2,data3,data4; - - std::istringstream loadStream(in); - loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3 >> data4; - - if( dataHead1 == 'A' && dataHead2 == 'K') - { - Encounters[0] = data0; - Encounters[1] = data1; - Encounters[2] = data2; - Encounters[3] = data3; - Encounters[4] = data4; - - for(uint8 i = 0; i < ENCOUNTERS; ++i) - if (Encounters[i] == IN_PROGRESS) - Encounters[i] = NOT_STARTED; - - }else OUT_LOAD_INST_DATA_FAIL; - - OUT_LOAD_INST_DATA_COMPLETE; - } -}; - -InstanceData* GetInstanceData_instance_ahnkahet(Map* map) -{ - return new instance_ahnkahet(map); -} - -void AddSC_instance_ahnkahet() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "instance_ahnkahet"; - newscript->GetInstanceData = &GetInstanceData_instance_ahnkahet; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_anubarak.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_anubarak.cpp deleted file mode 100644 index c479e17d162..00000000000 --- a/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_anubarak.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright (C) 2009 Trinity - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_anubarak -SDAuthor: LordVanMartin -SD%Complete: 0 -SDComment: -SDCategory: Azjol Nerub -EndScriptData */ - -/*** SQL START *** -update creature_template set scriptname = 'boss_anub_arak' where entry = ''; -*** SQL END ***/ - -#include "precompiled.h" -#include "def_azjol_nerub.h" - -//Spells -#define SPELL_CARRION_BEETLES 53520 -#define SPELL_LOCUST_SWARM 53467 -#define SPELL_IMPALE 53454 -#define SPELL_POUND 53472 - -//Yell -#define SAY_INTRO -1601010 -#define SAY_AGGRO -1601000 -#define SAY_SLAY_1 -1601001 -#define SAY_SLAY_2 -1601002 -#define SAY_SLAY_3 -1601003 -#define SAY_LOCUST_1 -1601005 -#define SAY_LOCUST_2 -1601006 -#define SAY_LOCUST_3 -1601007 -#define SAY_SUBMERGE_1 -1601008 -#define SAY_SUBMERGE_2 -1601009 -#define SAY_DEATH -1601004 - -struct TRINITY_DLL_DECL boss_anub_arakAI : public ScriptedAI -{ - boss_anub_arakAI(Creature *c) : ScriptedAI(c) {} - - uint32 phase; - - void Reset() {} - void Aggro(Unit* who) - { - DoScriptText(SAY_AGGRO, m_creature); - } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if(!UpdateVictim()) - return; - - phase =1; - - if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 33) - phase = 2; - if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) == 15) - phase = 3; - - DoMeleeAttackIfReady(); - } - void JustDied(Unit* killer) - { - DoScriptText(SAY_DEATH, m_creature); - } - void KilledUnit(Unit *victim) - { - if (victim == m_creature) - return; - - switch(rand()%3) - { - case 0: DoScriptText(SAY_SLAY_1, m_creature);break; - case 1: DoScriptText(SAY_SLAY_2, m_creature);break; - case 2: DoScriptText(SAY_SLAY_3, m_creature);break; - } - } -}; - -CreatureAI* GetAI_boss_anub_arak(Creature *_Creature) -{ - return new boss_anub_arakAI (_Creature); -} - -void AddSC_boss_anub_arak() -{ - Script *newscript; - - newscript = new Script; - newscript->Name="boss_anub_arak"; - newscript->GetAI = GetAI_boss_anub_arak; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_hadronox.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_hadronox.cpp deleted file mode 100644 index e72ccd6436f..00000000000 --- a/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_hadronox.cpp +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (C) 2009 Trinity - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_hadronox -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Azjol Nerub -EndScriptData */ - -#include "precompiled.h" -#include "def_azjol_nerub.h" - -#define SPELL_WEB_FRONT_DOORS 53177//dummy - -#define SPELL_ACID_CLOUD 53400 -#define H_SPELL_ACID_CLOUD 59419 -#define SPELL_LEECH_POISON 53030 -#define H_SPELL_LEECH_POISON 59417 -#define SPELL_LEECH_POISON_DEADTRIGGER 53800//heal 10% heroic und normal -#define SPELL_PIECE_ARMOR 53418 -#define SPELL_WEB_GRAB 53406 -#define H_SPELL_WEB_GRAB 59420 - -/* Script Data Start -SDName: Boss hadronox -SDAuthor: LordVanMartin -SD%Complete: -SDComment: -SDCategory: -Script Data End */ - -/*** SQL START *** -update creature_template set scriptname = 'boss_hadronox' where entry = ''; -*** SQL END ***/ - -//Spells -#define SPELL_LEECH_POISON 53030 -#define SPELL_ACID_CLOUD 53400 -#define SPELL_PIERCE_ARMOR 53418 //Source SUN++ -#define SPELL_WEB_GRAB 53406 - -//Phase 0 => Gauntlet Event described below -//Phase 1 => Boss Encounter - -/*When your group enters the main room (the one after the bridge), you will notice a group of 3 Nerubians. -When you engage them, 2 more groups like this one spawn behind the first one - it is important to pull the first group back, -so you don't aggro all 3. Hadronox will be under you, fighting Nerubians. - -This is the timed gauntlet - waves of non-elite spiders - will spawn from the 3 doors located a little above the main room, and will then head down to fight Hadronox. After clearing the - main room, it is recommended to just stay in it, kill the occasional non-elites that will attack you instead of the boss, and wait for - Hadronox to make his way to you. When Hadronox enters the main room, she will web the doors, and no more non-elites will spawn.*/ - -struct TRINITY_DLL_DECL boss_hadronoxAI : public ScriptedAI -{ - boss_hadronoxAI(Creature *c) : ScriptedAI(c) {} - - uint32 phase; - - void Reset() {} - void Aggro(Unit* who) {} - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if(!UpdateVictim()) - return; - - phase =1; - - DoMeleeAttackIfReady(); - } - void JustDied(Unit* killer) {} - - void KilledUnit(Unit *victim) - { - if (victim == m_creature) - return; - - //when Hadronox kills any enemy (that includes a party member) she will regain 10% of her HP if the target had Leech Poison on - } -}; - -CreatureAI* GetAI_boss_hadronox(Creature *_Creature) -{ - return new boss_hadronoxAI (_Creature); -} - -void AddSC_boss_hadronox() -{ - Script *newscript; - - newscript = new Script; - newscript->Name="boss_hadronox"; - newscript->GetAI = GetAI_boss_hadronox; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp deleted file mode 100644 index 73316668d89..00000000000 --- a/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (C) 2009 Trinity - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: boss_krikthir_the_gatewatcher -SDAuthor: LordVanMartin -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Azjol Nerub -EndScriptData */ - -/*** SQL START *** -update creature_template set scriptname = 'boss_krik_thir' where entry = ''; -*** SQL END ***/ - -#include "precompiled.h" -#include "def_azjol_nerub.h" - -#define SPELL_MIND_FLAY 52586 -#define H_SPELL_MIND_FLAY 59367 -#define SPELL_CURSE_OF_FATIGUE 52592 -#define H_SPELL_CURSE_OF_FATIGUE 59368 -#define SPELL_FRENZY 28747 // maybe 53361 - -#define MOB_SKITTERING_SWARMER 28735 -#define MOB_SKITTERING_SWARMER_CONTROLLER 32593 - -#define SPELL_SUMMON_SKITTERING_SWARMER 52438//AOE Effekt 140, maybe 52439 -#define SPELL_SUMMON_SKITTERING_SWARMER 52439//Summon 3x 28735 - -struct TRINITY_DLL_DECL boss_krik_thirAI : public ScriptedAI -{ - boss_krik_thirAI(Creature *c) : ScriptedAI(c) {} - - void Reset() {} - - void Aggro(Unit* who) - { - DoScriptText(SAY_AGGRO, m_creature); - } - - void UpdateAI(const uint32 diff) - { - if(!UpdateVictim()) - return; - - if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) >= 10) - { - //Frenzy - } - - DoMeleeAttackIfReady(); - } - void JustDied(Unit* killer) - { - DoScriptText(SAY_DEATH, m_creature); - } - void KilledUnit(Unit *victim) - { - if (victim == m_creature) - return; - - switch(rand()%3) - { - case 0: DoScriptText(SAY_SLAY_1, m_creature);break; - case 1: DoScriptText(SAY_SLAY_2, m_creature);break; - case 2: DoScriptText(SAY_SLAY_3, m_creature);break; - } - } -}; - -CreatureAI* GetAI_boss_krik_thir(Creature *_Creature) -{ - return new boss_krik_thirAI (_Creature); -} - -void AddSC_boss_krik_thir() -{ - Script *newscript; - - newscript = new Script; - newscript->Name="boss_krik_thir"; - newscript->GetAI = GetAI_boss_krik_thir; - newscript->RegisterSelf(); - -} diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/def_azjol_nerub.h b/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/def_azjol_nerub.h deleted file mode 100644 index 9e319e8fde0..00000000000 --- a/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/def_azjol_nerub.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (C) 2009 Trinity - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -#ifndef DEF_AZJOL_NERUB_H -#define DEF_AZJOL_NERUB_H - -#define DATA_KRIKTHIR_THE_GATEWATCHER 1 -#define DATA_HADRONOX 2 -#define DATA_ANUBARAK 3 - -#define DATA_KRIKTHIR_THE_GATEWATCHER_EVENT 4 -#define DATA_HADRONOX_EVENT 5 -#define DATA_ANUBARAK_EVENT 6 -#endif diff --git a/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/instance_azjol_nerub.cpp b/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/instance_azjol_nerub.cpp deleted file mode 100644 index bd3fccd98d9..00000000000 --- a/src/bindings/scripts/scripts/zone/Azjol-Nerub/azjol_nerub/instance_azjol_nerub.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (C) 2009 Trinity - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: Instance_Azjol_Nerub -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Azjol Nerub -EndScriptData */ - -#include "precompiled.h" -#include "def_azjol_nerub.h" - -#define ENCOUNTERS 3 - -/* Azjol Nerub encounters: -0 - Krik'thir the Gatewatcher -1 - Hadronox -2 - Anub'arak -*/ - -struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance -{ - instance_azjol_nerub(Map *Map) : ScriptedInstance(Map) {Initialize();}; - - uint64 Krikthir; - uint64 Hadronox; - uint64 Anubarak; - - uint32 Encounters[ENCOUNTERS]; - - void Initialize() - { - Krikthir = 0; - Hadronox = 0; - Anubarak =0; - - - for(uint8 i = 0; i < ENCOUNTERS; ++i) - Encounters[i] = NOT_STARTED; - } - - bool IsEncounterInProgress() const - { - for(uint8 i = 0; i < ENCOUNTERS; ++i) - if(Encounters[i] == IN_PROGRESS) return true; - - return false; - } - - - void OnCreatureCreate(Creature *creature, uint32 creature_entry) - { - switch(creature_entry) - { - case 28684: Krikthir = creature->GetGUID(); break; - case 28921: Hadronox = creature->GetGUID(); break; - case 29120: Anubarak = creature->GetGUID(); break; - - } - } - - uint64 GetData64(uint32 identifier) - { - switch(identifier) - { - case DATA_KRIKTHIR_THE_GATEWATCHER: return Krikthir; - case DATA_HADRONOX: return Hadronox; - case DATA_ANUBARAK: return Anubarak; - } - - return 0; - } - - void SetData(uint32 type, uint32 data) - { - switch(type) - { - case DATA_KRIKTHIR_THE_GATEWATCHER_EVENT: - Encounters[0] = data;break; - case DATA_HADRONOX_EVENT: - Encounters[1] = data; break; - case DATA_ANUBARAK_EVENT: - Encounters[2] = data; break; - } - - if (data == DONE) - { - SaveToDB(); - } - } - - uint32 GetData(uint32 type) - { - switch(type) - { - case DATA_KRIKTHIR_THE_GATEWATCHER_EVENT: return Encounters[0]; - case DATA_HADRONOX_EVENT: return Encounters[1]; - case DATA_ANUBARAK_EVENT: return Encounters[2]; - } - - return 0; - } - - const char* Save() - { - OUT_SAVE_INST_DATA; - - std::string str_data; - - std::ostringstream saveStream; - saveStream << "A N " << Encounters[0] << " " << Encounters[1] << " " - << Encounters[2]; - - str_data = saveStream.str(); - - OUT_SAVE_INST_DATA_COMPLETE; - return str_data.c_str(); - } - - void Load(const char* in) - { - if (!in) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(in); - - char dataHead1, dataHead2; - uint16 data0,data1,data2; - - std::istringstream loadStream(in); - loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2; - - if( dataHead1 == 'A' && dataHead2 == 'N') - { - Encounters[0] = data0; - Encounters[1] = data1; - Encounters[2] = data2; - - for(uint8 i = 0; i < ENCOUNTERS; ++i) - if (Encounters[i] == IN_PROGRESS) - Encounters[i] = NOT_STARTED; - - }else OUT_LOAD_INST_DATA_FAIL; - - OUT_LOAD_INST_DATA_COMPLETE; - } -}; - -InstanceData* GetInstanceData_instance_azjol_nerub(Map* map) -{ - return new instance_azjol_nerub(map); -} - -void AddSC_instance_azjol_nerub() -{ - Script *newscript; - newscript = new Script; - newscript->Name = "instance_azjol_nerub"; - newscript->GetInstanceData = &GetInstanceData_instance_azjol_nerub; - newscript->RegisterSelf(); -} diff --git a/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_amanitar.cpp b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_amanitar.cpp new file mode 100644 index 00000000000..9431880921c --- /dev/null +++ b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_amanitar.cpp @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2009 Trinity + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* Script Data Start +SDName: boss_amanitar +SDAuthor: LordVanMartin +SD%Complete: 0 +SDComment: Only appears in heroic mode +SDCategory: Ahn'kahet +Script Data End */ + +/*** SQL START *** +update creature_template set scriptname = 'boss_amanitar' where entry = ''; +*** SQL END ***/ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +#define SPELL_BASH 57094 +#define SPELL_ENTANGLING_ROOTS 57095 +#define SPELL_MINI 57055 +#define SPELL_VENOM_BOLT_VOLLEY 57088 + +struct TRINITY_DLL_DECL boss_amanitarAI : public ScriptedAI +{ + boss_amanitarAI(Creature *c) : ScriptedAI(c) {} + + void Reset() {} + + void Aggro(Unit* who) {} + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if(!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* killer) {} + + void KilledUnit(Unit *victim) + { + if (victim == m_creature) + return; + } +}; + +CreatureAI* GetAI_boss_amanitar(Creature *_Creature) +{ + return new boss_amanitarAI (_Creature); +} + +void AddSC_boss_amanitar() +{ + Script *newscript; + + newscript = new Script; + newscript->Name="boss_amanitar"; + newscript->GetAI = GetAI_boss_amanitar; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_elder_nadox.cpp b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_elder_nadox.cpp new file mode 100644 index 00000000000..468aa8e10a7 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_elder_nadox.cpp @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2009 Trinity + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_elder_nadox +SDAuthor: LordVanMartin +SD%Complete: 0 +SDComment: +SDCategory: Ahn'kahet +EndScriptData */ + +/*** SQL START *** +update creature_template set scriptname = 'boss_nadox' where entry = ''; +*** SQL END ***/ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +#define SPELL_BROOD_PLAGUE 56130 +#define H_SPELL_BROOD_PLAGUE 59467 +#define SPELL_BROOD_RAGE 59465 //--> Heroic -- Enrages a Swarmer, increasing size and damage done. + +#define MOB_AHNKAHAR_SWARMER 30178 +#define SPELL_SUMMON_SWARMERS 56119//2x 30178 + +#define MOB_AHNKAHAR_SWARMER 30178 +#define SPELL_SUMMON_SWARM_GUARD 56120//1x 30176 +#define SPELL_DEADLY_POISON 56145// Proc trigger +#define H_SPELL_DEADLY_POISON 59479// Proc trigger +#define SPELL_GUARDIAN_AURA 56151 + +//randomly summons NPC 30178 and 30176 they can cast Sprint (56354) + +//Yell +#define SAY_AGGRO -1619014 +#define SAY_SLAY_1 -1619015 +#define SAY_SLAY_2 -1619016 +#define SAY_SLAY_3 -1619017 +#define SAY_DEATH -1619018 +#define SAY_EGG_SAC_1 -1619019 +#define SAY_EGG_SAC_2 -1619020 + +struct TRINITY_DLL_DECL boss_nadoxAI : public ScriptedAI +{ + boss_nadoxAI(Creature *c) : ScriptedAI(c) {} + + uint32 plague, + summon; + + void Reset() {} + + void Aggro(Unit* who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if(!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit *victim) + { + if (victim == m_creature) + return; + + switch(rand()%3) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } + + void summon_swarmer(){} + void summon_guardian(){} +}; + +CreatureAI* GetAI_boss_nadox(Creature *_Creature) +{ + return new boss_nadoxAI (_Creature); +} + +void AddSC_boss_nadox() +{ + Script *newscript; + + newscript = new Script; + newscript->Name="boss_nadox"; + newscript->GetAI = GetAI_boss_nadox; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_herald_volazj.cpp b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_herald_volazj.cpp new file mode 100644 index 00000000000..8e0b1a4744d --- /dev/null +++ b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_herald_volazj.cpp @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2009 Trinity + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_herald_volazj +SDAuthor: LordVanMartin +SD%Complete: 0 +SDComment: +SDCategory: Ahn'kahet +EndScriptData */ + +/*** SQL START *** +update creature_template set scriptname = 'boss_volazj' where entry = ''; +*** SQL END ***/ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +//Spells +#define SPELL_INSANITY 57496 //Dummy +#define INSANITY_VISUAL 57561 +#define SPELL_MIND_FLAY_N 57941 +#define SPELL_MIND_FLAY_H 59974 +#define SPELL_SHADOW_BOLT_VOLLEY_1 57942 +#define SPELL_SHADOW_BOLT_VOLLEY_2 59975 +#define SPELL_SHIVER_N 57949 +#define SPELL_SHIVER_H 59978 + +//Yell +#define SAY_AGGRO -1619030 +#define SAY_SLAY_1 -1619031 +#define SAY_SLAY_2 -1619032 +#define SAY_SLAY_3 -1619033 +#define SAY_DEATH_1 -1619034 +#define SAY_DEATH_2 -1619035 +#define SAY_PHASE -1619036 + +struct TRINITY_DLL_DECL boss_volazjAI : public ScriptedAI +{ + boss_volazjAI(Creature *c) : ScriptedAI(c) {} + + uint32 phase; + + void Reset() {} + void Aggro(Unit* who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if(!UpdateVictim()) + return; + + phase =1; + + DoMeleeAttackIfReady(); + } + void JustDied(Unit* killer) + { + if(phase == 1) + DoScriptText(SAY_DEATH_1, m_creature); + else + DoScriptText(SAY_DEATH_2, m_creature); + } + + void KilledUnit(Unit *victim) + { + if (victim == m_creature) + return; + + switch(rand()%3) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + +CreatureAI* GetAI_boss_volazj(Creature *_Creature) +{ + return new boss_volazjAI (_Creature); +} + +void AddSC_boss_volazj() +{ + Script *newscript; + + newscript = new Script; + newscript->Name="boss_volazj"; + newscript->GetAI = GetAI_boss_volazj; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp new file mode 100644 index 00000000000..145c017679e --- /dev/null +++ b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_jedoga_shadowseeker.cpp @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2009 Trinity + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_jedoga_shadowseeker +SDAuthor: LordVanMartin +SD%Complete: 0 +SDComment: +SDCategory: Ahn'kahet +EndScriptData */ + +/*** SQL START *** +update creature_template set scriptname = 'boss_jedoga' where entry = ''; +*** SQL END ***/ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +#define SPELL_CYCLONE_STRIKE 56855 +#define H_SPELL_CYCLONE_STRIKE 60030//kein unterschied zu 56855 außer das 60030 1,5sec cast ist +#define SPELL_LIGHTNING_BOLT 56891 +#define H_SPELL_LIGHTNING_BOLT 60032 +#define SPELL_THUNDERSHOCK 56926//AOE works +#define H_SPELL_THUNDERSHOCK 60029//AOE works +#define SPELL_GIFT_OF_THE_HERALD 56219//triggert if sucessfull sacreficed + +#define SAY_AGGRO -1619000 +#define SAY_C_SACRIFICE_1 -1619001 +#define SAY_C_SACRIFICE_2 -1619002 +#define SAY_SACRIFICE_1 -1619003 +#define SAY_SACRIFICE_2 -1619004 +#define SAY_SLAY_1 -1619005 +#define SAY_SLAY_2 -1619006 +#define SAY_SLAY_3 -1619007 +#define SAY_DEATH -1619008 +#define SAY_PREACHING_1 -1619009 +#define SAY_PREACHING_2 -1619010 +#define SAY_PREACHING_3 -1619011 +#define SAY_PREACHING_4 -1619012 +#define SAY_PREACHING_5 -1619013 + +struct TRINITY_DLL_DECL boss_jedogaAI : public ScriptedAI +{ + boss_jedogaAI(Creature *c) : ScriptedAI(c) {} + + void Reset() {} + void Aggro(Unit* who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if(!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } + + void JustDied(Unit* killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit *victim) + { + if (victim == m_creature) + return; + + switch(rand()%3) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + +CreatureAI* GetAI_boss_jedoga(Creature *_Creature) +{ + return new boss_jedogaAI (_Creature); +} + +void AddSC_boss_jedoga() +{ + Script *newscript; + + newscript = new Script; + newscript->Name="boss_jedoga"; + newscript->GetAI = GetAI_boss_jedoga; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp new file mode 100644 index 00000000000..36e68862f0c --- /dev/null +++ b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/boss_prince_taldaram.cpp @@ -0,0 +1,109 @@ +/* + * Copyright (C) 2009 Trinity + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_prince_taldaram +SDAuthor: LordVanMartin +SD%Complete: 0 +SDComment: +SDCategory: Ahn'kahet +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +#define SPELL_BLOODTHIRST 55968 //Trigger Spell + add aura +#define SPELL_CONJURE_FLAME_SPHERE 55931 + +#define SPELL_FLAME_SPHERE_SUMMON_1 55895// 1x 30106 +#define H_SPELL_FLAME_SPHERE_SUMMON_1 59511// 1x 31686 +#define H_SPELL_FLAME_SPHERE_SUMMON_2 59512// 1x 31687 +#define SPELL_FLAME_SPHERE_SPAWN_EFFEKT 55891 +#define SPELL_FLAME_SPHERE_VISUAL 55928 +#define SPELL_FLAME_SPHERE_PERIODIC 55926 +#define H_SPELL_FLAME_SPHERE_PERIODIC 59508 +#define SPELL_FLAME_SPHERE_DEATH_EFFEKT 55947 + +#define SPELL_EMBRACE_OF_THE_VAMPYR 55959 +#define H_SPELL_EMBRACE_OF_THE_VAMPYR 59513 + +#define SPELL_VANISH 55964 + +//Yell +#define SAY_AGGRO -1619021 +#define SAY_SLAY_1 -1619022 +#define SAY_SLAY_2 -1619023 +#define SAY_SLAY_3 -1619024 +#define SAY_DEATH -1619025 +#define SAY_FEED_1 -1619026 +#define SAY_FEED_2 -1619027 +#define SAY_VANISH_1 -1619028 +#define SAY_VANISH_2 -1619029 + +struct TRINITY_DLL_DECL boss_taldaramAI : public ScriptedAI +{ + boss_taldaramAI(Creature *c) : ScriptedAI(c) {} + + void Reset() {} + void Aggro(Unit* who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if(!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } + void JustDied(Unit* killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + + void KilledUnit(Unit *victim) + { + if (victim == m_creature) + return; + + switch(rand()%3) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + +CreatureAI* GetAI_boss_taldaram(Creature *_Creature) +{ + return new boss_taldaramAI (_Creature); +} + +void AddSC_boss_taldaram() +{ + Script *newscript; + + newscript = new Script; + newscript->Name="boss_taldaram"; + newscript->GetAI = GetAI_boss_taldaram; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/def_ahnkahet.h b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/def_ahnkahet.h new file mode 100644 index 00000000000..97c0db55d72 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/def_ahnkahet.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2009 Trinity + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef DEF_AHNKAHET_H +#define DEF_AHNKAHET_H + +#define DATA_ELDER_NADOX 1 +#define DATA_PRINCE_TALDARAM 2 +#define DATA_JEDOGA_SHADOWSEEKER 3 +#define DATA_HERALD_VOLAZJ 4 +#define DATA_AMANITAR 5 + +#define DATA_ELDER_NADOX_EVENT 6 +#define DATA_PRINCE_TALDARAM_EVENT 7 +#define DATA_JEDOGA_SHADOWSEEKER_EVENT 8 +#define DATA_HERALD_VOLAZJ_EVENT 9 +#define DATA_AMANITAR_EVENT 10 +#endif diff --git a/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/instance_ahnkahet.cpp b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/instance_ahnkahet.cpp new file mode 100644 index 00000000000..41cb91f86b7 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/azjol_nerub/ahnkahet/instance_ahnkahet.cpp @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2009 Trinity + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Azjol_Nerub +SD%Complete: 0 +SDComment: +SDCategory: Azjol Nerub +EndScriptData */ + +#include "precompiled.h" +#include "def_ahnkahet.h" + +#define ENCOUNTERS 5 + +/* Ahn'kahet encounters: +0 - Elder Nadox +1 - Prince Taldaram +2 - Jedoga Shadowseeker +3 - Herald Volazj +4 - Amanitar (Heroic only) +*/ + +struct TRINITY_DLL_DECL instance_ahnkahet : public ScriptedInstance +{ + instance_ahnkahet(Map *Map) : ScriptedInstance(Map) {Initialize();}; + + uint64 Elder_Nadox; + uint64 Prince_Taldaram; + uint64 Jedoga_Shadowseeker; + uint64 Herald_Volazj; + uint64 Amanitar; + + uint32 Encounters[ENCOUNTERS]; + + void Initialize() + { + Elder_Nadox =0; + Prince_Taldaram =0; + Jedoga_Shadowseeker =0; + Herald_Volazj =0; + Amanitar =0; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + Encounters[i] = NOT_STARTED; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if(Encounters[i] == IN_PROGRESS) return true; + + return false; + } + + + void OnCreatureCreate(Creature *creature, uint32 creature_entry) + { + switch(creature_entry) + { + case 29309: Elder_Nadox = creature->GetGUID(); break; + case 29308: Prince_Taldaram = creature->GetGUID(); break; + case 29310: Jedoga_Shadowseeker = creature->GetGUID(); break; + case 29311: Herald_Volazj = creature->GetGUID(); break; + case 30258: Amanitar = creature->GetGUID(); break; + } + } + + uint64 GetData64(uint32 identifier) + { + switch(identifier) + { + case DATA_ELDER_NADOX: return Elder_Nadox; + case DATA_PRINCE_TALDARAM: return Prince_Taldaram; + case DATA_JEDOGA_SHADOWSEEKER: return Jedoga_Shadowseeker; + case DATA_HERALD_VOLAZJ: return Herald_Volazj; + case DATA_AMANITAR: return Amanitar; + } + return 0; + } + + void SetData(uint32 type, uint32 data) + { + switch(type) + { + case DATA_ELDER_NADOX_EVENT: + Encounters[0] = data;break; + case DATA_PRINCE_TALDARAM_EVENT: + Encounters[1] = data; break; + case DATA_JEDOGA_SHADOWSEEKER_EVENT: + Encounters[2] = data; break; + case DATA_HERALD_VOLAZJ: + Encounters[3] = data; break; + case DATA_AMANITAR: + Encounters[4] = data; break; + } + + if (data == DONE) + { + SaveToDB(); + } + } + + uint32 GetData(uint32 type) + { + switch(type) + { + case DATA_ELDER_NADOX_EVENT: return Encounters[0]; + case DATA_PRINCE_TALDARAM_EVENT: return Encounters[1]; + case DATA_JEDOGA_SHADOWSEEKER_EVENT: return Encounters[2]; + case DATA_HERALD_VOLAZJ: return Encounters[3]; + case DATA_AMANITAR: return Encounters[4]; + } + return 0; + } + + const char* Save() + { + OUT_SAVE_INST_DATA; + + std::string str_data; + + std::ostringstream saveStream; + saveStream << "A K " << Encounters[0] << " " << Encounters[1] << " " + << Encounters[2] << Encounters[3] << Encounters[4]; + + str_data = saveStream.str(); + + OUT_SAVE_INST_DATA_COMPLETE; + return str_data.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + char dataHead1, dataHead2; + uint16 data0,data1,data2,data3,data4; + + std::istringstream loadStream(in); + loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3 >> data4; + + if( dataHead1 == 'A' && dataHead2 == 'K') + { + Encounters[0] = data0; + Encounters[1] = data1; + Encounters[2] = data2; + Encounters[3] = data3; + Encounters[4] = data4; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if (Encounters[i] == IN_PROGRESS) + Encounters[i] = NOT_STARTED; + + }else OUT_LOAD_INST_DATA_FAIL; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_ahnkahet(Map* map) +{ + return new instance_ahnkahet(map); +} + +void AddSC_instance_ahnkahet() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_ahnkahet"; + newscript->GetInstanceData = &GetInstanceData_instance_ahnkahet; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_anubarak.cpp b/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_anubarak.cpp new file mode 100644 index 00000000000..c479e17d162 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_anubarak.cpp @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2009 Trinity + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_anubarak +SDAuthor: LordVanMartin +SD%Complete: 0 +SDComment: +SDCategory: Azjol Nerub +EndScriptData */ + +/*** SQL START *** +update creature_template set scriptname = 'boss_anub_arak' where entry = ''; +*** SQL END ***/ + +#include "precompiled.h" +#include "def_azjol_nerub.h" + +//Spells +#define SPELL_CARRION_BEETLES 53520 +#define SPELL_LOCUST_SWARM 53467 +#define SPELL_IMPALE 53454 +#define SPELL_POUND 53472 + +//Yell +#define SAY_INTRO -1601010 +#define SAY_AGGRO -1601000 +#define SAY_SLAY_1 -1601001 +#define SAY_SLAY_2 -1601002 +#define SAY_SLAY_3 -1601003 +#define SAY_LOCUST_1 -1601005 +#define SAY_LOCUST_2 -1601006 +#define SAY_LOCUST_3 -1601007 +#define SAY_SUBMERGE_1 -1601008 +#define SAY_SUBMERGE_2 -1601009 +#define SAY_DEATH -1601004 + +struct TRINITY_DLL_DECL boss_anub_arakAI : public ScriptedAI +{ + boss_anub_arakAI(Creature *c) : ScriptedAI(c) {} + + uint32 phase; + + void Reset() {} + void Aggro(Unit* who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if(!UpdateVictim()) + return; + + phase =1; + + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= 33) + phase = 2; + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) == 15) + phase = 3; + + DoMeleeAttackIfReady(); + } + void JustDied(Unit* killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + void KilledUnit(Unit *victim) + { + if (victim == m_creature) + return; + + switch(rand()%3) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + +CreatureAI* GetAI_boss_anub_arak(Creature *_Creature) +{ + return new boss_anub_arakAI (_Creature); +} + +void AddSC_boss_anub_arak() +{ + Script *newscript; + + newscript = new Script; + newscript->Name="boss_anub_arak"; + newscript->GetAI = GetAI_boss_anub_arak; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_hadronox.cpp b/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_hadronox.cpp new file mode 100644 index 00000000000..e72ccd6436f --- /dev/null +++ b/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_hadronox.cpp @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2009 Trinity + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_hadronox +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Azjol Nerub +EndScriptData */ + +#include "precompiled.h" +#include "def_azjol_nerub.h" + +#define SPELL_WEB_FRONT_DOORS 53177//dummy + +#define SPELL_ACID_CLOUD 53400 +#define H_SPELL_ACID_CLOUD 59419 +#define SPELL_LEECH_POISON 53030 +#define H_SPELL_LEECH_POISON 59417 +#define SPELL_LEECH_POISON_DEADTRIGGER 53800//heal 10% heroic und normal +#define SPELL_PIECE_ARMOR 53418 +#define SPELL_WEB_GRAB 53406 +#define H_SPELL_WEB_GRAB 59420 + +/* Script Data Start +SDName: Boss hadronox +SDAuthor: LordVanMartin +SD%Complete: +SDComment: +SDCategory: +Script Data End */ + +/*** SQL START *** +update creature_template set scriptname = 'boss_hadronox' where entry = ''; +*** SQL END ***/ + +//Spells +#define SPELL_LEECH_POISON 53030 +#define SPELL_ACID_CLOUD 53400 +#define SPELL_PIERCE_ARMOR 53418 //Source SUN++ +#define SPELL_WEB_GRAB 53406 + +//Phase 0 => Gauntlet Event described below +//Phase 1 => Boss Encounter + +/*When your group enters the main room (the one after the bridge), you will notice a group of 3 Nerubians. +When you engage them, 2 more groups like this one spawn behind the first one - it is important to pull the first group back, +so you don't aggro all 3. Hadronox will be under you, fighting Nerubians. + +This is the timed gauntlet - waves of non-elite spiders + will spawn from the 3 doors located a little above the main room, and will then head down to fight Hadronox. After clearing the + main room, it is recommended to just stay in it, kill the occasional non-elites that will attack you instead of the boss, and wait for + Hadronox to make his way to you. When Hadronox enters the main room, she will web the doors, and no more non-elites will spawn.*/ + +struct TRINITY_DLL_DECL boss_hadronoxAI : public ScriptedAI +{ + boss_hadronoxAI(Creature *c) : ScriptedAI(c) {} + + uint32 phase; + + void Reset() {} + void Aggro(Unit* who) {} + void AttackStart(Unit* who) {} + void MoveInLineOfSight(Unit* who) {} + void UpdateAI(const uint32 diff) + { + //Return since we have no target + if(!UpdateVictim()) + return; + + phase =1; + + DoMeleeAttackIfReady(); + } + void JustDied(Unit* killer) {} + + void KilledUnit(Unit *victim) + { + if (victim == m_creature) + return; + + //when Hadronox kills any enemy (that includes a party member) she will regain 10% of her HP if the target had Leech Poison on + } +}; + +CreatureAI* GetAI_boss_hadronox(Creature *_Creature) +{ + return new boss_hadronoxAI (_Creature); +} + +void AddSC_boss_hadronox() +{ + Script *newscript; + + newscript = new Script; + newscript->Name="boss_hadronox"; + newscript->GetAI = GetAI_boss_hadronox; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp b/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp new file mode 100644 index 00000000000..73316668d89 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/boss_krikthir_the_gatewatcher.cpp @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2009 Trinity + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: boss_krikthir_the_gatewatcher +SDAuthor: LordVanMartin +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Azjol Nerub +EndScriptData */ + +/*** SQL START *** +update creature_template set scriptname = 'boss_krik_thir' where entry = ''; +*** SQL END ***/ + +#include "precompiled.h" +#include "def_azjol_nerub.h" + +#define SPELL_MIND_FLAY 52586 +#define H_SPELL_MIND_FLAY 59367 +#define SPELL_CURSE_OF_FATIGUE 52592 +#define H_SPELL_CURSE_OF_FATIGUE 59368 +#define SPELL_FRENZY 28747 // maybe 53361 + +#define MOB_SKITTERING_SWARMER 28735 +#define MOB_SKITTERING_SWARMER_CONTROLLER 32593 + +#define SPELL_SUMMON_SKITTERING_SWARMER 52438//AOE Effekt 140, maybe 52439 +#define SPELL_SUMMON_SKITTERING_SWARMER 52439//Summon 3x 28735 + +struct TRINITY_DLL_DECL boss_krik_thirAI : public ScriptedAI +{ + boss_krik_thirAI(Creature *c) : ScriptedAI(c) {} + + void Reset() {} + + void Aggro(Unit* who) + { + DoScriptText(SAY_AGGRO, m_creature); + } + + void UpdateAI(const uint32 diff) + { + if(!UpdateVictim()) + return; + + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) >= 10) + { + //Frenzy + } + + DoMeleeAttackIfReady(); + } + void JustDied(Unit* killer) + { + DoScriptText(SAY_DEATH, m_creature); + } + void KilledUnit(Unit *victim) + { + if (victim == m_creature) + return; + + switch(rand()%3) + { + case 0: DoScriptText(SAY_SLAY_1, m_creature);break; + case 1: DoScriptText(SAY_SLAY_2, m_creature);break; + case 2: DoScriptText(SAY_SLAY_3, m_creature);break; + } + } +}; + +CreatureAI* GetAI_boss_krik_thir(Creature *_Creature) +{ + return new boss_krik_thirAI (_Creature); +} + +void AddSC_boss_krik_thir() +{ + Script *newscript; + + newscript = new Script; + newscript->Name="boss_krik_thir"; + newscript->GetAI = GetAI_boss_krik_thir; + newscript->RegisterSelf(); + +} diff --git a/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/def_azjol_nerub.h b/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/def_azjol_nerub.h new file mode 100644 index 00000000000..9e319e8fde0 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/def_azjol_nerub.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2009 Trinity + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef DEF_AZJOL_NERUB_H +#define DEF_AZJOL_NERUB_H + +#define DATA_KRIKTHIR_THE_GATEWATCHER 1 +#define DATA_HADRONOX 2 +#define DATA_ANUBARAK 3 + +#define DATA_KRIKTHIR_THE_GATEWATCHER_EVENT 4 +#define DATA_HADRONOX_EVENT 5 +#define DATA_ANUBARAK_EVENT 6 +#endif diff --git a/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp b/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp new file mode 100644 index 00000000000..bd3fccd98d9 --- /dev/null +++ b/src/bindings/scripts/scripts/zone/azjol_nerub/azjol_nerub/instance_azjol_nerub.cpp @@ -0,0 +1,180 @@ +/* + * Copyright (C) 2009 Trinity + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Instance_Azjol_Nerub +SD%Complete: 0 +SDComment: Placeholder +SDCategory: Azjol Nerub +EndScriptData */ + +#include "precompiled.h" +#include "def_azjol_nerub.h" + +#define ENCOUNTERS 3 + +/* Azjol Nerub encounters: +0 - Krik'thir the Gatewatcher +1 - Hadronox +2 - Anub'arak +*/ + +struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance +{ + instance_azjol_nerub(Map *Map) : ScriptedInstance(Map) {Initialize();}; + + uint64 Krikthir; + uint64 Hadronox; + uint64 Anubarak; + + uint32 Encounters[ENCOUNTERS]; + + void Initialize() + { + Krikthir = 0; + Hadronox = 0; + Anubarak =0; + + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + Encounters[i] = NOT_STARTED; + } + + bool IsEncounterInProgress() const + { + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if(Encounters[i] == IN_PROGRESS) return true; + + return false; + } + + + void OnCreatureCreate(Creature *creature, uint32 creature_entry) + { + switch(creature_entry) + { + case 28684: Krikthir = creature->GetGUID(); break; + case 28921: Hadronox = creature->GetGUID(); break; + case 29120: Anubarak = creature->GetGUID(); break; + + } + } + + uint64 GetData64(uint32 identifier) + { + switch(identifier) + { + case DATA_KRIKTHIR_THE_GATEWATCHER: return Krikthir; + case DATA_HADRONOX: return Hadronox; + case DATA_ANUBARAK: return Anubarak; + } + + return 0; + } + + void SetData(uint32 type, uint32 data) + { + switch(type) + { + case DATA_KRIKTHIR_THE_GATEWATCHER_EVENT: + Encounters[0] = data;break; + case DATA_HADRONOX_EVENT: + Encounters[1] = data; break; + case DATA_ANUBARAK_EVENT: + Encounters[2] = data; break; + } + + if (data == DONE) + { + SaveToDB(); + } + } + + uint32 GetData(uint32 type) + { + switch(type) + { + case DATA_KRIKTHIR_THE_GATEWATCHER_EVENT: return Encounters[0]; + case DATA_HADRONOX_EVENT: return Encounters[1]; + case DATA_ANUBARAK_EVENT: return Encounters[2]; + } + + return 0; + } + + const char* Save() + { + OUT_SAVE_INST_DATA; + + std::string str_data; + + std::ostringstream saveStream; + saveStream << "A N " << Encounters[0] << " " << Encounters[1] << " " + << Encounters[2]; + + str_data = saveStream.str(); + + OUT_SAVE_INST_DATA_COMPLETE; + return str_data.c_str(); + } + + void Load(const char* in) + { + if (!in) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(in); + + char dataHead1, dataHead2; + uint16 data0,data1,data2; + + std::istringstream loadStream(in); + loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2; + + if( dataHead1 == 'A' && dataHead2 == 'N') + { + Encounters[0] = data0; + Encounters[1] = data1; + Encounters[2] = data2; + + for(uint8 i = 0; i < ENCOUNTERS; ++i) + if (Encounters[i] == IN_PROGRESS) + Encounters[i] = NOT_STARTED; + + }else OUT_LOAD_INST_DATA_FAIL; + + OUT_LOAD_INST_DATA_COMPLETE; + } +}; + +InstanceData* GetInstanceData_instance_azjol_nerub(Map* map) +{ + return new instance_azjol_nerub(map); +} + +void AddSC_instance_azjol_nerub() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "instance_azjol_nerub"; + newscript->GetInstanceData = &GetInstanceData_instance_azjol_nerub; + newscript->RegisterSelf(); +} -- cgit v1.2.3