Ahn'Kahet: Code cleansing

--HG--
branch : trunk
This commit is contained in:
Tartalo
2010-03-22 23:24:59 +01:00
parent 2e5c5d3e1b
commit 2c2b75fb55
6 changed files with 261 additions and 290 deletions
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
*
* 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
@@ -19,30 +19,34 @@
#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
enum Data64
{
DATA_ELDER_NADOX,
DATA_PRINCE_TALDARAM,
DATA_JEDOGA_SHADOWSEEKER,
DATA_HERALD_VOLAZJ,
DATA_AMANITAR,
DATA_SPHERE1,
DATA_SPHERE2,
DATA_PRINCE_TALDARAM_PLATFORM,
DATA_PL_JEDOGA_TARGET,
DATA_ADD_JEDOGA_OPFER,
DATA_ADD_JEDOGA_INITIAND
};
#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
#define DATA_SPHERE1 11
#define DATA_SPHERE2 12
#define DATA_SPHERE1_EVENT 13
#define DATA_SPHERE2_EVENT 14
#define DATA_PRINCE_TALDARAM_PLATFORM 15
#define DATA_PL_JEDOGA_TARGET 16
#define DATA_ADD_JEDOGA_OPFER 17
#define DATA_JEDOGA_RESET_INITIANDS 18
#define DATA_JEDOGA_TRIGGER_SWITCH 19
#define DATA_ADD_JEDOGA_INITIAND 20
#define DATA_ALL_INITIAND_DEAD 21
#define DATA_INITIAND_KILLED 22
enum Data
{
DATA_ELDER_NADOX_EVENT,
DATA_PRINCE_TALDARAM_EVENT,
DATA_JEDOGA_SHADOWSEEKER_EVENT,
DATA_HERALD_VOLAZJ_EVENT,
DATA_AMANITAR_EVENT,
DATA_SPHERE1_EVENT,
DATA_SPHERE2_EVENT,
DATA_JEDOGA_TRIGGER_SWITCH,
DATA_JEDOGA_RESET_INITIANDS,
DATA_INITIAND_KILLED,
DATA_ALL_INITIAND_DEAD
};
#endif
@@ -1,52 +1,45 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* 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
*/
* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
*
* 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: WarHead
SD%Complete: 80%
SDComment: Find correct mushrooms spell to make them visible - buffs of the mushrooms not ever applied to the users...
SDCategory: Ahn'kahet
Script Data End */
/*
* Comment: Find correct mushrooms spell to make them visible - buffs of the mushrooms not ever applied to the users...
*/
#include "ScriptedPch.h"
#include "ahnkahet.h"
enum Spells
{
SPELL_BASH = 57094, // Victim
SPELL_ENTANGLING_ROOTS = 57095, // Random Victim 100Y
SPELL_MINI = 57055, // Self
SPELL_VENOM_BOLT_VOLLEY = 57088, // Random Victim 100Y
HEALTHY_MUSHROOM_SPELL_POTENT_FUNGUS = 56648, // Killer 3Y
POISONOUS_MUSHROOM_SPELL_POISON_CLOUD = 57061, // Self - Duration 8 Sec
POISONOUS_MUSHROOM_SPELL_VISUAL_AREA = 61566, // Self
POISONOUS_MUSHROOM_SPELL_VISUAL_AURA = 56741, // Self
SPELL_PUTRID_MUSHROOM = 31690, // To make the mushrooms visible
SPELL_BASH = 57094, // Victim
SPELL_ENTANGLING_ROOTS = 57095, // Random Victim 100Y
SPELL_MINI = 57055, // Self
SPELL_VENOM_BOLT_VOLLEY = 57088, // Random Victim 100Y
SPELL_HEALTHY_MUSHROOM_POTENT_FUNGUS = 56648, // Killer 3Y
SPELL_POISONOUS_MUSHROOM_POISON_CLOUD = 57061, // Self - Duration 8 Sec
SPELL_POISONOUS_MUSHROOM_VISUAL_AREA = 61566, // Self
SPELL_POISONOUS_MUSHROOM_VISUAL_AURA = 56741, // Self
SPELL_PUTRID_MUSHROOM = 31690, // To make the mushrooms visible
};
enum Creatures
{
#define NPC_HEALTHY_MUSHROOM 30391
#define NPC_POISONOUS_MUSHROOM 30435
NPC_HEALTHY_MUSHROOM = 30391,
NPC_POISONOUS_MUSHROOM = 30435
};
struct boss_amanitarAI : public ScriptedAI
@@ -59,10 +52,10 @@ struct boss_amanitarAI : public ScriptedAI
ScriptedInstance* pInstance;
uint32 roottimer,
bashtimer,
bolttimer,
spawntimer;
uint32 roottimer;
uint32 bashtimer;
uint32 bolttimer;
uint32 spawntimer;
bool FirstTime;
@@ -173,7 +166,7 @@ struct mob_amanitar_mushroomsAI : public Scripted_NoMovementAI
DoCast(m_creature, SPELL_PUTRID_MUSHROOM, true); // Hack, to make the mushrooms visible, can't find orig. spell...
if (m_creature->GetEntry() == NPC_POISONOUS_MUSHROOM)
DoCast(m_creature, POISONOUS_MUSHROOM_SPELL_VISUAL_AURA, true);
DoCast(m_creature, SPELL_POISONOUS_MUSHROOM_VISUAL_AURA, true);
auratimer = 0;
deathtimer = 30000;
@@ -187,7 +180,7 @@ struct mob_amanitar_mushroomsAI : public Scripted_NoMovementAI
if (m_creature->GetEntry() == NPC_HEALTHY_MUSHROOM && killer->GetTypeId() == TYPEID_PLAYER)
{
m_creature->InterruptNonMeleeSpells(false);
DoCast(killer, HEALTHY_MUSHROOM_SPELL_POTENT_FUNGUS, false);
DoCast(killer, SPELL_HEALTHY_MUSHROOM_POTENT_FUNGUS, false);
}
}
@@ -200,8 +193,8 @@ struct mob_amanitar_mushroomsAI : public Scripted_NoMovementAI
{
if (auratimer <= diff)
{
DoCast(m_creature, POISONOUS_MUSHROOM_SPELL_VISUAL_AREA, true);
DoCast(m_creature, POISONOUS_MUSHROOM_SPELL_POISON_CLOUD, false);
DoCast(m_creature, SPELL_POISONOUS_MUSHROOM_VISUAL_AREA, true);
DoCast(m_creature, SPELL_POISONOUS_MUSHROOM_POISON_CLOUD, false);
auratimer = 7000;
} else auratimer -= diff;
}
@@ -1,55 +1,63 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* 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
SD%Complete: 100
SDComment:
SDCategory: Ahn'kahet
EndScriptData */
* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
*
* 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
*/
#include "ScriptedPch.h"
#include "ahnkahet.h"
bool DeadAhnkaharGuardian; // needed for achievement: Respect Your Elders(2038)
#define ACHIEVEMENT_RESPECT_YOUR_ELDERS 2038
enum Achievements
{
ACHIEV_RESPECT_YOUR_ELDERS = 2038
};
//not in db
#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
enum Yells
{
SAY_AGGRO = -1619014,
SAY_SLAY_1 = -1619015,
SAY_SLAY_2 = -1619016,
SAY_SLAY_3 = -1619017,
SAY_DEATH = -1619018,
SAY_EGG_SAC_1 = -1619019,
SAY_EGG_SAC_2 = -1619020
};
#define SPELL_BROOD_PLAGUE 56130
#define H_SPELL_BROOD_PLAGUE 59467
#define H_SPELL_BROOD_RAGE 59465
#define SPELL_ENRAGE 26662// Enraged if too far away from home
enum Spells
{
SPELL_BROOD_PLAGUE = 56130,
H_SPELL_BROOD_PLAGUE = 59467,
H_SPELL_BROOD_RAGE = 59465,
SPELL_ENRAGE = 26662 // Enraged if too far away from home
};
#define MOB_AHNKAHAR_SWARMER 30178
#define SPELL_SUMMON_SWARMERS 56119//2x 30178 -- 2x every 10secs
enum Creatures
{
MOB_AHNKAHAR_SWARMER = 30178,
MOB_AHNKAHAR_GUARDIAN_ENTRY = 30176
};
#define MOB_AHNKAHAR_GUARDIAN_ENTRY 30176
#define SPELL_SUMMON_SWARM_GUARD 56120//1x 30176 -- every 25secs
#define SPELL_GUARDIAN_AURA 56151
enum CreatureSpells
{
SPELL_SUMMON_SWARMERS = 56119, //2x 30178 -- 2x every 10secs
SPELL_SUMMON_SWARM_GUARD = 56120, //1x 30176 -- every 25secs
SPELL_GUARDIAN_AURA = 56151
};
#define EMOTE_HATCHES "An Ahn'kahar Guardian hatches!"
@@ -107,23 +115,12 @@ struct boss_elder_nadoxAI : public ScriptedAI
{
DoScriptText(SAY_SLAY_3,m_creature); //SAY_SLAY_3 on death?
if (IsHeroic() && !DeadAhnkaharGuardian)
{
AchievementEntry const *AchievRespectYourElders = GetAchievementStore()->LookupEntry(ACHIEVEMENT_RESPECT_YOUR_ELDERS);
if (AchievRespectYourElders)
{
Map* pMap = m_creature->GetMap();
if (pMap && pMap->IsDungeon())
{
Map::PlayerList const &players = pMap->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievRespectYourElders);
}
}
}
if (pInstance)
{
pInstance->SetData(DATA_ELDER_NADOX_EVENT, DONE);
if (IsHeroic() && !DeadAhnkaharGuardian)
pInstance->DoCompleteAchievement(ACHIEV_RESPECT_YOUR_ELDERS);
}
}
void UpdateAI(const uint32 diff)
@@ -225,8 +222,7 @@ struct mob_ahnkahar_nerubianAI : public ScriptedAI
{
if (pInstance->GetData(DATA_ELDER_NADOX_EVENT) != IN_PROGRESS)
{
m_creature->DealDamage(m_creature,m_creature->GetHealth());
m_creature->RemoveCorpse();
m_creature->DisappearAndDie();
}
}
@@ -1,62 +1,61 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* 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
*/
* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
*
* 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: thenecromancer
SD%Complete: ??
SDComment: Missing AI for Twisted Visages
SDCategory: Ahn'kahet
EndScriptData */
/*
* Comment: Missing AI for Twisted Visages
*/
#include "ScriptedPch.h"
#include "ahnkahet.h"
enum Spells
{
SPELL_INSANITY = 57496, //Dummy
INSANITY_VISUAL = 57561,
SPELL_INSANITY_TARGET = 57508,
SPELL_MIND_FLAY = 57941,
H_SPELL_MIND_FLAY = 59974,
SPELL_SHADOW_BOLT_VOLLEY = 57942,
H_SPELL_SHADOW_BOLT_VOLLEY = 59975,
SPELL_SHIVER = 57949,
H_SPELL_SHIVER = 59978
SPELL_INSANITY = 57496, //Dummy
INSANITY_VISUAL = 57561,
SPELL_INSANITY_TARGET = 57508,
SPELL_MIND_FLAY = 57941,
H_SPELL_MIND_FLAY = 59974,
SPELL_SHADOW_BOLT_VOLLEY = 57942,
H_SPELL_SHADOW_BOLT_VOLLEY = 59975,
SPELL_SHIVER = 57949,
H_SPELL_SHIVER = 59978
};
#define MOB_TWISTED_VISAGE 30625
enum Creatures
{
MOB_TWISTED_VISAGE = 30625
};
//not in db
enum Yells
{
SAY_AGGRO = -1619030,
SAY_SLAY_1 = -1619031,
SAY_SLAY_2 = -1619032,
SAY_SLAY_3 = -1619033,
SAY_DEATH_1 = -1619034,
SAY_DEATH_2 = -1619035,
SAY_PHASE = -1619036
SAY_AGGRO = -1619030,
SAY_SLAY_1 = -1619031,
SAY_SLAY_2 = -1619032,
SAY_SLAY_3 = -1619033,
SAY_DEATH_1 = -1619034,
SAY_DEATH_2 = -1619035,
SAY_PHASE = -1619036
};
enum Achievements
{
ACHIEVEMENT_QUICK_DEMISE = 1862
ACHIEV_QUICK_DEMISE = 1862
};
struct boss_volazjAI : public ScriptedAI
@@ -282,17 +281,12 @@ struct boss_volazjAI : public ScriptedAI
DoScriptText(SAY_DEATH_1, m_creature);
if (pInstance)
pInstance->SetData(DATA_HERALD_VOLAZJ, DONE);
AchievementEntry const *AchievQuickDemise = GetAchievementStore()->LookupEntry(ACHIEVEMENT_QUICK_DEMISE);
Map* pMap = m_creature->GetMap();
if (IsHeroic() && uiEncounterTimer < 120000 && pMap && pMap->IsDungeon() && AchievQuickDemise)
{
Map::PlayerList const &players = pMap->GetPlayers();
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
itr->getSource()->CompletedAchievement(AchievQuickDemise);
pInstance->SetData(DATA_HERALD_VOLAZJ, DONE);
if (IsHeroic() && uiEncounterTimer < 120000)
pInstance->DoCompleteAchievement(ACHIEV_QUICK_DEMISE);
}
Summons.DespawnAll();
}
@@ -1,63 +1,59 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* 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
*/
* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
*
* 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: WarHead
SD%Complete: 100%
SDComment: Complete - BUT THE TRIGGER NEEDS DATA WHETHER THE PRISON OF TALDARAM IS OFFLINE !
SDCategory: Ahn'kahet
EndScriptData */
/*
* Comment: Complete - BUT THE TRIGGER NEEDS DATA WHETHER THE PRISON OF TALDARAM IS OFFLINE !
*/
#include "ScriptedPch.h"
#include "ahnkahet.h"
enum Yells
{
TEXT_AGGRO = -1619000,
TEXT_SACRIFICE_1_1 = -1619001,
TEXT_SACRIFICE_1_2 = -1619002,
TEXT_SACRIFICE_2_1 = -1619003,
TEXT_SACRIFICE_2_2 = -1619004,
TEXT_SLAY_1 = -1619005,
TEXT_SLAY_2 = -1619006,
TEXT_SLAY_3 = -1619007,
TEXT_DEATH = -1619008,
TEXT_PREACHING_1 = -1619009,
TEXT_PREACHING_2 = -1619010,
TEXT_PREACHING_3 = -1619011,
TEXT_PREACHING_4 = -1619012,
TEXT_PREACHING_5 = -1619013
TEXT_AGGRO = -1619000,
TEXT_SACRIFICE_1_1 = -1619001,
TEXT_SACRIFICE_1_2 = -1619002,
TEXT_SACRIFICE_2_1 = -1619003,
TEXT_SACRIFICE_2_2 = -1619004,
TEXT_SLAY_1 = -1619005,
TEXT_SLAY_2 = -1619006,
TEXT_SLAY_3 = -1619007,
TEXT_DEATH = -1619008,
TEXT_PREACHING_1 = -1619009,
TEXT_PREACHING_2 = -1619010,
TEXT_PREACHING_3 = -1619011,
TEXT_PREACHING_4 = -1619012,
TEXT_PREACHING_5 = -1619013
};
enum Spells
{
SPELL_SPHERE_VISUAL = 56075,
SPELL_GIFT_OF_THE_HERALD = 56219,
SPELL_CYCLONE_STRIKE = 56855, // Self
SPELL_CYCLONE_STRIKE_H = 60030,
SPELL_LIGHTNING_BOLT = 56891, // 40Y
SPELL_LIGHTNING_BOLT_H = 60032, // 40Y
SPELL_THUNDERSHOCK = 56926, // 30Y
SPELL_THUNDERSHOCK_H = 60029 // 30Y
SPELL_SPHERE_VISUAL = 56075,
SPELL_GIFT_OF_THE_HERALD = 56219,
SPELL_CYCLONE_STRIKE = 56855, // Self
SPELL_CYCLONE_STRIKE_H = 60030,
SPELL_LIGHTNING_BOLT = 56891, // 40Y
SPELL_LIGHTNING_BOLT_H = 60032, // 40Y
SPELL_THUNDERSHOCK = 56926, // 30Y
SPELL_THUNDERSHOCK_H = 60029 // 30Y
};
float JEDOGA_POS[2][4] =
const Position JedogaPosition[2] =
{
{372.330994f, -705.278015f, -0.624178f, 5.427970f},
{372.330994f, -705.278015f, -16.179716f, 5.427970f}
@@ -74,16 +70,16 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
ScriptedInstance* pInstance;
uint32 uiOpFerTimer,
uiCycloneTimer,
uiBoltTimer,
uiThunderTimer;
uint32 uiOpFerTimer;
uint32 uiCycloneTimer;
uint32 uiBoltTimer;
uint32 uiThunderTimer;
bool predone,
bOpFerok,
bOnGround,
bOpFerokFail,
bCanDown;
bool predone;
bool bOpFerok;
bool bOnGround;
bool bOpFerokFail;
bool bCanDown;
bool FirstTime;
@@ -188,13 +184,12 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
bOpFerokFail = false;
pInstance->SetData(DATA_JEDOGA_TRIGGER_SWITCH, 0);
m_creature->GetMotionMaster()->MovePoint(1, JEDOGA_POS[1][0], JEDOGA_POS[1][1], JEDOGA_POS[1][2]);
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_JUMPING);
m_creature->SendMonsterMove(JEDOGA_POS[1][0], JEDOGA_POS[1][1], JEDOGA_POS[1][2], 0, MOVEFLAG_JUMP, 0);
m_creature->Relocate(JEDOGA_POS[1][0], JEDOGA_POS[1][1], JEDOGA_POS[1][2], JEDOGA_POS[1][3]);
m_creature->GetMotionMaster()->MovePoint(1, JedogaPosition[1]);
/* m_creature->SetUnitMovementFlags(MOVEMENTFLAG_JUMPING);
m_creature->SendMonsterMove(JedogaPosition[1], MOVEFLAG_JUMP, 0);
m_creature->Relocate(JedogaPosition[1][0], JedogaPosition[1][1], JedogaPosition[1][2], JedogaPosition[1][3]);
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_WALK_MODE);
*/
m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, false);
m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, false);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE);
@@ -234,15 +229,15 @@ struct boss_jedoga_shadowseekerAI : public ScriptedAI
m_creature->AttackStop();
m_creature->RemoveAllAuras();
m_creature->LoadCreaturesAddon();
m_creature->GetMotionMaster()->MovePoint(0, JEDOGA_POS[0][0], JEDOGA_POS[0][1], JEDOGA_POS[0][2]);
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_JUMPING);
m_creature->SendMonsterMove(JEDOGA_POS[0][0], JEDOGA_POS[0][1], JEDOGA_POS[0][2], 0, MOVEFLAG_JUMP, 0);
m_creature->Relocate(JEDOGA_POS[0][0], JEDOGA_POS[0][1], JEDOGA_POS[0][2], JEDOGA_POS[0][3]);
m_creature->GetMotionMaster()->MovePoint(0, JedogaPosition[0]);
/* m_creature->SetUnitMovementFlags(MOVEMENTFLAG_JUMPING);
m_creature->SendMonsterMove(JedogaPosition[0][0], JedogaPosition[0][1], JedogaPosition[0][2], 0, MOVEFLAG_JUMP, 0);
m_creature->Relocate(JedogaPosition[0][0], JedogaPosition[0][1], JedogaPosition[0][2], JedogaPosition[0][3]);
m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING);
m_creature->GetMotionMaster()->Clear();
m_creature->GetMotionMaster()->MoveIdle();
m_creature->StopMoving();
*/
pInstance->SetData(DATA_JEDOGA_TRIGGER_SWITCH, 1);
if (pInstance->GetData(DATA_JEDOGA_SHADOWSEEKER_EVENT) == IN_PROGRESS) OpferRufen();
@@ -437,7 +432,7 @@ struct mob_jedoga_initiandAI : public ScriptedAI
m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, false);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE + UNIT_FLAG_NON_ATTACKABLE);
float distance = m_creature->GetDistance(JEDOGA_POS[1][0], JEDOGA_POS[1][1], JEDOGA_POS[1][2]);
float distance = m_creature->GetDistance(JedogaPosition[1]);
if (distance < 9.0f)
m_creature->SetSpeed(MOVE_WALK, 0.5f, true);
@@ -447,7 +442,7 @@ struct mob_jedoga_initiandAI : public ScriptedAI
m_creature->SetSpeed(MOVE_WALK, 1.0f, true);
m_creature->GetMotionMaster()->Clear(false);
m_creature->GetMotionMaster()->MovePoint(1, JEDOGA_POS[1][0], JEDOGA_POS[1][1], JEDOGA_POS[1][2]);
m_creature->GetMotionMaster()->MovePoint(1, JedogaPosition[1]);
walking = true;
}
if (!walking)
@@ -483,8 +478,8 @@ struct mob_jedoga_initiandAI : public ScriptedAI
// ------------------------------------------------------------------------------------------------------------
enum AufseherSpell
{
SPELL_BEAM_VISUAL_JEDOGAS_AUFSEHER_1 = 60342,
SPELL_BEAM_VISUAL_JEDOGAS_AUFSEHER_2 = 56312
SPELL_BEAM_VISUAL_JEDOGAS_AUFSEHER_1 = 60342,
SPELL_BEAM_VISUAL_JEDOGAS_AUFSEHER_2 = 56312
};
struct npc_jedogas_aufseher_triggerAI : public Scripted_NoMovementAI
@@ -502,10 +497,10 @@ struct npc_jedogas_aufseher_triggerAI : public Scripted_NoMovementAI
ScriptedInstance* pInstance;
bool removed,
removed2,
casted,
casted2;
bool removed;
bool removed2;
bool casted;
bool casted2;
void Reset() {}
void EnterCombat(Unit* who) {}
@@ -518,13 +513,7 @@ struct npc_jedogas_aufseher_triggerAI : public Scripted_NoMovementAI
return;
if (!removed && m_creature->GetPositionX() > 440.0f)
{ /* NEEDS DATA WHETHER THE PRISON OF TALDARAM IS OFFLINE !
if (pInstance->GetData(EVENT_VORRICHTUNGEN))
{
m_creature->InterruptNonMeleeSpells(true);
removed = true;
return;
}*/
{
if (pInstance->GetData(DATA_PRINCE_TALDARAM_EVENT) == DONE)
{
m_creature->InterruptNonMeleeSpells(true);
@@ -1,36 +1,24 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* 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 */
* Copyright (C) 2009 - 2010 TrinityCore <http://www.trinitycore.org/>
*
* 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
*/
#include "ScriptedPch.h"
#include "ahnkahet.h"
#define MAX_ENCOUNTER 5
#define MAX_JEDOGA_INITIANDS 15
#define AchievementVolunteerWork 2056
/* Ahn'kahet encounters:
0 - Elder Nadox
1 - Prince Taldaram
@@ -39,6 +27,13 @@ EndScriptData */
4 - Amanitar (Heroic only)
*/
#define MAX_ENCOUNTER 5
enum Achievements
{
ACHIEV_VOLUNTEER_WORK = 2056
};
struct instance_ahnkahet : public ScriptedInstance
{
instance_ahnkahet(Map* pMap) : ScriptedInstance(pMap) {Initialize();};
@@ -202,11 +197,11 @@ struct instance_ahnkahet : public ScriptedInstance
}
}
if (!initiandkilled && instance->IsHeroic())
DoCompleteAchievement(AchievementVolunteerWork);
DoCompleteAchievement(ACHIEV_VOLUNTEER_WORK);
}
break;
case DATA_HERALD_VOLAZJ: m_auiEncounter[3] = data; break;
case DATA_AMANITAR: m_auiEncounter[4] = data; break;
case DATA_HERALD_VOLAZJ_EVENT: m_auiEncounter[3] = data; break;
case DATA_AMANITAR_EVENT: m_auiEncounter[4] = data; break;
case DATA_SPHERE1_EVENT: spheres[0] = data; break;
case DATA_SPHERE2_EVENT: spheres[1] = data; break;
case DATA_JEDOGA_TRIGGER_SWITCH: switchtrigger = data; break;
@@ -235,7 +230,7 @@ struct instance_ahnkahet : public ScriptedInstance
case DATA_PRINCE_TALDARAM_EVENT: return m_auiEncounter[1];
case DATA_JEDOGA_SHADOWSEEKER_EVENT: return m_auiEncounter[2];
case DATA_HERALD_VOLAZJ: return m_auiEncounter[3];
case DATA_AMANITAR: return m_auiEncounter[4];
case DATA_AMANITAR_EVENT: return m_auiEncounter[4];
case DATA_SPHERE1_EVENT: return spheres[0];
case DATA_SPHERE2_EVENT: return spheres[1];
case DATA_ALL_INITIAND_DEAD: