Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/AI/CoreAI/TotemAI.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Unit/Unit.cpp src/server/game/Globals/ObjectMgr.cpp src/server/game/Guilds/Guild.cpp src/server/game/Guilds/Guild.h src/server/game/Movement/Spline/MoveSplineInit.cpp src/server/game/Movement/Spline/MovementPacketBuilder.cpp src/server/game/Movement/Spline/MovementPacketBuilder.h src/server/game/Spells/SpellMgr.cpp src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_nefarian.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp src/server/scripts/Kalimdor/zone_mulgore.cpp src/server/scripts/Kalimdor/zone_stonetalon_mountains.cpp src/server/shared/Database/Implementation/CharacterDatabase.cpp
This commit is contained in:
commit
e8be55aa8b
230 files changed
+35529
-5277
No files matched your search
+4
-35
@@ -73,6 +73,8 @@ public:
|
||||
go_blackrockaltar = 0;
|
||||
go_portcullis_active = 0;
|
||||
go_portcullis_tobossrooms = 0;
|
||||
memset(go_roomrunes, 0, sizeof(go_roomrunes));
|
||||
memset(go_emberseerrunes, 0, sizeof(go_emberseerrunes));
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) OVERRIDE
|
||||
@@ -270,7 +272,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void ProcessEvent(WorldObject* /*gameObject*/, uint32 eventId) OVERRIDE
|
||||
void ProcessEvent(WorldObject* /*obj*/, uint32 eventId) OVERRIDE
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
@@ -313,102 +315,71 @@ public:
|
||||
{
|
||||
case DATA_HIGHLORD_OMOKK:
|
||||
return HighlordOmokk;
|
||||
break;
|
||||
case DATA_SHADOW_HUNTER_VOSHGAJIN:
|
||||
return ShadowHunterVoshgajin;
|
||||
break;
|
||||
case DATA_WARMASTER_VOONE:
|
||||
return WarMasterVoone;
|
||||
break;
|
||||
case DATA_MOTHER_SMOLDERWEB:
|
||||
return MotherSmolderweb;
|
||||
break;
|
||||
case DATA_UROK_DOOMHOWL:
|
||||
return UrokDoomhowl;
|
||||
break;
|
||||
case DATA_QUARTERMASTER_ZIGRIS:
|
||||
return QuartermasterZigris;
|
||||
break;
|
||||
case DATA_GIZRUL_THE_SLAVENER:
|
||||
return GizrultheSlavener;
|
||||
break;
|
||||
case DATA_HALYCON:
|
||||
return Halycon;
|
||||
break;
|
||||
case DATA_OVERLORD_WYRMTHALAK:
|
||||
return OverlordWyrmthalak;
|
||||
break;
|
||||
case DATA_PYROGAURD_EMBERSEER:
|
||||
return PyroguardEmberseer;
|
||||
break;
|
||||
case DATA_WARCHIEF_REND_BLACKHAND:
|
||||
return WarchiefRendBlackhand;
|
||||
break;
|
||||
case DATA_GYTH:
|
||||
return Gyth;
|
||||
break;
|
||||
case DATA_THE_BEAST:
|
||||
return TheBeast;
|
||||
break;
|
||||
case DATA_GENERAL_DRAKKISATH:
|
||||
return GeneralDrakkisath;
|
||||
break;
|
||||
case GO_EMBERSEER_IN:
|
||||
return go_emberseerin;
|
||||
break;
|
||||
case GO_DOORS:
|
||||
return go_doors;
|
||||
break;
|
||||
case GO_EMBERSEER_OUT:
|
||||
return go_emberseerout;
|
||||
break;
|
||||
case GO_HALL_RUNE_1:
|
||||
return go_roomrunes[0];
|
||||
break;
|
||||
case GO_HALL_RUNE_2:
|
||||
return go_roomrunes[1];
|
||||
break;
|
||||
case GO_HALL_RUNE_3:
|
||||
return go_roomrunes[2];
|
||||
break;
|
||||
case GO_HALL_RUNE_4:
|
||||
return go_roomrunes[3];
|
||||
break;
|
||||
case GO_HALL_RUNE_5:
|
||||
return go_roomrunes[4];
|
||||
break;
|
||||
case GO_HALL_RUNE_6:
|
||||
return go_roomrunes[5];
|
||||
break;
|
||||
case GO_HALL_RUNE_7:
|
||||
return go_roomrunes[6];
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_1:
|
||||
return go_emberseerrunes[0];
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_2:
|
||||
return go_emberseerrunes[1];
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_3:
|
||||
return go_emberseerrunes[2];
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_4:
|
||||
return go_emberseerrunes[3];
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_5:
|
||||
return go_emberseerrunes[4];
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_6:
|
||||
return go_emberseerrunes[5];
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_7:
|
||||
return go_emberseerrunes[6];
|
||||
break;
|
||||
case GO_PORTCULLIS_ACTIVE:
|
||||
return go_portcullis_active;
|
||||
break;
|
||||
case GO_PORTCULLIS_TOBOSSROOMS:
|
||||
return go_portcullis_tobossrooms;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
@@ -577,8 +548,6 @@ public:
|
||||
|
||||
protected:
|
||||
EventMap Events;
|
||||
uint32 encounter[EncounterCount];
|
||||
std::string m_strInstData;
|
||||
uint64 HighlordOmokk;
|
||||
uint64 ShadowHunterVoshgajin;
|
||||
uint64 WarMasterVoone;
|
||||
|
||||
@@ -614,7 +614,8 @@ public:
|
||||
}
|
||||
return 50000;
|
||||
case 15:
|
||||
arca->DealDamage(arca, arca->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
if (arca)
|
||||
arca->DealDamage(arca, arca->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
return 5000;
|
||||
default : return 9999999;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ enum Quotes
|
||||
YELL_MADR_INTRO = 1,
|
||||
YELL_MADR_ICE_BLOCK = 2,
|
||||
YELL_MADR_TRAP = 3,
|
||||
YELL_MADR_DEATH = 4,
|
||||
YELL_MADR_DEATH = 4
|
||||
};
|
||||
|
||||
enum Spells
|
||||
@@ -61,18 +61,11 @@ enum Spells
|
||||
SPELL_INTRO_ENCAPSULATE_CHANELLING = 45661
|
||||
};
|
||||
|
||||
#define FELMYST 25038
|
||||
|
||||
class boss_brutallus : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_brutallus() : CreatureScript("boss_brutallus") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_brutallusAI(creature);
|
||||
}
|
||||
|
||||
struct boss_brutallusAI : public ScriptedAI
|
||||
{
|
||||
boss_brutallusAI(Creature* creature) : ScriptedAI(creature)
|
||||
@@ -112,16 +105,14 @@ public:
|
||||
|
||||
DoCast(me, SPELL_DUAL_WIELD, true);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_BRUTALLUS_EVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_BRUTALLUS, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(YELL_AGGRO);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_BRUTALLUS_EVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_BRUTALLUS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -133,13 +124,10 @@ public:
|
||||
{
|
||||
Talk(YELL_DEATH);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(DATA_BRUTALLUS_EVENT, DONE);
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z);
|
||||
me->SummonCreature(FELMYST, x, y, z+30, me->GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
}
|
||||
instance->SetBossState(DATA_BRUTALLUS, DONE);
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z);
|
||||
me->SummonCreature(NPC_FELMYST, x, y, z + 30, me->GetOrientation(), TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
}
|
||||
|
||||
void EnterEvadeMode() OVERRIDE
|
||||
@@ -152,8 +140,8 @@ public:
|
||||
{
|
||||
if (!Intro || IsIntro)
|
||||
return;
|
||||
Creature* Madrigosa = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_MADRIGOSA) : 0);
|
||||
if (Madrigosa)
|
||||
|
||||
if (Creature* Madrigosa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MADRIGOSA)))
|
||||
{
|
||||
Madrigosa->Respawn();
|
||||
Madrigosa->setActive(true);
|
||||
@@ -166,7 +154,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
//Madrigosa not found, end intro
|
||||
// Madrigosa not found, end intro
|
||||
TC_LOG_ERROR("scripts", "Madrigosa was not found");
|
||||
EndIntro();
|
||||
}
|
||||
@@ -188,7 +176,7 @@ public:
|
||||
|
||||
void DoIntro()
|
||||
{
|
||||
Creature* Madrigosa = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_MADRIGOSA) : 0);
|
||||
Creature* Madrigosa = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(DATA_MADRIGOSA) : 0);
|
||||
if (!Madrigosa)
|
||||
return;
|
||||
|
||||
@@ -265,15 +253,16 @@ public:
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
|
||||
{
|
||||
if (!me->IsValidAttackTarget(who))
|
||||
return;
|
||||
if (instance && Intro)
|
||||
instance->SetData(DATA_BRUTALLUS_EVENT, SPECIAL);
|
||||
|
||||
if (Intro)
|
||||
instance->SetBossState(DATA_BRUTALLUS, SPECIAL);
|
||||
|
||||
if (Intro && !IsIntro)
|
||||
StartIntro();
|
||||
|
||||
if (!Intro)
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
@@ -290,15 +279,19 @@ public:
|
||||
{
|
||||
if (IntroFrostBoltTimer <= diff)
|
||||
{
|
||||
if (Creature* Madrigosa = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_MADRIGOSA) : 0))
|
||||
if (Creature* Madrigosa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MADRIGOSA)))
|
||||
{
|
||||
Madrigosa->CastSpell(me, SPELL_INTRO_FROSTBOLT, true);
|
||||
IntroFrostBoltTimer = 2000;
|
||||
}
|
||||
} else IntroFrostBoltTimer -= diff;
|
||||
}
|
||||
else
|
||||
IntroFrostBoltTimer -= diff;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
@@ -341,6 +334,11 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetSunwellPlateauAI<boss_brutallusAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_brutallus()
|
||||
|
||||
@@ -15,12 +15,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Eredar_Twins
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "sunwell_plateau.h"
|
||||
@@ -48,35 +42,35 @@ enum Quotes
|
||||
YELL_ALY_DEAD = 6,
|
||||
YELL_SISTER_SACROLASH_DEAD = 7,
|
||||
YELL_CANFLAGRATION = 8,
|
||||
YELL_BERSERK = 9,
|
||||
YELL_BERSERK = 9
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
//Lady Sacrolash spells
|
||||
SPELL_DARK_TOUCHED = 45347,
|
||||
SPELL_SHADOW_BLADES = 45248, //10 secs
|
||||
SPELL_DARK_STRIKE = 45271,
|
||||
SPELL_SHADOW_NOVA = 45329, //30-35 secs
|
||||
SPELL_CONFOUNDING_BLOW = 45256, //25 secs
|
||||
SPELL_DARK_TOUCHED = 45347,
|
||||
SPELL_SHADOW_BLADES = 45248, //10 secs
|
||||
SPELL_DARK_STRIKE = 45271,
|
||||
SPELL_SHADOW_NOVA = 45329, //30-35 secs
|
||||
SPELL_CONFOUNDING_BLOW = 45256, //25 secs
|
||||
|
||||
//Shadow Image spells
|
||||
SPELL_SHADOW_FURY = 45270,
|
||||
SPELL_IMAGE_VISUAL = 45263,
|
||||
SPELL_SHADOW_FURY = 45270,
|
||||
SPELL_IMAGE_VISUAL = 45263,
|
||||
|
||||
//Misc spells
|
||||
SPELL_ENRAGE = 46587,
|
||||
SPELL_EMPOWER = 45366,
|
||||
SPELL_DARK_FLAME = 45345,
|
||||
SPELL_ENRAGE = 46587,
|
||||
SPELL_EMPOWER = 45366,
|
||||
SPELL_DARK_FLAME = 45345,
|
||||
|
||||
//Grand Warlock Alythess spells
|
||||
SPELL_PYROGENICS = 45230, //15secs
|
||||
SPELL_FLAME_TOUCHED = 45348,
|
||||
SPELL_CONFLAGRATION = 45342, //30-35 secs
|
||||
SPELL_BLAZE = 45235, //on main target every 3 secs
|
||||
SPELL_FLAME_SEAR = 46771,
|
||||
SPELL_BLAZE_SUMMON = 45236, //187366 GO
|
||||
SPELL_BLAZE_BURN = 45246
|
||||
SPELL_PYROGENICS = 45230, //15secs
|
||||
SPELL_FLAME_TOUCHED = 45348,
|
||||
SPELL_CONFLAGRATION = 45342, //30-35 secs
|
||||
SPELL_BLAZE = 45235, //on main target every 3 secs
|
||||
SPELL_FLAME_SEAR = 46771,
|
||||
SPELL_BLAZE_SUMMON = 45236, //187366 GO
|
||||
SPELL_BLAZE_BURN = 45246
|
||||
};
|
||||
|
||||
class boss_sacrolash : public CreatureScript
|
||||
@@ -84,11 +78,6 @@ class boss_sacrolash : public CreatureScript
|
||||
public:
|
||||
boss_sacrolash() : CreatureScript("boss_sacrolash") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_sacrolashAI(creature);
|
||||
};
|
||||
|
||||
struct boss_sacrolashAI : public ScriptedAI
|
||||
{
|
||||
boss_sacrolashAI(Creature* creature) : ScriptedAI(creature)
|
||||
@@ -112,15 +101,12 @@ public:
|
||||
{
|
||||
Enraged = false;
|
||||
|
||||
if (instance)
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ALYTHESS)))
|
||||
{
|
||||
if (Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ALYTHESS)))
|
||||
{
|
||||
if (temp->isDead())
|
||||
temp->Respawn();
|
||||
else if (temp->GetVictim())
|
||||
me->getThreatManager().addThreat(temp->GetVictim(), 0.0f);
|
||||
}
|
||||
if (temp->isDead())
|
||||
temp->Respawn();
|
||||
else if (temp->GetVictim())
|
||||
me->getThreatManager().addThreat(temp->GetVictim(), 0.0f);
|
||||
}
|
||||
|
||||
if (!me->IsInCombat())
|
||||
@@ -131,27 +117,21 @@ public:
|
||||
ShadowimageTimer = 20000;
|
||||
ConflagrationTimer = 30000;
|
||||
EnrageTimer = 360000;
|
||||
|
||||
SisterDeath = false;
|
||||
}
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_EREDAR_TWINS_EVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_EREDAR_TWINS, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) OVERRIDE
|
||||
{
|
||||
DoZoneInCombat();
|
||||
|
||||
if (instance)
|
||||
{
|
||||
Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_ALYTHESS));
|
||||
if (temp && temp->IsAlive() && !temp->GetVictim())
|
||||
temp->AI()->AttackStart(who);
|
||||
}
|
||||
Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ALYTHESS));
|
||||
if (temp && temp->IsAlive() && !temp->GetVictim())
|
||||
temp->AI()->AttackStart(who);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_EREDAR_TWINS_EVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_EREDAR_TWINS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -167,8 +147,7 @@ public:
|
||||
{
|
||||
Talk(YELL_SAC_DEAD);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_EREDAR_TWINS_EVENT, DONE);
|
||||
instance->SetBossState(DATA_EREDAR_TWINS, DONE);
|
||||
}
|
||||
else
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
@@ -178,15 +157,15 @@ public:
|
||||
{
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_SHADOW_BLADES:
|
||||
case SPELL_SHADOW_NOVA:
|
||||
case SPELL_CONFOUNDING_BLOW:
|
||||
case SPELL_SHADOW_FURY:
|
||||
HandleTouchedSpells(target, SPELL_DARK_TOUCHED);
|
||||
break;
|
||||
case SPELL_CONFLAGRATION:
|
||||
HandleTouchedSpells(target, SPELL_FLAME_TOUCHED);
|
||||
break;
|
||||
case SPELL_SHADOW_BLADES:
|
||||
case SPELL_SHADOW_NOVA:
|
||||
case SPELL_CONFOUNDING_BLOW:
|
||||
case SPELL_SHADOW_FURY:
|
||||
HandleTouchedSpells(target, SPELL_DARK_TOUCHED);
|
||||
break;
|
||||
case SPELL_CONFLAGRATION:
|
||||
HandleTouchedSpells(target, SPELL_FLAME_TOUCHED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,26 +173,26 @@ public:
|
||||
{
|
||||
switch (TouchedType)
|
||||
{
|
||||
case SPELL_FLAME_TOUCHED:
|
||||
if (!target->HasAura(SPELL_DARK_FLAME))
|
||||
{
|
||||
if (target->HasAura(SPELL_DARK_TOUCHED))
|
||||
case SPELL_FLAME_TOUCHED:
|
||||
if (!target->HasAura(SPELL_DARK_FLAME))
|
||||
{
|
||||
target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED);
|
||||
target->CastSpell(target, SPELL_DARK_FLAME, true);
|
||||
} else target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
|
||||
}
|
||||
break;
|
||||
case SPELL_DARK_TOUCHED:
|
||||
if (!target->HasAura(SPELL_DARK_FLAME))
|
||||
{
|
||||
if (target->HasAura(SPELL_FLAME_TOUCHED))
|
||||
if (target->HasAura(SPELL_DARK_TOUCHED))
|
||||
{
|
||||
target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED);
|
||||
target->CastSpell(target, SPELL_DARK_FLAME, true);
|
||||
} else target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
|
||||
}
|
||||
break;
|
||||
case SPELL_DARK_TOUCHED:
|
||||
if (!target->HasAura(SPELL_DARK_FLAME))
|
||||
{
|
||||
target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
|
||||
target->CastSpell(target, SPELL_DARK_FLAME, true);
|
||||
} else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
|
||||
}
|
||||
break;
|
||||
if (target->HasAura(SPELL_FLAME_TOUCHED))
|
||||
{
|
||||
target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
|
||||
target->CastSpell(target, SPELL_DARK_FLAME, true);
|
||||
} else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,17 +200,13 @@ public:
|
||||
{
|
||||
if (!SisterDeath)
|
||||
{
|
||||
if (instance)
|
||||
Unit* Temp = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_ALYTHESS));
|
||||
if (Temp && Temp->isDead())
|
||||
{
|
||||
Unit* Temp = NULL;
|
||||
Temp = Unit::GetUnit(*me, instance->GetData64(DATA_ALYTHESS));
|
||||
if (Temp && Temp->isDead())
|
||||
{
|
||||
Talk(YELL_SISTER_ALYTHESS_DEAD);
|
||||
DoCast(me, SPELL_EMPOWER);
|
||||
me->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||
SisterDeath = true;
|
||||
}
|
||||
Talk(YELL_SISTER_ALYTHESS_DEAD);
|
||||
DoCast(me, SPELL_EMPOWER);
|
||||
me->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||
SisterDeath = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,9 +220,7 @@ public:
|
||||
if (!me->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
me->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CONFLAGRATION);
|
||||
ConflagrationTimer = 30000+(rand()%5000);
|
||||
}
|
||||
@@ -259,8 +232,7 @@ public:
|
||||
{
|
||||
if (!me->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
DoCast(target, SPELL_SHADOW_NOVA);
|
||||
|
||||
@@ -279,9 +251,7 @@ public:
|
||||
{
|
||||
if (!me->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_CONFOUNDING_BLOW);
|
||||
ConfoundingblowTimer = 20000 + (rand()%5000);
|
||||
}
|
||||
@@ -297,7 +267,7 @@ public:
|
||||
temp = DoSpawnCreature(NPC_SHADOW_IMAGE, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 10000);
|
||||
if (temp && target)
|
||||
{
|
||||
temp->AddThreat(target, 1000000);//don't change target(healers)
|
||||
temp->AddThreat(target, 1000000); //don't change target(healers)
|
||||
temp->AI()->AttackStart(target);
|
||||
}
|
||||
}
|
||||
@@ -333,6 +303,11 @@ public:
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetSunwellPlateauAI<boss_sacrolashAI>(creature);
|
||||
};
|
||||
};
|
||||
|
||||
class boss_alythess : public CreatureScript
|
||||
@@ -340,11 +315,6 @@ class boss_alythess : public CreatureScript
|
||||
public:
|
||||
boss_alythess() : CreatureScript("boss_alythess") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_alythessAI(creature);
|
||||
};
|
||||
|
||||
struct boss_alythessAI : public ScriptedAI
|
||||
{
|
||||
boss_alythessAI(Creature* creature) : ScriptedAI(creature)
|
||||
@@ -374,15 +344,12 @@ public:
|
||||
{
|
||||
Enraged = false;
|
||||
|
||||
if (instance)
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SACROLASH)))
|
||||
{
|
||||
if (Creature* temp = Unit::GetCreature((*me), instance->GetData64(DATA_SACROLASH)))
|
||||
{
|
||||
if (temp->isDead())
|
||||
temp->Respawn();
|
||||
else if (temp->GetVictim())
|
||||
me->getThreatManager().addThreat(temp->GetVictim(), 0.0f);
|
||||
}
|
||||
if (temp->isDead())
|
||||
temp->Respawn();
|
||||
else if (temp->GetVictim())
|
||||
me->getThreatManager().addThreat(temp->GetVictim(), 0.0f);
|
||||
}
|
||||
|
||||
if (!me->IsInCombat())
|
||||
@@ -398,23 +365,18 @@ public:
|
||||
SisterDeath = false;
|
||||
}
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_EREDAR_TWINS_EVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_EREDAR_TWINS, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) OVERRIDE
|
||||
{
|
||||
DoZoneInCombat();
|
||||
|
||||
if (instance)
|
||||
{
|
||||
Creature* temp = Unit::GetCreature(*me, instance->GetData64(DATA_SACROLASH));
|
||||
if (temp && temp->IsAlive() && !temp->GetVictim())
|
||||
temp->AI()->AttackStart(who);
|
||||
}
|
||||
Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SACROLASH));
|
||||
if (temp && temp->IsAlive() && !temp->GetVictim())
|
||||
temp->AI()->AttackStart(who);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_EREDAR_TWINS_EVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_EREDAR_TWINS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) OVERRIDE
|
||||
@@ -424,7 +386,6 @@ public:
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
|
||||
{
|
||||
if (!who || me->GetVictim())
|
||||
return;
|
||||
@@ -441,17 +402,13 @@ public:
|
||||
}
|
||||
}
|
||||
else if (IntroStepCounter == 10 && me->IsWithinLOSInMap(who)&& me->IsWithinDistInMap(who, 30))
|
||||
{
|
||||
IntroStepCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
{
|
||||
if (rand()%4 == 0)
|
||||
{
|
||||
Talk(YELL_ALY_KILL);
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
@@ -459,9 +416,7 @@ public:
|
||||
if (SisterDeath)
|
||||
{
|
||||
Talk(YELL_ALY_DEAD);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_EREDAR_TWINS_EVENT, DONE);
|
||||
instance->SetBossState(DATA_EREDAR_TWINS, DONE);
|
||||
}
|
||||
else
|
||||
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
@@ -471,16 +426,16 @@ public:
|
||||
{
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_BLAZE:
|
||||
target->CastSpell(target, SPELL_BLAZE_SUMMON, true);
|
||||
break;
|
||||
case SPELL_CONFLAGRATION:
|
||||
case SPELL_FLAME_SEAR:
|
||||
HandleTouchedSpells(target, SPELL_FLAME_TOUCHED);
|
||||
break;
|
||||
case SPELL_SHADOW_NOVA:
|
||||
HandleTouchedSpells(target, SPELL_DARK_TOUCHED);
|
||||
break;
|
||||
case SPELL_BLAZE:
|
||||
target->CastSpell(target, SPELL_BLAZE_SUMMON, true);
|
||||
break;
|
||||
case SPELL_CONFLAGRATION:
|
||||
case SPELL_FLAME_SEAR:
|
||||
HandleTouchedSpells(target, SPELL_FLAME_TOUCHED);
|
||||
break;
|
||||
case SPELL_SHADOW_NOVA:
|
||||
HandleTouchedSpells(target, SPELL_DARK_TOUCHED);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -488,58 +443,68 @@ public:
|
||||
{
|
||||
switch (TouchedType)
|
||||
{
|
||||
case SPELL_FLAME_TOUCHED:
|
||||
if (!target->HasAura(SPELL_DARK_FLAME))
|
||||
{
|
||||
if (target->HasAura(SPELL_DARK_TOUCHED))
|
||||
case SPELL_FLAME_TOUCHED:
|
||||
if (!target->HasAura(SPELL_DARK_FLAME))
|
||||
{
|
||||
target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED);
|
||||
target->CastSpell(target, SPELL_DARK_FLAME, true);
|
||||
}else
|
||||
{
|
||||
target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
|
||||
if (target->HasAura(SPELL_DARK_TOUCHED))
|
||||
{
|
||||
target->RemoveAurasDueToSpell(SPELL_DARK_TOUCHED);
|
||||
target->CastSpell(target, SPELL_DARK_FLAME, true);
|
||||
}
|
||||
else
|
||||
target->CastSpell(target, SPELL_FLAME_TOUCHED, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SPELL_DARK_TOUCHED:
|
||||
if (!target->HasAura(SPELL_DARK_FLAME))
|
||||
{
|
||||
if (target->HasAura(SPELL_FLAME_TOUCHED))
|
||||
break;
|
||||
case SPELL_DARK_TOUCHED:
|
||||
if (!target->HasAura(SPELL_DARK_FLAME))
|
||||
{
|
||||
target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
|
||||
target->CastSpell(target, SPELL_DARK_FLAME, true);
|
||||
} else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
|
||||
}
|
||||
break;
|
||||
if (target->HasAura(SPELL_FLAME_TOUCHED))
|
||||
{
|
||||
target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
|
||||
target->CastSpell(target, SPELL_DARK_FLAME, true);
|
||||
}
|
||||
else
|
||||
target->CastSpell(target, SPELL_DARK_TOUCHED, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 IntroStep(uint32 step)
|
||||
{
|
||||
Creature* Sacrolash = Unit::GetCreature(*me, instance ? instance->GetData64(DATA_SACROLASH) : 0);
|
||||
Creature* Sacrolash = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SACROLASH));
|
||||
switch (step)
|
||||
{
|
||||
case 0: return 0;
|
||||
case 1:
|
||||
if (Sacrolash)
|
||||
Sacrolash->AI()->Talk(YELL_INTRO_SAC_1);
|
||||
return 1000;
|
||||
case 2: Talk(YELL_INTRO_ALY_2); return 1000;
|
||||
case 3:
|
||||
if (Sacrolash)
|
||||
Sacrolash->AI()->Talk(YELL_INTRO_SAC_3);
|
||||
return 2000;
|
||||
case 4: Talk(YELL_INTRO_ALY_4); return 1000;
|
||||
case 5:
|
||||
if (Sacrolash)
|
||||
Sacrolash->AI()->Talk(YELL_INTRO_SAC_5);
|
||||
return 2000;
|
||||
case 6: Talk(YELL_INTRO_ALY_6); return 1000;
|
||||
case 7:
|
||||
if (Sacrolash)
|
||||
Sacrolash->AI()->Talk(YELL_INTRO_SAC_7);
|
||||
return 3000;
|
||||
case 8: Talk(YELL_INTRO_ALY_8); return 900000;
|
||||
case 0:
|
||||
return 0;
|
||||
case 1:
|
||||
if (Sacrolash)
|
||||
Sacrolash->AI()->Talk(YELL_INTRO_SAC_1);
|
||||
return 1000;
|
||||
case 2:
|
||||
Talk(YELL_INTRO_ALY_2);
|
||||
return 1000;
|
||||
case 3:
|
||||
if (Sacrolash)
|
||||
Sacrolash->AI()->Talk(YELL_INTRO_SAC_3);
|
||||
return 2000;
|
||||
case 4:
|
||||
Talk(YELL_INTRO_ALY_4);
|
||||
return 1000;
|
||||
case 5:
|
||||
if (Sacrolash)
|
||||
Sacrolash->AI()->Talk(YELL_INTRO_SAC_5);
|
||||
return 2000;
|
||||
case 6:
|
||||
Talk(YELL_INTRO_ALY_6);
|
||||
return 1000;
|
||||
case 7:
|
||||
if (Sacrolash)
|
||||
Sacrolash->AI()->Talk(YELL_INTRO_SAC_7);
|
||||
return 3000;
|
||||
case 8:
|
||||
Talk(YELL_INTRO_ALY_8);
|
||||
return 900000;
|
||||
}
|
||||
return 10000;
|
||||
}
|
||||
@@ -556,30 +521,23 @@ public:
|
||||
|
||||
if (!SisterDeath)
|
||||
{
|
||||
if (instance)
|
||||
Unit* Temp = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_SACROLASH));
|
||||
if (Temp && Temp->isDead())
|
||||
{
|
||||
Unit* Temp = NULL;
|
||||
Temp = Unit::GetUnit(*me, instance->GetData64(DATA_SACROLASH));
|
||||
if (Temp && Temp->isDead())
|
||||
{
|
||||
Talk(YELL_SISTER_SACROLASH_DEAD);
|
||||
DoCast(me, SPELL_EMPOWER);
|
||||
me->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||
SisterDeath = true;
|
||||
}
|
||||
Talk(YELL_SISTER_SACROLASH_DEAD);
|
||||
DoCast(me, SPELL_EMPOWER);
|
||||
me->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||
SisterDeath = true;
|
||||
}
|
||||
}
|
||||
if (!me->GetVictim())
|
||||
{
|
||||
if (instance)
|
||||
Creature* sisiter = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SACROLASH));
|
||||
if (sisiter && !sisiter->isDead() && sisiter->GetVictim())
|
||||
{
|
||||
Creature* sisiter = Unit::GetCreature((*me), instance->GetData64(DATA_SACROLASH));
|
||||
if (sisiter && !sisiter->isDead() && sisiter->GetVictim())
|
||||
{
|
||||
me->AddThreat(sisiter->GetVictim(), 0.0f);
|
||||
DoStartNoMovement(sisiter->GetVictim());
|
||||
me->Attack(sisiter->GetVictim(), false);
|
||||
}
|
||||
me->AddThreat(sisiter->GetVictim(), 0.0f);
|
||||
DoStartNoMovement(sisiter->GetVictim());
|
||||
me->Attack(sisiter->GetVictim(), false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -592,9 +550,7 @@ public:
|
||||
{
|
||||
if (!me->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
DoCast(target, SPELL_SHADOW_NOVA);
|
||||
ShadownovaTimer= 30000+(rand()%5000);
|
||||
}
|
||||
@@ -607,8 +563,7 @@ public:
|
||||
if (!me->IsNonMeleeSpellCasted(false))
|
||||
{
|
||||
me->InterruptSpell(CURRENT_GENERIC_SPELL);
|
||||
Unit* target = NULL;
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);
|
||||
if (target)
|
||||
DoCast(target, SPELL_CONFLAGRATION);
|
||||
ConflagrationTimer = 30000+(rand()%5000);
|
||||
@@ -661,6 +616,11 @@ public:
|
||||
} else EnrageTimer -= diff;
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetSunwellPlateauAI<boss_alythessAI>(creature);
|
||||
};
|
||||
};
|
||||
|
||||
class npc_shadow_image : public CreatureScript
|
||||
@@ -689,23 +649,23 @@ public:
|
||||
KillTimer = 15000;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)OVERRIDE { }
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void SpellHitTarget(Unit* target, const SpellInfo* spell) OVERRIDE
|
||||
{
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_SHADOW_FURY:
|
||||
case SPELL_DARK_STRIKE:
|
||||
if (!target->HasAura(SPELL_DARK_FLAME))
|
||||
{
|
||||
if (target->HasAura(SPELL_FLAME_TOUCHED))
|
||||
case SPELL_SHADOW_FURY:
|
||||
case SPELL_DARK_STRIKE:
|
||||
if (!target->HasAura(SPELL_DARK_FLAME))
|
||||
{
|
||||
target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
|
||||
target->CastSpell(target, SPELL_DARK_FLAME, true);
|
||||
} else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
|
||||
}
|
||||
break;
|
||||
if (target->HasAura(SPELL_FLAME_TOUCHED))
|
||||
{
|
||||
target->RemoveAurasDueToSpell(SPELL_FLAME_TOUCHED);
|
||||
target->CastSpell(target, SPELL_DARK_FLAME, true);
|
||||
} else target->CastSpell(target, SPELL_DARK_TOUCHED, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,14 +81,14 @@ enum Spells
|
||||
//Other
|
||||
SPELL_BERSERK = 45078,
|
||||
SPELL_CLOUD_VISUAL = 45212,
|
||||
SPELL_CLOUD_SUMMON = 45884,
|
||||
SPELL_CLOUD_SUMMON = 45884
|
||||
};
|
||||
|
||||
enum PhaseFelmyst
|
||||
{
|
||||
PHASE_NONE,
|
||||
PHASE_GROUND,
|
||||
PHASE_FLIGHT,
|
||||
PHASE_FLIGHT
|
||||
};
|
||||
|
||||
enum EventFelmyst
|
||||
@@ -104,7 +104,7 @@ enum EventFelmyst
|
||||
|
||||
EVENT_FLIGHT_SEQUENCE,
|
||||
EVENT_SUMMON_DEAD,
|
||||
EVENT_SUMMON_FOG,
|
||||
EVENT_SUMMON_FOG
|
||||
};
|
||||
|
||||
class boss_felmyst : public CreatureScript
|
||||
@@ -112,11 +112,6 @@ class boss_felmyst : public CreatureScript
|
||||
public:
|
||||
boss_felmyst() : CreatureScript("boss_felmyst") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_felmystAI(creature);
|
||||
}
|
||||
|
||||
struct boss_felmystAI : public ScriptedAI
|
||||
{
|
||||
boss_felmystAI(Creature* creature) : ScriptedAI(creature)
|
||||
@@ -148,8 +143,7 @@ public:
|
||||
DespawnSummons(NPC_VAPOR_TRAIL);
|
||||
me->setActive(false);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_FELMYST_EVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_FELMYST, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
@@ -162,8 +156,7 @@ public:
|
||||
DoCast(me, AURA_NOXIOUS_FUMES, true);
|
||||
EnterPhase(PHASE_GROUND);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_FELMYST_EVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_FELMYST, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) OVERRIDE
|
||||
@@ -173,7 +166,6 @@ public:
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
|
||||
{
|
||||
if (phase != PHASE_FLIGHT)
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
@@ -193,8 +185,7 @@ public:
|
||||
{
|
||||
Talk(YELL_DEATH);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_FELMYST_EVENT, DONE);
|
||||
instance->SetBossState(DATA_FELMYST, DONE);
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
|
||||
@@ -246,26 +237,26 @@ public:
|
||||
{
|
||||
switch (NextPhase)
|
||||
{
|
||||
case PHASE_GROUND:
|
||||
me->CastStop(SPELL_FOG_BREATH);
|
||||
me->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
|
||||
me->StopMoving();
|
||||
me->SetSpeed(MOVE_RUN, 2.0f);
|
||||
case PHASE_GROUND:
|
||||
me->CastStop(SPELL_FOG_BREATH);
|
||||
me->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
|
||||
me->StopMoving();
|
||||
me->SetSpeed(MOVE_RUN, 2.0f);
|
||||
|
||||
events.ScheduleEvent(EVENT_CLEAVE, urand(5000, 10000));
|
||||
events.ScheduleEvent(EVENT_CORROSION, urand(10000, 20000));
|
||||
events.ScheduleEvent(EVENT_GAS_NOVA, urand(15000, 20000));
|
||||
events.ScheduleEvent(EVENT_ENCAPSULATE, urand(20000, 25000));
|
||||
events.ScheduleEvent(EVENT_FLIGHT, 60000);
|
||||
break;
|
||||
case PHASE_FLIGHT:
|
||||
me->SetDisableGravity(true);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1000);
|
||||
uiFlightCount = 0;
|
||||
uiBreathCount = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
events.ScheduleEvent(EVENT_CLEAVE, urand(5000, 10000));
|
||||
events.ScheduleEvent(EVENT_CORROSION, urand(10000, 20000));
|
||||
events.ScheduleEvent(EVENT_GAS_NOVA, urand(15000, 20000));
|
||||
events.ScheduleEvent(EVENT_ENCAPSULATE, urand(20000, 25000));
|
||||
events.ScheduleEvent(EVENT_FLIGHT, 60000);
|
||||
break;
|
||||
case PHASE_FLIGHT:
|
||||
me->SetDisableGravity(true);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1000);
|
||||
uiFlightCount = 0;
|
||||
uiBreathCount = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
phase = NextPhase;
|
||||
}
|
||||
@@ -274,133 +265,131 @@ public:
|
||||
{
|
||||
switch (uiFlightCount)
|
||||
{
|
||||
case 0:
|
||||
//me->AttackStop();
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||
me->StopMoving();
|
||||
Talk(YELL_TAKEOFF);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 2000);
|
||||
break;
|
||||
case 1:
|
||||
me->GetMotionMaster()->MovePoint(0, me->GetPositionX()+1, me->GetPositionY(), me->GetPositionZ()+10);
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||
if (!target)
|
||||
target = Unit::GetUnit(*me, instance ? instance->GetData64(DATA_PLAYER_GUID) : 0);
|
||||
|
||||
if (!target)
|
||||
case 0:
|
||||
//me->AttackStop();
|
||||
me->GetMotionMaster()->Clear(false);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
|
||||
me->StopMoving();
|
||||
Talk(YELL_TAKEOFF);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 2000);
|
||||
break;
|
||||
case 1:
|
||||
me->GetMotionMaster()->MovePoint(0, me->GetPositionX()+1, me->GetPositionY(), me->GetPositionZ()+10);
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||
if (!target)
|
||||
target = Unit::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
|
||||
|
||||
Creature* Vapor = me->SummonCreature(NPC_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
|
||||
if (Vapor)
|
||||
if (!target)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
if (Creature* Vapor = me->SummonCreature(NPC_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000))
|
||||
{
|
||||
Vapor->AI()->AttackStart(target);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
|
||||
Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
|
||||
}
|
||||
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
Vapor->AI()->AttackStart(target);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(Vapor, SPELL_VAPOR_CHANNEL, false); // core bug
|
||||
Vapor->CastSpell(Vapor, SPELL_VAPOR_TRIGGER, true);
|
||||
DespawnSummons(NPC_VAPOR_TRAIL);
|
||||
//DoCast(me, SPELL_VAPOR_SELECT); need core support
|
||||
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||
if (!target)
|
||||
target = Unit::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
|
||||
|
||||
if (!target)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
//target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support
|
||||
if (Creature* pVapor = me->SummonCreature(NPC_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000))
|
||||
{
|
||||
if (pVapor->AI())
|
||||
pVapor->AI()->AttackStart(target);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(pVapor, SPELL_VAPOR_CHANNEL, false); // core bug
|
||||
pVapor->CastSpell(pVapor, SPELL_VAPOR_TRIGGER, true);
|
||||
}
|
||||
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
|
||||
break;
|
||||
}
|
||||
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
DespawnSummons(NPC_VAPOR_TRAIL);
|
||||
//DoCast(me, SPELL_VAPOR_SELECT); need core support
|
||||
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||
if (!target)
|
||||
target = Unit::GetUnit(*me, instance ? instance->GetData64(DATA_PLAYER_GUID) : 0);
|
||||
|
||||
if (!target)
|
||||
case 4:
|
||||
DespawnSummons(NPC_VAPOR_TRAIL);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1);
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||
if (!target)
|
||||
target = Unit::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
|
||||
|
||||
//target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support
|
||||
Creature* pVapor = me->SummonCreature(NPC_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000);
|
||||
if (pVapor)
|
||||
if (!target)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
breathX = target->GetPositionX();
|
||||
breathY = target->GetPositionY();
|
||||
float x, y, z;
|
||||
target->GetContactPoint(me, x, y, z, 70);
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z+10);
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
me->SetOrientation(me->GetAngle(breathX, breathY));
|
||||
me->StopMoving();
|
||||
//DoTextEmote("takes a deep breath.", NULL);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
|
||||
break;
|
||||
case 7:
|
||||
{
|
||||
if (pVapor->AI())
|
||||
pVapor->AI()->AttackStart(target);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
DoCast(pVapor, SPELL_VAPOR_CHANNEL, false); // core bug
|
||||
pVapor->CastSpell(pVapor, SPELL_VAPOR_TRIGGER, true);
|
||||
DoCast(me, SPELL_FOG_BREATH, true);
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z);
|
||||
x = 2 * breathX - x;
|
||||
y = 2 * breathY - y;
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
events.ScheduleEvent(EVENT_SUMMON_FOG, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
DespawnSummons(NPC_VAPOR_TRAIL);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1);
|
||||
break;
|
||||
case 5:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||
if (!target)
|
||||
target = Unit::GetUnit(*me, instance ? instance->GetData64(DATA_PLAYER_GUID) : 0);
|
||||
|
||||
if (!target)
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
breathX = target->GetPositionX();
|
||||
breathY = target->GetPositionY();
|
||||
float x, y, z;
|
||||
target->GetContactPoint(me, x, y, z, 70);
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z+10);
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
me->SetOrientation(me->GetAngle(breathX, breathY));
|
||||
me->StopMoving();
|
||||
//DoTextEmote("takes a deep breath.", NULL);
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000);
|
||||
break;
|
||||
case 7:
|
||||
{
|
||||
DoCast(me, SPELL_FOG_BREATH, true);
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z);
|
||||
x = 2 * breathX - x;
|
||||
y = 2 * breathY - y;
|
||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
events.ScheduleEvent(EVENT_SUMMON_FOG, 1);
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
me->CastStop(SPELL_FOG_BREATH);
|
||||
me->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
|
||||
++uiBreathCount;
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1);
|
||||
if (uiBreathCount < 3)
|
||||
uiFlightCount = 4;
|
||||
break;
|
||||
case 9:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO))
|
||||
DoStartMovement(target);
|
||||
else
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
me->SetDisableGravity(false);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
|
||||
EnterPhase(PHASE_GROUND);
|
||||
AttackStart(SelectTarget(SELECT_TARGET_TOPAGGRO));
|
||||
break;
|
||||
case 8:
|
||||
me->CastStop(SPELL_FOG_BREATH);
|
||||
me->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
|
||||
++uiBreathCount;
|
||||
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1);
|
||||
if (uiBreathCount < 3)
|
||||
uiFlightCount = 4;
|
||||
break;
|
||||
case 9:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_TOPAGGRO))
|
||||
DoStartMovement(target);
|
||||
else
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
me->SetDisableGravity(false);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_LAND);
|
||||
EnterPhase(PHASE_GROUND);
|
||||
AttackStart(SelectTarget(SELECT_TARGET_TOPAGGRO));
|
||||
break;
|
||||
}
|
||||
++uiFlightCount;
|
||||
}
|
||||
@@ -512,6 +501,11 @@ public:
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetSunwellPlateauAI<boss_felmystAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_felmyst_vapor : public CreatureScript
|
||||
@@ -531,12 +525,14 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetSpeed(MOVE_RUN, 0.8f);
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE { }
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
DoZoneInCombat();
|
||||
//DoCast(me, SPELL_VAPOR_FORCE, true); core bug
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) OVERRIDE
|
||||
{
|
||||
if (!me->GetVictim())
|
||||
@@ -565,6 +561,7 @@ public:
|
||||
me->SetTarget(me->GetGUID());
|
||||
me->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 0.01f); // core bug
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE { }
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE { }
|
||||
void AttackStart(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
@@ -44,7 +44,7 @@ enum Yells
|
||||
|
||||
SAY_GOOD_AGGRO = 0,
|
||||
SAY_GOOD_NEAR_DEATH = 1,
|
||||
SAY_GOOD_NEAR_DEATH2 = 2,
|
||||
SAY_GOOD_NEAR_DEATH2 = 2
|
||||
};
|
||||
|
||||
enum Spells
|
||||
@@ -76,20 +76,20 @@ enum Spells
|
||||
enum SWPActions
|
||||
{
|
||||
DO_ENRAGE = 1,
|
||||
DO_BANISH = 2,
|
||||
DO_BANISH = 2
|
||||
};
|
||||
|
||||
#define GO_FAILED "You are unable to use this currently."
|
||||
|
||||
#define EMOTE_UNABLE_TO_FIND "is unable to find Kalecgos"
|
||||
|
||||
#define FLY_X 1679
|
||||
#define FLY_Y 900
|
||||
#define FLY_Z 82
|
||||
#define FLY_X 1679
|
||||
#define FLY_Y 900
|
||||
#define FLY_Z 82
|
||||
|
||||
#define CENTER_X 1705
|
||||
#define CENTER_Y 930
|
||||
#define RADIUS 30
|
||||
#define CENTER_X 1705
|
||||
#define CENTER_Y 930
|
||||
#define RADIUS 30
|
||||
|
||||
#define DRAGON_REALM_Z 53.079f
|
||||
#define DEMON_REALM_Z -74.558f
|
||||
@@ -103,11 +103,6 @@ class boss_kalecgos : public CreatureScript
|
||||
public:
|
||||
boss_kalecgos() : CreatureScript("boss_kalecgos") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_kalecgosAI(creature);
|
||||
}
|
||||
|
||||
struct boss_kalecgosAI : public ScriptedAI
|
||||
{
|
||||
boss_kalecgosAI(Creature* creature) : ScriptedAI(creature)
|
||||
@@ -141,13 +136,10 @@ public:
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
SathGUID = instance->GetData64(DATA_SATHROVARR);
|
||||
instance->SetData(DATA_KALECGOS_EVENT, NOT_STARTED);
|
||||
}
|
||||
SathGUID = instance->GetData64(DATA_SATHROVARR);
|
||||
instance->SetBossState(DATA_KALECGOS, NOT_STARTED);
|
||||
|
||||
if (Creature* Sath = Unit::GetCreature(*me, SathGUID))
|
||||
if (Creature* Sath = ObjectAccessor::GetCreature(*me, SathGUID))
|
||||
Sath->AI()->EnterEvadeMode();
|
||||
|
||||
me->setFaction(14);
|
||||
@@ -158,7 +150,7 @@ public:
|
||||
me->SetVisible(true);
|
||||
me->SetStandState(UNIT_STAND_STATE_SLEEP);
|
||||
}
|
||||
me->SetFullHealth();//dunno why it does not resets health at evade..
|
||||
me->SetFullHealth(); //dunno why it does not resets health at evade..
|
||||
ArcaneBuffetTimer = 8000;
|
||||
FrostBreathTimer = 15000;
|
||||
WildMagicTimer = 10000;
|
||||
@@ -234,6 +226,7 @@ public:
|
||||
} else ResetTimer -= diff;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
@@ -246,13 +239,13 @@ public:
|
||||
}
|
||||
if (HealthBelowPct(10) && !isEnraged)
|
||||
{
|
||||
if (Creature* Sath = Unit::GetCreature(*me, SathGUID))
|
||||
if (Creature* Sath = ObjectAccessor::GetCreature(*me, SathGUID))
|
||||
Sath->AI()->DoAction(DO_ENRAGE);
|
||||
DoAction(DO_ENRAGE);
|
||||
}
|
||||
if (!isBanished && HealthBelowPct(1))
|
||||
{
|
||||
if (Creature* Sath = Unit::GetCreature(*me, SathGUID))
|
||||
if (Creature* Sath = ObjectAccessor::GetCreature(*me, SathGUID))
|
||||
{
|
||||
if (Sath->HasAura(SPELL_BANISH))
|
||||
{
|
||||
@@ -317,6 +310,7 @@ public:
|
||||
SpectralBlastTimer = 1000;
|
||||
return;
|
||||
}
|
||||
|
||||
std::list<Unit*>::const_iterator i = targetList.begin();
|
||||
advance(i, rand()%targetList.size());
|
||||
if ((*i))
|
||||
@@ -331,7 +325,6 @@ public:
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
|
||||
{
|
||||
if (bJustReset)//boss is invisible, don't attack
|
||||
return;
|
||||
@@ -356,8 +349,7 @@ public:
|
||||
Talk(SAY_EVIL_AGGRO);
|
||||
DoZoneInCombat();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_KALECGOS_EVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_KALECGOS, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -396,21 +388,21 @@ public:
|
||||
{
|
||||
switch (TalkSequence)
|
||||
{
|
||||
case 1:
|
||||
me->setFaction(35);
|
||||
TalkTimer = 1000;
|
||||
break;
|
||||
case 2:
|
||||
Talk(SAY_GOOD_PLRWIN);
|
||||
TalkTimer = 10000;
|
||||
break;
|
||||
case 3:
|
||||
me->SetDisableGravity(true);
|
||||
me->GetMotionMaster()->MovePoint(0, FLY_X, FLY_Y, FLY_Z);
|
||||
TalkTimer = 600000;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case 1:
|
||||
me->setFaction(35);
|
||||
TalkTimer = 1000;
|
||||
break;
|
||||
case 2:
|
||||
Talk(SAY_GOOD_PLRWIN);
|
||||
TalkTimer = 10000;
|
||||
break;
|
||||
case 3:
|
||||
me->SetDisableGravity(true);
|
||||
me->GetMotionMaster()->MovePoint(0, FLY_X, FLY_Y, FLY_Z);
|
||||
TalkTimer = 600000;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -418,23 +410,28 @@ public:
|
||||
{
|
||||
switch (TalkSequence)
|
||||
{
|
||||
case 1:
|
||||
Talk(SAY_EVIL_ENRAGE);
|
||||
TalkTimer = 3000;
|
||||
break;
|
||||
case 2:
|
||||
me->SetDisableGravity(true);
|
||||
me->GetMotionMaster()->MovePoint(0, FLY_X, FLY_Y, FLY_Z);
|
||||
TalkTimer = 15000;
|
||||
break;
|
||||
case 3:
|
||||
EnterEvadeMode();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case 1:
|
||||
Talk(SAY_EVIL_ENRAGE);
|
||||
TalkTimer = 3000;
|
||||
break;
|
||||
case 2:
|
||||
me->SetDisableGravity(true);
|
||||
me->GetMotionMaster()->MovePoint(0, FLY_X, FLY_Y, FLY_Z);
|
||||
TalkTimer = 15000;
|
||||
break;
|
||||
case 3:
|
||||
EnterEvadeMode();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetSunwellPlateauAI<boss_kalecgosAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class boss_kalec : public CreatureScript
|
||||
@@ -490,6 +487,7 @@ public:
|
||||
{
|
||||
if (!me->HasAura(AURA_SPECTRAL_INVISIBILITY))
|
||||
me->CastSpell(me, AURA_SPECTRAL_INVISIBILITY, true);
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
@@ -497,26 +495,26 @@ public:
|
||||
{
|
||||
switch (YellSequence)
|
||||
{
|
||||
case 0:
|
||||
Talk(SAY_GOOD_AGGRO);
|
||||
++YellSequence;
|
||||
break;
|
||||
case 1:
|
||||
if (HealthBelowPct(50))
|
||||
{
|
||||
Talk(SAY_GOOD_NEAR_DEATH);
|
||||
case 0:
|
||||
Talk(SAY_GOOD_AGGRO);
|
||||
++YellSequence;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (HealthBelowPct(10))
|
||||
{
|
||||
Talk(SAY_GOOD_NEAR_DEATH2);
|
||||
++YellSequence;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
case 1:
|
||||
if (HealthBelowPct(50))
|
||||
{
|
||||
Talk(SAY_GOOD_NEAR_DEATH);
|
||||
++YellSequence;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (HealthBelowPct(10))
|
||||
{
|
||||
Talk(SAY_GOOD_NEAR_DEATH2);
|
||||
++YellSequence;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
YellTimer = 5000;
|
||||
}
|
||||
@@ -610,11 +608,11 @@ public:
|
||||
if (instance)
|
||||
{
|
||||
KalecgosGUID = instance->GetData64(DATA_KALECGOS_DRAGON);
|
||||
instance->SetData(DATA_KALECGOS_EVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_KALECGOS, NOT_STARTED);
|
||||
}
|
||||
if (KalecGUID)
|
||||
{
|
||||
if (Creature* Kalec = Unit::GetCreature(*me, KalecGUID))
|
||||
if (Creature* Kalec = ObjectAccessor::GetCreature(*me, KalecGUID))
|
||||
Kalec->setDeathState(JUST_DIED);
|
||||
KalecGUID = 0;
|
||||
}
|
||||
@@ -654,7 +652,7 @@ public:
|
||||
if (target->GetGUID() == KalecGUID)
|
||||
{
|
||||
TeleportAllPlayersBack();
|
||||
if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
|
||||
if (Creature* Kalecgos = ObjectAccessor::GetCreature(*me, KalecgosGUID))
|
||||
{
|
||||
CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->TalkTimer = 1;
|
||||
CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->isFriendly = false;
|
||||
@@ -670,14 +668,14 @@ public:
|
||||
Talk(SAY_SATH_DEATH);
|
||||
me->SetPosition(me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation());
|
||||
TeleportAllPlayersBack();
|
||||
if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
|
||||
if (Creature* Kalecgos = ObjectAccessor::GetCreature(*me, KalecgosGUID))
|
||||
{
|
||||
CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->TalkTimer = 1;
|
||||
CAST_AI(boss_kalecgos::boss_kalecgosAI, Kalecgos->AI())->isFriendly = true;
|
||||
}
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_KALECGOS_EVENT, DONE);
|
||||
instance->SetBossState(DATA_KALECGOS, DONE);
|
||||
}
|
||||
|
||||
void TeleportAllPlayersBack()
|
||||
@@ -716,27 +714,28 @@ public:
|
||||
{
|
||||
if (!me->HasAura(AURA_SPECTRAL_INVISIBILITY))
|
||||
me->CastSpell(me, AURA_SPECTRAL_INVISIBILITY, true);
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (CheckTimer <= diff)
|
||||
{
|
||||
Creature* Kalec = Unit::GetCreature(*me, KalecGUID);
|
||||
Creature* Kalec = ObjectAccessor::GetCreature(*me, KalecGUID);
|
||||
if (!Kalec || !Kalec->IsAlive())
|
||||
{
|
||||
if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
|
||||
if (Creature* Kalecgos = ObjectAccessor::GetCreature(*me, KalecgosGUID))
|
||||
Kalecgos->AI()->EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
if (HealthBelowPct(10) && !isEnraged)
|
||||
{
|
||||
if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
|
||||
if (Creature* Kalecgos = ObjectAccessor::GetCreature(*me, KalecgosGUID))
|
||||
Kalecgos->AI()->DoAction(DO_ENRAGE);
|
||||
DoAction(DO_ENRAGE);
|
||||
}
|
||||
|
||||
Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID);
|
||||
Creature* Kalecgos = ObjectAccessor::GetCreature(*me, KalecgosGUID);
|
||||
if (Kalecgos && !Kalecgos->IsInCombat())
|
||||
{
|
||||
me->AI()->EnterEvadeMode();
|
||||
@@ -778,7 +777,8 @@ public:
|
||||
|
||||
if (ShadowBoltTimer <= diff)
|
||||
{
|
||||
if (!(rand()%5))Talk(SAY_SATH_SPELL1);
|
||||
if (!(rand()%5))
|
||||
Talk(SAY_SATH_SPELL1);
|
||||
DoCast(me, SPELL_SHADOW_BOLT);
|
||||
ShadowBoltTimer = 7000+(rand()%3000);
|
||||
} else ShadowBoltTimer -= diff;
|
||||
|
||||
@@ -60,7 +60,7 @@ enum Yells
|
||||
SAY_ANVEENA_IMPRISONED = 0,
|
||||
SAY_ANVEENA_LOST = 1,
|
||||
SAY_ANVEENA_KALEC = 2,
|
||||
SAY_ANVEENA_GOODBYE = 3,
|
||||
SAY_ANVEENA_GOODBYE = 3
|
||||
};
|
||||
|
||||
/*** Spells used during the encounter ***/
|
||||
@@ -156,7 +156,7 @@ enum Phase
|
||||
PHASE_NORMAL = 2, // Kil'Jaeden emerges from the sunwell
|
||||
PHASE_DARKNESS = 3, // At 85%, he gains few abilities; Kalecgos joins the fight
|
||||
PHASE_ARMAGEDDON = 4, // At 55%, he gains even more abilities
|
||||
PHASE_SACRIFICE = 5, // At 25%, Anveena sacrifices herself into the Sunwell; at this point he becomes enraged and has *significally* shorter cooldowns.
|
||||
PHASE_SACRIFICE = 5 // At 25%, Anveena sacrifices herself into the Sunwell; at this point he becomes enraged and has *significally* shorter cooldowns.
|
||||
};
|
||||
|
||||
//Timers
|
||||
@@ -185,7 +185,7 @@ Position DeceiverLocations[3]=
|
||||
{
|
||||
{1682.045f, 631.299f, 5.936f, 0.0f},
|
||||
{1684.099f, 618.848f, 0.589f, 0.0f},
|
||||
{1694.170f, 612.272f, 1.416f, 0.0f},
|
||||
{1694.170f, 612.272f, 1.416f, 0.0f}
|
||||
};
|
||||
|
||||
// Locations, where Shield Orbs will spawn
|
||||
@@ -225,7 +225,7 @@ static Speech Speeches[]=
|
||||
{SAY_KJ_PHASE5, DATA_KILJAEDEN, 5500},
|
||||
|
||||
// use in End sequence?
|
||||
{SAY_KALECGOS_GOODBYE, DATA_KALECGOS_KJ, 12000},
|
||||
{SAY_KALECGOS_GOODBYE, DATA_KALECGOS_KJ, 12000}
|
||||
};
|
||||
|
||||
//AI for Kalecgos
|
||||
@@ -271,13 +271,13 @@ public:
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
return instance->instance->GetGameObject(instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1));
|
||||
return ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1));
|
||||
case 1:
|
||||
return instance->instance->GetGameObject(instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_2));
|
||||
return ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_2));
|
||||
case 2:
|
||||
return instance->instance->GetGameObject(instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_3));
|
||||
return ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_3));
|
||||
case 3:
|
||||
return instance->instance->GetGameObject(instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_4));
|
||||
return ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_4));
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -368,11 +368,11 @@ public:
|
||||
if (go->GetUInt32Value(GAMEOBJECT_FACTION) == 35)
|
||||
{
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
player->SummonCreature(CREATURE_POWER_OF_THE_BLUE_DRAGONFLIGHT, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 121000);
|
||||
player->SummonCreature(NPC_POWER_OF_THE_BLUE_DRAGONFLIGHT, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 121000);
|
||||
player->CastSpell(player, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, false);
|
||||
go->SetUInt32Value(GAMEOBJECT_FACTION, 0);
|
||||
|
||||
if (Creature* pKalec = Unit::GetCreature(*player, instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
if (Creature* pKalec = ObjectAccessor::GetCreature(*player, instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalec->AI())->SetRingOfBlueFlames();
|
||||
|
||||
go->Refresh();
|
||||
@@ -425,7 +425,7 @@ public:
|
||||
phase = PHASE_DECEIVERS;
|
||||
|
||||
if (instance)
|
||||
if (Creature* pKalecKJ = Unit::GetCreature((*me), instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
if (Creature* pKalecKJ = ObjectAccessor::GetCreature((*me), instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalecKJ->AI())->ResetOrbs();
|
||||
deceiverDeathCount = 0;
|
||||
bSummonedDeceivers = false;
|
||||
@@ -438,15 +438,15 @@ public:
|
||||
{
|
||||
switch (summoned->GetEntry())
|
||||
{
|
||||
case CREATURE_HAND_OF_THE_DECEIVER:
|
||||
case NPC_HAND_OF_THE_DECEIVER:
|
||||
summoned->CastSpell(summoned, SPELL_SHADOW_CHANNELING, false);
|
||||
break;
|
||||
case CREATURE_ANVEENA:
|
||||
case NPC_ANVEENA:
|
||||
summoned->SetDisableGravity(true);
|
||||
summoned->CastSpell(summoned, SPELL_ANVEENA_PRISON, true);
|
||||
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case CREATURE_KILJAEDEN:
|
||||
case NPC_KILJAEDEN:
|
||||
summoned->CastSpell(summoned, SPELL_REBIRTH, false);
|
||||
summoned->AddThreat(me->GetVictim(), 1.0f);
|
||||
break;
|
||||
@@ -458,7 +458,7 @@ public:
|
||||
{
|
||||
if (uiRandomSayTimer < diff)
|
||||
{
|
||||
if (instance && instance->GetData(DATA_MURU_EVENT) != DONE && instance->GetData(DATA_KILJAEDEN_EVENT) == NOT_STARTED)
|
||||
if (instance && instance->GetBossState(DATA_MURU) != DONE && instance->GetBossState(DATA_KILJAEDEN) == NOT_STARTED)
|
||||
Talk(SAY_KJ_OFFCOMBAT);
|
||||
uiRandomSayTimer = 30000;
|
||||
} else uiRandomSayTimer -= diff;
|
||||
@@ -466,9 +466,9 @@ public:
|
||||
if (!bSummonedDeceivers)
|
||||
{
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
me->SummonCreature(CREATURE_HAND_OF_THE_DECEIVER, DeceiverLocations[i], TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
me->SummonCreature(NPC_HAND_OF_THE_DECEIVER, DeceiverLocations[i], TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
|
||||
DoSpawnCreature(CREATURE_ANVEENA, 0, 0, 40, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
DoSpawnCreature(NPC_ANVEENA, 0, 0, 40, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
DoCast(me, SPELL_ANVEENA_ENERGY_DRAIN);
|
||||
bSummonedDeceivers = true;
|
||||
}
|
||||
@@ -477,7 +477,7 @@ public:
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_ANVEENA_ENERGY_DRAIN);
|
||||
phase = PHASE_NORMAL;
|
||||
DoSpawnCreature(CREATURE_KILJAEDEN, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
DoSpawnCreature(NPC_KILJAEDEN, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -489,11 +489,6 @@ class boss_kiljaeden : public CreatureScript
|
||||
public:
|
||||
boss_kiljaeden() : CreatureScript("boss_kiljaeden") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_kiljaedenAI(creature);
|
||||
}
|
||||
|
||||
struct boss_kiljaedenAI : public ScriptedAI
|
||||
{
|
||||
boss_kiljaedenAI(Creature* creature) : ScriptedAI(creature), summons(me)
|
||||
@@ -559,11 +554,9 @@ public:
|
||||
OrbActivated = false;
|
||||
SpeechBegins = true;
|
||||
|
||||
if (instance)
|
||||
{
|
||||
if (Creature* pKalec = Unit::GetCreature(*me, instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
pKalec->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
|
||||
}
|
||||
if (Creature* pKalec = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
pKalec->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
|
||||
|
||||
me->SetFloatValue(UNIT_FIELD_COMBATREACH, 12);
|
||||
ChangeTimers(false, 0);
|
||||
summons.DespawnAll();
|
||||
@@ -590,7 +583,7 @@ public:
|
||||
|
||||
void JustSummoned(Creature* summoned) OVERRIDE
|
||||
{
|
||||
if (summoned->GetEntry() == CREATURE_ARMAGEDDON_TARGET)
|
||||
if (summoned->GetEntry() == NPC_ARMAGEDDON_TARGET)
|
||||
{
|
||||
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
summoned->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -607,9 +600,7 @@ public:
|
||||
{
|
||||
Talk(SAY_KJ_DEATH);
|
||||
summons.DespawnAll();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_KILJAEDEN_EVENT, DONE);
|
||||
instance->SetBossState(DATA_KILJAEDEN, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -624,11 +615,8 @@ public:
|
||||
summons.DespawnAll();
|
||||
|
||||
// Reset the controller
|
||||
if (instance)
|
||||
{
|
||||
if (Creature* pControl = Unit::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
|
||||
CAST_AI(npc_kiljaeden_controller::npc_kiljaeden_controllerAI, pControl->AI())->Reset();
|
||||
}
|
||||
if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
|
||||
CAST_AI(npc_kiljaeden_controller::npc_kiljaeden_controllerAI, pControl->AI())->Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
@@ -657,7 +645,7 @@ public:
|
||||
{
|
||||
float x, y, z;
|
||||
target->GetPosition(x, y, z);
|
||||
if (Creature* pSinisterReflection = me->SummonCreature(CREATURE_SINISTER_REFLECTION, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0))
|
||||
if (Creature* pSinisterReflection = me->SummonCreature(NPC_SINISTER_REFLECTION, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0))
|
||||
{
|
||||
pSinisterReflection->SetDisplayId(target->GetDisplayId());
|
||||
pSinisterReflection->AI()->AttackStart(target);
|
||||
@@ -709,15 +697,12 @@ public:
|
||||
if (Speeches[speechCount].timer < SpeechTimer)
|
||||
{
|
||||
SpeechTimer = 0;
|
||||
if (instance)
|
||||
{
|
||||
if (Creature* speechCreature = Unit::GetCreature(*me, instance->GetData64(Speeches[speechCount].creature)))
|
||||
speechCreature->AI()->Talk(Speeches[speechCount].textid);
|
||||
if (speechCount == 12)
|
||||
if (Creature* pAnveena = Unit::GetCreature(*me, instance->GetData64(DATA_ANVEENA)))
|
||||
pAnveena->CastSpell(me, SPELL_SACRIFICE_OF_ANVEENA, false);
|
||||
// ChangeTimers(true, 10000); // Kil should do an emote while screaming without attacking for 10 seconds
|
||||
}
|
||||
if (Creature* speechCreature = ObjectAccessor::GetCreature(*me, instance->GetData64(Speeches[speechCount].creature)))
|
||||
speechCreature->AI()->Talk(Speeches[speechCount].textid);
|
||||
if (speechCount == 12)
|
||||
if (Creature* pAnveena = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ANVEENA)))
|
||||
pAnveena->CastSpell(me, SPELL_SACRIFICE_OF_ANVEENA, false);
|
||||
// ChangeTimers(true, 10000); // Kil should do an emote while screaming without attacking for 10 seconds
|
||||
if (speechCount == speechPhaseEnd)
|
||||
TimerIsDeactivated[TIMER_SPEECH]=true;
|
||||
speechCount++;
|
||||
@@ -769,7 +754,7 @@ public:
|
||||
float sx, sy;
|
||||
sx = ShieldOrbLocations[0][0] + std::sin(ShieldOrbLocations[i][0]);
|
||||
sy = ShieldOrbLocations[0][1] + std::sin(ShieldOrbLocations[i][1]);
|
||||
me->SummonCreature(CREATURE_SHIELD_ORB, sx, sy, SHIELD_ORB_Z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
|
||||
me->SummonCreature(NPC_SHIELD_ORB, sx, sy, SHIELD_ORB_Z, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
|
||||
}
|
||||
Timer[TIMER_SUMMON_SHILEDORB] = urand(30000, 60000); // 30-60seconds cooldown
|
||||
Timer[TIMER_SOUL_FLAY] = 2000;
|
||||
@@ -814,19 +799,18 @@ public:
|
||||
}
|
||||
break;
|
||||
case TIMER_ORBS_EMPOWER: //Phase 3
|
||||
if (instance)
|
||||
if (Creature* pKalec = Unit::GetCreature(*me, instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
if (Creature* pKalec = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
{
|
||||
switch (Phase)
|
||||
{
|
||||
switch (Phase)
|
||||
{
|
||||
case PHASE_SACRIFICE:
|
||||
CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalec->AI())->EmpowerOrb(true);
|
||||
break;
|
||||
default:
|
||||
CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalec->AI())->EmpowerOrb(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
OrbActivated = true;
|
||||
TimerIsDeactivated[TIMER_ORBS_EMPOWER] = true;
|
||||
break;
|
||||
@@ -841,7 +825,7 @@ public:
|
||||
{
|
||||
float x, y, z;
|
||||
target->GetPosition(x, y, z);
|
||||
me->SummonCreature(CREATURE_ARMAGEDDON_TARGET, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
me->SummonCreature(NPC_ARMAGEDDON_TARGET, x, y, z, 0, TEMPSUMMON_TIMED_DESPAWN, 15000);
|
||||
}
|
||||
Timer[TIMER_ARMAGEDDON] = 2000; // No, I'm not kidding
|
||||
break;
|
||||
@@ -893,6 +877,11 @@ public:
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetSunwellPlateauAI<boss_kiljaedenAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
//AI for Hand of the Deceiver
|
||||
@@ -901,11 +890,6 @@ class npc_hand_of_the_deceiver : public CreatureScript
|
||||
public:
|
||||
npc_hand_of_the_deceiver() : CreatureScript("npc_hand_of_the_deceiver") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_hand_of_the_deceiverAI(creature);
|
||||
}
|
||||
|
||||
struct npc_hand_of_the_deceiverAI : public ScriptedAI
|
||||
{
|
||||
npc_hand_of_the_deceiverAI(Creature* creature) : ScriptedAI(creature)
|
||||
@@ -923,8 +907,7 @@ public:
|
||||
/// @todo Timers!
|
||||
ShadowBoltVolleyTimer = urand(8000, 14000); // So they don't all cast it in the same moment.
|
||||
FelfirePortalTimer = 20000;
|
||||
if (instance)
|
||||
instance->SetData(DATA_KILJAEDEN_EVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_KILJAEDEN, NOT_STARTED);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) OVERRIDE
|
||||
@@ -935,12 +918,10 @@ public:
|
||||
|
||||
void EnterCombat(Unit* who) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(DATA_KILJAEDEN_EVENT, IN_PROGRESS);
|
||||
if (Creature* pControl = Unit::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
|
||||
pControl->AddThreat(who, 1.0f);
|
||||
}
|
||||
instance->SetBossState(DATA_KILJAEDEN, IN_PROGRESS);
|
||||
if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
|
||||
pControl->AddThreat(who, 1.0f);
|
||||
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
}
|
||||
|
||||
@@ -949,7 +930,7 @@ public:
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (Creature* pControl = Unit::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
|
||||
if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
|
||||
++(CAST_AI(npc_kiljaeden_controller::npc_kiljaeden_controllerAI, pControl->AI())->deceiverDeathCount);
|
||||
}
|
||||
|
||||
@@ -977,7 +958,7 @@ public:
|
||||
// Felfire Portal - Creatres a portal, that spawns Volatile Felfire Fiends, which do suicide bombing.
|
||||
if (FelfirePortalTimer <= diff)
|
||||
{
|
||||
if (Creature* pPortal = DoSpawnCreature(CREATURE_FELFIRE_PORTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
|
||||
if (Creature* pPortal = DoSpawnCreature(NPC_FELFIRE_PORTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
|
||||
{
|
||||
ThreatContainer::StorageType const &threatlist = me->getThreatManager().getThreatList();
|
||||
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
|
||||
@@ -993,6 +974,11 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetSunwellPlateauAI<npc_hand_of_the_deceiverAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
//AI for Felfire Portal
|
||||
@@ -1034,7 +1020,7 @@ public:
|
||||
|
||||
if (uiSpawnFiendTimer <= diff)
|
||||
{
|
||||
if (Creature* pFiend = DoSpawnCreature(CREATURE_VOLATILE_FELFIRE_FIEND, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20000))
|
||||
if (Creature* pFiend = DoSpawnCreature(NPC_VOLATILE_FELFIRE_FIEND, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20000))
|
||||
pFiend->AddThreat(SelectTarget(SELECT_TARGET_RANDOM, 0), 100000.0f);
|
||||
uiSpawnFiendTimer = urand(4000, 8000);
|
||||
} else uiSpawnFiendTimer -= diff;
|
||||
|
||||
@@ -30,55 +30,56 @@ SDComment: all sounds, black hole effect triggers to often (46228)
|
||||
// Muru & Entropius's spells
|
||||
enum Spells
|
||||
{
|
||||
SPELL_ENRAGE = 26662,
|
||||
SPELL_ENRAGE = 26662,
|
||||
|
||||
// Muru's spells
|
||||
SPELL_NEGATIVE_ENERGY = 46009, //(this trigger 46008)
|
||||
SPELL_DARKNESS = 45999,
|
||||
SPELL_OPEN_ALL_PORTALS = 46177,
|
||||
SPELL_DARKNESS = 45999,
|
||||
SPELL_OPEN_ALL_PORTALS = 46177,
|
||||
SPELL_OPEN_PORTAL = 45977,
|
||||
SPELL_OPEN_PORTAL_2 = 45976,
|
||||
SPELL_SUMMON_BERSERKER = 46037,
|
||||
SPELL_SUMNON_FURY_MAGE = 46038,
|
||||
SPELL_SUMMON_VOID_SENTINEL = 45988,
|
||||
SPELL_SUMMON_ENTROPIUS = 46217,
|
||||
SPELL_OPEN_PORTAL_2 = 45976,
|
||||
SPELL_SUMMON_BERSERKER = 46037,
|
||||
SPELL_SUMNON_FURY_MAGE = 46038,
|
||||
SPELL_SUMMON_VOID_SENTINEL = 45988,
|
||||
SPELL_SUMMON_ENTROPIUS = 46217,
|
||||
|
||||
// Entropius's spells
|
||||
SPELL_DARKNESS_E = 46269,
|
||||
SPELL_BLACKHOLE = 46282,
|
||||
SPELL_NEGATIVE_ENERGY_E = 46284,
|
||||
SPELL_DARKNESS_E = 46269,
|
||||
SPELL_BLACKHOLE = 46282,
|
||||
SPELL_NEGATIVE_ENERGY_E = 46284,
|
||||
SPELL_ENTROPIUS_SPAWN = 46223,
|
||||
|
||||
// Shadowsword Berserker's spells
|
||||
SPELL_FLURRY = 46160,
|
||||
SPELL_DUAL_WIELD = 29651,
|
||||
SPELL_FLURRY = 46160,
|
||||
SPELL_DUAL_WIELD = 29651,
|
||||
|
||||
// Shadowsword Fury Mage's spells
|
||||
SPELL_FEL_FIREBALL = 46101,
|
||||
SPELL_SPELL_FURY = 46102,
|
||||
SPELL_FEL_FIREBALL = 46101,
|
||||
SPELL_SPELL_FURY = 46102,
|
||||
|
||||
// Void Sentinel's spells
|
||||
SPELL_SHADOW_PULSE = 46087,
|
||||
SPELL_VOID_BLAST = 46161,
|
||||
SPELL_SHADOW_PULSE = 46087,
|
||||
SPELL_VOID_BLAST = 46161,
|
||||
|
||||
// Void Spawn's spells
|
||||
SPELL_SHADOW_BOLT_VOLLEY = 46082,
|
||||
SPELL_SHADOW_BOLT_VOLLEY = 46082,
|
||||
|
||||
//Dark Fiend Spells
|
||||
SPELL_DARKFIEND_AOE = 45944,
|
||||
SPELL_DARKFIEND_VISUAL = 45936,
|
||||
SPELL_DARKFIEND_SKIN = 45934,
|
||||
SPELL_DARKFIEND_AOE = 45944,
|
||||
SPELL_DARKFIEND_VISUAL = 45936,
|
||||
SPELL_DARKFIEND_SKIN = 45934,
|
||||
|
||||
//Black Hole Spells
|
||||
SPELL_BLACKHOLE_SPAWN = 46242,
|
||||
SPELL_BLACKHOLE_GROW = 46228
|
||||
SPELL_BLACKHOLE_GROW = 46228
|
||||
};
|
||||
|
||||
enum BossTimers{
|
||||
TIMER_DARKNESS = 0,
|
||||
TIMER_HUMANOIDES = 1,
|
||||
TIMER_PHASE = 2,
|
||||
TIMER_SENTINEL = 3
|
||||
enum BossTimers
|
||||
{
|
||||
TIMER_DARKNESS = 0,
|
||||
TIMER_HUMANOIDES = 1,
|
||||
TIMER_PHASE = 2,
|
||||
TIMER_SENTINEL = 3
|
||||
};
|
||||
|
||||
float DarkFiends[8][4] =
|
||||
@@ -88,32 +89,28 @@ float DarkFiends[8][4] =
|
||||
{1801.98f, 633.62f, 69.74f, 5.71f},
|
||||
{1830.88f, 629.99f, 69.73f, 3.52f},
|
||||
{1800.38f, 621.41f, 69.74f, 0.22f},
|
||||
{1808.3f, 612.45f, 69.73f, 1.02f},
|
||||
{1823.9f, 639.69f, 69.74f, 4.12f},
|
||||
{1808.3f, 612.45f, 69.73f, 1.02f},
|
||||
{1823.9f, 639.69f, 69.74f, 4.12f},
|
||||
{1811.85f, 640.46f, 69.73f, 4.97f}
|
||||
};
|
||||
|
||||
float Humanoides[6][5] =
|
||||
{
|
||||
{CREATURE_FURY_MAGE, 1780.16f, 666.83f, 71.19f, 5.21f},
|
||||
{CREATURE_FURY_MAGE, 1847.93f, 600.30f, 71.30f, 2.57f},
|
||||
{CREATURE_BERSERKER, 1779.97f, 660.64f, 71.19f, 5.28f},
|
||||
{CREATURE_BERSERKER, 1786.2f, 661.01f, 71.19f, 4.51f},
|
||||
{CREATURE_BERSERKER, 1845.17f, 602.63f, 71.28f, 2.43f},
|
||||
{CREATURE_BERSERKER, 1842.91f, 599.93f, 71.23f, 2.44f}
|
||||
{NPC_FURY_MAGE, 1780.16f, 666.83f, 71.19f, 5.21f},
|
||||
{NPC_FURY_MAGE, 1847.93f, 600.30f, 71.30f, 2.57f},
|
||||
{NPC_BERSERKER, 1779.97f, 660.64f, 71.19f, 5.28f},
|
||||
{NPC_BERSERKER, 1786.2f, 661.01f, 71.19f, 4.51f},
|
||||
{NPC_BERSERKER, 1845.17f, 602.63f, 71.28f, 2.43f},
|
||||
{NPC_BERSERKER, 1842.91f, 599.93f, 71.23f, 2.44f}
|
||||
};
|
||||
|
||||
uint32 EnrageTimer = 600000;
|
||||
|
||||
class boss_entropius : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_entropius() : CreatureScript("boss_entropius") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_entropiusAI(creature);
|
||||
}
|
||||
|
||||
struct boss_entropiusAI : public ScriptedAI
|
||||
{
|
||||
boss_entropiusAI(Creature* creature) : ScriptedAI(creature), Summons(me)
|
||||
@@ -133,8 +130,7 @@ public:
|
||||
|
||||
Summons.DespawnAll();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_MURU_EVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_MURU, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
@@ -142,22 +138,21 @@ public:
|
||||
DoCastAOE(SPELL_NEGATIVE_ENERGY_E, true);
|
||||
DoCast(me, SPELL_ENTROPIUS_SPAWN, false);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_MURU_EVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_MURU, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) OVERRIDE
|
||||
{
|
||||
switch (summoned->GetEntry())
|
||||
{
|
||||
case CREATURE_DARK_FIENDS:
|
||||
case NPC_DARK_FIENDS:
|
||||
summoned->CastSpell(summoned, SPELL_DARKFIEND_VISUAL, false);
|
||||
break;
|
||||
case CREATURE_DARKNESS:
|
||||
case NPC_DARKNESS:
|
||||
summoned->AddUnitState(UNIT_STATE_STUNNED);
|
||||
float x, y, z, o;
|
||||
summoned->GetHomePosition(x, y, z, o);
|
||||
me->SummonCreature(CREATURE_DARK_FIENDS, x, y, z, o, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
me->SummonCreature(NPC_DARK_FIENDS, x, y, z, o, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
break;
|
||||
}
|
||||
summoned->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true));
|
||||
@@ -167,9 +162,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Summons.DespawnAll();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_MURU_EVENT, DONE);
|
||||
instance->SetBossState(DATA_MURU, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -201,6 +194,11 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetSunwellPlateauAI<boss_entropiusAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class boss_muru : public CreatureScript
|
||||
@@ -208,11 +206,6 @@ class boss_muru : public CreatureScript
|
||||
public:
|
||||
boss_muru() : CreatureScript("boss_muru") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_muruAI(creature);
|
||||
}
|
||||
|
||||
struct boss_muruAI : public ScriptedAI
|
||||
{
|
||||
boss_muruAI(Creature* creature) : ScriptedAI(creature), Summons(creature)
|
||||
@@ -244,17 +237,13 @@ public:
|
||||
me->SetVisible(true);
|
||||
|
||||
Summons.DespawnAll();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_MURU_EVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_MURU, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
DoCastAOE(SPELL_NEGATIVE_ENERGY, false);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_MURU_EVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_MURU, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*done_by*/, uint32 &damage) OVERRIDE
|
||||
@@ -275,10 +264,10 @@ public:
|
||||
{
|
||||
switch (summoned->GetEntry())
|
||||
{
|
||||
case BOSS_ENTROPIUS:
|
||||
case NPC_ENTROPIUS:
|
||||
me->SetVisible(false);
|
||||
break;
|
||||
case CREATURE_DARK_FIENDS:
|
||||
case NPC_DARK_FIENDS:
|
||||
summoned->CastSpell(summoned, SPELL_DARKFIEND_VISUAL, false);
|
||||
break;
|
||||
}
|
||||
@@ -295,9 +284,7 @@ public:
|
||||
{
|
||||
if (Timer[TIMER_PHASE] <= diff)
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
switch (instance->GetData(DATA_MURU_EVENT))
|
||||
switch (instance->GetBossState(DATA_MURU))
|
||||
{
|
||||
case NOT_STARTED:
|
||||
Reset();
|
||||
@@ -306,6 +293,8 @@ public:
|
||||
Phase = 4;
|
||||
me->DisappearAndDie();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Timer[TIMER_PHASE] = 3000;
|
||||
} else Timer[TIMER_PHASE] -= diff;
|
||||
@@ -334,7 +323,7 @@ public:
|
||||
{
|
||||
DarkFiend = false;
|
||||
for (uint8 j = 0; j < 8; ++j)
|
||||
me->SummonCreature(CREATURE_DARK_FIENDS, DarkFiends[j][0], DarkFiends[j][1], DarkFiends[j][2], DarkFiends[j][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
me->SummonCreature(NPC_DARK_FIENDS, DarkFiends[j][0], DarkFiends[j][1], DarkFiends[j][2], DarkFiends[j][3], TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
Timer[TIMER_DARKNESS] = 42000;
|
||||
}
|
||||
break;
|
||||
@@ -358,14 +347,21 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
//Timer
|
||||
// Timer
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
if (i != TIMER_PHASE)Timer[i] -= diff;
|
||||
else if (Phase == 2) Timer[i] -= diff;
|
||||
if (i != TIMER_PHASE)
|
||||
Timer[i] -= diff;
|
||||
else if (Phase == 2)
|
||||
Timer[i] -= diff;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetSunwellPlateauAI<boss_muruAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_muru_portal : public CreatureScript
|
||||
@@ -438,7 +434,7 @@ public:
|
||||
{
|
||||
if (!SummonSentinel)
|
||||
{
|
||||
if (InAction && instance && instance->GetData(DATA_MURU_EVENT) == NOT_STARTED)
|
||||
if (InAction && instance && instance->GetBossState(DATA_MURU) == NOT_STARTED)
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
@@ -525,7 +521,7 @@ public:
|
||||
|
||||
struct npc_void_sentinelAI : public ScriptedAI
|
||||
{
|
||||
npc_void_sentinelAI(Creature* creature) : ScriptedAI(creature){ }
|
||||
npc_void_sentinelAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 PulseTimer;
|
||||
uint32 VoidBlastTimer;
|
||||
@@ -543,7 +539,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
for (uint8 i = 0; i < 8; ++i)
|
||||
me->SummonCreature(CREATURE_VOID_SPAWN, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), float(rand()%6), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
|
||||
me->SummonCreature(NPC_VOID_SPAWN, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), float(rand()%6), TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* 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
|
||||
@@ -16,19 +15,10 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Instance_Sunwell_Plateau
|
||||
SD%Complete: 25
|
||||
SDComment: VERIFY SCRIPT
|
||||
SDCategory: Sunwell_Plateau
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "sunwell_plateau.h"
|
||||
#include "Player.h"
|
||||
|
||||
#define MAX_ENCOUNTER 6
|
||||
#include "sunwell_plateau.h"
|
||||
|
||||
/* Sunwell Plateau:
|
||||
0 - Kalecgos and Sathrovarr
|
||||
@@ -39,268 +29,256 @@ EndScriptData */
|
||||
5 - Kil'Jaeden
|
||||
*/
|
||||
|
||||
DoorData const doorData[] =
|
||||
{
|
||||
{ GO_FIRE_BARRIER, DATA_FELMYST, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
||||
{ GO_MURUS_GATE_1, DATA_MURU, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
||||
{ GO_MURUS_GATE_2, DATA_MURU, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
||||
{ GO_BOSS_COLLISION_1, DATA_KALECGOS, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
||||
{ GO_BOSS_COLLISION_2, DATA_KALECGOS, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
||||
{ GO_FORCE_FIELD, DATA_KALECGOS, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
||||
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END
|
||||
};
|
||||
|
||||
class instance_sunwell_plateau : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_sunwell_plateau() : InstanceMapScript("instance_sunwell_plateau", 580) { }
|
||||
public:
|
||||
instance_sunwell_plateau() : InstanceMapScript(SunwellPlateauScriptName, 580) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
|
||||
{
|
||||
return new instance_sunwell_plateau_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_sunwell_plateau_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_sunwell_plateau_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
/** Creatures **/
|
||||
uint64 Kalecgos_Dragon;
|
||||
uint64 Kalecgos_Human;
|
||||
uint64 Sathrovarr;
|
||||
uint64 Brutallus;
|
||||
uint64 Madrigosa;
|
||||
uint64 Felmyst;
|
||||
uint64 Alythess;
|
||||
uint64 Sacrolash;
|
||||
uint64 Muru;
|
||||
uint64 KilJaeden;
|
||||
uint64 KilJaedenController;
|
||||
uint64 Anveena;
|
||||
uint64 KalecgosKJ;
|
||||
uint32 SpectralPlayers;
|
||||
|
||||
/** GameObjects **/
|
||||
uint64 ForceField; // Kalecgos Encounter
|
||||
uint64 KalecgosWall[2];
|
||||
uint64 FireBarrier; // Felmysts Encounter
|
||||
uint64 MurusGate[2]; // Murus Encounter
|
||||
|
||||
/*** Misc ***/
|
||||
uint32 SpectralRealmTimer;
|
||||
std::vector<uint64> SpectralRealmList;
|
||||
|
||||
void Initialize() OVERRIDE
|
||||
struct instance_sunwell_plateau_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
/*** Creatures ***/
|
||||
Kalecgos_Dragon = 0;
|
||||
Kalecgos_Human = 0;
|
||||
Sathrovarr = 0;
|
||||
Brutallus = 0;
|
||||
Madrigosa = 0;
|
||||
Felmyst = 0;
|
||||
Alythess = 0;
|
||||
Sacrolash = 0;
|
||||
Muru = 0;
|
||||
KilJaeden = 0;
|
||||
KilJaedenController = 0;
|
||||
Anveena = 0;
|
||||
KalecgosKJ = 0;
|
||||
SpectralPlayers = 0;
|
||||
|
||||
/*** GameObjects ***/
|
||||
ForceField = 0;
|
||||
FireBarrier = 0;
|
||||
MurusGate[0] = 0;
|
||||
MurusGate[1] = 0;
|
||||
KalecgosWall[0] = 0;
|
||||
KalecgosWall[1] = 0;
|
||||
|
||||
/*** Misc ***/
|
||||
SpectralRealmTimer = 5000;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const OVERRIDE
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Player const* GetPlayerInMap() const
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
if (!players.isEmpty())
|
||||
instance_sunwell_plateau_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadDoorData(doorData);
|
||||
|
||||
KalecgosDragonGUID = 0;
|
||||
KalecgosHumanGUID = 0;
|
||||
SathrovarrGUID = 0;
|
||||
BrutallusGUID = 0;
|
||||
MadrigosaGUID = 0;
|
||||
FelmystGUID = 0;
|
||||
AlythessGUID = 0;
|
||||
SacrolashGUID = 0;
|
||||
MuruGUID = 0;
|
||||
KilJaedenGUID = 0;
|
||||
KilJaedenControllerGUID = 0;
|
||||
AnveenaGUID = 0;
|
||||
KalecgosKjGUID = 0;
|
||||
SpectralPlayers = 0;
|
||||
|
||||
SpectralRealmTimer = 5000;
|
||||
}
|
||||
|
||||
Player const* GetPlayerInMap() const
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
if (!players.isEmpty())
|
||||
{
|
||||
Player* player = itr->GetSource();
|
||||
if (player && !player->HasAura(45839, 0))
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
Player* player = itr->GetSource();
|
||||
if (player && !player->HasAura(45839, 0))
|
||||
return player;
|
||||
}
|
||||
}
|
||||
else
|
||||
TC_LOG_DEBUG("scripts", "Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) OVERRIDE
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_KALECGOS:
|
||||
KalecgosDragonGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_KALEC:
|
||||
KalecgosHumanGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_SATHROVARR:
|
||||
SathrovarrGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_BRUTALLUS:
|
||||
BrutallusGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_MADRIGOSA:
|
||||
MadrigosaGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_FELMYST:
|
||||
FelmystGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_GRAND_WARLOCK_ALYTHESS:
|
||||
AlythessGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_LADY_SACROLASH:
|
||||
SacrolashGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_MURU:
|
||||
MuruGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_KILJAEDEN:
|
||||
KilJaedenGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_KILJAEDEN_CONTROLLER:
|
||||
KilJaedenControllerGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_ANVEENA:
|
||||
AnveenaGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_KALECGOS_KJ:
|
||||
KalecgosKjGUID = creature->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
TC_LOG_DEBUG("scripts", "Instance Sunwell Plateau: GetPlayerInMap, but PlayerList is empty!");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) OVERRIDE
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
void OnGameObjectCreate(GameObject* go) OVERRIDE
|
||||
{
|
||||
case 24850: Kalecgos_Dragon = creature->GetGUID(); break;
|
||||
case 24891: Kalecgos_Human = creature->GetGUID(); break;
|
||||
case 24892: Sathrovarr = creature->GetGUID(); break;
|
||||
case 24882: Brutallus = creature->GetGUID(); break;
|
||||
case 24895: Madrigosa = creature->GetGUID(); break;
|
||||
case 25038: Felmyst = creature->GetGUID(); break;
|
||||
case 25166: Alythess = creature->GetGUID(); break;
|
||||
case 25165: Sacrolash = creature->GetGUID(); break;
|
||||
case 25741: Muru = creature->GetGUID(); break;
|
||||
case 25315: KilJaeden = creature->GetGUID(); break;
|
||||
case 25608: KilJaedenController = creature->GetGUID(); break;
|
||||
case 26046: Anveena = creature->GetGUID(); break;
|
||||
case 25319: KalecgosKJ = creature->GetGUID(); break;
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_FORCE_FIELD:
|
||||
case GO_BOSS_COLLISION_1:
|
||||
case GO_BOSS_COLLISION_2:
|
||||
case GO_FIRE_BARRIER:
|
||||
case GO_MURUS_GATE_1:
|
||||
case GO_MURUS_GATE_2:
|
||||
AddDoor(go, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) OVERRIDE
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
void OnGameObjectRemove(GameObject* go) OVERRIDE
|
||||
{
|
||||
case 188421: ForceField = go->GetGUID(); break;
|
||||
case 188523: KalecgosWall[0] = go->GetGUID(); break;
|
||||
case 188524: KalecgosWall[0] = go->GetGUID(); break;
|
||||
case 188075:
|
||||
if (m_auiEncounter[2] == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
FireBarrier = go->GetGUID();
|
||||
break;
|
||||
case 187990: MurusGate[0] = go->GetGUID(); break;
|
||||
case 188118:
|
||||
if (m_auiEncounter[4] == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
MurusGate[1]= go->GetGUID();
|
||||
break;
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_FIRE_BARRIER:
|
||||
case GO_MURUS_GATE_1:
|
||||
case GO_MURUS_GATE_2:
|
||||
case GO_BOSS_COLLISION_1:
|
||||
case GO_BOSS_COLLISION_2:
|
||||
case GO_FORCE_FIELD:
|
||||
AddDoor(go, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 id) const OVERRIDE
|
||||
{
|
||||
switch (id)
|
||||
uint64 GetData64(uint32 id) const OVERRIDE
|
||||
{
|
||||
case DATA_KALECGOS_EVENT: return m_auiEncounter[0];
|
||||
case DATA_BRUTALLUS_EVENT: return m_auiEncounter[1];
|
||||
case DATA_FELMYST_EVENT: return m_auiEncounter[2];
|
||||
case DATA_EREDAR_TWINS_EVENT: return m_auiEncounter[3];
|
||||
case DATA_MURU_EVENT: return m_auiEncounter[4];
|
||||
case DATA_KILJAEDEN_EVENT: return m_auiEncounter[5];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 id) const OVERRIDE
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case DATA_KALECGOS_DRAGON: return Kalecgos_Dragon;
|
||||
case DATA_KALECGOS_HUMAN: return Kalecgos_Human;
|
||||
case DATA_SATHROVARR: return Sathrovarr;
|
||||
case DATA_GO_FORCEFIELD: return ForceField;
|
||||
case DATA_BRUTALLUS: return Brutallus;
|
||||
case DATA_MADRIGOSA: return Madrigosa;
|
||||
case DATA_FELMYST: return Felmyst;
|
||||
case DATA_ALYTHESS: return Alythess;
|
||||
case DATA_SACROLASH: return Sacrolash;
|
||||
case DATA_MURU: return Muru;
|
||||
case DATA_KILJAEDEN: return KilJaeden;
|
||||
case DATA_KILJAEDEN_CONTROLLER: return KilJaedenController;
|
||||
case DATA_ANVEENA: return Anveena;
|
||||
case DATA_KALECGOS_KJ: return KalecgosKJ;
|
||||
case DATA_PLAYER_GUID:
|
||||
Player const* target = GetPlayerInMap();
|
||||
return target ? target->GetGUID() : 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetData(uint32 id, uint32 data) OVERRIDE
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case DATA_KALECGOS_EVENT:
|
||||
switch (id)
|
||||
{
|
||||
case DATA_KALECGOS_DRAGON:
|
||||
return KalecgosDragonGUID;
|
||||
case DATA_KALECGOS_HUMAN:
|
||||
return KalecgosHumanGUID;
|
||||
case DATA_SATHROVARR:
|
||||
return SathrovarrGUID;
|
||||
case DATA_BRUTALLUS:
|
||||
return BrutallusGUID;
|
||||
case DATA_MADRIGOSA:
|
||||
return MadrigosaGUID;
|
||||
case DATA_FELMYST:
|
||||
return FelmystGUID;
|
||||
case DATA_ALYTHESS:
|
||||
return AlythessGUID;
|
||||
case DATA_SACROLASH:
|
||||
return SacrolashGUID;
|
||||
case DATA_MURU:
|
||||
return MuruGUID;
|
||||
case DATA_KILJAEDEN:
|
||||
return KilJaedenGUID;
|
||||
case DATA_KILJAEDEN_CONTROLLER:
|
||||
return KilJaedenControllerGUID;
|
||||
case DATA_ANVEENA:
|
||||
return AnveenaGUID;
|
||||
case DATA_KALECGOS_KJ:
|
||||
return KalecgosKjGUID;
|
||||
case DATA_PLAYER_GUID:
|
||||
{
|
||||
if (data == NOT_STARTED || data == DONE)
|
||||
{
|
||||
HandleGameObject(ForceField, true);
|
||||
HandleGameObject(KalecgosWall[0], true);
|
||||
HandleGameObject(KalecgosWall[1], true);
|
||||
}
|
||||
else if (data == IN_PROGRESS)
|
||||
{
|
||||
HandleGameObject(ForceField, false);
|
||||
HandleGameObject(KalecgosWall[0], false);
|
||||
HandleGameObject(KalecgosWall[1], false);
|
||||
}
|
||||
m_auiEncounter[0] = data;
|
||||
Player const* target = GetPlayerInMap();
|
||||
return target ? target->GetGUID() : 0;
|
||||
}
|
||||
break;
|
||||
case DATA_BRUTALLUS_EVENT: m_auiEncounter[1] = data; break;
|
||||
case DATA_FELMYST_EVENT:
|
||||
if (data == DONE)
|
||||
HandleGameObject(FireBarrier, true);
|
||||
m_auiEncounter[2] = data; break;
|
||||
case DATA_EREDAR_TWINS_EVENT: m_auiEncounter[3] = data; break;
|
||||
case DATA_MURU_EVENT:
|
||||
switch (data)
|
||||
{
|
||||
case DONE:
|
||||
HandleGameObject(MurusGate[0], true);
|
||||
HandleGameObject(MurusGate[1], true);
|
||||
break;
|
||||
case IN_PROGRESS:
|
||||
HandleGameObject(MurusGate[0], false);
|
||||
HandleGameObject(MurusGate[1], false);
|
||||
break;
|
||||
case NOT_STARTED:
|
||||
HandleGameObject(MurusGate[0], true);
|
||||
HandleGameObject(MurusGate[1], false);
|
||||
break;
|
||||
}
|
||||
m_auiEncounter[4] = data; break;
|
||||
case DATA_KILJAEDEN_EVENT: m_auiEncounter[5] = data; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (data == DONE)
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
std::string GetSaveData() OVERRIDE
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
std::ostringstream stream;
|
||||
stream << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' ' << m_auiEncounter[2] << ' ' << m_auiEncounter[3] << ' '
|
||||
<< m_auiEncounter[4] << ' ' << m_auiEncounter[5];
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
void Load(char const* in) OVERRIDE
|
||||
{
|
||||
if (!in)
|
||||
std::string GetSaveData() OVERRIDE
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "S P " << GetBossSaveData();
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
std::istringstream stream(in);
|
||||
stream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]
|
||||
>> m_auiEncounter[4] >> m_auiEncounter[5];
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead.
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
void Load(char const* str) OVERRIDE
|
||||
{
|
||||
if (!str)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(str);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
|
||||
std::istringstream loadStream(str);
|
||||
loadStream >> dataHead1 >> dataHead2;
|
||||
|
||||
if (dataHead1 == 'S' && dataHead2 == 'P')
|
||||
{
|
||||
for (uint32 i = 0; i < EncounterCount; ++i)
|
||||
{
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
}
|
||||
else
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
protected:
|
||||
uint64 KalecgosDragonGUID;
|
||||
uint64 KalecgosHumanGUID;
|
||||
uint64 SathrovarrGUID;
|
||||
uint64 BrutallusGUID;
|
||||
uint64 MadrigosaGUID;
|
||||
uint64 FelmystGUID;
|
||||
uint64 AlythessGUID;
|
||||
uint64 SacrolashGUID;
|
||||
uint64 MuruGUID;
|
||||
uint64 KilJaedenGUID;
|
||||
uint64 KilJaedenControllerGUID;
|
||||
uint64 AnveenaGUID;
|
||||
uint64 KalecgosKjGUID;
|
||||
uint32 SpectralPlayers;
|
||||
|
||||
uint32 SpectralRealmTimer;
|
||||
std::vector<uint64> SpectralRealmList;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
|
||||
{
|
||||
return new instance_sunwell_plateau_InstanceMapScript(map);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_instance_sunwell_plateau()
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* 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
|
||||
@@ -16,94 +15,105 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DEF_SUNWELLPLATEAU_H
|
||||
#define DEF_SUNWELLPLATEAU_H
|
||||
#ifndef SUNWELL_PLATEAU_H
|
||||
#define SUNWELL_PLATEAU_H
|
||||
|
||||
/*** Encounters ***/
|
||||
enum Data
|
||||
{
|
||||
DATA_KALECGOS_EVENT,
|
||||
DATA_BRUTALLUS_EVENT,
|
||||
DATA_FELMYST_EVENT,
|
||||
DATA_EREDAR_TWINS_EVENT,
|
||||
DATA_MURU_EVENT,
|
||||
DATA_KILJAEDEN_EVENT,
|
||||
};
|
||||
#define SunwellPlateauScriptName "instance_sunwell_plateau"
|
||||
|
||||
enum Data64
|
||||
uint32 const EncounterCount = 6;
|
||||
|
||||
enum DataTypes
|
||||
{
|
||||
/*** Creatures ***/
|
||||
// Encounter States/Boss GUIDs
|
||||
DATA_KALECGOS = 0,
|
||||
DATA_BRUTALLUS = 1,
|
||||
DATA_FELMYST = 2,
|
||||
DATA_EREDAR_TWINS = 3,
|
||||
DATA_MURU = 4,
|
||||
DATA_KILJAEDEN = 5,
|
||||
|
||||
DATA_KALECGOS_DRAGON,
|
||||
DATA_KALECGOS_HUMAN,
|
||||
DATA_SATHROVARR,
|
||||
DATA_BRUTALLUS,
|
||||
DATA_MADRIGOSA,
|
||||
DATA_FELMYST,
|
||||
DATA_ALYTHESS,
|
||||
DATA_SACROLASH,
|
||||
DATA_MURU,
|
||||
DATA_KILJAEDEN,
|
||||
DATA_KILJAEDEN_CONTROLLER,
|
||||
DATA_ANVEENA,
|
||||
DATA_KALECGOS_KJ,
|
||||
|
||||
/*** GameObjects ***/
|
||||
DATA_GO_FORCEFIELD,
|
||||
// GameObject GUIDs
|
||||
DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1,
|
||||
DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_2,
|
||||
DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_3,
|
||||
DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_4,
|
||||
|
||||
/*** Misc ***/
|
||||
DATA_PLAYER_GUID,
|
||||
// Misc
|
||||
DATA_PLAYER_GUID
|
||||
};
|
||||
|
||||
enum Creatures
|
||||
enum CreatureIds
|
||||
{
|
||||
BOSS_MURU = 25741,
|
||||
BOSS_ENTROPIUS = 25840,
|
||||
NPC_KALECGOS = 24850,
|
||||
NPC_KALEC = 24891,
|
||||
NPC_SATHROVARR = 24892,
|
||||
NPC_MURU = 25741,
|
||||
NPC_ENTROPIUS = 25840,
|
||||
NPC_KALECGOS = 24850,
|
||||
NPC_KALEC = 24891,
|
||||
NPC_SATHROVARR = 24892,
|
||||
NPC_BRUTALLUS = 24882,
|
||||
NPC_MADRIGOSA = 24895,
|
||||
NPC_FELMYST = 25038,
|
||||
|
||||
NPC_DEAD = 25268,
|
||||
NPC_FLIGHT_LEFT = 25357,
|
||||
NPC_FLIGHT_RIGHT = 25358,
|
||||
NPC_DEATH_CLOUD = 25703,
|
||||
NPC_VAPOR = 25265,
|
||||
NPC_VAPOR_TRAIL = 25267,
|
||||
NPC_DEAD = 25268,
|
||||
NPC_FLIGHT_LEFT = 25357,
|
||||
NPC_FLIGHT_RIGHT = 25358,
|
||||
NPC_DEATH_CLOUD = 25703,
|
||||
NPC_VAPOR = 25265,
|
||||
NPC_VAPOR_TRAIL = 25267,
|
||||
|
||||
NPC_GRAND_WARLOCK_ALYTHESS = 25166,
|
||||
NPC_SHADOW_IMAGE = 25214,
|
||||
NPC_LADY_SACROLASH = 25165,
|
||||
NPC_GRAND_WARLOCK_ALYTHESS = 25166,
|
||||
NPC_SHADOW_IMAGE = 25214,
|
||||
NPC_LADY_SACROLASH = 25165,
|
||||
|
||||
CREATURE_ANVEENA = 26046, // Embodiment of the Sunwell
|
||||
CREATURE_KALECGOS = 25319, // Helps the raid throughout the fight
|
||||
CREATURE_PROPHET = 26246, // Outro
|
||||
CREATURE_KILJAEDEN = 25315, // Give it to 'em KJ!
|
||||
CREATURE_HAND_OF_THE_DECEIVER = 25588, // Adds found before KJ emerges
|
||||
CREATURE_FELFIRE_PORTAL = 25603, // Portal spawned be Hand of the Deceivers
|
||||
CREATURE_VOLATILE_FELFIRE_FIEND = 25598, // Fiends spawned by the above portal
|
||||
CREATURE_ARMAGEDDON_TARGET = 25735, // This mob casts meteor on itself.. I think
|
||||
CREATURE_SHIELD_ORB = 25502, // Shield orbs circle the room raining shadow bolts on raid
|
||||
CREATURE_THE_CORE_OF_ENTROPIUS = 26262, // Used in the ending cinematic?
|
||||
CREATURE_POWER_OF_THE_BLUE_DRAGONFLIGHT = 25653, // NPC that players possess when using the Orb of the Blue Dragonflight
|
||||
CREATURE_SPIKE_TARGET1 = 30598, // Should summon these under Shadow Spike Channel on targets place
|
||||
CREATURE_SPIKE_TARGET2 = 30614,
|
||||
CREATURE_SINISTER_REFLECTION = 25708, // Sinister Relection spawnd on Phase swichtes
|
||||
NPC_ANVEENA = 26046, // Embodiment of the Sunwell
|
||||
NPC_KALECGOS_KJ = 25319, // Helps the raid throughout the fight
|
||||
NPC_PROPHET = 26246, // Outro
|
||||
NPC_KILJAEDEN = 25315, // Give it to 'em KJ!
|
||||
NPC_KILJAEDEN_CONTROLLER = 25608,
|
||||
NPC_HAND_OF_THE_DECEIVER = 25588, // Adds found before KJ emerges
|
||||
NPC_FELFIRE_PORTAL = 25603, // Portal spawned be Hand of the Deceivers
|
||||
NPC_VOLATILE_FELFIRE_FIEND = 25598, // Fiends spawned by the above portal
|
||||
NPC_ARMAGEDDON_TARGET = 25735, // This mob casts meteor on itself.. I think
|
||||
NPC_SHIELD_ORB = 25502, // Shield orbs circle the room raining shadow bolts on raid
|
||||
NPC_THE_CORE_OF_ENTROPIUS = 26262, // Used in the ending cinematic?
|
||||
NPC_POWER_OF_THE_BLUE_DRAGONFLIGHT = 25653, // NPC that players possess when using the Orb of the Blue Dragonflight
|
||||
NPC_SPIKE_TARGET1 = 30598, // Should summon these under Shadow Spike Channel on targets place
|
||||
NPC_SPIKE_TARGET2 = 30614,
|
||||
NPC_SINISTER_REFLECTION = 25708, // Sinister Relection spawnd on Phase swichtes
|
||||
|
||||
CREATURE_DARKNESS = 25879,
|
||||
CREATURE_DARK_FIENDS = 25744,
|
||||
CREATURE_BERSERKER = 25798,
|
||||
CREATURE_FURY_MAGE = 25799,
|
||||
CREATURE_VOID_SENTINEL = 25772,
|
||||
CREATURE_VOID_SPAWN = 25824,
|
||||
CREATURE_BLACK_HOLE = 25855,
|
||||
NPC_DARKNESS = 25879,
|
||||
NPC_DARK_FIENDS = 25744,
|
||||
NPC_BERSERKER = 25798,
|
||||
NPC_FURY_MAGE = 25799,
|
||||
NPC_VOID_SENTINEL = 25772,
|
||||
NPC_VOID_SPAWN = 25824,
|
||||
NPC_BLACK_HOLE = 25855
|
||||
};
|
||||
|
||||
enum GameObjects
|
||||
enum GameObjectIds
|
||||
{
|
||||
GAMEOBJECT_ORB_OF_THE_BLUE_DRAGONFLIGHT = 188415,
|
||||
GO_ORB_OF_THE_BLUE_DRAGONFLIGHT = 188415,
|
||||
GO_FORCE_FIELD = 188421,
|
||||
GO_BOSS_COLLISION_1 = 188523,
|
||||
GO_BOSS_COLLISION_2 = 188524,
|
||||
GO_FIRE_BARRIER = 188075,
|
||||
GO_MURUS_GATE_1 = 187990,
|
||||
GO_MURUS_GATE_2 = 188118
|
||||
};
|
||||
|
||||
#endif
|
||||
template<class AI>
|
||||
AI* GetSunwellPlateauAI(Creature* creature)
|
||||
{
|
||||
return GetInstanceAI<AI>(creature, SunwellPlateauScriptName);
|
||||
}
|
||||
|
||||
#endif // SUNWELL_PLATEAU_H
|
||||
@@ -18,8 +18,8 @@
|
||||
|
||||
/* ScriptData
|
||||
SDName: Eversong_Woods
|
||||
SD%Complete: 100
|
||||
SDComment: Quest support: 8488, 8490
|
||||
SD%Complete: 95
|
||||
SDComment: Quest support: 8487, 8488, 8490
|
||||
SDCategory: Eversong Woods
|
||||
EndScriptData */
|
||||
|
||||
@@ -37,11 +37,29 @@ EndContentData */
|
||||
enum UnexpectedResults
|
||||
{
|
||||
// Quest
|
||||
QUEST_CORRUPTED_SOIL = 8487,
|
||||
QUEST_UNEXPECTED_RESULT = 8488,
|
||||
|
||||
// Creatures
|
||||
NPC_GHARZUL = 15958,
|
||||
NPC_ANGERSHADE = 15656
|
||||
NPC_GHARZUL = 15958, // Quest 8488
|
||||
NPC_ANGERSHADE = 15656, // Quest 8488
|
||||
|
||||
// Factions
|
||||
FACTION_NORMAL = 1604, // Quest 8488
|
||||
FACTION_COMBAT = 232, // Quest 8488
|
||||
|
||||
// Spells
|
||||
SPELL_TEST_SOIL = 29535, // Quest 8487
|
||||
SPELL_FIREBALL = 20811, // Quest 8488
|
||||
|
||||
// Text
|
||||
SAY_TEST_SOIL = 0, // Quest 8487
|
||||
|
||||
// Events
|
||||
EVENT_TALK = 1, // Quest 8487
|
||||
EVENT_ADD_QUEST_GIVER_FLAG = 2, // Quest 8487
|
||||
EVENT_SUMMON = 3, // Quest 8488
|
||||
EVENT_FIREBALL = 4 // Quest 8488
|
||||
};
|
||||
|
||||
class npc_apprentice_mirveda : public CreatureScript
|
||||
@@ -49,47 +67,57 @@ class npc_apprentice_mirveda : public CreatureScript
|
||||
public:
|
||||
npc_apprentice_mirveda() : CreatureScript("npc_apprentice_mirveda") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_UNEXPECTED_RESULT)
|
||||
{
|
||||
CAST_AI(npc_apprentice_mirveda::npc_apprentice_mirvedaAI, creature->AI())->Summon = true;
|
||||
CAST_AI(npc_apprentice_mirveda::npc_apprentice_mirvedaAI, creature->AI())->PlayerGUID = player->GetGUID();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_apprentice_mirvedaAI(creature);
|
||||
}
|
||||
|
||||
struct npc_apprentice_mirvedaAI : public ScriptedAI
|
||||
{
|
||||
npc_apprentice_mirvedaAI(Creature* creature) : ScriptedAI(creature), Summons(me) { }
|
||||
|
||||
uint32 KillCount;
|
||||
uint64 PlayerGUID;
|
||||
bool Summon;
|
||||
SummonList Summons;
|
||||
EventMap events;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
SetCombatMovement(false);
|
||||
KillCount = 0;
|
||||
PlayerGUID = 0;
|
||||
Summons.DespawnAll();
|
||||
Summon = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)OVERRIDE { }
|
||||
void sQuestReward(Player* /*player*/, Quest const* quest, uint32 /*opt*/) OVERRIDE
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_CORRUPTED_SOIL)
|
||||
{
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
events.ScheduleEvent(EVENT_TALK, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* player, Quest const* quest) OVERRIDE
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_UNEXPECTED_RESULT)
|
||||
{
|
||||
me->setFaction(FACTION_COMBAT);
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
events.ScheduleEvent(EVENT_SUMMON, 1000);
|
||||
PlayerGUID = player->GetGUID();
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
events.ScheduleEvent(EVENT_FIREBALL, 1000);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) OVERRIDE
|
||||
{
|
||||
summoned->AI()->AttackStart(me);
|
||||
// This is the best I can do because AttackStart does nothing
|
||||
summoned->GetMotionMaster()->MovePoint(1, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
|
||||
// summoned->AI()->AttackStart(me);
|
||||
Summons.Summon(summoned);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summoned) OVERRIDE
|
||||
void SummonedCreatureDies(Creature* summoned, Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Summons.Despawn(summoned);
|
||||
++KillCount;
|
||||
@@ -97,26 +125,60 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
me->setFaction(FACTION_NORMAL);
|
||||
|
||||
if (PlayerGUID)
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID))
|
||||
player->FailQuest(QUEST_UNEXPECTED_RESULT);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) OVERRIDE
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (KillCount >= 3 && PlayerGUID)
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID))
|
||||
player->CompleteQuest(QUEST_UNEXPECTED_RESULT);
|
||||
if (player->GetQuestStatus(QUEST_UNEXPECTED_RESULT) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
player->CompleteQuest(QUEST_UNEXPECTED_RESULT);
|
||||
me->setFaction(FACTION_NORMAL);
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
}
|
||||
|
||||
if (Summon)
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
me->SummonCreature(NPC_GHARZUL, 8745, -7134.32f, 35.22f, 0, TEMPSUMMON_CORPSE_DESPAWN, 4000);
|
||||
me->SummonCreature(NPC_ANGERSHADE, 8745, -7134.32f, 35.22f, 0, TEMPSUMMON_CORPSE_DESPAWN, 4000);
|
||||
me->SummonCreature(NPC_ANGERSHADE, 8745, -7134.32f, 35.22f, 0, TEMPSUMMON_CORPSE_DESPAWN, 4000);
|
||||
Summon = false;
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_TALK:
|
||||
Talk(SAY_TEST_SOIL);
|
||||
events.ScheduleEvent(EVENT_ADD_QUEST_GIVER_FLAG, 7000);
|
||||
break;
|
||||
case EVENT_ADD_QUEST_GIVER_FLAG:
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
|
||||
break;
|
||||
case EVENT_SUMMON:
|
||||
me->SummonCreature(NPC_GHARZUL, 8749.505f, -7132.595f, 35.31983f, 3.816502f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000);
|
||||
me->SummonCreature(NPC_ANGERSHADE, 8755.38f, -7131.521f, 35.30957f, 3.816502f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000);
|
||||
me->SummonCreature(NPC_ANGERSHADE, 8753.199f, -7125.975f, 35.31986f, 3.816502f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 180000);
|
||||
break;
|
||||
case EVENT_FIREBALL:
|
||||
if (!UpdateVictim())
|
||||
continue;
|
||||
DoCastVictim(SPELL_FIREBALL, true); // Not casting in combat
|
||||
events.ScheduleEvent(EVENT_FIREBALL, 3000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_apprentice_mirvedaAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
|
||||
@@ -40,9 +40,9 @@ enum eOOX
|
||||
{
|
||||
SAY_OOX_START = 0,
|
||||
SAY_OOX_AGGRO = 1,
|
||||
SAY_OOX_AMBUSH = 3,
|
||||
SAY_OOX_AMBUSH_REPLY = 4,
|
||||
SAY_OOX_END = 5,
|
||||
SAY_OOX_AMBUSH = 2,
|
||||
SAY_OOX_AMBUSH_REPLY = 3,
|
||||
SAY_OOX_END = 4,
|
||||
|
||||
QUEST_RESQUE_OOX_09 = 836,
|
||||
|
||||
|
||||
@@ -189,7 +189,6 @@ public:
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
|
||||
{
|
||||
if (!who)
|
||||
return;
|
||||
@@ -393,7 +392,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)OVERRIDE { }
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
|
||||
@@ -15,12 +15,15 @@ set(scripts_STAT_SRCS
|
||||
Kalimdor/zone_moonglade.cpp
|
||||
Kalimdor/RazorfenDowns/razorfen_downs.cpp
|
||||
Kalimdor/RazorfenDowns/instance_razorfen_downs.cpp
|
||||
Kalimdor/RazorfenDowns/boss_tuten_kash.cpp
|
||||
Kalimdor/RazorfenDowns/boss_mordresh_fire_eye.cpp
|
||||
Kalimdor/RazorfenDowns/boss_glutton.cpp
|
||||
Kalimdor/RazorfenDowns/boss_amnennar_the_coldbringer.cpp
|
||||
Kalimdor/RazorfenDowns/razorfen_downs.h
|
||||
Kalimdor/ZulFarrak/zulfarrak.h
|
||||
Kalimdor/ZulFarrak/zulfarrak.cpp
|
||||
Kalimdor/ZulFarrak/instance_zulfarrak.cpp
|
||||
Kalimdor/ZulFarrak/boss_zum_rah.cpp
|
||||
Kalimdor/ZulFarrak/zulfarrak.h
|
||||
Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_epoch_hunter.cpp
|
||||
Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/old_hillsbrad.h
|
||||
Kalimdor/CavernsOfTime/EscapeFromDurnholdeKeep/boss_leutenant_drake.cpp
|
||||
|
||||
@@ -186,6 +186,7 @@ hyjal_trashAI::hyjal_trashAI(Creature* creature) : npc_escortAI(creature)
|
||||
faction = 0;
|
||||
useFlyPath = false;
|
||||
damageTaken = 0;
|
||||
memset(DummyTarget, 0, sizeof(DummyTarget));
|
||||
Reset();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* 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
|
||||
@@ -16,63 +15,57 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Amnennar_the_coldbringer
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Razorfen Downs
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "razorfen_downs.h"
|
||||
|
||||
enum AmnennarTheColdbringer
|
||||
enum Say
|
||||
{
|
||||
SAY_AGGRO = 0,
|
||||
SAY_SUMMON60 = 1,
|
||||
SAY_SUMMON30 = 2,
|
||||
SAY_HP = 3,
|
||||
SAY_KILL = 4,
|
||||
SAY_KILL = 4
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_AMNENNARSWRATH = 13009,
|
||||
SPELL_FROSTBOLT = 15530,
|
||||
SPELL_FROST_NOVA = 15531,
|
||||
SPELL_FROST_SPECTRES = 12642
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_AMNENNARSWRATH = 1,
|
||||
EVENT_FROSTBOLT = 2,
|
||||
EVENT_FROST_NOVA = 3
|
||||
};
|
||||
|
||||
class boss_amnennar_the_coldbringer : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_amnennar_the_coldbringer() : CreatureScript("boss_amnennar_the_coldbringer") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
struct boss_amnennar_the_coldbringerAI : public BossAI
|
||||
{
|
||||
return new boss_amnennar_the_coldbringerAI(creature);
|
||||
}
|
||||
|
||||
struct boss_amnennar_the_coldbringerAI : public ScriptedAI
|
||||
{
|
||||
boss_amnennar_the_coldbringerAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 AmnenarsWrath_Timer;
|
||||
uint32 FrostBolt_Timer;
|
||||
uint32 FrostNova_Timer;
|
||||
bool Spectrals60;
|
||||
bool Spectrals30;
|
||||
bool Hp;
|
||||
boss_amnennar_the_coldbringerAI(Creature* creature) : BossAI(creature, DATA_AMNENNAR_THE_COLD_BRINGER) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
AmnenarsWrath_Timer = 8000;
|
||||
FrostBolt_Timer = 1000;
|
||||
FrostNova_Timer = urand(10000, 15000);
|
||||
Spectrals30 = false;
|
||||
Spectrals60 = false;
|
||||
Hp = false;
|
||||
_Reset();
|
||||
hp60Spectrals = false;
|
||||
hp30Spectrals = false;
|
||||
hp50 = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_AMNENNARSWRATH, 8000);
|
||||
events.ScheduleEvent(EVENT_FROSTBOLT, 1000);
|
||||
events.ScheduleEvent(EVENT_FROST_NOVA, urand(10000, 15000));
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
@@ -81,55 +74,73 @@ public:
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//AmnenarsWrath_Timer
|
||||
if (AmnenarsWrath_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_AMNENNARSWRATH);
|
||||
AmnenarsWrath_Timer = 12000;
|
||||
} else AmnenarsWrath_Timer -= diff;
|
||||
events.Update(diff);
|
||||
|
||||
//FrostBolt_Timer
|
||||
if (FrostBolt_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_FROSTBOLT);
|
||||
FrostBolt_Timer = 8000;
|
||||
} else FrostBolt_Timer -= diff;
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (FrostNova_Timer <= diff)
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
DoCast(me, SPELL_FROST_NOVA);
|
||||
FrostNova_Timer = 15000;
|
||||
} else FrostNova_Timer -= diff;
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_AMNENNARSWRATH:
|
||||
DoCastVictim(SPELL_AMNENNARSWRATH);
|
||||
events.ScheduleEvent(EVENT_AMNENNARSWRATH, 12000);
|
||||
break;
|
||||
case EVENT_FROSTBOLT:
|
||||
DoCastVictim(SPELL_FROSTBOLT);
|
||||
events.ScheduleEvent(EVENT_FROSTBOLT, 8000);
|
||||
break;
|
||||
case EVENT_FROST_NOVA:
|
||||
DoCast(me, SPELL_FROST_NOVA);
|
||||
events.ScheduleEvent(EVENT_FROST_NOVA, 15000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Spectrals60 && HealthBelowPct(60))
|
||||
if (!hp60Spectrals && HealthBelowPct(60))
|
||||
{
|
||||
Talk(SAY_SUMMON60);
|
||||
DoCastVictim(SPELL_FROST_SPECTRES);
|
||||
Spectrals60 = true;
|
||||
hp60Spectrals = true;
|
||||
}
|
||||
|
||||
if (!Hp && HealthBelowPct(50))
|
||||
if (!hp50 && HealthBelowPct(50))
|
||||
{
|
||||
Talk(SAY_HP);
|
||||
Hp = true;
|
||||
hp50 = true;
|
||||
}
|
||||
|
||||
if (!Spectrals30 && HealthBelowPct(30))
|
||||
if (!hp30Spectrals && HealthBelowPct(30))
|
||||
{
|
||||
Talk(SAY_SUMMON30);
|
||||
DoCastVictim(SPELL_FROST_SPECTRES);
|
||||
Spectrals30 = true;
|
||||
hp30Spectrals = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool hp60Spectrals;
|
||||
bool hp30Spectrals;
|
||||
bool hp50;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_amnennar_the_coldbringerAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_amnennar_the_coldbringer()
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "razorfen_downs.h"
|
||||
|
||||
enum Say
|
||||
{
|
||||
SAY_HP50 = 0,
|
||||
SAY_HP15 = 1
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_DISEASE_CLOUD = 12627,
|
||||
SPELL_FRENZY = 12795
|
||||
};
|
||||
|
||||
class boss_glutton : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_glutton() : CreatureScript("boss_glutton") { }
|
||||
|
||||
struct boss_gluttonAI : public BossAI
|
||||
{
|
||||
boss_gluttonAI(Creature* creature) : BossAI(creature, DATA_GLUTTON) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
hp50 = false;
|
||||
hp15 = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!hp50 && HealthBelowPct(50))
|
||||
{
|
||||
Talk(SAY_HP50);
|
||||
hp50 = true;
|
||||
}
|
||||
|
||||
if (!hp15 && HealthBelowPct(15))
|
||||
{
|
||||
Talk(SAY_HP15);
|
||||
DoCast(me, SPELL_FRENZY);
|
||||
hp15 = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool hp50;
|
||||
bool hp15;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_gluttonAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_glutton()
|
||||
{
|
||||
new boss_glutton();
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "razorfen_downs.h"
|
||||
|
||||
enum Say
|
||||
{
|
||||
SAY_OOC_1 = 0,
|
||||
SAY_OOC_2 = 1,
|
||||
SAY_OOC_3 = 2,
|
||||
SAY_AGGRO = 3
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_FIREBALL = 12466,
|
||||
SPELL_FIRE_NOVA = 12470
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_OOC_1 = 1,
|
||||
EVENT_OOC_2 = 2,
|
||||
EVENT_OOC_3 = 3,
|
||||
EVENT_OOC_4 = 4,
|
||||
EVENT_FIREBALL = 5,
|
||||
EVENT_FIRE_NOVA = 6
|
||||
};
|
||||
|
||||
class boss_mordresh_fire_eye : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_mordresh_fire_eye() : CreatureScript("boss_mordresh_fire_eye") { }
|
||||
|
||||
struct boss_mordresh_fire_eyeAI : public BossAI
|
||||
{
|
||||
boss_mordresh_fire_eyeAI(Creature* creature) : BossAI(creature, DATA_MORDRESH_FIRE_EYE) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
events.ScheduleEvent(EVENT_OOC_1, 10000);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
events.Reset();
|
||||
Talk(SAY_AGGRO);
|
||||
events.ScheduleEvent(EVENT_FIREBALL, 100);
|
||||
events.ScheduleEvent(EVENT_FIRE_NOVA, urand(8000, 12000));
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_OOC_1:
|
||||
Talk(SAY_OOC_1);
|
||||
events.ScheduleEvent(EVENT_OOC_2, 8000);
|
||||
break;
|
||||
case EVENT_OOC_2:
|
||||
Talk(SAY_OOC_2);
|
||||
events.ScheduleEvent(EVENT_OOC_3, 3000);
|
||||
break;
|
||||
case EVENT_OOC_3:
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION);
|
||||
events.ScheduleEvent(EVENT_OOC_4, 6000);
|
||||
break;
|
||||
case EVENT_OOC_4:
|
||||
Talk(SAY_OOC_3);
|
||||
events.ScheduleEvent(EVENT_OOC_1, 14000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_FIREBALL:
|
||||
DoCastVictim(SPELL_FIREBALL);
|
||||
events.ScheduleEvent(EVENT_FIREBALL, urand(2400, 3800));
|
||||
break;
|
||||
case EVENT_FIRE_NOVA:
|
||||
DoCast(me, SPELL_FIRE_NOVA);
|
||||
events.ScheduleEvent(EVENT_FIRE_NOVA, urand(11000, 16000));
|
||||
break;
|
||||
}
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_mordresh_fire_eyeAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_mordresh_fire_eye()
|
||||
{
|
||||
new boss_mordresh_fire_eye();
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "razorfen_downs.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_THRASH = 8876,
|
||||
SPELL_WEB_SPRAY = 12252,
|
||||
SPELL_VIRULENT_POISON = 12254,
|
||||
SPELL_CURSE_OF_TUTENKASH = 12255
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_WEB_SPRAY = 1,
|
||||
EVENT_CURSE_OF_TUTENKASH = 2
|
||||
};
|
||||
|
||||
class boss_tuten_kash : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_tuten_kash() : CreatureScript("boss_tuten_kash") { }
|
||||
|
||||
struct boss_tuten_kashAI : public BossAI
|
||||
{
|
||||
boss_tuten_kashAI(Creature* creature) : BossAI(creature, DATA_TUTEN_KASH) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
if (!me->HasAura(SPELL_THRASH))
|
||||
DoCast(me, SPELL_THRASH);
|
||||
if (!me->HasAura(SPELL_VIRULENT_POISON))
|
||||
DoCast(me, SPELL_VIRULENT_POISON);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_WEB_SPRAY, urand(3000, 5000));
|
||||
events.ScheduleEvent(EVENT_CURSE_OF_TUTENKASH, urand(9000, 14000));
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_WEB_SPRAY:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, false))
|
||||
{
|
||||
if (!target->HasAura(SPELL_WEB_SPRAY))
|
||||
DoCast(target, SPELL_WEB_SPRAY);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_WEB_SPRAY, urand(6000, 8000));
|
||||
break;
|
||||
case EVENT_CURSE_OF_TUTENKASH:
|
||||
DoCast(me, SPELL_CURSE_OF_TUTENKASH);
|
||||
events.ScheduleEvent(EVENT_CURSE_OF_TUTENKASH, urand(15000, 25000));
|
||||
break;
|
||||
}
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_tuten_kashAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_tuten_kash()
|
||||
{
|
||||
new boss_tuten_kash();
|
||||
}
|
||||
@@ -16,44 +16,160 @@
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "razorfen_downs.h"
|
||||
#include "Player.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
#define MAX_ENCOUNTER 1
|
||||
Position const PosSummonTutenkash[15] =
|
||||
{
|
||||
// 7349 Tomb Fiend
|
||||
{ 2487.339f, 805.9111f, 43.08361f, 2.844887f },
|
||||
{ 2485.405f, 804.1145f, 43.68511f, 3.054326f },
|
||||
{ 2488.431f, 801.2809f, 42.70374f, 4.29351f },
|
||||
{ 2489.914f, 804.7949f, 43.25175f, 1.658063f },
|
||||
{ 2541.246f, 907.0941f, 46.64201f, 2.024582f },
|
||||
{ 2544.701f, 907.6331f, 46.38007f, 1.605703f },
|
||||
{ 2541.49f, 911.1756f, 46.26493f, 4.817109f },
|
||||
{ 2544.693f, 912.8887f, 46.39912f, 2.129302f },
|
||||
{ 2524.036f, 834.4852f, 48.37031f, 0.8028514f },
|
||||
{ 2527.017f, 829.9793f, 48.06498f, 0.6981317f },
|
||||
// 7351 Tomb Reaver
|
||||
{ 2542.818f, 904.9359f, 46.80911f, 4.642576f },
|
||||
{ 2543.287f, 911.2448f, 46.32785f, 0.6806784f },
|
||||
{ 2489.083f, 806.5914f, 43.21102f, 3.682645f },
|
||||
{ 2486.828f, 802.8737f, 43.19883f, 2.9147f },
|
||||
// 7355 Tuten'kash
|
||||
{ 2487.939f, 804.2224f, 43.10735f, 1.692969f }
|
||||
};
|
||||
|
||||
class instance_razorfen_downs : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_razorfen_downs() : InstanceMapScript("instance_razorfen_downs", 129) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
|
||||
{
|
||||
return new instance_razorfen_downs_InstanceMapScript(map);
|
||||
}
|
||||
instance_razorfen_downs() : InstanceMapScript(RFDScriptName, 129) { }
|
||||
|
||||
struct instance_razorfen_downs_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_razorfen_downs_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetBossNumber(EncounterCount);
|
||||
}
|
||||
|
||||
uint64 uiGongGUID;
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
uint16 uiGongWaves;
|
||||
|
||||
std::string str_data;
|
||||
|
||||
void Initialize() OVERRIDE
|
||||
{
|
||||
uiGongGUID = 0;
|
||||
goGongGUID = 0;
|
||||
gongWave = 0;
|
||||
fiendsKilled = 0;
|
||||
reaversKilled = 0;
|
||||
summonLowRange = 0;
|
||||
summonHighRange = 0;
|
||||
summonCreature = 0;
|
||||
}
|
||||
|
||||
uiGongWaves = 0;
|
||||
void OnGameObjectCreate(GameObject* gameObject) OVERRIDE
|
||||
{
|
||||
switch (gameObject->GetEntry())
|
||||
{
|
||||
case GO_GONG:
|
||||
goGongGUID = gameObject->GetGUID();
|
||||
if (GetBossState(DATA_TUTEN_KASH) == DONE)
|
||||
gameObject->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case GO_IDOL_OVEN_FIRE:
|
||||
case GO_IDOL_CUP_FIRE:
|
||||
case GO_IDOL_MOUTH_FIRE:
|
||||
if (GetBossState(DATA_EXTINGUISHING_THE_IDOL) == DONE)
|
||||
gameObject->Delete();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state) OVERRIDE
|
||||
{
|
||||
if (!InstanceScript::SetBossState(type, state))
|
||||
return false;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DATA_TUTEN_KASH:
|
||||
case DATA_MORDRESH_FIRE_EYE:
|
||||
case DATA_GLUTTON:
|
||||
case DATA_AMNENNAR_THE_COLD_BRINGER:
|
||||
case DATA_GONG:
|
||||
case DATA_WAVE:
|
||||
case DATA_EXTINGUISHING_THE_IDOL:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data) OVERRIDE
|
||||
{
|
||||
if (type == DATA_WAVE)
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
case IN_PROGRESS:
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(goGongGUID))
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
switch (gongWave)
|
||||
{
|
||||
case 0:
|
||||
summonLowRange = 0;
|
||||
summonHighRange = 10;
|
||||
summonCreature = NPC_TOMB_FIEND;
|
||||
break;
|
||||
case 1:
|
||||
summonLowRange = 10;
|
||||
summonHighRange = 14;
|
||||
summonCreature = NPC_TOMB_REAVER;
|
||||
break;
|
||||
case 2:
|
||||
summonLowRange = 14;
|
||||
summonHighRange = 15;
|
||||
summonCreature = NPC_TUTEN_KASH;
|
||||
break;
|
||||
}
|
||||
|
||||
if (GameObject* go = instance->GetGameObject(goGongGUID))
|
||||
{
|
||||
for (uint8 i = summonLowRange; i < summonHighRange; ++i)
|
||||
{
|
||||
Creature* creature = go->SummonCreature(summonCreature, PosSummonTutenkash[i]);
|
||||
creature->GetMotionMaster()->MovePoint(0, 2533.479f + float(irand(-5, 5)), 870.020f + float(irand(-5, 5)), 47.678f);
|
||||
}
|
||||
}
|
||||
|
||||
++gongWave;
|
||||
break;
|
||||
}
|
||||
case NPC_TOMB_FIEND:
|
||||
if (++fiendsKilled == 10)
|
||||
{
|
||||
fiendsKilled = 0;
|
||||
if (GameObject* go = instance->GetGameObject(goGongGUID))
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
break;
|
||||
case NPC_TOMB_REAVER:
|
||||
if (++reaversKilled == 4)
|
||||
{
|
||||
reaversKilled = 0;
|
||||
if (GameObject* go = instance->GetGameObject(goGongGUID))
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
}
|
||||
|
||||
std::string GetSaveData() OVERRIDE
|
||||
@@ -61,154 +177,58 @@ public:
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
|
||||
saveStream << "T C " << m_auiEncounter[0]
|
||||
<< ' ' << uiGongWaves;
|
||||
|
||||
str_data = saveStream.str();
|
||||
saveStream << "R D " << GetBossSaveData();
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return str_data;
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(const char* in) OVERRIDE
|
||||
void Load(const char* str) OVERRIDE
|
||||
{
|
||||
if (!in)
|
||||
if (!str)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
OUT_LOAD_INST_DATA(str);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
uint16 data0, data1;
|
||||
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> dataHead1 >> dataHead2 >> data0 >> data1;
|
||||
std::istringstream loadStream(str);
|
||||
loadStream >> dataHead1 >> dataHead2;
|
||||
|
||||
if (dataHead1 == 'T' && dataHead2 == 'C')
|
||||
if (dataHead1 == 'R' && dataHead2 == 'D')
|
||||
{
|
||||
m_auiEncounter[0] = data0;
|
||||
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
|
||||
uiGongWaves = data1;
|
||||
} else OUT_LOAD_INST_DATA_FAIL;
|
||||
for (uint32 i = 0; i < EncounterCount; ++i)
|
||||
{
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
}
|
||||
else
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) OVERRIDE
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_GONG:
|
||||
uiGongGUID = go->GetGUID();
|
||||
if (m_auiEncounter[0] == DONE)
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 uiType, uint32 uiData) OVERRIDE
|
||||
{
|
||||
if (uiType == DATA_GONG_WAVES)
|
||||
{
|
||||
uiGongWaves = uiData;
|
||||
|
||||
switch (uiGongWaves)
|
||||
{
|
||||
case 9:
|
||||
case 14:
|
||||
if (GameObject* go = instance->GetGameObject(uiGongGUID))
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
break;
|
||||
case 1:
|
||||
case 10:
|
||||
case 16:
|
||||
{
|
||||
GameObject* go = instance->GetGameObject(uiGongGUID);
|
||||
|
||||
if (!go)
|
||||
return;
|
||||
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
|
||||
uint32 uiCreature = 0;
|
||||
uint8 uiSummonTimes = 0;
|
||||
|
||||
switch (uiGongWaves)
|
||||
{
|
||||
case 1:
|
||||
uiCreature = NPC_TOMB_FIEND;
|
||||
uiSummonTimes = 7;
|
||||
break;
|
||||
case 10:
|
||||
uiCreature = NPC_TOMB_REAVER;
|
||||
uiSummonTimes = 3;
|
||||
break;
|
||||
case 16:
|
||||
uiCreature = NPC_TUTEN_KASH;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (Creature* creature = go->SummonCreature(uiCreature, 2502.635f, 844.140f, 46.896f, 0.633f))
|
||||
{
|
||||
if (uiGongWaves == 10 || uiGongWaves == 1)
|
||||
{
|
||||
for (uint8 i = 0; i < uiSummonTimes; ++i)
|
||||
{
|
||||
if (Creature* summon = go->SummonCreature(uiCreature, 2502.635f + float(irand(-5, 5)), 844.140f + float(irand(-5, 5)), 46.896f, 0.633f))
|
||||
summon->GetMotionMaster()->MovePoint(0, 2533.479f + float(irand(-5, 5)), 870.020f + float(irand(-5, 5)), 47.678f);
|
||||
}
|
||||
}
|
||||
creature->GetMotionMaster()->MovePoint(0, 2533.479f + float(irand(-5, 5)), 870.020f + float(irand(-5, 5)), 47.678f);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (uiType == BOSS_TUTEN_KASH)
|
||||
{
|
||||
m_auiEncounter[0] = uiData;
|
||||
|
||||
if (uiData == DONE)
|
||||
SaveToDB();
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 uiType) const OVERRIDE
|
||||
{
|
||||
switch (uiType)
|
||||
{
|
||||
case DATA_GONG_WAVES:
|
||||
return uiGongWaves;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiType) const OVERRIDE
|
||||
{
|
||||
switch (uiType)
|
||||
{
|
||||
case DATA_GONG: return uiGongGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
protected:
|
||||
uint64 goGongGUID;
|
||||
uint16 gongWave;
|
||||
uint8 fiendsKilled;
|
||||
uint8 reaversKilled;
|
||||
uint8 summonLowRange;
|
||||
uint8 summonHighRange;
|
||||
uint32 summonCreature;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
|
||||
{
|
||||
return new instance_razorfen_downs_InstanceMapScript(map);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_instance_razorfen_downs()
|
||||
|
||||
@@ -32,6 +32,10 @@ EndContentData */
|
||||
#include "ScriptedGossip.h"
|
||||
#include "razorfen_downs.h"
|
||||
#include "Player.h"
|
||||
#include "GridNotifiers.h"
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Cell.h"
|
||||
#include "CellImpl.h"
|
||||
|
||||
/*###
|
||||
# npc_henry_stern
|
||||
@@ -100,6 +104,339 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_belnistrasz for Quest 3525 "Extinguishing the Idol"
|
||||
######*/
|
||||
|
||||
Position const PosSummonSpawner[3] =
|
||||
{
|
||||
{ 2582.789f, 954.3925f, 52.48214f, 3.787364f },
|
||||
{ 2569.42f, 956.3801f, 52.27323f, 5.427974f },
|
||||
{ 2570.62f, 942.3934f, 53.7433f, 0.715585f }
|
||||
};
|
||||
|
||||
enum Belnistrasz
|
||||
{
|
||||
EVENT_CHANNEL = 1,
|
||||
EVENT_IDOL_ROOM_SPAWNER = 2,
|
||||
EVENT_PROGRESS = 3,
|
||||
EVENT_COMPLETE = 4,
|
||||
EVENT_FIREBALL = 5,
|
||||
EVENT_FROST_NOVA = 6,
|
||||
|
||||
FACTION_ESCORT = 250,
|
||||
|
||||
PATH_ESCORT = 871710,
|
||||
POINT_REACH_IDOL = 17,
|
||||
|
||||
QUEST_EXTINGUISHING_THE_IDOL = 3525,
|
||||
|
||||
SAY_QUEST_ACCEPTED = 0,
|
||||
SAY_EVENT_START = 1,
|
||||
SAY_EVENT_THREE_MIN_LEFT = 2,
|
||||
SAY_EVENT_TWO_MIN_LEFT = 3,
|
||||
SAY_EVENT_ONE_MIN_LEFT = 4,
|
||||
SAY_EVENT_END = 5,
|
||||
SAY_AGGRO = 6, // Combat
|
||||
SAY_WATCH_OUT = 7, // 25% chance to target random creature and say on wave spawn
|
||||
|
||||
SPELL_ARCANE_INTELLECT = 13326,
|
||||
SPELL_FIREBALL = 9053,
|
||||
SPELL_FROST_NOVA = 11831,
|
||||
SPELL_IDOL_SHUTDOWN_VISUAL = 12774, // Hits Unit Entry: 8662
|
||||
SPELL_IDOM_ROOM_CAMERA_SHAKE = 12816 // Dummy needs scripting
|
||||
};
|
||||
|
||||
class npc_belnistrasz : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_belnistrasz() : CreatureScript("npc_belnistrasz") { }
|
||||
|
||||
struct npc_belnistraszAI : public ScriptedAI
|
||||
{
|
||||
npc_belnistraszAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
eventInProgress = false;
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (!eventInProgress)
|
||||
{
|
||||
if (!me->HasAura(SPELL_ARCANE_INTELLECT))
|
||||
DoCast(me, SPELL_ARCANE_INTELLECT);
|
||||
|
||||
channeling = false;
|
||||
eventProgress = 0;
|
||||
spawnerCount = 0;
|
||||
me->SetFlag(UNIT_NPC_FLAGS, GOSSIP_OPTION_QUESTGIVER);
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) OVERRIDE
|
||||
{
|
||||
if (channeling)
|
||||
{
|
||||
Talk(SAY_WATCH_OUT, who->GetGUID());
|
||||
}
|
||||
else
|
||||
{
|
||||
events.ScheduleEvent(EVENT_FIREBALL, 1000);
|
||||
events.ScheduleEvent(EVENT_FROST_NOVA, urand(8000, 12000));
|
||||
if (urand(0, 100) > 40)
|
||||
Talk(SAY_AGGRO, who->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
instance->SetBossState(DATA_EXTINGUISHING_THE_IDOL, DONE);
|
||||
me->DespawnOrUnsummon(5000);
|
||||
}
|
||||
|
||||
void sQuestAccept(Player* /*player*/, Quest const* quest) OVERRIDE
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_EXTINGUISHING_THE_IDOL)
|
||||
{
|
||||
eventInProgress = true;
|
||||
Talk(SAY_QUEST_ACCEPTED);
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, GOSSIP_OPTION_QUESTGIVER);
|
||||
me->setFaction(FACTION_ESCORT);
|
||||
me->GetMotionMaster()->MovePath(PATH_ESCORT, false);
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) OVERRIDE
|
||||
{
|
||||
if (type == WAYPOINT_MOTION_TYPE && id == POINT_REACH_IDOL)
|
||||
{
|
||||
channeling = true;
|
||||
events.ScheduleEvent(EVENT_CHANNEL, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!eventInProgress)
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_CHANNEL:
|
||||
Talk(SAY_EVENT_START);
|
||||
DoCast(me, SPELL_IDOL_SHUTDOWN_VISUAL);
|
||||
events.ScheduleEvent(EVENT_IDOL_ROOM_SPAWNER, 100);
|
||||
events.ScheduleEvent(EVENT_PROGRESS, 120000);
|
||||
break;
|
||||
case EVENT_IDOL_ROOM_SPAWNER:
|
||||
if (Creature* creature = me->SummonCreature(NPC_IDOL_ROOM_SPAWNER, PosSummonSpawner[urand(0,2)], TEMPSUMMON_TIMED_DESPAWN, 4000))
|
||||
creature->AI()->SetData(0,spawnerCount);
|
||||
if (++spawnerCount < 8)
|
||||
events.ScheduleEvent(EVENT_IDOL_ROOM_SPAWNER, 35000);
|
||||
break;
|
||||
case EVENT_PROGRESS:
|
||||
{
|
||||
switch (eventProgress)
|
||||
{
|
||||
case 0:
|
||||
Talk(SAY_EVENT_THREE_MIN_LEFT);
|
||||
++eventProgress;
|
||||
events.ScheduleEvent(EVENT_PROGRESS, 60000);
|
||||
break;
|
||||
case 1:
|
||||
Talk(SAY_EVENT_TWO_MIN_LEFT);
|
||||
++eventProgress;
|
||||
events.ScheduleEvent(EVENT_PROGRESS, 60000);
|
||||
break;
|
||||
case 2:
|
||||
Talk(SAY_EVENT_ONE_MIN_LEFT);
|
||||
++eventProgress;
|
||||
events.ScheduleEvent(EVENT_PROGRESS, 60000);
|
||||
break;
|
||||
case 3:
|
||||
events.CancelEvent(EVENT_IDOL_ROOM_SPAWNER);
|
||||
me->InterruptSpell(CURRENT_CHANNELED_SPELL);
|
||||
Talk(SAY_EVENT_END);
|
||||
events.ScheduleEvent(EVENT_COMPLETE, 3000);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case EVENT_COMPLETE:
|
||||
{
|
||||
DoCast(me, SPELL_IDOM_ROOM_CAMERA_SHAKE);
|
||||
me->SummonGameObject(GO_BELNISTRASZS_BRAZIER, 2577.196f, 947.0781f, 53.16757f, 2.356195f, 0, 0, 0.9238796f, 0.3826832f, 3600000);
|
||||
std::list<WorldObject*> ClusterList;
|
||||
Trinity::AllWorldObjectsInRange objects(me, 50.0f);
|
||||
Trinity::WorldObjectListSearcher<Trinity::AllWorldObjectsInRange> searcher(me, ClusterList, objects);
|
||||
me->VisitNearbyObject(50.0f, searcher);
|
||||
for (std::list<WorldObject*>::const_iterator itr = ClusterList.begin(); itr != ClusterList.end(); ++itr)
|
||||
{
|
||||
if (Player* player = (*itr)->ToPlayer())
|
||||
{
|
||||
if (player->GetQuestStatus(QUEST_EXTINGUISHING_THE_IDOL) == QUEST_STATUS_INCOMPLETE)
|
||||
player->CompleteQuest(QUEST_EXTINGUISHING_THE_IDOL);
|
||||
}
|
||||
else if (GameObject* go = (*itr)->ToGameObject())
|
||||
{
|
||||
if (go->GetEntry() == GO_IDOL_OVEN_FIRE || go->GetEntry() == GO_IDOL_CUP_FIRE || go->GetEntry() == GO_IDOL_MOUTH_FIRE)
|
||||
go->Delete();
|
||||
}
|
||||
}
|
||||
instance->SetBossState(DATA_EXTINGUISHING_THE_IDOL, DONE);
|
||||
me->DespawnOrUnsummon();
|
||||
break;
|
||||
}
|
||||
case EVENT_FIREBALL:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING) || !UpdateVictim())
|
||||
return;
|
||||
DoCastVictim(SPELL_FIREBALL);
|
||||
events.ScheduleEvent(EVENT_FIREBALL, 8000);
|
||||
break;
|
||||
case EVENT_FROST_NOVA:
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING) || !UpdateVictim())
|
||||
return;
|
||||
DoCast(me, SPELL_FROST_NOVA);
|
||||
events.ScheduleEvent(EVENT_FROST_NOVA, 15000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!channeling)
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
bool eventInProgress;
|
||||
bool channeling;
|
||||
uint8 eventProgress;
|
||||
uint8 spawnerCount;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_belnistraszAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_idol_room_spawner : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_idol_room_spawner() : CreatureScript("npc_idol_room_spawner") { }
|
||||
|
||||
struct npc_idol_room_spawnerAI : public ScriptedAI
|
||||
{
|
||||
npc_idol_room_spawnerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE { }
|
||||
|
||||
void SetData(uint32 /*type*/, uint32 data) OVERRIDE
|
||||
{
|
||||
if(!instance)
|
||||
return;
|
||||
|
||||
if (data < 7)
|
||||
{
|
||||
me->SummonCreature(NPC_WITHERED_BATTLE_BOAR, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
if (data > 0 && me->GetOrientation() < 4.0f)
|
||||
me->SummonCreature(NPC_WITHERED_BATTLE_BOAR, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
me->SummonCreature(NPC_DEATHS_HEAD_GEOMANCER, me->GetPositionX() + (cos(me->GetOrientation() - (M_PI/2)) * 2), me->GetPositionY() + (sin(me->GetOrientation() - (M_PI/2)) * 2), me->GetPositionZ(), me->GetOrientation());
|
||||
me->SummonCreature(NPC_WITHERED_QUILGUARD, me->GetPositionX() + (cos(me->GetOrientation() + (M_PI/2)) * 2), me->GetPositionY() + (sin(me->GetOrientation() + (M_PI/2)) * 2), me->GetPositionZ(), me->GetOrientation());
|
||||
}
|
||||
else if (data =7)
|
||||
me->SummonCreature(NPC_PLAGUEMAW_THE_ROTTING, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation());
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_idol_room_spawnerAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
enum TombCreature
|
||||
{
|
||||
EVENT_WEB = 7,
|
||||
SPELL_POISON_PROC = 3616,
|
||||
SPELL_VIRULENT_POISON_PROC = 12254,
|
||||
SPELL_WEB = 745
|
||||
};
|
||||
|
||||
class npc_tomb_creature : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_tomb_creature() : CreatureScript("npc_tomb_creature") { }
|
||||
|
||||
struct npc_tomb_creatureAI : public ScriptedAI
|
||||
{
|
||||
npc_tomb_creatureAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (!me->HasAura(SPELL_POISON_PROC) && me->GetEntry() == NPC_TOMB_FIEND)
|
||||
DoCast(me, SPELL_POISON_PROC);
|
||||
|
||||
if (!me->HasAura(SPELL_VIRULENT_POISON_PROC) && me->GetEntry() == NPC_TOMB_REAVER)
|
||||
DoCast(me, SPELL_VIRULENT_POISON_PROC);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_WAVE, me->GetEntry());
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
events.ScheduleEvent(EVENT_WEB, urand(5000, 8000));
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_WEB:
|
||||
DoCastVictim(SPELL_WEB);
|
||||
events.ScheduleEvent(EVENT_WEB, urand(7000, 16000));
|
||||
break;
|
||||
}
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* instance;
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_tomb_creatureAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## go_gong
|
||||
######*/
|
||||
@@ -111,81 +448,24 @@ public:
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
|
||||
{
|
||||
//basic support, not blizzlike data is missing...
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(DATA_GONG_WAVES, instance->GetData(DATA_GONG_WAVES)+1);
|
||||
go->SendCustomAnim(0);
|
||||
instance->SetData(DATA_WAVE, IN_PROGRESS);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
enum TombCreature
|
||||
{
|
||||
SPELL_WEB = 745
|
||||
};
|
||||
|
||||
class npc_tomb_creature : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_tomb_creature() : CreatureScript("npc_tomb_creature") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_tomb_creatureAI(creature);
|
||||
}
|
||||
|
||||
struct npc_tomb_creatureAI : public ScriptedAI
|
||||
{
|
||||
npc_tomb_creatureAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 uiWebTimer;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
uiWebTimer = urand(5000, 8000);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//from acid
|
||||
if (me->GetEntry() == NPC_TOMB_REAVER)
|
||||
{
|
||||
if (uiWebTimer <= uiDiff)
|
||||
{
|
||||
DoCastVictim(SPELL_WEB);
|
||||
uiWebTimer = urand(7000, 16000);
|
||||
} else uiWebTimer -= uiDiff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_GONG_WAVES, instance->GetData(DATA_GONG_WAVES)+1);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_razorfen_downs()
|
||||
{
|
||||
new npc_henry_stern();
|
||||
new go_gong();
|
||||
new npc_belnistrasz();
|
||||
new npc_idol_room_spawner();
|
||||
new npc_tomb_creature();
|
||||
new go_gong();
|
||||
}
|
||||
@@ -18,27 +18,56 @@
|
||||
#ifndef DEF_RAZORFEN_DOWNS_H
|
||||
#define DEF_RAZORFEN_DOWNS_H
|
||||
|
||||
enum Data
|
||||
#define RFDScriptName "instance_razorfen_downs"
|
||||
|
||||
uint32 const EncounterCount = 5;
|
||||
|
||||
enum DataTypes
|
||||
{
|
||||
BOSS_TUTEN_KASH,
|
||||
DATA_GONG_WAVES
|
||||
// Main Bosses
|
||||
DATA_TUTEN_KASH = 0,
|
||||
DATA_MORDRESH_FIRE_EYE = 1,
|
||||
DATA_GLUTTON = 2,
|
||||
DATA_AMNENNAR_THE_COLD_BRINGER = 3,
|
||||
// Events
|
||||
DATA_GONG = 4,
|
||||
DATA_WAVE = 5,
|
||||
DATA_EXTINGUISHING_THE_IDOL = 6
|
||||
};
|
||||
|
||||
enum Data64
|
||||
enum CreatureIds
|
||||
{
|
||||
DATA_GONG
|
||||
// Used in Tuten Kash summon event
|
||||
NPC_TOMB_FIEND = 7349,
|
||||
NPC_TOMB_REAVER = 7351,
|
||||
NPC_TUTEN_KASH = 7355,
|
||||
// Used for quest 3525 "Extinguishing the Idol"
|
||||
NPC_IDOL_ROOM_SPAWNER = 8611,
|
||||
NPC_WITHERED_BATTLE_BOAR = 7333,
|
||||
NPC_DEATHS_HEAD_GEOMANCER = 7335,
|
||||
NPC_WITHERED_QUILGUARD = 7329,
|
||||
NPC_PLAGUEMAW_THE_ROTTING = 7356
|
||||
};
|
||||
|
||||
enum GameObjectIds
|
||||
{
|
||||
GO_GONG = 148917
|
||||
// Used for Tuten Kash summon event
|
||||
GO_GONG = 148917,
|
||||
// Used for quest 3525 "Extinguishing the Idol"
|
||||
GO_IDOL_OVEN_FIRE = 151951,
|
||||
GO_IDOL_CUP_FIRE = 151952,
|
||||
GO_IDOL_MOUTH_FIRE = 151973,
|
||||
GO_BELNISTRASZS_BRAZIER = 152097
|
||||
};
|
||||
|
||||
enum CreatureId
|
||||
template<class AI>
|
||||
CreatureAI* GetRazorfenDownsAI(Creature* creature)
|
||||
{
|
||||
NPC_TOMB_FIEND = 7349,
|
||||
NPC_TOMB_REAVER = 7351,
|
||||
NPC_TUTEN_KASH = 7355
|
||||
};
|
||||
if (InstanceMap* instance = creature->GetMap()->ToInstanceMap())
|
||||
if (instance->GetInstanceScript())
|
||||
if (instance->GetScriptId() == sObjectMgr->GetScriptId(RFDScriptName))
|
||||
return new AI(creature);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -457,7 +457,7 @@ public:
|
||||
StartEvent();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)OVERRIDE { }
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void StartEvent()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* 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
|
||||
|
||||
@@ -398,7 +398,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void Reset()OVERRIDE { }
|
||||
void Reset() OVERRIDE { }
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
|
||||
@@ -43,12 +43,21 @@ class instance_forge_of_souls : public InstanceMapScript
|
||||
teamInInstance = 0;
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* player) OVERRIDE
|
||||
{
|
||||
if (!teamInInstance)
|
||||
teamInInstance = player->GetTeam();
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) OVERRIDE
|
||||
{
|
||||
Map::PlayerList const &players = instance->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (Player* player = players.begin()->GetSource())
|
||||
teamInInstance = player->GetTeam();
|
||||
if (!teamInInstance)
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (Player* player = players.begin()->GetSource())
|
||||
teamInInstance = player->GetTeam();
|
||||
}
|
||||
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
|
||||
+28
-19
@@ -1089,9 +1089,9 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
break;
|
||||
case EVENT_ESCAPE_27:
|
||||
if (_instance->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
|
||||
me->SummonGameObject(GO_CAPTAIN_CHEST_1, ChestPos.GetPositionX(), ChestPos.GetPositionY(), ChestPos.GetPositionZ(), ChestPos.GetOrientation(), 0, 0, 0, 0, 720000);
|
||||
me->SummonGameObject(IsHeroic() ? GO_CAPTAIN_CHEST_ALLIANCE_HEROIC : GO_CAPTAIN_CHEST_ALLIANCE_NORMAL, ChestPos.GetPositionX(), ChestPos.GetPositionY(), ChestPos.GetPositionZ(), ChestPos.GetOrientation(), 0, 0, 0, 0, 720000);
|
||||
else
|
||||
me->SummonGameObject(GO_CAPTAIN_CHEST_3, ChestPos.GetPositionX(), ChestPos.GetPositionY(), ChestPos.GetPositionZ(), ChestPos.GetOrientation(), 0, 0, 0, 0, 720000);
|
||||
me->SummonGameObject(IsHeroic() ? GO_CAPTAIN_CHEST_HORDE_HEROIC : GO_CAPTAIN_CHEST_HORDE_NORMAL, ChestPos.GetPositionX(), ChestPos.GetPositionY(), ChestPos.GetPositionZ(), ChestPos.GetOrientation(), 0, 0, 0, 0, 720000);
|
||||
me->SummonGameObject(GO_PORTAL, FinalPortalPos.GetPositionX(), FinalPortalPos.GetPositionY(), FinalPortalPos.GetPositionZ(), FinalPortalPos.GetOrientation(), 0, 0, 0, 0, 720000);
|
||||
if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID))
|
||||
lichking->DespawnOrUnsummon(1);
|
||||
@@ -1121,6 +1121,7 @@ enum TrashSpells
|
||||
SPELL_FROSTBOLT = 72166,
|
||||
SPELL_CHAINS_OF_ICE = 72121,
|
||||
SPELL_HALLUCINATION = 72342,
|
||||
AURA_HALLUCINATION = 72343,
|
||||
|
||||
// Phantom Hallucination (same as phantom mage + HALLUCINATION_2 when dies)
|
||||
SPELL_HALLUCINATION_2 = 72344,
|
||||
@@ -1180,10 +1181,7 @@ enum TrashEvents
|
||||
|
||||
struct npc_gauntlet_trash : public ScriptedAI
|
||||
{
|
||||
npc_gauntlet_trash(Creature* creature) : ScriptedAI(creature),
|
||||
_instance(creature->GetInstanceScript())
|
||||
{
|
||||
}
|
||||
npc_gauntlet_trash(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
@@ -1226,9 +1224,7 @@ public:
|
||||
|
||||
struct npc_ghostly_priestAI : public npc_gauntlet_trash
|
||||
{
|
||||
npc_ghostly_priestAI(Creature* creature) : npc_gauntlet_trash(creature)
|
||||
{
|
||||
}
|
||||
npc_ghostly_priestAI(Creature* creature) : npc_gauntlet_trash(creature) { }
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
@@ -1297,8 +1293,12 @@ public:
|
||||
|
||||
struct npc_phantom_mageAI : public npc_gauntlet_trash
|
||||
{
|
||||
npc_phantom_mageAI(Creature* creature) : npc_gauntlet_trash(creature)
|
||||
npc_phantom_mageAI(Creature* creature) : npc_gauntlet_trash(creature) { }
|
||||
|
||||
void EnterEvadeMode() OVERRIDE
|
||||
{
|
||||
if (!me->HasAura(AURA_HALLUCINATION))
|
||||
npc_gauntlet_trash::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
@@ -1342,6 +1342,8 @@ public:
|
||||
_events.ScheduleEvent(EVENT_CHAINS_OF_ICE, 15000);
|
||||
break;
|
||||
case EVENT_HALLUCINATION:
|
||||
// removing any dots on mage or else the invisibility spell will break duration
|
||||
me->RemoveAllAuras();
|
||||
DoCast(SPELL_HALLUCINATION);
|
||||
break;
|
||||
}
|
||||
@@ -1365,6 +1367,19 @@ public:
|
||||
{
|
||||
npc_phantom_hallucinationAI(Creature* creature) : npc_phantom_mage::npc_phantom_mageAI(creature) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (Unit* unit = me->SelectNearestTarget())
|
||||
AttackStart(unit);
|
||||
DoZoneInCombat();
|
||||
}
|
||||
|
||||
void EnterEvadeMode() OVERRIDE
|
||||
{
|
||||
if (!me->GetOwner()->HasAura(AURA_HALLUCINATION))
|
||||
npc_phantom_mage::npc_phantom_mageAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
DoCast(SPELL_HALLUCINATION_2);
|
||||
@@ -1384,9 +1399,7 @@ public:
|
||||
|
||||
struct npc_shadowy_mercenaryAI : public npc_gauntlet_trash
|
||||
{
|
||||
npc_shadowy_mercenaryAI(Creature* creature) : npc_gauntlet_trash(creature)
|
||||
{
|
||||
}
|
||||
npc_shadowy_mercenaryAI(Creature* creature) : npc_gauntlet_trash(creature) { }
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
@@ -1444,9 +1457,7 @@ public:
|
||||
|
||||
struct npc_spectral_footmanAI : public npc_gauntlet_trash
|
||||
{
|
||||
npc_spectral_footmanAI(Creature* creature) : npc_gauntlet_trash(creature)
|
||||
{
|
||||
}
|
||||
npc_spectral_footmanAI(Creature* creature) : npc_gauntlet_trash(creature) { }
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
@@ -1498,9 +1509,7 @@ public:
|
||||
|
||||
struct npc_tortured_riflemanAI : public npc_gauntlet_trash
|
||||
{
|
||||
npc_tortured_riflemanAI(Creature* creature) : npc_gauntlet_trash(creature)
|
||||
{
|
||||
}
|
||||
npc_tortured_riflemanAI(Creature* creature) : npc_gauntlet_trash(creature) { }
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
|
||||
@@ -95,10 +95,10 @@ enum GameObjects
|
||||
GO_ORGRIM_HAMMER = 201599,
|
||||
GO_PORTAL = 202079,
|
||||
|
||||
GO_CAPTAIN_CHEST_1 = 202212, //3145
|
||||
GO_CAPTAIN_CHEST_2 = 201710, //30357
|
||||
GO_CAPTAIN_CHEST_3 = 202337, //3246
|
||||
GO_CAPTAIN_CHEST_4 = 202336, //3333
|
||||
GO_CAPTAIN_CHEST_HORDE_NORMAL = 202212, //3145
|
||||
GO_CAPTAIN_CHEST_ALLIANCE_NORMAL = 201710, //30357
|
||||
GO_CAPTAIN_CHEST_HORDE_HEROIC = 202337, //3246
|
||||
GO_CAPTAIN_CHEST_ALLIANCE_HEROIC = 202336, //3333
|
||||
};
|
||||
|
||||
enum HorWorldStates
|
||||
|
||||
+10
-7
@@ -110,10 +110,13 @@ public:
|
||||
|
||||
void OnCreatureCreate(Creature* creature) OVERRIDE
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (Player* player = players.begin()->GetSource())
|
||||
_teamInInstance = player->GetTeam();
|
||||
if (!_teamInInstance)
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (Player* player = players.begin()->GetSource())
|
||||
_teamInInstance = player->GetTeam();
|
||||
}
|
||||
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
@@ -184,7 +187,7 @@ public:
|
||||
case GO_ARTHAS_DOOR:
|
||||
_arthasDoorGUID = go->GetGUID();
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
|
||||
if (GetBossState(DATA_FROSWORN_EVENT) == DONE)
|
||||
if (GetData(DATA_FROSWORN_EVENT) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
else
|
||||
HandleGameObject(0, false, go);
|
||||
@@ -511,13 +514,13 @@ public:
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "H R " << GetBossSaveData() << _introEvent << ' ' << _frostwornGeneral << _escapeevent;
|
||||
saveStream << "H R " << GetBossSaveData() << _introEvent << ' ' << _frostwornGeneral << ' ' << _escapeevent;
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(char const* in) OVERRIDE OVERRIDE
|
||||
void Load(char const* in) OVERRIDE
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
|
||||
@@ -187,7 +187,7 @@ class boss_garfrost : public CreatureScript
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_THROW_SARONITE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
{
|
||||
Talk(SAY_THROW_SARONITE, target->GetGUID());
|
||||
DoCast(target, SPELL_THROW_SARONITE);
|
||||
@@ -199,7 +199,7 @@ class boss_garfrost : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_CHILLING_WAVE, 40000, 0, PHASE_TWO);
|
||||
break;
|
||||
case EVENT_DEEP_FREEZE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
{
|
||||
Talk(SAY_CAST_DEEP_FREEZE, target->GetGUID());
|
||||
DoCast(target, SPELL_DEEP_FREEZE);
|
||||
|
||||
@@ -385,32 +385,25 @@ class boss_rimefang : public CreatureScript
|
||||
class player_overlord_brandAI : public PlayerAI
|
||||
{
|
||||
public:
|
||||
player_overlord_brandAI(Player* player) : PlayerAI(player), _tyrannus(0)
|
||||
{
|
||||
}
|
||||
|
||||
void SetGUID(uint64 guid, int32 /*type*/) OVERRIDE
|
||||
{
|
||||
_tyrannus = guid;
|
||||
}
|
||||
player_overlord_brandAI(Player* player, uint64 casterGUID) : PlayerAI(player), _tyrannusGUID(casterGUID) { }
|
||||
|
||||
void DamageDealt(Unit* /*victim*/, uint32& damage, DamageEffectType /*damageType*/) OVERRIDE
|
||||
{
|
||||
if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannus))
|
||||
if (tyrannus->GetVictim())
|
||||
me->CastCustomSpell(SPELL_OVERLORD_BRAND_DAMAGE, SPELLVALUE_BASE_POINT0, damage, tyrannus->GetVictim(), true, NULL, NULL, tyrannus->GetGUID());
|
||||
if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannusGUID))
|
||||
if (Unit* victim = tyrannus->GetVictim())
|
||||
me->CastCustomSpell(SPELL_OVERLORD_BRAND_DAMAGE, SPELLVALUE_BASE_POINT0, damage, victim, true, NULL, NULL, tyrannus->GetGUID());
|
||||
}
|
||||
|
||||
void HealDone(Unit* /*target*/, uint32& addHealth) OVERRIDE
|
||||
{
|
||||
if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannus))
|
||||
me->CastCustomSpell(SPELL_OVERLORD_BRAND_HEAL, SPELLVALUE_BASE_POINT0, int32(addHealth*5.5f), tyrannus, true, NULL, NULL, tyrannus->GetGUID());
|
||||
if (Creature* tyrannus = ObjectAccessor::GetCreature(*me, _tyrannusGUID))
|
||||
me->CastCustomSpell(SPELL_OVERLORD_BRAND_HEAL, SPELLVALUE_BASE_POINT0, int32(addHealth * 5.5f), tyrannus, true, NULL, NULL, tyrannus->GetGUID());
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) OVERRIDE { }
|
||||
|
||||
private:
|
||||
uint64 _tyrannus;
|
||||
uint64 _tyrannusGUID;
|
||||
};
|
||||
|
||||
class spell_tyrannus_overlord_brand : public SpellScriptLoader
|
||||
@@ -434,8 +427,8 @@ class spell_tyrannus_overlord_brand : public SpellScriptLoader
|
||||
|
||||
oldAI = GetTarget()->GetAI();
|
||||
oldAIState = GetTarget()->IsAIEnabled;
|
||||
GetTarget()->SetAI(new player_overlord_brandAI(GetTarget()->ToPlayer()));
|
||||
GetTarget()->GetAI()->SetGUID(GetCasterGUID());
|
||||
GetTarget()->SetAI(new player_overlord_brandAI(GetTarget()->ToPlayer(), GetCasterGUID()));
|
||||
GetTarget()->IsAIEnabled = true;
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
|
||||
@@ -63,7 +63,7 @@ class instance_pit_of_saron : public InstanceMapScript
|
||||
{
|
||||
if (!_teamInInstance)
|
||||
{
|
||||
Map::PlayerList const &players = instance->GetPlayers();
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
if (Player* player = players.begin()->GetSource())
|
||||
_teamInInstance = player->GetTeam();
|
||||
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
unit->SetControlled(true, UNIT_STATE_ROOT);
|
||||
}
|
||||
|
||||
void ProcessEvent(WorldObject* /*obj*/, uint32 eventId)
|
||||
void ProcessEvent(WorldObject* /*obj*/, uint32 eventId) OVERRIDE
|
||||
{
|
||||
if (eventId == EVENT_FOCUSING_IRIS)
|
||||
{
|
||||
|
||||
@@ -52,141 +52,141 @@ enum DrakosEvents
|
||||
|
||||
class boss_drakos : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_drakos() : CreatureScript("boss_drakos") { }
|
||||
public:
|
||||
boss_drakos() : CreatureScript("boss_drakos") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_drakosAI(creature);
|
||||
}
|
||||
|
||||
struct boss_drakosAI : public BossAI
|
||||
{
|
||||
boss_drakosAI(Creature* creature) : BossAI(creature, DATA_DRAKOS_EVENT) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
struct boss_drakosAI : public BossAI
|
||||
{
|
||||
_Reset();
|
||||
boss_drakosAI(Creature* creature) : BossAI(creature, DATA_DRAKOS) { }
|
||||
|
||||
events.ScheduleEvent(EVENT_MAGIC_PULL, 15000);
|
||||
events.ScheduleEvent(EVENT_STOMP, 17000);
|
||||
events.ScheduleEvent(EVENT_BOMB_SUMMON, 2000);
|
||||
|
||||
postPull = false;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_BOMB_SUMMON:
|
||||
{
|
||||
Position pPosition;
|
||||
me->GetPosition(&pPosition);
|
||||
_Reset();
|
||||
|
||||
for (uint8 i = 0; i <= (postPull ? 3 : 0); i++)
|
||||
{
|
||||
me->GetRandomNearPosition(pPosition, float(urand(0, 10)));
|
||||
me->SummonCreature(NPC_UNSTABLE_SPHERE, pPosition);
|
||||
}
|
||||
}
|
||||
events.ScheduleEvent(EVENT_BOMB_SUMMON, 2000);
|
||||
break;
|
||||
case EVENT_MAGIC_PULL:
|
||||
DoCast(SPELL_MAGIC_PULL);
|
||||
postPull = true;
|
||||
events.ScheduleEvent(EVENT_MAGIC_PULL, 15000);
|
||||
break;
|
||||
case EVENT_STOMP:
|
||||
Talk(SAY_STOMP);
|
||||
DoCast(SPELL_THUNDERING_STOMP);
|
||||
events.ScheduleEvent(EVENT_STOMP, 17000);
|
||||
break;
|
||||
}
|
||||
events.ScheduleEvent(EVENT_MAGIC_PULL, 15000);
|
||||
events.ScheduleEvent(EVENT_STOMP, 17000);
|
||||
events.ScheduleEvent(EVENT_BOMB_SUMMON, 2000);
|
||||
|
||||
postPull = false;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_BOMB_SUMMON:
|
||||
{
|
||||
Position position;
|
||||
me->GetPosition(&position);
|
||||
|
||||
for (uint8 i = 0; i <= (postPull ? 3 : 0); i++)
|
||||
{
|
||||
me->GetRandomNearPosition(position, frand(0.0f, 10.0f));
|
||||
me->SummonCreature(NPC_UNSTABLE_SPHERE, position);
|
||||
}
|
||||
}
|
||||
events.ScheduleEvent(EVENT_BOMB_SUMMON, 2000);
|
||||
break;
|
||||
case EVENT_MAGIC_PULL:
|
||||
DoCast(SPELL_MAGIC_PULL);
|
||||
postPull = true;
|
||||
events.ScheduleEvent(EVENT_MAGIC_PULL, 15000);
|
||||
break;
|
||||
case EVENT_STOMP:
|
||||
Talk(SAY_STOMP);
|
||||
DoCast(SPELL_THUNDERING_STOMP);
|
||||
events.ScheduleEvent(EVENT_STOMP, 17000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
// start achievement timer (kill Eregos within 20 min)
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
private:
|
||||
bool postPull;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
// start achievement timer (kill Eregos within 20 min)
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
return GetOculusAI<boss_drakosAI>(creature);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
private:
|
||||
bool postPull;
|
||||
};
|
||||
};
|
||||
|
||||
class npc_unstable_sphere : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_unstable_sphere() : CreatureScript("npc_unstable_sphere") { }
|
||||
public:
|
||||
npc_unstable_sphere() : CreatureScript("npc_unstable_sphere") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_unstable_sphereAI(creature);
|
||||
}
|
||||
|
||||
struct npc_unstable_sphereAI : public ScriptedAI
|
||||
{
|
||||
npc_unstable_sphereAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
struct npc_unstable_sphereAI : public ScriptedAI
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->GetMotionMaster()->MoveRandom(40.0f);
|
||||
npc_unstable_sphereAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
me->AddAura(SPELL_UNSTABLE_SPHERE_PASSIVE, me);
|
||||
me->AddAura(SPELL_UNSTABLE_SPHERE_TIMER, me);
|
||||
|
||||
pulseTimer = 3000;
|
||||
deathTimer = 19000;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (pulseTimer <= diff)
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
DoCast(SPELL_UNSTABLE_SPHERE_PULSE);
|
||||
pulseTimer = 3*IN_MILLISECONDS;
|
||||
} else pulseTimer -= diff;
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->GetMotionMaster()->MoveRandom(40.0f);
|
||||
|
||||
if (deathTimer <= diff)
|
||||
me->DisappearAndDie();
|
||||
else deathTimer -= diff;
|
||||
me->AddAura(SPELL_UNSTABLE_SPHERE_PASSIVE, me);
|
||||
me->AddAura(SPELL_UNSTABLE_SPHERE_TIMER, me);
|
||||
|
||||
pulseTimer = 3000;
|
||||
|
||||
me->DespawnOrUnsummon(19000);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (pulseTimer <= diff)
|
||||
{
|
||||
DoCast(SPELL_UNSTABLE_SPHERE_PULSE);
|
||||
pulseTimer = 3 * IN_MILLISECONDS;
|
||||
}
|
||||
else
|
||||
pulseTimer -= diff;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 pulseTimer;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_unstable_sphereAI(creature);
|
||||
}
|
||||
private:
|
||||
uint32 pulseTimer;
|
||||
uint32 deathTimer;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
void AddSC_boss_drakos()
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "oculus.h"
|
||||
|
||||
//Types of drake mounts: Ruby(Tank), Amber(DPS), Emerald(Healer)
|
||||
//Two Repeating phases
|
||||
// Types of drake mounts: Ruby (Tank), Amber (DPS), Emerald (Healer)
|
||||
// Two Repeating phases
|
||||
|
||||
enum Events
|
||||
{
|
||||
@@ -61,8 +61,8 @@ enum Npcs
|
||||
|
||||
enum Phases
|
||||
{
|
||||
PHASE_NORMAL = 1,
|
||||
PHASE_FIRST_PLANAR = 2,
|
||||
PHASE_NORMAL = 1,
|
||||
PHASE_FIRST_PLANAR = 2,
|
||||
PHASE_SECOND_PLANAR = 3
|
||||
};
|
||||
|
||||
@@ -80,172 +80,174 @@ enum EregosData
|
||||
|
||||
class boss_eregos : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_eregos() : CreatureScript("boss_eregos") { }
|
||||
public:
|
||||
boss_eregos() : CreatureScript("boss_eregos") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_eregosAI(creature);
|
||||
}
|
||||
|
||||
struct boss_eregosAI : public BossAI
|
||||
{
|
||||
boss_eregosAI(Creature* creature) : BossAI(creature, DATA_EREGOS_EVENT) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
struct boss_eregosAI : public BossAI
|
||||
{
|
||||
_Reset();
|
||||
_phase = PHASE_NORMAL;
|
||||
boss_eregosAI(Creature* creature) : BossAI(creature, DATA_EREGOS) { }
|
||||
|
||||
_rubyVoid = true;
|
||||
_emeraldVoid = true;
|
||||
_amberVoid = true;
|
||||
|
||||
DoAction(ACTION_SET_NORMAL_EVENTS);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
/* Checks for present drakes vehicles from each type and deactivate achievement that corresponds to each found
|
||||
The checks are so big in case some party try weird things like pulling boss down or hiding out of check range, the only thing player need is to get the boss kill credit after the check /even if he or his drake die/
|
||||
Drakes mechanic would despawn all after unmount and also drakes should be auto mounted after item use, item use after Eregos is engaged leads to his despawn - based on retail data. */
|
||||
if (me->FindNearestCreature(NPC_RUBY_DRAKE_VEHICLE, 500.0f, true))
|
||||
_rubyVoid = false;
|
||||
if (me->FindNearestCreature(NPC_EMERALD_DRAKE_VEHICLE, 500.0f, true))
|
||||
_emeraldVoid = false;
|
||||
if (me->FindNearestCreature(NPC_AMBER_DRAKE_VEHICLE, 500.0f, true))
|
||||
_amberVoid = false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const OVERRIDE
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_RUBY_VOID:
|
||||
return _rubyVoid;
|
||||
case DATA_EMERALD_VOID:
|
||||
return _emeraldVoid;
|
||||
case DATA_AMBER_VOID:
|
||||
return _amberVoid;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DoAction(int32 action) OVERRIDE
|
||||
{
|
||||
if (action != ACTION_SET_NORMAL_EVENTS)
|
||||
return;
|
||||
|
||||
events.ScheduleEvent(EVENT_ARCANE_BARRAGE, urand(3, 10) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
events.ScheduleEvent(EVENT_ARCANE_VOLLEY, urand(10, 25) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
events.ScheduleEvent(EVENT_ENRAGED_ASSAULT, urand(35, 50) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
events.ScheduleEvent(EVENT_SUMMON_LEY_WHELP, urand(15, 30) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) OVERRIDE
|
||||
{
|
||||
BossAI::JustSummoned(summon);
|
||||
|
||||
if (summon->GetEntry() != NPC_PLANAR_ANOMALY)
|
||||
return;
|
||||
|
||||
summon->CombatStop(true);
|
||||
summon->SetReactState(REACT_PASSIVE);
|
||||
summon->GetMotionMaster()->MoveRandom(100.0f);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon) OVERRIDE
|
||||
{
|
||||
if (summon->GetEntry() != NPC_PLANAR_ANOMALY)
|
||||
return;
|
||||
|
||||
// TO-DO: See why the spell is not casted
|
||||
summon->CastSpell(summon, SPELL_PLANAR_BLAST, true);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE
|
||||
{
|
||||
if (!me->GetMap()->IsHeroic())
|
||||
return;
|
||||
|
||||
if ( (me->GetHealthPct() < 60.0f && me->GetHealthPct() > 20.0f && _phase < PHASE_FIRST_PLANAR)
|
||||
|| (me->GetHealthPct() < 20.0f && _phase < PHASE_SECOND_PLANAR) )
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
events.Reset();
|
||||
_phase = (me->GetHealthPct() < 60.0f && me->GetHealthPct() > 20.0f) ? PHASE_FIRST_PLANAR : PHASE_SECOND_PLANAR;
|
||||
_Reset();
|
||||
_phase = PHASE_NORMAL;
|
||||
|
||||
Talk(SAY_SHIELD);
|
||||
DoCast(SPELL_PLANAR_SHIFT);
|
||||
_rubyVoid = true;
|
||||
_emeraldVoid = true;
|
||||
_amberVoid = true;
|
||||
|
||||
// not sure about the amount, and if we should despawn previous spawns (dragon trashs)
|
||||
summons.DespawnAll();
|
||||
for (uint8 i = 0; i < 6; i++)
|
||||
DoCast(SPELL_PLANAR_ANOMALIES);
|
||||
DoAction(ACTION_SET_NORMAL_EVENTS);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
{
|
||||
switch (eventId)
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
/* Checks for present drakes vehicles from each type and deactivate achievement that corresponds to each found
|
||||
The checks are so big in case some party try weird things like pulling boss down or hiding out of check range, the only thing player need is to get the boss kill credit after the check /even if he or his drake die/
|
||||
Drakes mechanic would despawn all after unmount and also drakes should be auto mounted after item use, item use after Eregos is engaged leads to his despawn - based on retail data. */
|
||||
if (me->FindNearestCreature(NPC_RUBY_DRAKE_VEHICLE, 500.0f, true))
|
||||
_rubyVoid = false;
|
||||
if (me->FindNearestCreature(NPC_EMERALD_DRAKE_VEHICLE, 500.0f, true))
|
||||
_emeraldVoid = false;
|
||||
if (me->FindNearestCreature(NPC_AMBER_DRAKE_VEHICLE, 500.0f, true))
|
||||
_amberVoid = false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const OVERRIDE
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_RUBY_VOID:
|
||||
return _rubyVoid;
|
||||
case DATA_EMERALD_VOID:
|
||||
return _emeraldVoid;
|
||||
case DATA_AMBER_VOID:
|
||||
return _amberVoid;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
void DoAction(int32 action) OVERRIDE
|
||||
{
|
||||
if (action != ACTION_SET_NORMAL_EVENTS)
|
||||
return;
|
||||
|
||||
events.SetPhase(PHASE_NORMAL);
|
||||
events.ScheduleEvent(EVENT_ARCANE_BARRAGE, urand(3, 10) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
events.ScheduleEvent(EVENT_ARCANE_VOLLEY, urand(10, 25) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
events.ScheduleEvent(EVENT_ENRAGED_ASSAULT, urand(35, 50) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
events.ScheduleEvent(EVENT_SUMMON_LEY_WHELP, urand(15, 30) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) OVERRIDE
|
||||
{
|
||||
BossAI::JustSummoned(summon);
|
||||
|
||||
if (summon->GetEntry() != NPC_PLANAR_ANOMALY)
|
||||
return;
|
||||
|
||||
summon->CombatStop(true);
|
||||
summon->SetReactState(REACT_PASSIVE);
|
||||
summon->GetMotionMaster()->MoveRandom(100.0f);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon) OVERRIDE
|
||||
{
|
||||
if (summon->GetEntry() != NPC_PLANAR_ANOMALY)
|
||||
return;
|
||||
|
||||
/// @todo: See why the spell is not casted
|
||||
summon->CastSpell(summon, SPELL_PLANAR_BLAST, true);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/) OVERRIDE
|
||||
{
|
||||
if (!IsHeroic())
|
||||
return;
|
||||
|
||||
if ( (me->GetHealthPct() < 60.0f && me->GetHealthPct() > 20.0f && _phase < PHASE_FIRST_PLANAR)
|
||||
|| (me->GetHealthPct() < 20.0f && _phase < PHASE_SECOND_PLANAR) )
|
||||
{
|
||||
case EVENT_ARCANE_BARRAGE:
|
||||
DoCastVictim(SPELL_ARCANE_BARRAGE);
|
||||
events.ScheduleEvent(EVENT_ARCANE_BARRAGE, urand(3, 10) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
break;
|
||||
case EVENT_ARCANE_VOLLEY:
|
||||
DoCastAOE(SPELL_ARCANE_VOLLEY);
|
||||
events.ScheduleEvent(EVENT_ARCANE_VOLLEY, urand(10, 25) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
break;
|
||||
case EVENT_ENRAGED_ASSAULT:
|
||||
Talk(SAY_ENRAGE);
|
||||
DoCast(SPELL_ENRAGED_ASSAULT);
|
||||
events.ScheduleEvent(EVENT_ENRAGED_ASSAULT, urand(35, 50) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
break;
|
||||
case EVENT_SUMMON_LEY_WHELP:
|
||||
for (uint8 i = 0; i < 3; i++)
|
||||
DoCast(SPELL_SUMMON_LEY_WHELP);
|
||||
events.ScheduleEvent(EVENT_SUMMON_LEY_WHELP, urand(15, 30) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
break;
|
||||
events.Reset();
|
||||
_phase = (me->GetHealthPct() < 60.0f && me->GetHealthPct() > 20.0f) ? PHASE_FIRST_PLANAR : PHASE_SECOND_PLANAR;
|
||||
|
||||
Talk(SAY_SHIELD);
|
||||
DoCast(SPELL_PLANAR_SHIFT);
|
||||
|
||||
// not sure about the amount, and if we should despawn previous spawns (dragon trashs)
|
||||
summons.DespawnAll();
|
||||
for (uint8 i = 0; i < 6; i++)
|
||||
DoCast(SPELL_PLANAR_ANOMALIES);
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_ARCANE_BARRAGE:
|
||||
DoCastVictim(SPELL_ARCANE_BARRAGE);
|
||||
events.ScheduleEvent(EVENT_ARCANE_BARRAGE, urand(3, 10) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
break;
|
||||
case EVENT_ARCANE_VOLLEY:
|
||||
DoCastAOE(SPELL_ARCANE_VOLLEY);
|
||||
events.ScheduleEvent(EVENT_ARCANE_VOLLEY, urand(10, 25) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
break;
|
||||
case EVENT_ENRAGED_ASSAULT:
|
||||
Talk(SAY_ENRAGE);
|
||||
DoCast(SPELL_ENRAGED_ASSAULT);
|
||||
events.ScheduleEvent(EVENT_ENRAGED_ASSAULT, urand(35, 50) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
break;
|
||||
case EVENT_SUMMON_LEY_WHELP:
|
||||
for (uint8 i = 0; i < 3; i++)
|
||||
DoCast(SPELL_SUMMON_LEY_WHELP);
|
||||
events.ScheduleEvent(EVENT_SUMMON_LEY_WHELP, urand(15, 30) * IN_MILLISECONDS, 0, PHASE_NORMAL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
private:
|
||||
uint8 _phase;
|
||||
bool _rubyVoid;
|
||||
bool _emeraldVoid;
|
||||
bool _amberVoid;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
_JustDied();
|
||||
return new boss_eregosAI(creature);
|
||||
}
|
||||
|
||||
private:
|
||||
uint8 _phase;
|
||||
bool _rubyVoid;
|
||||
bool _emeraldVoid;
|
||||
bool _amberVoid;
|
||||
};
|
||||
};
|
||||
|
||||
class spell_eregos_planar_shift : public SpellScriptLoader
|
||||
@@ -259,9 +261,8 @@ class spell_eregos_planar_shift : public SpellScriptLoader
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (Creature* creatureCaster = caster->ToCreature())
|
||||
creatureCaster->AI()->DoAction(ACTION_SET_NORMAL_EVENTS);
|
||||
if (Creature* creature = GetTarget()->ToCreature())
|
||||
creature->AI()->DoAction(ACTION_SET_NORMAL_EVENTS);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
|
||||
@@ -29,7 +29,6 @@ EndScriptData */
|
||||
|
||||
enum Spells
|
||||
{
|
||||
|
||||
SPELL_ARCANE_SHIELD = 53813, //Dummy --> Channeled, shields the caster from damage.
|
||||
SPELL_EMPOWERED_ARCANE_EXPLOSION = 51110,
|
||||
SPELL_EMPOWERED_ARCANE_EXPLOSION_2 = 59377,
|
||||
@@ -89,274 +88,242 @@ static uint32 TeleportSpells[]=
|
||||
|
||||
class boss_urom : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_urom() : CreatureScript("boss_urom") { }
|
||||
public:
|
||||
boss_urom() : CreatureScript("boss_urom") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_uromAI(creature);
|
||||
}
|
||||
|
||||
struct boss_uromAI : public BossAI
|
||||
{
|
||||
boss_uromAI(Creature* creature) : BossAI(creature, DATA_UROM_EVENT) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
struct boss_uromAI : public BossAI
|
||||
{
|
||||
me->CastSpell(me, SPELL_EVOCATE);
|
||||
|
||||
_Reset();
|
||||
|
||||
if (instance->GetData(DATA_UROM_PLATAFORM) == 0)
|
||||
boss_uromAI(Creature* creature) : BossAI(creature, DATA_UROM)
|
||||
{
|
||||
for (uint8 i = 0; i < 3; i++)
|
||||
group[i] = 0;
|
||||
platform = 0;
|
||||
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
group[i] = i;
|
||||
|
||||
std::random_shuffle(group, group + 3);
|
||||
}
|
||||
|
||||
x = 0.0f;
|
||||
y = 0.0f;
|
||||
canCast = false;
|
||||
canGoBack = false;
|
||||
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
|
||||
teleportTimer = urand(30000, 35000);
|
||||
arcaneExplosionTimer = 9000;
|
||||
castArcaneExplosionTimer = 2000;
|
||||
frostBombTimer = urand(5000, 8000);
|
||||
timeBombTimer = urand(20000, 25000);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
|
||||
SetGroups();
|
||||
SummonGroups();
|
||||
CastTeleport();
|
||||
|
||||
if (instance->GetData(DATA_UROM_PLATAFORM) != 3)
|
||||
instance->SetData(DATA_UROM_PLATAFORM, instance->GetData(DATA_UROM_PLATAFORM)+1);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) OVERRIDE
|
||||
{
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if (me->GetPositionZ() > 518.63f)
|
||||
DoStartNoMovement(who);
|
||||
|
||||
if (me->GetPositionZ() < 518.63f)
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (me->Attack(who, true))
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
me->SetInCombatWith(who);
|
||||
who->SetInCombatWith(me);
|
||||
|
||||
me->GetMotionMaster()->MoveChase(who, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SetGroups()
|
||||
{
|
||||
if (!instance || instance->GetData(DATA_UROM_PLATAFORM) != 0)
|
||||
return;
|
||||
|
||||
while (group[0] == group[1] || group[0] == group[2] || group[1] == group[2])
|
||||
{
|
||||
for (uint8 i = 0; i < 3; i++)
|
||||
group[i] = urand(0, 2);
|
||||
}
|
||||
}
|
||||
|
||||
void SetPosition(uint8 i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
x = me->GetPositionX() + 4;
|
||||
y = me->GetPositionY() - 4;
|
||||
break;
|
||||
case 1:
|
||||
x = me->GetPositionX() + 4;
|
||||
y = me->GetPositionY() + 4;
|
||||
break;
|
||||
case 2:
|
||||
x = me->GetPositionX() - 4;
|
||||
y = me->GetPositionY() + 4;
|
||||
break;
|
||||
case 3:
|
||||
x = me->GetPositionX() - 4;
|
||||
y = me->GetPositionY() - 4;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SummonGroups()
|
||||
{
|
||||
if (!instance || instance->GetData(DATA_UROM_PLATAFORM) > 2)
|
||||
return;
|
||||
|
||||
for (uint8 i = 0; i < 4; i++)
|
||||
{
|
||||
SetPosition(i);
|
||||
me->SummonCreature(Group[group[instance->GetData(DATA_UROM_PLATAFORM)]].entry[i], x, y, me->GetPositionZ(), me->GetOrientation());
|
||||
|
||||
// teleport to next platform and spawn adds
|
||||
switch (instance->GetData(DATA_UROM_PLATAFORM))
|
||||
me->CastSpell(me, SPELL_EVOCATE);
|
||||
|
||||
_Reset();
|
||||
|
||||
x = 0.0f;
|
||||
y = 0.0f;
|
||||
canCast = false;
|
||||
canGoBack = false;
|
||||
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
|
||||
teleportTimer = urand(30000, 35000);
|
||||
arcaneExplosionTimer = 9000;
|
||||
castArcaneExplosionTimer = 2000;
|
||||
frostBombTimer = urand(5000, 8000);
|
||||
timeBombTimer = urand(20000, 25000);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
|
||||
StartAttack();
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) OVERRIDE
|
||||
{
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if (me->GetPositionZ() > 518.63f)
|
||||
DoStartNoMovement(who);
|
||||
else
|
||||
BossAI::AttackStart(who);
|
||||
}
|
||||
|
||||
void SetPosition(uint8 i)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
x = me->GetPositionX() + 4;
|
||||
y = me->GetPositionY() - 4;
|
||||
break;
|
||||
case 1:
|
||||
Talk(SAY_SUMMON_1);
|
||||
x = me->GetPositionX() + 4;
|
||||
y = me->GetPositionY() + 4;
|
||||
break;
|
||||
case 2:
|
||||
Talk(SAY_SUMMON_2);
|
||||
x = me->GetPositionX() - 4;
|
||||
y = me->GetPositionY() + 4;
|
||||
break;
|
||||
case 3:
|
||||
Talk(SAY_SUMMON_3);
|
||||
x = me->GetPositionX() - 4;
|
||||
y = me->GetPositionY() - 4;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CastTeleport()
|
||||
{
|
||||
if (!instance || instance->GetData(DATA_UROM_PLATAFORM) > 2)
|
||||
return;
|
||||
|
||||
Talk(instance->GetData(DATA_UROM_PLATAFORM) < 5 ? instance->GetData(DATA_UROM_PLATAFORM) : 0);
|
||||
DoCast(TeleportSpells[instance->GetData(DATA_UROM_PLATAFORM)]);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_PLAYER_KILL);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!instance || instance->GetData(DATA_UROM_PLATAFORM) < 2)
|
||||
return;
|
||||
|
||||
if (teleportTimer <= uiDiff)
|
||||
void StartAttack()
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
DoCast(SPELL_TELEPORT);
|
||||
teleportTimer = urand(30000, 35000);
|
||||
|
||||
} else teleportTimer -= uiDiff;
|
||||
|
||||
if (canCast && !me->FindCurrentSpellBySpellId(SPELL_EMPOWERED_ARCANE_EXPLOSION))
|
||||
{
|
||||
if (castArcaneExplosionTimer <= uiDiff)
|
||||
if (platform > 2)
|
||||
{
|
||||
canCast = false;
|
||||
canGoBack = true;
|
||||
DoCastAOE(SPELL_EMPOWERED_ARCANE_EXPLOSION);
|
||||
castArcaneExplosionTimer = 2000;
|
||||
}else castArcaneExplosionTimer -= uiDiff;
|
||||
Talk(SAY_AGGRO);
|
||||
return;
|
||||
}
|
||||
|
||||
// summon guards and jump to next platform
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
SetPosition(i);
|
||||
me->SummonCreature(Group[group[platform]].entry[i], x, y, me->GetPositionZ(), me->GetOrientation());
|
||||
}
|
||||
|
||||
Talk(platform);
|
||||
DoCast(TeleportSpells[platform]);
|
||||
|
||||
++platform;
|
||||
}
|
||||
|
||||
if (canGoBack)
|
||||
void KilledUnit(Unit* who) OVERRIDE
|
||||
{
|
||||
if (arcaneExplosionTimer <= uiDiff)
|
||||
{
|
||||
Position pPos;
|
||||
me->GetVictim()->GetPosition(&pPos);
|
||||
|
||||
me->NearTeleportTo(pPos.GetPositionX(), pPos.GetPositionY(), pPos.GetPositionZ(), pPos.GetOrientation());
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim(), 0, 0);
|
||||
me->SetWalk(true);
|
||||
|
||||
Talk(EMOTE_ARCANE_EXPLOSION);
|
||||
Talk(SAY_ARCANE_EXPLOSION);
|
||||
|
||||
canCast = false;
|
||||
canGoBack = false;
|
||||
arcaneExplosionTimer = 9000;
|
||||
} else arcaneExplosionTimer -= uiDiff;
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_PLAYER_KILL);
|
||||
}
|
||||
|
||||
if (!me->IsNonMeleeSpellCasted(false, true, true))
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (frostBombTimer <= uiDiff)
|
||||
{
|
||||
DoCastVictim(SPELL_FROSTBOMB);
|
||||
frostBombTimer = urand(5000, 8000);
|
||||
} else frostBombTimer -= uiDiff;
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (timeBombTimer <= uiDiff)
|
||||
{
|
||||
if (Unit* unit = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
DoCast(unit, SPELL_TIME_BOMB);
|
||||
if (platform < 3)
|
||||
return;
|
||||
|
||||
timeBombTimer = urand(20000, 25000);
|
||||
} else timeBombTimer -= uiDiff;
|
||||
events.Update(diff);
|
||||
|
||||
if (teleportTimer <= diff)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
DoCast(SPELL_TELEPORT);
|
||||
teleportTimer = urand(30000, 35000);
|
||||
}
|
||||
else
|
||||
teleportTimer -= diff;
|
||||
|
||||
if (canCast && !me->FindCurrentSpellBySpellId(SPELL_EMPOWERED_ARCANE_EXPLOSION))
|
||||
{
|
||||
if (castArcaneExplosionTimer <= diff)
|
||||
{
|
||||
canCast = false;
|
||||
canGoBack = true;
|
||||
DoCastAOE(SPELL_EMPOWERED_ARCANE_EXPLOSION);
|
||||
castArcaneExplosionTimer = 2000;
|
||||
}
|
||||
else
|
||||
castArcaneExplosionTimer -= diff;
|
||||
}
|
||||
|
||||
if (canGoBack)
|
||||
{
|
||||
if (arcaneExplosionTimer <= diff)
|
||||
{
|
||||
Position pos;
|
||||
me->GetVictim()->GetPosition(&pos);
|
||||
|
||||
me->NearTeleportTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation());
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
me->SetWalk(true);
|
||||
|
||||
Talk(EMOTE_ARCANE_EXPLOSION);
|
||||
Talk(SAY_ARCANE_EXPLOSION);
|
||||
|
||||
canCast = false;
|
||||
canGoBack = false;
|
||||
arcaneExplosionTimer = 9000;
|
||||
}
|
||||
else
|
||||
arcaneExplosionTimer -= diff;
|
||||
}
|
||||
|
||||
if (!me->IsNonMeleeSpellCasted(false, true, true))
|
||||
{
|
||||
if (frostBombTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_FROSTBOMB);
|
||||
frostBombTimer = urand(5000, 8000);
|
||||
}
|
||||
else
|
||||
frostBombTimer -= diff;
|
||||
|
||||
if (timeBombTimer <= diff)
|
||||
{
|
||||
if (Unit* unit = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
DoCast(unit, SPELL_TIME_BOMB);
|
||||
|
||||
timeBombTimer = urand(20000, 25000);
|
||||
}
|
||||
else
|
||||
timeBombTimer -= diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
|
||||
}
|
||||
|
||||
void LeaveCombat()
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
me->CombatStop(false);
|
||||
me->DeleteThreatList();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*pCaster*/, const SpellInfo* pSpell) OVERRIDE
|
||||
{
|
||||
switch (pSpell->Id)
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
case SPELL_SUMMON_MENAGERIE:
|
||||
me->SetHomePosition(968.66f, 1042.53f, 527.32f, 0.077f);
|
||||
LeaveCombat();
|
||||
me->CastSpell(me, SPELL_EVOCATE);
|
||||
break;
|
||||
case SPELL_SUMMON_MENAGERIE_2:
|
||||
me->SetHomePosition(1164.02f, 1170.85f, 527.321f, 3.66f);
|
||||
LeaveCombat();
|
||||
me->CastSpell(me, SPELL_EVOCATE);
|
||||
break;
|
||||
case SPELL_SUMMON_MENAGERIE_3:
|
||||
me->SetHomePosition(1118.31f, 1080.377f, 508.361f, 4.25f);
|
||||
LeaveCombat();
|
||||
me->CastSpell(me, SPELL_EVOCATE);
|
||||
break;
|
||||
case SPELL_TELEPORT:
|
||||
//! Unconfirmed, previous below
|
||||
me->SetDisableGravity(true);
|
||||
//me->AddUnitMovementFlag(MOVEMENTFLAG_CAN_FLY); // with out it the npc will fall down while is casting
|
||||
canCast = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
|
||||
}
|
||||
}
|
||||
|
||||
void LeaveCombat()
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
me->CombatStop(false);
|
||||
me->DeleteThreatList();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spellInfo) OVERRIDE
|
||||
{
|
||||
switch (spellInfo->Id)
|
||||
{
|
||||
case SPELL_SUMMON_MENAGERIE:
|
||||
me->SetHomePosition(968.66f, 1042.53f, 527.32f, 0.077f);
|
||||
LeaveCombat();
|
||||
me->CastSpell(me, SPELL_EVOCATE);
|
||||
break;
|
||||
case SPELL_SUMMON_MENAGERIE_2:
|
||||
me->SetHomePosition(1164.02f, 1170.85f, 527.321f, 3.66f);
|
||||
LeaveCombat();
|
||||
me->CastSpell(me, SPELL_EVOCATE);
|
||||
break;
|
||||
case SPELL_SUMMON_MENAGERIE_3:
|
||||
me->SetHomePosition(1118.31f, 1080.377f, 508.361f, 4.25f);
|
||||
LeaveCombat();
|
||||
me->CastSpell(me, SPELL_EVOCATE);
|
||||
break;
|
||||
case SPELL_TELEPORT:
|
||||
//! Unconfirmed, previous below
|
||||
me->SetDisableGravity(true);
|
||||
//me->AddUnitMovementFlag(MOVEMENTFLAG_CAN_FLY); // with out it the npc will fall down while is casting
|
||||
canCast = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
float x, y;
|
||||
|
||||
bool canCast;
|
||||
bool canGoBack;
|
||||
|
||||
uint8 platform;
|
||||
|
||||
uint8 group[3];
|
||||
|
||||
uint32 teleportTimer;
|
||||
@@ -364,7 +331,12 @@ public:
|
||||
uint32 castArcaneExplosionTimer;
|
||||
uint32 frostBombTimer;
|
||||
uint32 timeBombTimer;
|
||||
};
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetOculusAI<boss_uromAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_urom()
|
||||
|
||||
@@ -54,105 +54,111 @@ enum Events
|
||||
|
||||
class boss_varos : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_varos() : CreatureScript("boss_varos") { }
|
||||
public:
|
||||
boss_varos() : CreatureScript("boss_varos") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_varosAI(creature);
|
||||
}
|
||||
|
||||
struct boss_varosAI : public BossAI
|
||||
{
|
||||
boss_varosAI(Creature* creature) : BossAI(creature, DATA_VAROS_EVENT)
|
||||
struct boss_varosAI : public BossAI
|
||||
{
|
||||
if (instance->GetBossState(DATA_DRAKOS_EVENT) != DONE)
|
||||
DoCast(me, SPELL_CENTRIFUGE_SHIELD);
|
||||
}
|
||||
boss_varosAI(Creature* creature) : BossAI(creature, DATA_VAROS) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
|
||||
events.ScheduleEvent(EVENT_AMPLIFY_MAGIC, urand(20, 25) * IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_ENERGIZE_CORES_VISUAL, 5000);
|
||||
// not sure if this is handled by a timer or hp percentage
|
||||
events.ScheduleEvent(EVENT_CALL_AZURE, urand(15, 30) * IN_MILLISECONDS);
|
||||
|
||||
firstCoreEnergize = false;
|
||||
coreEnergizeOrientation = 0.0f;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
float GetCoreEnergizeOrientation()
|
||||
{
|
||||
return coreEnergizeOrientation;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
void InitializeAI() OVERRIDE
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_ENERGIZE_CORES:
|
||||
DoCast(me, SPELL_ENERGIZE_CORES);
|
||||
events.CancelEvent(EVENT_ENERGIZE_CORES);
|
||||
break;
|
||||
case EVENT_ENERGIZE_CORES_VISUAL:
|
||||
if (!firstCoreEnergize)
|
||||
{
|
||||
coreEnergizeOrientation = me->GetOrientation();
|
||||
firstCoreEnergize = true;
|
||||
} else
|
||||
coreEnergizeOrientation = Position::NormalizeOrientation(coreEnergizeOrientation - 2.0f);
|
||||
|
||||
DoCast(me, SPELL_ENERGIZE_CORES_VISUAL);
|
||||
events.ScheduleEvent(EVENT_ENERGIZE_CORES_VISUAL, 5000);
|
||||
events.ScheduleEvent(EVENT_ENERGIZE_CORES, 4000);
|
||||
break;
|
||||
case EVENT_CALL_AZURE:
|
||||
// not sure how blizz handles this, i cant see any pattern between the differnt spells
|
||||
DoCast(me, SPELL_CALL_AZURE_RING_CAPTAIN);
|
||||
Talk(SAY_AZURE);
|
||||
Talk(SAY_AZURE_EMOTE);
|
||||
events.ScheduleEvent(EVENT_CALL_AZURE, urand(20, 25) * IN_MILLISECONDS);
|
||||
break;
|
||||
case EVENT_AMPLIFY_MAGIC:
|
||||
DoCastVictim(SPELL_CALL_AMPLIFY_MAGIC);
|
||||
events.ScheduleEvent(EVENT_AMPLIFY_MAGIC, urand(17, 20) * IN_MILLISECONDS);
|
||||
break;
|
||||
}
|
||||
BossAI::InitializeAI();
|
||||
if (instance->GetBossState(DATA_DRAKOS) != DONE)
|
||||
DoCast(me, SPELL_CENTRIFUGE_SHIELD);
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
events.ScheduleEvent(EVENT_AMPLIFY_MAGIC, urand(20, 25) * IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_ENERGIZE_CORES_VISUAL, 5000);
|
||||
// not sure if this is handled by a timer or hp percentage
|
||||
events.ScheduleEvent(EVENT_CALL_AZURE, urand(15, 30) * IN_MILLISECONDS);
|
||||
|
||||
firstCoreEnergize = false;
|
||||
coreEnergizeOrientation = 0.0f;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
float GetCoreEnergizeOrientation()
|
||||
{
|
||||
return coreEnergizeOrientation;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_ENERGIZE_CORES:
|
||||
DoCast(me, SPELL_ENERGIZE_CORES);
|
||||
events.CancelEvent(EVENT_ENERGIZE_CORES);
|
||||
break;
|
||||
case EVENT_ENERGIZE_CORES_VISUAL:
|
||||
if (!firstCoreEnergize)
|
||||
{
|
||||
coreEnergizeOrientation = me->GetOrientation();
|
||||
firstCoreEnergize = true;
|
||||
}
|
||||
else
|
||||
coreEnergizeOrientation = Position::NormalizeOrientation(coreEnergizeOrientation - 2.0f);
|
||||
|
||||
DoCast(me, SPELL_ENERGIZE_CORES_VISUAL);
|
||||
events.ScheduleEvent(EVENT_ENERGIZE_CORES_VISUAL, 5000);
|
||||
events.ScheduleEvent(EVENT_ENERGIZE_CORES, 4000);
|
||||
break;
|
||||
case EVENT_CALL_AZURE:
|
||||
// not sure how blizz handles this, i cant see any pattern between the differnt spells
|
||||
DoCast(me, SPELL_CALL_AZURE_RING_CAPTAIN);
|
||||
Talk(SAY_AZURE);
|
||||
Talk(SAY_AZURE_EMOTE);
|
||||
events.ScheduleEvent(EVENT_CALL_AZURE, urand(20, 25) * IN_MILLISECONDS);
|
||||
break;
|
||||
case EVENT_AMPLIFY_MAGIC:
|
||||
DoCastVictim(SPELL_CALL_AMPLIFY_MAGIC);
|
||||
events.ScheduleEvent(EVENT_AMPLIFY_MAGIC, urand(17, 20) * IN_MILLISECONDS);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
|
||||
}
|
||||
|
||||
private:
|
||||
bool firstCoreEnergize;
|
||||
float coreEnergizeOrientation;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
DoCast(me, SPELL_DEATH_SPELL, true); // we cast the spell as triggered or the summon effect does not occur
|
||||
return GetOculusAI<boss_varosAI>(creature);
|
||||
}
|
||||
private:
|
||||
bool firstCoreEnergize;
|
||||
float coreEnergizeOrientation;
|
||||
};
|
||||
};
|
||||
|
||||
class npc_azure_ring_captain : public CreatureScript
|
||||
@@ -259,7 +265,6 @@ class spell_varos_centrifuge_shield : public SpellScriptLoader
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
// flags taken from sniffs
|
||||
// UNIT_FLAG_UNK_9 -> means passive but it is not yet implemented in core
|
||||
if (caster->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15|UNIT_FLAG_IMMUNE_TO_NPC|UNIT_FLAG_IMMUNE_TO_PC|UNIT_FLAG_UNK_6))
|
||||
{
|
||||
caster->ToCreature()->SetReactState(REACT_PASSIVE);
|
||||
|
||||
@@ -18,354 +18,336 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "oculus.h"
|
||||
#include "Player.h"
|
||||
|
||||
#define MAX_ENCOUNTER 4
|
||||
DoorData const doorData[] =
|
||||
{
|
||||
{ GO_DRAGON_CAGE_DOOR, DATA_DRAKOS, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
||||
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE }
|
||||
};
|
||||
|
||||
/* The Occulus encounters:
|
||||
0 - Drakos the Interrogator
|
||||
1 - Varos Cloudstrider
|
||||
2 - Mage-Lord Urom
|
||||
3 - Ley-Guardian Eregos */
|
||||
Position const VerdisaMove = { 949.188f, 1032.91f, 359.967f, 1.093027f };
|
||||
Position const BelgaristraszMove = { 941.453f, 1044.1f, 359.967f, 0.1984709f };
|
||||
Position const EternosMove = { 943.202f, 1059.35f, 359.967f, 5.757278f };
|
||||
|
||||
class instance_oculus : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_oculus() : InstanceMapScript("instance_oculus", 578) { }
|
||||
public:
|
||||
instance_oculus() : InstanceMapScript(OculusScriptName, 578) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
|
||||
{
|
||||
return new instance_oculus_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
struct instance_oculus_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_oculus_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
void Initialize() OVERRIDE
|
||||
struct instance_oculus_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
SetBossNumber(MAX_ENCOUNTER);
|
||||
|
||||
drakosGUID = 0;
|
||||
varosGUID = 0;
|
||||
uromGUID = 0;
|
||||
eregosGUID = 0;
|
||||
|
||||
platformUrom = 0;
|
||||
centrifugueConstructCounter = 0;
|
||||
|
||||
eregosCacheGUID = 0;
|
||||
|
||||
gwhelpList.clear();
|
||||
gameObjectList.clear();
|
||||
|
||||
belgaristraszGUID = 0;
|
||||
eternosGUID = 0;
|
||||
verdisaGUID = 0;
|
||||
}
|
||||
|
||||
void OnUnitDeath(Unit* unit) OVERRIDE
|
||||
{
|
||||
Creature* creature = unit->ToCreature();
|
||||
if (!creature)
|
||||
return;
|
||||
|
||||
if (creature->GetEntry() != NPC_CENTRIFUGE_CONSTRUCT)
|
||||
return;
|
||||
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, --centrifugueConstructCounter);
|
||||
|
||||
if (!centrifugueConstructCounter)
|
||||
if (Creature* varos = instance->GetCreature(varosGUID))
|
||||
varos->RemoveAllAuras();
|
||||
}
|
||||
|
||||
void OnPlayerEnter(Player* player) OVERRIDE
|
||||
{
|
||||
if (GetBossState(DATA_DRAKOS_EVENT) == DONE && GetBossState(DATA_VAROS_EVENT) != DONE)
|
||||
instance_oculus_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
player->SendUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 1);
|
||||
player->SendUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, centrifugueConstructCounter);
|
||||
} else
|
||||
{
|
||||
player->SendUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 0);
|
||||
player->SendUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, 0);
|
||||
}
|
||||
}
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadDoorData(doorData);
|
||||
|
||||
void ProcessEvent(WorldObject* /*unit*/, uint32 eventId)
|
||||
{
|
||||
if (eventId != EVENT_CALL_DRAGON)
|
||||
return;
|
||||
DrakosGUID = 0;
|
||||
VarosGUID = 0;
|
||||
UromGUID = 0;
|
||||
EregosGUID = 0;
|
||||
|
||||
Creature* varos = instance->GetCreature(varosGUID);
|
||||
CentrifugueConstructCounter = 0;
|
||||
|
||||
if (!varos)
|
||||
return;
|
||||
EregosCacheGUID = 0;
|
||||
|
||||
if (Creature* drake = varos->SummonCreature(NPC_AZURE_RING_GUARDIAN, varos->GetPositionX(), varos->GetPositionY(), varos->GetPositionZ()+40))
|
||||
drake->AI()->DoAction(ACTION_CALL_DRAGON_EVENT);
|
||||
}
|
||||
GreaterWhelpList.clear();
|
||||
|
||||
void OnCreatureCreate(Creature* creature) OVERRIDE
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_DRAKOS:
|
||||
drakosGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_VAROS:
|
||||
varosGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
|
||||
creature->SetPhaseMask(1, true);
|
||||
break;
|
||||
case NPC_UROM:
|
||||
uromGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_VAROS_EVENT) == DONE)
|
||||
creature->SetPhaseMask(1, true);
|
||||
break;
|
||||
case NPC_EREGOS:
|
||||
eregosGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_UROM_EVENT) == DONE)
|
||||
creature->SetPhaseMask(1, true);
|
||||
break;
|
||||
case NPC_CENTRIFUGE_CONSTRUCT:
|
||||
if (creature->IsAlive())
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, ++centrifugueConstructCounter);
|
||||
break;
|
||||
case NPC_BELGARISTRASZ:
|
||||
belgaristraszGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
|
||||
{
|
||||
creature->SetWalk(true),
|
||||
creature->GetMotionMaster()->MovePoint(0, 941.453f, 1044.1f, 359.967f),
|
||||
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
break;
|
||||
case NPC_ETERNOS:
|
||||
eternosGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
|
||||
{
|
||||
creature->SetWalk(true),
|
||||
creature->GetMotionMaster()->MovePoint(0, 943.202f, 1059.35f, 359.967f),
|
||||
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
break;
|
||||
case NPC_VERDISA:
|
||||
verdisaGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
|
||||
{
|
||||
creature->SetWalk(true),
|
||||
creature->GetMotionMaster()->MovePoint(0, 949.188f, 1032.91f, 359.967f),
|
||||
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
break;
|
||||
case NPC_GREATER_WHELP:
|
||||
if (GetBossState(DATA_UROM_EVENT) == DONE)
|
||||
{
|
||||
creature->SetPhaseMask(1, true);
|
||||
gwhelpList.push_back(creature->GetGUID());
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) OVERRIDE
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_DRAGON_CAGE_DOOR:
|
||||
if (GetBossState(DATA_DRAKOS_EVENT) == DONE)
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
else
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
gameObjectList.push_back(go->GetGUID());
|
||||
break;
|
||||
case GO_EREGOS_CACHE_N:
|
||||
case GO_EREGOS_CACHE_H:
|
||||
eregosCacheGUID = go->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state) OVERRIDE
|
||||
{
|
||||
if (!InstanceScript::SetBossState(type, state))
|
||||
return false;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DATA_DRAKOS_EVENT:
|
||||
if (state == DONE)
|
||||
{
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 1);
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, centrifugueConstructCounter);
|
||||
OpenCageDoors();
|
||||
FreeDragons();
|
||||
if (Creature* varos = instance->GetCreature(varosGUID))
|
||||
varos->SetPhaseMask(1, true);
|
||||
}
|
||||
break;
|
||||
case DATA_VAROS_EVENT:
|
||||
if (state == DONE)
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 0);
|
||||
if (Creature* urom = instance->GetCreature(uromGUID))
|
||||
urom->SetPhaseMask(1, true);
|
||||
break;
|
||||
case DATA_UROM_EVENT:
|
||||
if (state == DONE)
|
||||
{
|
||||
if (Creature* eregos = instance->GetCreature(eregosGUID))
|
||||
{
|
||||
eregos->SetPhaseMask(1, true);
|
||||
GreaterWhelps();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DATA_EREGOS_EVENT:
|
||||
if (state == DONE)
|
||||
DoRespawnGameObject(eregosCacheGUID, 7*DAY);
|
||||
break;
|
||||
BelgaristraszGUID = 0;
|
||||
EternosGUID = 0;
|
||||
VerdisaGUID = 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data) OVERRIDE
|
||||
{
|
||||
switch (type)
|
||||
void OnCreatureCreate(Creature* creature) OVERRIDE
|
||||
{
|
||||
case DATA_UROM_PLATAFORM:
|
||||
platformUrom = data;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const OVERRIDE
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_UROM_PLATAFORM: return platformUrom;
|
||||
// used by condition system
|
||||
case DATA_UROM_EVENT: return GetBossState(DATA_UROM_EVENT);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier) const OVERRIDE
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
case DATA_DRAKOS: return drakosGUID;
|
||||
case DATA_VAROS: return varosGUID;
|
||||
case DATA_UROM: return uromGUID;
|
||||
case DATA_EREGOS: return eregosGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void OpenCageDoors()
|
||||
{
|
||||
if (gameObjectList.empty())
|
||||
return;
|
||||
|
||||
for (std::list<uint64>::const_iterator itr = gameObjectList.begin(); itr != gameObjectList.end(); ++itr)
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(*itr))
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
void FreeDragons()
|
||||
{
|
||||
if (Creature* belgaristrasz = instance->GetCreature(belgaristraszGUID))
|
||||
belgaristrasz->SetWalk(true),
|
||||
belgaristrasz->GetMotionMaster()->MovePoint(0, 941.453f, 1044.1f, 359.967f);
|
||||
if (Creature* eternos = instance->GetCreature(eternosGUID))
|
||||
eternos->SetWalk(true),
|
||||
eternos->GetMotionMaster()->MovePoint(0, 943.202f, 1059.35f, 359.967f);
|
||||
if (Creature* verdisa = instance->GetCreature(verdisaGUID))
|
||||
verdisa->SetWalk(true),
|
||||
verdisa->GetMotionMaster()->MovePoint(0, 949.188f, 1032.91f, 359.967f);
|
||||
}
|
||||
|
||||
void GreaterWhelps()
|
||||
{
|
||||
if (gwhelpList.empty())
|
||||
return;
|
||||
|
||||
for (std::list<uint64>::const_iterator itr = gwhelpList.begin(); itr != gwhelpList.end(); ++itr)
|
||||
if (Creature* gwhelp = instance->GetCreature(*itr))
|
||||
gwhelp->SetPhaseMask(1, true);
|
||||
}
|
||||
|
||||
std::string GetSaveData() OVERRIDE
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "T O " << GetBossSaveData();
|
||||
|
||||
str_data = saveStream.str();
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return str_data;
|
||||
}
|
||||
|
||||
void Load(const char* in) OVERRIDE
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> dataHead1 >> dataHead2;
|
||||
|
||||
if (dataHead1 == 'T' && dataHead2 == 'O')
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
case NPC_DRAKOS:
|
||||
DrakosGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_VAROS:
|
||||
VarosGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_DRAKOS) == DONE)
|
||||
creature->SetPhaseMask(1, true);
|
||||
break;
|
||||
case NPC_UROM:
|
||||
UromGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_VAROS) == DONE)
|
||||
creature->SetPhaseMask(1, true);
|
||||
break;
|
||||
case NPC_EREGOS:
|
||||
EregosGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_UROM) == DONE)
|
||||
creature->SetPhaseMask(1, true);
|
||||
break;
|
||||
case NPC_CENTRIFUGE_CONSTRUCT:
|
||||
if (creature->IsAlive())
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, ++CentrifugueConstructCounter);
|
||||
break;
|
||||
case NPC_BELGARISTRASZ:
|
||||
BelgaristraszGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_DRAKOS) == DONE)
|
||||
{
|
||||
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
creature->Relocate(BelgaristraszMove);
|
||||
}
|
||||
break;
|
||||
case NPC_ETERNOS:
|
||||
EternosGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_DRAKOS) == DONE)
|
||||
{
|
||||
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
creature->Relocate(EternosMove);
|
||||
}
|
||||
break;
|
||||
case NPC_VERDISA:
|
||||
VerdisaGUID = creature->GetGUID();
|
||||
if (GetBossState(DATA_DRAKOS) == DONE)
|
||||
{
|
||||
creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
creature->Relocate(VerdisaMove);
|
||||
}
|
||||
break;
|
||||
case NPC_GREATER_WHELP:
|
||||
if (GetBossState(DATA_UROM) == DONE)
|
||||
{
|
||||
creature->SetPhaseMask(1, true);
|
||||
GreaterWhelpList.push_back(creature->GetGUID());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else OUT_LOAD_INST_DATA_FAIL;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
void OnGameObjectCreate(GameObject* go) OVERRIDE
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_DRAGON_CAGE_DOOR:
|
||||
AddDoor(go, true);
|
||||
break;
|
||||
case GO_EREGOS_CACHE_N:
|
||||
case GO_EREGOS_CACHE_H:
|
||||
EregosCacheGUID = go->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectRemove(GameObject* go) OVERRIDE
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_DRAGON_CAGE_DOOR:
|
||||
AddDoor(go, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnUnitDeath(Unit* unit) OVERRIDE
|
||||
{
|
||||
Creature* creature = unit->ToCreature();
|
||||
if (!creature)
|
||||
return;
|
||||
|
||||
if (creature->GetEntry() == NPC_CENTRIFUGE_CONSTRUCT)
|
||||
{
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, --CentrifugueConstructCounter);
|
||||
|
||||
if (!CentrifugueConstructCounter)
|
||||
if (Creature* varos = instance->GetCreature(VarosGUID))
|
||||
varos->RemoveAllAuras();
|
||||
}
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data) OVERRIDE
|
||||
{
|
||||
if (GetBossState(DATA_DRAKOS) == DONE && GetBossState(DATA_VAROS) != DONE)
|
||||
{
|
||||
data << uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW) << uint32(1);
|
||||
data << uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT) << uint32(CentrifugueConstructCounter);
|
||||
}
|
||||
else
|
||||
{
|
||||
data << uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW) << uint32(0);
|
||||
data << uint32(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT) << uint32(0);
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessEvent(WorldObject* /*unit*/, uint32 eventId) OVERRIDE
|
||||
{
|
||||
if (eventId != EVENT_CALL_DRAGON)
|
||||
return;
|
||||
|
||||
if (Creature* varos = instance->GetCreature(VarosGUID))
|
||||
if (Creature* drake = varos->SummonCreature(NPC_AZURE_RING_GUARDIAN, varos->GetPositionX(), varos->GetPositionY(), varos->GetPositionZ() + 40))
|
||||
drake->AI()->DoAction(ACTION_CALL_DRAGON_EVENT);
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state) OVERRIDE
|
||||
{
|
||||
if (!InstanceScript::SetBossState(type, state))
|
||||
return false;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DATA_DRAKOS:
|
||||
if (state == DONE)
|
||||
{
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 1);
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_AMOUNT, CentrifugueConstructCounter);
|
||||
FreeDragons();
|
||||
if (Creature* varos = instance->GetCreature(VarosGUID))
|
||||
varos->SetPhaseMask(1, true);
|
||||
}
|
||||
break;
|
||||
case DATA_VAROS:
|
||||
if (state == DONE)
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 0);
|
||||
if (Creature* urom = instance->GetCreature(UromGUID))
|
||||
urom->SetPhaseMask(1, true);
|
||||
break;
|
||||
case DATA_UROM:
|
||||
if (state == DONE)
|
||||
{
|
||||
if (Creature* eregos = instance->GetCreature(EregosGUID))
|
||||
{
|
||||
eregos->SetPhaseMask(1, true);
|
||||
GreaterWhelps();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DATA_EREGOS:
|
||||
if (state == DONE)
|
||||
{
|
||||
if (GameObject* cache = instance->GetGameObject(EregosCacheGUID))
|
||||
{
|
||||
cache->SetRespawnTime(cache->GetRespawnDelay());
|
||||
cache->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type) const OVERRIDE
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_DRAKOS:
|
||||
return DrakosGUID;
|
||||
case DATA_VAROS:
|
||||
return VarosGUID;
|
||||
case DATA_UROM:
|
||||
return UromGUID;
|
||||
case DATA_EREGOS:
|
||||
return EregosGUID;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void FreeDragons()
|
||||
{
|
||||
if (Creature* belgaristrasz = instance->GetCreature(BelgaristraszGUID))
|
||||
{
|
||||
belgaristrasz->SetWalk(true);
|
||||
belgaristrasz->GetMotionMaster()->MovePoint(POINT_MOVE_OUT, BelgaristraszMove);
|
||||
}
|
||||
|
||||
if (Creature* eternos = instance->GetCreature(EternosGUID))
|
||||
{
|
||||
eternos->SetWalk(true);
|
||||
eternos->GetMotionMaster()->MovePoint(POINT_MOVE_OUT, EternosMove);
|
||||
}
|
||||
|
||||
if (Creature* verdisa = instance->GetCreature(VerdisaGUID))
|
||||
{
|
||||
verdisa->SetWalk(true);
|
||||
verdisa->GetMotionMaster()->MovePoint(POINT_MOVE_OUT, VerdisaMove);
|
||||
}
|
||||
}
|
||||
|
||||
void GreaterWhelps()
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = GreaterWhelpList.begin(); itr != GreaterWhelpList.end(); ++itr)
|
||||
if (Creature* gwhelp = instance->GetCreature(*itr))
|
||||
gwhelp->SetPhaseMask(1, true);
|
||||
}
|
||||
|
||||
std::string GetSaveData() OVERRIDE
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "T O " << GetBossSaveData();
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(char const* str) OVERRIDE
|
||||
{
|
||||
if (!str)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(str);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
|
||||
std::istringstream loadStream(str);
|
||||
loadStream >> dataHead1 >> dataHead2;
|
||||
|
||||
if (dataHead1 == 'T' && dataHead2 == 'O')
|
||||
{
|
||||
for (uint32 i = 0; i < EncounterCount; ++i)
|
||||
{
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
}
|
||||
else
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
protected:
|
||||
uint64 DrakosGUID;
|
||||
uint64 VarosGUID;
|
||||
uint64 UromGUID;
|
||||
uint64 EregosGUID;
|
||||
|
||||
uint64 BelgaristraszGUID;
|
||||
uint64 EternosGUID;
|
||||
uint64 VerdisaGUID;
|
||||
|
||||
uint8 CentrifugueConstructCounter;
|
||||
|
||||
uint64 EregosCacheGUID;
|
||||
|
||||
std::list<uint64> GreaterWhelpList;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
|
||||
{
|
||||
return new instance_oculus_InstanceMapScript(map);
|
||||
}
|
||||
private:
|
||||
uint64 drakosGUID;
|
||||
uint64 varosGUID;
|
||||
uint64 uromGUID;
|
||||
uint64 eregosGUID;
|
||||
|
||||
uint64 belgaristraszGUID;
|
||||
uint64 eternosGUID;
|
||||
uint64 verdisaGUID;
|
||||
|
||||
uint8 platformUrom;
|
||||
uint8 centrifugueConstructCounter;
|
||||
|
||||
uint64 eregosCacheGUID;
|
||||
|
||||
std::string str_data;
|
||||
|
||||
std::list<uint64> gameObjectList;
|
||||
std::list<uint64> gwhelpList;
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_instance_oculus()
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -15,59 +15,55 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DEF_OCULUS_H
|
||||
#define DEF_OCULUS_H
|
||||
#ifndef OCULUS_H_
|
||||
#define OCULUS_H_
|
||||
|
||||
enum Data
|
||||
#define OculusScriptName "instance_oculus"
|
||||
|
||||
uint32 const EncounterCount = 4;
|
||||
|
||||
enum DataTypes
|
||||
{
|
||||
DATA_DRAKOS_EVENT,
|
||||
DATA_VAROS_EVENT,
|
||||
DATA_UROM_EVENT,
|
||||
DATA_EREGOS_EVENT,
|
||||
DATA_UROM_PLATAFORM
|
||||
// Encounter States/Boss GUIDs
|
||||
DATA_DRAKOS = 0,
|
||||
DATA_VAROS = 1,
|
||||
DATA_UROM = 2,
|
||||
DATA_EREGOS = 3
|
||||
};
|
||||
|
||||
enum Data64
|
||||
{
|
||||
DATA_DRAKOS,
|
||||
DATA_VAROS,
|
||||
DATA_UROM,
|
||||
DATA_EREGOS
|
||||
};
|
||||
|
||||
enum Bosses_NPCs
|
||||
enum CreatureIds
|
||||
{
|
||||
NPC_DRAKOS = 27654,
|
||||
NPC_VAROS = 27447,
|
||||
NPC_UROM = 27655,
|
||||
NPC_EREGOS = 27656,
|
||||
|
||||
NPC_AZURE_RING_GUARDIAN = 28236,
|
||||
NPC_CENTRIFUGE_CONSTRUCT = 27641,
|
||||
NPC_RUBY_DRAKE_VEHICLE = 27756,
|
||||
NPC_EMERALD_DRAKE_VEHICLE = 27692,
|
||||
NPC_AMBER_DRAKE_VEHICLE = 27755,
|
||||
NPC_VERDISA = 27657,
|
||||
NPC_BELGARISTRASZ = 27658,
|
||||
NPC_ETERNOS = 27659,
|
||||
NPC_GREATER_WHELP = 28276
|
||||
NPC_AZURE_RING_GUARDIAN = 28236,
|
||||
NPC_CENTRIFUGE_CONSTRUCT = 27641,
|
||||
NPC_RUBY_DRAKE_VEHICLE = 27756,
|
||||
NPC_EMERALD_DRAKE_VEHICLE = 27692,
|
||||
NPC_AMBER_DRAKE_VEHICLE = 27755,
|
||||
NPC_VERDISA = 27657,
|
||||
NPC_BELGARISTRASZ = 27658,
|
||||
NPC_ETERNOS = 27659,
|
||||
NPC_GREATER_WHELP = 28276
|
||||
};
|
||||
|
||||
enum GameObjects
|
||||
enum GameObjectIds
|
||||
{
|
||||
GO_DRAGON_CAGE_DOOR = 193995,
|
||||
GO_EREGOS_CACHE_N = 191349,
|
||||
GO_EREGOS_CACHE_H = 193603
|
||||
GO_DRAGON_CAGE_DOOR = 193995,
|
||||
GO_EREGOS_CACHE_N = 191349,
|
||||
GO_EREGOS_CACHE_H = 193603
|
||||
};
|
||||
|
||||
enum SpellEvents
|
||||
{
|
||||
EVENT_CALL_DRAGON = 12229
|
||||
EVENT_CALL_DRAGON = 12229
|
||||
};
|
||||
|
||||
enum CreatureActions
|
||||
{
|
||||
ACTION_CALL_DRAGON_EVENT = 1
|
||||
ACTION_CALL_DRAGON_EVENT = 1
|
||||
};
|
||||
|
||||
enum OculusWorldStates
|
||||
@@ -78,7 +74,19 @@ enum OculusWorldStates
|
||||
|
||||
enum OculusSpells
|
||||
{
|
||||
SPELL_CENTRIFUGE_SHIELD = 50053,
|
||||
SPELL_DEATH_SPELL = 50415
|
||||
SPELL_CENTRIFUGE_SHIELD = 50053,
|
||||
SPELL_DEATH_SPELL = 50415
|
||||
};
|
||||
#endif
|
||||
|
||||
enum Misc
|
||||
{
|
||||
POINT_MOVE_OUT = 1
|
||||
};
|
||||
|
||||
template<class AI>
|
||||
AI* GetOculusAI(Creature* creature)
|
||||
{
|
||||
return GetInstanceAI<AI>(creature, OculusScriptName);
|
||||
}
|
||||
|
||||
#endif // OCULUS_H_
|
||||
@@ -58,19 +58,14 @@ enum Creatures
|
||||
NPC_STASIS_CONTROLLER = 26688
|
||||
};
|
||||
|
||||
struct Locations
|
||||
Position const moveLocs[] =
|
||||
{
|
||||
float x, y, z;
|
||||
};
|
||||
|
||||
struct Locations moveLocs[]=
|
||||
{
|
||||
{261.6f, -449.3f, 109.5f},
|
||||
{263.3f, -454.0f, 109.5f},
|
||||
{291.5f, -450.4f, 109.5f},
|
||||
{291.5f, -454.0f, 109.5f},
|
||||
{310.0f, -453.4f, 109.5f},
|
||||
{238.6f, -460.7f, 109.5f}
|
||||
{ 261.6f, -449.3f, 109.5f, 0.0f },
|
||||
{ 263.3f, -454.0f, 109.5f, 0.0f },
|
||||
{ 291.5f, -450.4f, 109.5f, 0.0f },
|
||||
{ 291.5f, -454.0f, 109.5f, 0.0f },
|
||||
{ 310.0f, -453.4f, 109.5f, 0.0f },
|
||||
{ 238.6f, -460.7f, 109.5f, 0.0f }
|
||||
};
|
||||
|
||||
enum Phase
|
||||
@@ -83,21 +78,20 @@ enum Phase
|
||||
PHASE_NONE
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
ACTION_NEXT_PHASE,
|
||||
};
|
||||
|
||||
class boss_palehoof : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_palehoof() : CreatureScript("boss_palehoof") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
struct boss_palehoofAI : public BossAI
|
||||
{
|
||||
return new boss_palehoofAI(creature);
|
||||
}
|
||||
|
||||
struct boss_palehoofAI : public ScriptedAI
|
||||
{
|
||||
boss_palehoofAI(Creature* creature) : ScriptedAI(creature)
|
||||
boss_palehoofAI(Creature* creature) : BossAI(creature, DATA_GORTOK_PALEHOOF)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
uint32 uiArcingSmashTimer;
|
||||
@@ -108,10 +102,10 @@ public:
|
||||
uint8 AddCount;
|
||||
Phase Sequence[4];
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
|
||||
/// There is a good reason to store them like this, we are going to shuffle the order.
|
||||
for (uint32 i = PHASE_FRENZIED_WORGEN; i < PHASE_GORTOK_PALEHOOF; ++i)
|
||||
Sequence[i] = Phase(i);
|
||||
@@ -129,32 +123,15 @@ public:
|
||||
|
||||
currentPhase = PHASE_NONE;
|
||||
|
||||
if (instance)
|
||||
for (uint8 i = DATA_FRENZIED_WORGEN; i <= DATA_FEROCIOUS_RHINO; ++i)
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(i)))
|
||||
if (!temp->IsAlive())
|
||||
temp->Respawn();
|
||||
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_GORTOK_PALEHOOF_SPHERE)))
|
||||
{
|
||||
instance->SetData(DATA_GORTOK_PALEHOOF_EVENT, NOT_STARTED);
|
||||
|
||||
Creature* temp = Unit::GetCreature((*me), instance->GetData64(DATA_NPC_FRENZIED_WORGEN));
|
||||
if (temp && !temp->IsAlive())
|
||||
temp->Respawn();
|
||||
|
||||
temp = Unit::GetCreature((*me), instance->GetData64(DATA_NPC_FEROCIOUS_RHINO));
|
||||
if (temp && !temp->IsAlive())
|
||||
temp->Respawn();
|
||||
|
||||
temp = Unit::GetCreature((*me), instance->GetData64(DATA_NPC_MASSIVE_JORMUNGAR));
|
||||
if (temp && !temp->IsAlive())
|
||||
temp->Respawn();
|
||||
|
||||
temp = Unit::GetCreature((*me), instance->GetData64(DATA_NPC_RAVENOUS_FURBOLG));
|
||||
if (temp && !temp->IsAlive())
|
||||
temp->Respawn();
|
||||
|
||||
GameObject* go = instance->instance->GetGameObject(instance->GetData64(DATA_GORTOK_PALEHOOF_SPHERE));
|
||||
if (go)
|
||||
{
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -185,14 +162,9 @@ public:
|
||||
if (currentPhase != PHASE_GORTOK_PALEHOOF)
|
||||
return;
|
||||
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
Creature* temp = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_ORB) : 0);
|
||||
if (temp && temp->IsAlive())
|
||||
temp->DisappearAndDie();
|
||||
|
||||
if (uiArcingSmashTimer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_ARCING_SMASH);
|
||||
@@ -217,12 +189,8 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
//Talk(SAY_DEATH);
|
||||
if (instance)
|
||||
instance->SetData(DATA_GORTOK_PALEHOOF_EVENT, DONE);
|
||||
Creature* temp = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_ORB) : 0);
|
||||
if (temp && temp->IsAlive())
|
||||
temp->DisappearAndDie();
|
||||
_JustDied();
|
||||
//Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
@@ -230,28 +198,30 @@ public:
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void NextPhase()
|
||||
void DoAction(int32 actionId) OVERRIDE
|
||||
{
|
||||
if (actionId != ACTION_NEXT_PHASE)
|
||||
return;
|
||||
|
||||
if (currentPhase == PHASE_NONE)
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData(DATA_GORTOK_PALEHOOF_EVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_GORTOK_PALEHOOF, IN_PROGRESS);
|
||||
|
||||
me->SummonCreature(NPC_STASIS_CONTROLLER, moveLocs[5].x, moveLocs[5].y, moveLocs[5].z, 0, TEMPSUMMON_CORPSE_DESPAWN);
|
||||
if (Creature* orb = me->SummonCreature(NPC_STASIS_CONTROLLER, moveLocs[5], TEMPSUMMON_CORPSE_DESPAWN))
|
||||
orb->CastSpell(me, SPELL_ORB_VISUAL, true);
|
||||
}
|
||||
|
||||
Phase move = PHASE_NONE;
|
||||
if (AddCount >= DUNGEON_MODE(2, 4))
|
||||
move = PHASE_GORTOK_PALEHOOF;
|
||||
else
|
||||
move = Sequence[AddCount++];
|
||||
//send orb to summon spot
|
||||
Creature* pOrb = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_ORB) : 0);
|
||||
if (pOrb && pOrb->IsAlive())
|
||||
{
|
||||
if (currentPhase == PHASE_NONE)
|
||||
pOrb->CastSpell(me, SPELL_ORB_VISUAL, true);
|
||||
pOrb->GetMotionMaster()->MovePoint(move, moveLocs[move].x, moveLocs[move].y, moveLocs[move].z);
|
||||
}
|
||||
|
||||
// send orb to summon spot
|
||||
if (Creature* orb = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_ORB)))
|
||||
if (orb->IsAlive())
|
||||
orb->GetMotionMaster()->MovePoint(move, moveLocs[move]);
|
||||
|
||||
currentPhase = move;
|
||||
}
|
||||
|
||||
@@ -263,6 +233,10 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetUtgardePinnacleAI<boss_palehoofAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
//ravenous furbolg's spells
|
||||
@@ -305,13 +279,12 @@ public:
|
||||
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS)
|
||||
{
|
||||
Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof && pPalehoof->IsAlive())
|
||||
CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->Reset();
|
||||
}
|
||||
if (instance->GetBossState(DATA_GORTOK_PALEHOOF) == IN_PROGRESS)
|
||||
{
|
||||
Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF));
|
||||
if (palehoof && palehoof->IsAlive())
|
||||
palehoof->AI()->Reset();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -360,12 +333,8 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof)
|
||||
CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->NextPhase();
|
||||
}
|
||||
if (Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF)))
|
||||
palehoof->AI()->DoAction(ACTION_NEXT_PHASE);
|
||||
}
|
||||
|
||||
void JustReachedHome() OVERRIDE
|
||||
@@ -418,13 +387,12 @@ public:
|
||||
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS)
|
||||
{
|
||||
Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof && pPalehoof->IsAlive())
|
||||
CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->Reset();
|
||||
}
|
||||
if (instance->GetBossState(DATA_GORTOK_PALEHOOF) == IN_PROGRESS)
|
||||
{
|
||||
Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF));
|
||||
if (palehoof && palehoof->IsAlive())
|
||||
palehoof->AI()->Reset();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -470,17 +438,13 @@ public:
|
||||
DoStartMovement(who);
|
||||
}
|
||||
if (instance)
|
||||
instance->SetData(DATA_GORTOK_PALEHOOF_EVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_GORTOK_PALEHOOF, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
Creature* pPalehoof = Unit::GetCreature((*me), instance->GetData64(DATA_GORTOK_PALEHOOF));
|
||||
if (pPalehoof)
|
||||
CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->NextPhase();
|
||||
}
|
||||
if (Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF)))
|
||||
palehoof->AI()->DoAction(ACTION_NEXT_PHASE);
|
||||
}
|
||||
|
||||
void JustReachedHome() OVERRIDE
|
||||
@@ -534,13 +498,12 @@ public:
|
||||
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS)
|
||||
{
|
||||
Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof && pPalehoof->IsAlive())
|
||||
CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->Reset();
|
||||
}
|
||||
if (instance->GetBossState(DATA_GORTOK_PALEHOOF) == IN_PROGRESS)
|
||||
{
|
||||
Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF));
|
||||
if (palehoof && palehoof->IsAlive())
|
||||
palehoof->AI()->Reset();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -590,12 +553,8 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof)
|
||||
CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->NextPhase();
|
||||
}
|
||||
if (Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF)))
|
||||
palehoof->AI()->DoAction(ACTION_NEXT_PHASE);
|
||||
}
|
||||
|
||||
void JustReachedHome() OVERRIDE
|
||||
@@ -654,13 +613,12 @@ public:
|
||||
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
|
||||
if (instance)
|
||||
if (instance->GetData(DATA_GORTOK_PALEHOOF_EVENT) == IN_PROGRESS)
|
||||
{
|
||||
Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof && pPalehoof->IsAlive())
|
||||
CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->Reset();
|
||||
}
|
||||
if (instance->GetBossState(DATA_GORTOK_PALEHOOF) == IN_PROGRESS)
|
||||
{
|
||||
Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF));
|
||||
if (palehoof && palehoof->IsAlive())
|
||||
palehoof->AI()->Reset();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -711,12 +669,8 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
Creature* pPalehoof = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof)
|
||||
CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->NextPhase();
|
||||
}
|
||||
if (Creature* palehoof = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_GORTOK_PALEHOOF)))
|
||||
palehoof->AI()->DoAction(ACTION_NEXT_PHASE);
|
||||
}
|
||||
|
||||
void JustReachedHome() OVERRIDE
|
||||
@@ -767,52 +721,76 @@ public:
|
||||
|
||||
if (SummonTimer <= diff)
|
||||
{
|
||||
if (currentPhase<5&¤tPhase >= 0)
|
||||
uint8 nextBossId = 0;
|
||||
switch (currentPhase)
|
||||
{
|
||||
Creature* pNext = NULL;
|
||||
switch (currentPhase)
|
||||
{
|
||||
case PHASE_FRENZIED_WORGEN: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_FRENZIED_WORGEN) : 0); break;
|
||||
case PHASE_RAVENOUS_FURLBORG: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_RAVENOUS_FURBOLG) : 0); break;
|
||||
case PHASE_MASSIVE_JORMUNGAR: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_MASSIVE_JORMUNGAR) : 0); break;
|
||||
case PHASE_FEROCIOUS_RHINO: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_FEROCIOUS_RHINO) : 0); break;
|
||||
case PHASE_GORTOK_PALEHOOF: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0); break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (pNext)
|
||||
{
|
||||
pNext->RemoveAurasDueToSpell(SPELL_FREEZE);
|
||||
pNext->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC);
|
||||
pNext->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
pNext->SetInCombatWithZone();
|
||||
pNext->Attack(pNext->SelectNearestTarget(100), true);
|
||||
|
||||
}
|
||||
currentPhase = PHASE_NONE;
|
||||
case PHASE_FRENZIED_WORGEN:
|
||||
nextBossId = DATA_FRENZIED_WORGEN;
|
||||
break;
|
||||
case PHASE_RAVENOUS_FURLBORG:
|
||||
nextBossId = DATA_RAVENOUS_FURBOLG;
|
||||
break;
|
||||
case PHASE_MASSIVE_JORMUNGAR:
|
||||
nextBossId = DATA_MASSIVE_JORMUNGAR;
|
||||
break;
|
||||
case PHASE_FEROCIOUS_RHINO:
|
||||
nextBossId = DATA_FEROCIOUS_RHINO;
|
||||
break;
|
||||
case PHASE_GORTOK_PALEHOOF:
|
||||
nextBossId = DATA_GORTOK_PALEHOOF;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
} else SummonTimer -= diff;
|
||||
|
||||
if (Creature* nextBoss = ObjectAccessor::GetCreature(*me, instance->GetData64(nextBossId)))
|
||||
{
|
||||
nextBoss->RemoveAurasDueToSpell(SPELL_FREEZE);
|
||||
nextBoss->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_IMMUNE_TO_PC);
|
||||
nextBoss->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
nextBoss->SetInCombatWithZone();
|
||||
nextBoss->Attack(nextBoss->SelectNearestTarget(100), true);
|
||||
}
|
||||
currentPhase = PHASE_NONE;
|
||||
|
||||
if (nextBossId == DATA_GORTOK_PALEHOOF)
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
else
|
||||
SummonTimer -= diff;
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id) OVERRIDE
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
if (id > 4)
|
||||
return;
|
||||
Creature* pNext = NULL;
|
||||
|
||||
uint8 nextBossId = 0;
|
||||
switch (id)
|
||||
{
|
||||
case PHASE_FRENZIED_WORGEN: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_FRENZIED_WORGEN) : 0); break;
|
||||
case PHASE_RAVENOUS_FURLBORG: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_RAVENOUS_FURBOLG) : 0); break;
|
||||
case PHASE_MASSIVE_JORMUNGAR: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_MASSIVE_JORMUNGAR) : 0); break;
|
||||
case PHASE_FEROCIOUS_RHINO: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_NPC_FEROCIOUS_RHINO) : 0); break;
|
||||
case PHASE_GORTOK_PALEHOOF: pNext = Unit::GetCreature((*me), instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0); break;
|
||||
default: break;
|
||||
case PHASE_FRENZIED_WORGEN:
|
||||
nextBossId = DATA_FRENZIED_WORGEN;
|
||||
break;
|
||||
case PHASE_RAVENOUS_FURLBORG:
|
||||
nextBossId = DATA_RAVENOUS_FURBOLG;
|
||||
break;
|
||||
case PHASE_MASSIVE_JORMUNGAR:
|
||||
nextBossId = DATA_MASSIVE_JORMUNGAR;
|
||||
break;
|
||||
case PHASE_FEROCIOUS_RHINO:
|
||||
nextBossId = DATA_FEROCIOUS_RHINO;
|
||||
break;
|
||||
case PHASE_GORTOK_PALEHOOF:
|
||||
nextBossId = DATA_GORTOK_PALEHOOF;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
if (pNext)
|
||||
DoCast(pNext, SPELL_ORB_CHANNEL, false);
|
||||
currentPhase = (Phase)id;
|
||||
|
||||
if (Creature* nextBoss = ObjectAccessor::GetCreature(*me, instance->GetData64(nextBossId)))
|
||||
DoCast(nextBoss, SPELL_ORB_CHANNEL, false);
|
||||
|
||||
currentPhase = Phase(id);
|
||||
SummonTimer = 5000;
|
||||
}
|
||||
};
|
||||
@@ -821,23 +799,25 @@ public:
|
||||
|
||||
class go_palehoof_sphere : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_palehoof_sphere() : GameObjectScript("go_palehoof_sphere") { }
|
||||
public:
|
||||
go_palehoof_sphere() : GameObjectScript("go_palehoof_sphere") { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
|
||||
{
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
|
||||
Creature* pPalehoof = Unit::GetCreature(*go, instance ? instance->GetData64(DATA_GORTOK_PALEHOOF) : 0);
|
||||
if (pPalehoof && pPalehoof->IsAlive())
|
||||
bool OnGossipHello(Player* /*player*/, GameObject* go) OVERRIDE
|
||||
{
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
InstanceScript* instance = go->GetInstanceScript();
|
||||
if (!instance)
|
||||
return false;
|
||||
|
||||
CAST_AI(boss_palehoof::boss_palehoofAI, pPalehoof->AI())->NextPhase();
|
||||
Creature* palehoof = ObjectAccessor::GetCreature(*go, instance->GetData64(DATA_GORTOK_PALEHOOF));
|
||||
if (palehoof && palehoof->IsAlive())
|
||||
{
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
palehoof->AI()->DoAction(ACTION_NEXT_PHASE);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
me->SummonCreature(NPC_GRAUF, Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 3.0f);
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, NOT_STARTED);
|
||||
instance->SetBossState(DATA_SKADI_THE_RUTHLESS, NOT_STARTED);
|
||||
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
}
|
||||
}
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
me->SetInCombatWithZone();
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, IN_PROGRESS);
|
||||
instance->SetBossState(DATA_SKADI_THE_RUTHLESS, IN_PROGRESS);
|
||||
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_START_EVENT);
|
||||
me->GetMotionMaster()->MoveJump(Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 5.0f, 10.0f);
|
||||
me->SetWalk(false);
|
||||
@@ -412,7 +412,7 @@ public:
|
||||
Talk(SAY_DEATH);
|
||||
Summons.DespawnAll();
|
||||
if (instance)
|
||||
instance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, DONE);
|
||||
instance->SetBossState(DATA_SKADI_THE_RUTHLESS, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
|
||||
@@ -74,7 +74,6 @@ enum Yells
|
||||
enum Creatures
|
||||
{
|
||||
NPC_ARTHAS = 29280, // Image of Arthas
|
||||
NPC_SVALA_SORROWGRAVE = 26668, // Svala after transformation
|
||||
NPC_RITUAL_CHANNELER = 27281,
|
||||
NPC_SPECTATOR = 26667,
|
||||
NPC_RITUAL_TARGET = 27327,
|
||||
@@ -82,11 +81,6 @@ enum Creatures
|
||||
NPC_SCOURGE_HULK = 26555
|
||||
};
|
||||
|
||||
enum GameObjects
|
||||
{
|
||||
GO_UTGARDE_MIRROR = 191745
|
||||
};
|
||||
|
||||
enum SvalaPhase
|
||||
{
|
||||
IDLE,
|
||||
@@ -101,191 +95,159 @@ enum Misc
|
||||
DATA_INCREDIBLE_HULK = 2043
|
||||
};
|
||||
|
||||
static const float spectatorWP[2][3] =
|
||||
Position const spectatorWP[2] =
|
||||
{
|
||||
{296.95f, -312.76f, 86.36f},
|
||||
{297.69f, -275.81f, 86.36f}
|
||||
{296.95f, -312.76f, 86.36f, 0.0f },
|
||||
{297.69f, -275.81f, 86.36f, 0.0f }
|
||||
};
|
||||
|
||||
static Position ArthasPos = { 295.81f, -366.16f, 92.57f, 1.58f };
|
||||
Position const ArthasPos = { 295.81f, -366.16f, 92.57f, 1.58f };
|
||||
|
||||
class boss_svala : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_svala() : CreatureScript("boss_svala") { }
|
||||
public:
|
||||
boss_svala() : CreatureScript("boss_svala") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_svalaAI(creature);
|
||||
}
|
||||
|
||||
struct boss_svalaAI : public ScriptedAI
|
||||
{
|
||||
boss_svalaAI(Creature* creature) : ScriptedAI(creature), summons(creature)
|
||||
struct boss_svalaAI : public BossAI
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
Phase = IDLE;
|
||||
|
||||
me->ApplySpellImmune(0, IMMUNITY_ID, SPELL_RITUAL_STRIKE_EFF_1, true);
|
||||
me->ApplySpellImmune(0, IMMUNITY_ID, SPELL_RITUAL_STRIKE_EFF_2, true);
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
SummonList summons;
|
||||
SvalaPhase Phase;
|
||||
|
||||
Position pos;
|
||||
float x, y, z;
|
||||
|
||||
uint32 introTimer;
|
||||
uint8 introPhase;
|
||||
uint8 sacrePhase;
|
||||
|
||||
TempSummon* arthas;
|
||||
uint64 arthasGUID;
|
||||
|
||||
uint32 sinsterStrikeTimer;
|
||||
uint32 callFlamesTimer;
|
||||
uint32 sacrificeTimer;
|
||||
|
||||
bool sacrificed;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
sacrificed = false;
|
||||
SetCombatMovement(true);
|
||||
|
||||
summons.DespawnAll();
|
||||
me->RemoveAllAuras();
|
||||
|
||||
if (Phase > NORMAL)
|
||||
Phase = NORMAL;
|
||||
|
||||
me->SetDisableGravity(Phase == NORMAL);
|
||||
|
||||
introTimer = 1 * IN_MILLISECONDS;
|
||||
introPhase = 0;
|
||||
arthasGUID = 0;
|
||||
|
||||
if (instance)
|
||||
boss_svalaAI(Creature* creature) : BossAI(creature, DATA_SVALA_SORROWGRAVE)
|
||||
{
|
||||
instance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, NOT_STARTED);
|
||||
instance->SetData64(DATA_SACRIFICED_PLAYER, 0);
|
||||
Phase = IDLE;
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
SvalaPhase Phase;
|
||||
|
||||
sinsterStrikeTimer = 7 * IN_MILLISECONDS;
|
||||
callFlamesTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
|
||||
uint32 introTimer;
|
||||
uint8 introPhase;
|
||||
uint8 sacrePhase;
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, IN_PROGRESS);
|
||||
}
|
||||
uint64 arthasGUID;
|
||||
|
||||
void JustSummoned(Creature* summon) OVERRIDE
|
||||
{
|
||||
if (summon->GetEntry() == NPC_RITUAL_CHANNELER)
|
||||
summon->CastSpell(summon, SPELL_SUMMONED_VIS, true);
|
||||
uint32 sinsterStrikeTimer;
|
||||
uint32 callFlamesTimer;
|
||||
uint32 sacrificeTimer;
|
||||
|
||||
summons.Summon(summon);
|
||||
}
|
||||
bool sacrificed;
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon) OVERRIDE
|
||||
{
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
|
||||
{
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if (Phase == IDLE && me->IsValidAttackTarget(who) && me->IsWithinDistInMap(who, 40))
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
Phase = INTRO;
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
if (GameObject* mirror = GetClosestGameObjectWithEntry(me, GO_UTGARDE_MIRROR, 100.0f))
|
||||
mirror->SetGoState(GO_STATE_READY);
|
||||
|
||||
if (Creature* arthas = me->SummonCreature(NPC_ARTHAS, ArthasPos, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
arthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
arthasGUID = arthas->GetGUID();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
{
|
||||
if (victim != me)
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (Phase == SACRIFICING)
|
||||
SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
|
||||
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
|
||||
|
||||
summons.DespawnAll();
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_SVALA_SORROWGRAVE_EVENT, DONE);
|
||||
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* /*target*/, const SpellInfo* spell) OVERRIDE
|
||||
{
|
||||
if (spell->Id == SPELL_RITUAL_STRIKE_EFF_1 && Phase != NORMAL && Phase != SVALADEAD)
|
||||
{
|
||||
Phase = NORMAL;
|
||||
_Reset();
|
||||
sacrificed = false;
|
||||
SetCombatMovement(true);
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 300.0f, true))
|
||||
me->GetMotionMaster()->MoveChase(target);
|
||||
if (Phase > NORMAL)
|
||||
Phase = NORMAL;
|
||||
|
||||
me->SetDisableGravity(Phase == NORMAL);
|
||||
|
||||
introTimer = 1 * IN_MILLISECONDS;
|
||||
introPhase = 0;
|
||||
sacrePhase = 0;
|
||||
arthasGUID = 0;
|
||||
|
||||
instance->SetData64(DATA_SACRIFICED_PLAYER, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (Phase == IDLE)
|
||||
return;
|
||||
|
||||
if (Phase == INTRO)
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
if (introTimer <= diff)
|
||||
{
|
||||
Creature* arthas = Unit::GetCreature(*me, arthasGUID);
|
||||
if (!arthas)
|
||||
return;
|
||||
_EnterCombat();
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
switch (introPhase)
|
||||
sinsterStrikeTimer = 7 * IN_MILLISECONDS;
|
||||
callFlamesTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) OVERRIDE
|
||||
{
|
||||
if (summon->GetEntry() == NPC_RITUAL_CHANNELER)
|
||||
summon->CastSpell(summon, SPELL_SUMMONED_VIS, true);
|
||||
|
||||
summons.Summon(summon);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
{
|
||||
if (!who)
|
||||
return;
|
||||
|
||||
if (Phase == IDLE && me->IsValidAttackTarget(who) && me->IsWithinDistInMap(who, 40))
|
||||
{
|
||||
Phase = INTRO;
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
if (GameObject* mirror = ObjectAccessor::GetGameObject(*me, DATA_UTGARDE_MIRROR))
|
||||
mirror->SetGoState(GO_STATE_READY);
|
||||
|
||||
if (Creature* arthas = me->SummonCreature(NPC_ARTHAS, ArthasPos, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
case 0:
|
||||
Talk(SAY_SVALA_INTRO_0);
|
||||
++introPhase;
|
||||
introTimer = 8100;
|
||||
break;
|
||||
case 1:
|
||||
arthas->AI()->Talk(SAY_DIALOG_OF_ARTHAS_1);
|
||||
++introPhase;
|
||||
introTimer = 10000;
|
||||
break;
|
||||
case 2:
|
||||
arthas->CastSpell(me, SPELL_TRANSFORMING_CHANNEL, false);
|
||||
pos.Relocate(me);
|
||||
pos.m_positionZ += 8.0f;
|
||||
me->GetMotionMaster()->MoveTakeoff(0, pos);
|
||||
// spectators flee event
|
||||
if (instance)
|
||||
arthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
arthasGUID = arthas->GetGUID();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* who) OVERRIDE
|
||||
{
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
if (Phase == SACRIFICING)
|
||||
SetEquipmentSlots(false, EQUIP_UNEQUIP, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE);
|
||||
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
|
||||
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* /*target*/, SpellInfo const* spellInfo) OVERRIDE
|
||||
{
|
||||
if (spellInfo->Id == SPELL_RITUAL_STRIKE_EFF_1 && Phase != NORMAL && Phase != SVALADEAD)
|
||||
{
|
||||
Phase = NORMAL;
|
||||
SetCombatMovement(true);
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 300.0f, true))
|
||||
me->GetMotionMaster()->MoveChase(target);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (Phase == IDLE)
|
||||
return;
|
||||
|
||||
if (Phase == INTRO)
|
||||
{
|
||||
if (introTimer <= diff)
|
||||
{
|
||||
Creature* arthas = ObjectAccessor::GetCreature(*me, arthasGUID);
|
||||
if (!arthas)
|
||||
return;
|
||||
|
||||
switch (introPhase)
|
||||
{
|
||||
case 0:
|
||||
Talk(SAY_SVALA_INTRO_0);
|
||||
++introPhase;
|
||||
introTimer = 8100;
|
||||
break;
|
||||
case 1:
|
||||
arthas->AI()->Talk(SAY_DIALOG_OF_ARTHAS_1);
|
||||
++introPhase;
|
||||
introTimer = 10000;
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
arthas->CastSpell(me, SPELL_TRANSFORMING_CHANNEL, false);
|
||||
Position pos;
|
||||
pos.Relocate(me);
|
||||
pos.m_positionZ += 8.0f;
|
||||
me->GetMotionMaster()->MoveTakeoff(0, pos);
|
||||
// spectators flee event
|
||||
std::list<Creature*> lspectatorList;
|
||||
GetCreatureListWithEntryInGrid(lspectatorList, me, NPC_SPECTATOR, 100.0f);
|
||||
for (std::list<Creature*>::iterator itr = lspectatorList.begin(); itr != lspectatorList.end(); ++itr)
|
||||
@@ -294,257 +256,258 @@ public:
|
||||
{
|
||||
(*itr)->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
(*itr)->SetWalk(false);
|
||||
(*itr)->GetMotionMaster()->MovePoint(1, spectatorWP[0][0], spectatorWP[0][1], spectatorWP[0][2]);
|
||||
(*itr)->GetMotionMaster()->MovePoint(1, spectatorWP[0]);
|
||||
}
|
||||
}
|
||||
|
||||
++introPhase;
|
||||
introTimer = 4200;
|
||||
break;
|
||||
}
|
||||
++introPhase;
|
||||
introTimer = 4200;
|
||||
break;
|
||||
case 3:
|
||||
me->CastSpell(me, SPELL_SVALA_TRANSFORMING1, false);
|
||||
++introPhase;
|
||||
introTimer = 6200;
|
||||
break;
|
||||
case 4:
|
||||
me->CastSpell(me, SPELL_SVALA_TRANSFORMING2, false);
|
||||
arthas->InterruptNonMeleeSpells(true);
|
||||
me->RemoveAllAuras();
|
||||
me->UpdateEntry(NPC_SVALA_SORROWGRAVE);
|
||||
me->SetFacingToObject(arthas);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
++introPhase;
|
||||
introTimer = 3200;
|
||||
break;
|
||||
case 5:
|
||||
Talk(SAY_SVALA_INTRO_1);
|
||||
++introPhase;
|
||||
introTimer = 10000;
|
||||
break;
|
||||
case 6:
|
||||
arthas->AI()->Talk(SAY_DIALOG_OF_ARTHAS_2);
|
||||
++introPhase;
|
||||
introTimer = 7200;
|
||||
break;
|
||||
case 7:
|
||||
Talk(SAY_SVALA_INTRO_2);
|
||||
me->SetFacingTo(1.58f);
|
||||
arthas->SetVisible(false);
|
||||
++introPhase;
|
||||
introTimer = 13800;
|
||||
break;
|
||||
case 8:
|
||||
pos.Relocate(me);
|
||||
pos.m_positionX = me->GetHomePosition().GetPositionX();
|
||||
pos.m_positionY = me->GetHomePosition().GetPositionY();
|
||||
pos.m_positionZ = 90.6065f;
|
||||
me->GetMotionMaster()->MoveLand(0, pos);
|
||||
me->SetDisableGravity(false, true);
|
||||
me->SetHover(true);
|
||||
++introPhase;
|
||||
introTimer = 3000;
|
||||
break;
|
||||
case 9:
|
||||
if (GameObject* mirror = GetClosestGameObjectWithEntry(me, GO_UTGARDE_MIRROR, 100.0f))
|
||||
mirror->SetGoState(GO_STATE_ACTIVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
arthas->DespawnOrUnsummon();
|
||||
arthasGUID = 0;
|
||||
Phase = NORMAL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
introTimer -= diff;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (Phase == NORMAL)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (sinsterStrikeTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_SINSTER_STRIKE);
|
||||
sinsterStrikeTimer = urand(5 * IN_MILLISECONDS, 9 * IN_MILLISECONDS);
|
||||
}
|
||||
else
|
||||
sinsterStrikeTimer -= diff;
|
||||
|
||||
if (callFlamesTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
{
|
||||
DoCast(target, SPELL_CALL_FLAMES);
|
||||
callFlamesTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
|
||||
}
|
||||
}
|
||||
else callFlamesTimer -= diff;
|
||||
|
||||
if (!sacrificed)
|
||||
{
|
||||
if (HealthBelowPct(50))
|
||||
{
|
||||
if (Unit* sacrificeTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 80.0f, true))
|
||||
{
|
||||
if (instance)
|
||||
instance->SetData64(DATA_SACRIFICED_PLAYER, sacrificeTarget->GetGUID());
|
||||
|
||||
Talk(SAY_SACRIFICE_PLAYER);
|
||||
|
||||
DoCast(sacrificeTarget, SPELL_RITUAL_PREPARATION);
|
||||
|
||||
SetCombatMovement(false);
|
||||
|
||||
Phase = SACRIFICING;
|
||||
sacrePhase = 0;
|
||||
sacrificeTimer = 1 * IN_MILLISECONDS;
|
||||
|
||||
DoCast(me, SPELL_RITUAL_OF_THE_SWORD);
|
||||
sacrificed = true;
|
||||
case 3:
|
||||
me->CastSpell(me, SPELL_SVALA_TRANSFORMING1, false);
|
||||
++introPhase;
|
||||
introTimer = 6200;
|
||||
break;
|
||||
case 4:
|
||||
me->CastSpell(me, SPELL_SVALA_TRANSFORMING2, false);
|
||||
arthas->InterruptNonMeleeSpells(true);
|
||||
me->RemoveAllAuras();
|
||||
me->UpdateEntry(NPC_SVALA_SORROWGRAVE);
|
||||
me->SetFacingToObject(arthas);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
++introPhase;
|
||||
introTimer = 3200;
|
||||
break;
|
||||
case 5:
|
||||
Talk(SAY_SVALA_INTRO_1);
|
||||
++introPhase;
|
||||
introTimer = 10000;
|
||||
break;
|
||||
case 6:
|
||||
arthas->AI()->Talk(SAY_DIALOG_OF_ARTHAS_2);
|
||||
++introPhase;
|
||||
introTimer = 7200;
|
||||
break;
|
||||
case 7:
|
||||
Talk(SAY_SVALA_INTRO_2);
|
||||
me->SetFacingTo(1.58f);
|
||||
arthas->SetVisible(false);
|
||||
++introPhase;
|
||||
introTimer = 13800;
|
||||
break;
|
||||
case 8:
|
||||
{
|
||||
Position pos;
|
||||
pos.Relocate(me);
|
||||
pos.m_positionX = me->GetHomePosition().GetPositionX();
|
||||
pos.m_positionY = me->GetHomePosition().GetPositionY();
|
||||
pos.m_positionZ = 90.6065f;
|
||||
me->GetMotionMaster()->MoveLand(0, pos);
|
||||
me->SetDisableGravity(false, true);
|
||||
me->SetHover(true);
|
||||
++introPhase;
|
||||
introTimer = 3000;
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
if (GameObject* mirror = ObjectAccessor::GetGameObject(*me, DATA_UTGARDE_MIRROR))
|
||||
mirror->SetGoState(GO_STATE_ACTIVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
arthas->DespawnOrUnsummon();
|
||||
arthasGUID = 0;
|
||||
Phase = NORMAL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
introTimer -= diff;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
else //SACRIFICING
|
||||
{
|
||||
if (sacrificeTimer <= diff)
|
||||
if (Phase == NORMAL)
|
||||
{
|
||||
switch (sacrePhase)
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (sinsterStrikeTimer <= diff)
|
||||
{
|
||||
case 0:
|
||||
// spawn ritual channelers
|
||||
if (instance)
|
||||
DoCastVictim(SPELL_SINSTER_STRIKE);
|
||||
sinsterStrikeTimer = urand(5 * IN_MILLISECONDS, 9 * IN_MILLISECONDS);
|
||||
}
|
||||
else
|
||||
sinsterStrikeTimer -= diff;
|
||||
|
||||
if (callFlamesTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true))
|
||||
{
|
||||
DoCast(target, SPELL_CALL_FLAMES);
|
||||
callFlamesTimer = urand(10 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
|
||||
}
|
||||
}
|
||||
else
|
||||
callFlamesTimer -= diff;
|
||||
|
||||
if (!sacrificed)
|
||||
{
|
||||
if (HealthBelowPct(50))
|
||||
{
|
||||
if (Unit* sacrificeTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 80.0f, true))
|
||||
{
|
||||
instance->SetData64(DATA_SACRIFICED_PLAYER, sacrificeTarget->GetGUID());
|
||||
|
||||
Talk(SAY_SACRIFICE_PLAYER);
|
||||
|
||||
DoCast(sacrificeTarget, SPELL_RITUAL_PREPARATION);
|
||||
|
||||
SetCombatMovement(false);
|
||||
|
||||
Phase = SACRIFICING;
|
||||
sacrePhase = 0;
|
||||
sacrificeTimer = 1 * IN_MILLISECONDS;
|
||||
|
||||
DoCast(me, SPELL_RITUAL_OF_THE_SWORD);
|
||||
sacrificed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
else // SACRIFICING
|
||||
{
|
||||
if (sacrificeTimer <= diff)
|
||||
{
|
||||
switch (sacrePhase)
|
||||
{
|
||||
case 0:
|
||||
// spawn ritual channelers
|
||||
DoCast(me, SPELL_RITUAL_CHANNELER_1, true);
|
||||
DoCast(me, SPELL_RITUAL_CHANNELER_2, true);
|
||||
DoCast(me, SPELL_RITUAL_CHANNELER_3, true);
|
||||
}
|
||||
++sacrePhase;
|
||||
sacrificeTimer = 2 * IN_MILLISECONDS;
|
||||
break;
|
||||
case 1:
|
||||
me->StopMoving();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
DoCast(me, SPELL_RITUAL_STRIKE_TRIGGER, true);
|
||||
++sacrePhase;
|
||||
sacrificeTimer = 200;
|
||||
break;
|
||||
case 2:
|
||||
DoCast(me, SPELL_RITUAL_DISARM);
|
||||
++sacrePhase;
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
++sacrePhase;
|
||||
sacrificeTimer = 2 * IN_MILLISECONDS;
|
||||
break;
|
||||
case 1:
|
||||
me->StopMoving();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
DoCast(me, SPELL_RITUAL_STRIKE_TRIGGER, true);
|
||||
++sacrePhase;
|
||||
sacrificeTimer = 200;
|
||||
break;
|
||||
case 2:
|
||||
DoCast(me, SPELL_RITUAL_DISARM);
|
||||
++sacrePhase;
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
sacrificeTimer -= diff;
|
||||
}
|
||||
else sacrificeTimer -= diff;
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetUtgardePinnacleAI<boss_svalaAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_ritual_channeler : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_ritual_channeler() : CreatureScript("npc_ritual_channeler") { }
|
||||
public:
|
||||
npc_ritual_channeler() : CreatureScript("npc_ritual_channeler") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_ritual_channelerAI(creature);
|
||||
}
|
||||
|
||||
struct npc_ritual_channelerAI : public ScriptedAI
|
||||
{
|
||||
npc_ritual_channelerAI(Creature* creature) :ScriptedAI(creature)
|
||||
struct npc_ritual_channelerAI : public ScriptedAI
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
npc_ritual_channelerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
uint32 paralyzeTimer;
|
||||
InstanceScript* instance;
|
||||
uint32 paralyzeTimer;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
paralyzeTimer = 1600;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
paralyzeTimer = 1600;
|
||||
if (instance)
|
||||
if (IsHeroic())
|
||||
DoCast(me, SPELL_SHADOWS_IN_THE_DARK);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (paralyzeTimer <= diff)
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (instance)
|
||||
if (Unit* victim = me->GetUnit(*me, instance->GetData64(DATA_SACRIFICED_PLAYER)))
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (paralyzeTimer <= diff)
|
||||
{
|
||||
if (Unit* victim = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_SACRIFICED_PLAYER)))
|
||||
DoCast(victim, SPELL_PARALYZE, false);
|
||||
|
||||
paralyzeTimer = 200;
|
||||
paralyzeTimer = 200;
|
||||
}
|
||||
else
|
||||
paralyzeTimer -= diff;
|
||||
}
|
||||
else
|
||||
paralyzeTimer -= diff;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetUtgardePinnacleAI<npc_ritual_channelerAI>(creature);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class npc_spectator : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_spectator() : CreatureScript("npc_spectator") { }
|
||||
public:
|
||||
npc_spectator() : CreatureScript("npc_spectator") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_spectatorAI(creature);
|
||||
}
|
||||
|
||||
struct npc_spectatorAI : public ScriptedAI
|
||||
{
|
||||
npc_spectatorAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() OVERRIDE { }
|
||||
|
||||
void MovementInform(uint32 motionType, uint32 pointId) OVERRIDE
|
||||
struct npc_spectatorAI : public ScriptedAI
|
||||
{
|
||||
if (motionType == POINT_MOTION_TYPE)
|
||||
npc_spectatorAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() OVERRIDE { }
|
||||
|
||||
void MovementInform(uint32 motionType, uint32 pointId) OVERRIDE
|
||||
{
|
||||
if (pointId == 1)
|
||||
me->GetMotionMaster()->MovePoint(2, spectatorWP[1][0], spectatorWP[1][1], spectatorWP[1][2]);
|
||||
else if (pointId == 2)
|
||||
me->DespawnOrUnsummon(1000);
|
||||
if (motionType == POINT_MOTION_TYPE)
|
||||
{
|
||||
if (pointId == 1)
|
||||
me->GetMotionMaster()->MovePoint(2, spectatorWP[1]);
|
||||
else if (pointId == 2)
|
||||
me->DespawnOrUnsummon(1000);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetUtgardePinnacleAI<npc_spectatorAI>(creature);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class RitualTargetCheck
|
||||
{
|
||||
public:
|
||||
explicit RitualTargetCheck(Unit* _caster) : caster(_caster) { }
|
||||
explicit RitualTargetCheck() { }
|
||||
|
||||
bool operator() (WorldObject* unit) const
|
||||
bool operator() (WorldObject* obj) const
|
||||
{
|
||||
if (InstanceScript* instance = caster->GetInstanceScript())
|
||||
if (instance->GetData64(DATA_SACRIFICED_PLAYER) == unit->GetGUID())
|
||||
if (InstanceScript* instance = obj->GetInstanceScript())
|
||||
if (instance->GetData64(DATA_SACRIFICED_PLAYER) == obj->GetGUID())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
Unit* caster;
|
||||
};
|
||||
|
||||
class spell_paralyze_pinnacle : public SpellScriptLoader
|
||||
@@ -558,7 +521,7 @@ class spell_paralyze_pinnacle : public SpellScriptLoader
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
{
|
||||
unitList.remove_if(RitualTargetCheck(GetCaster()));
|
||||
unitList.remove_if(RitualTargetCheck());
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
@@ -635,7 +598,7 @@ class npc_scourge_hulk : public CreatureScript
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_scourge_hulkAI(creature);
|
||||
return GetUtgardePinnacleAI<npc_scourge_hulkAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -103,16 +103,10 @@ class boss_ymiron : public CreatureScript
|
||||
public:
|
||||
boss_ymiron() : CreatureScript("boss_ymiron") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
struct boss_ymironAI : public BossAI
|
||||
{
|
||||
return new boss_ymironAI(creature);
|
||||
}
|
||||
|
||||
struct boss_ymironAI : public ScriptedAI
|
||||
{
|
||||
boss_ymironAI(Creature* creature) : ScriptedAI(creature)
|
||||
boss_ymironAI(Creature* creature) : BossAI(creature, DATA_KING_YMIRON)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
for (int i = 0; i < 4; ++i)
|
||||
m_uiActiveOrder[i] = i;
|
||||
for (int i = 0; i < 3; ++i)
|
||||
@@ -122,9 +116,6 @@ public:
|
||||
m_uiActiveOrder[i] = m_uiActiveOrder[r];
|
||||
m_uiActiveOrder[r] = temp;
|
||||
}
|
||||
|
||||
m_uiActivedCreatureGUID = 0;
|
||||
m_uiOrbGUID = 0;
|
||||
}
|
||||
|
||||
bool m_bIsWalking;
|
||||
@@ -155,10 +146,9 @@ public:
|
||||
uint64 m_uiActivedCreatureGUID;
|
||||
uint64 m_uiOrbGUID;
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
m_bIsWalking = false;
|
||||
m_bIsPause = false;
|
||||
m_bIsActiveWithBJORN = false;
|
||||
@@ -182,19 +172,14 @@ public:
|
||||
m_uiHealthAmountModifier = 1;
|
||||
m_uiHealthAmountMultipler = DUNGEON_MODE(20, 25);
|
||||
|
||||
DespawnBoatGhosts(m_uiActivedCreatureGUID);
|
||||
DespawnBoatGhosts(m_uiOrbGUID);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_KING_YMIRON_EVENT, NOT_STARTED);
|
||||
m_uiActivedCreatureGUID = 0;
|
||||
m_uiOrbGUID = 0;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_KING_YMIRON_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* who, SpellInfo const* spell) OVERRIDE
|
||||
@@ -371,21 +356,17 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
DespawnBoatGhosts(m_uiActivedCreatureGUID);
|
||||
DespawnBoatGhosts(m_uiOrbGUID);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(DATA_KING_YMIRON_EVENT, DONE);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
void KilledUnit(Unit* who) OVERRIDE
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
if (who->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void DespawnBoatGhosts(uint64 m_uiCreatureGUID)
|
||||
void DespawnBoatGhosts(uint64& m_uiCreatureGUID)
|
||||
{
|
||||
if (m_uiCreatureGUID)
|
||||
if (Creature* temp = Unit::GetCreature(*me, m_uiCreatureGUID))
|
||||
@@ -395,14 +376,16 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetUtgardePinnacleAI<boss_ymironAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class achievement_kings_bane : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
achievement_kings_bane() : AchievementCriteriaScript("achievement_kings_bane")
|
||||
{
|
||||
}
|
||||
achievement_kings_bane() : AchievementCriteriaScript("achievement_kings_bane") { }
|
||||
|
||||
bool OnCheck(Player* /*player*/, Unit* target) OVERRIDE
|
||||
{
|
||||
|
||||
+210
-221
@@ -19,246 +19,235 @@
|
||||
#include "InstanceScript.h"
|
||||
#include "utgarde_pinnacle.h"
|
||||
|
||||
#define MAX_ENCOUNTER 4
|
||||
|
||||
/* Utgarde Pinnacle encounters:
|
||||
0 - Svala Sorrowgrave
|
||||
1 - Gortok Palehoof
|
||||
2 - Skadi the Ruthless
|
||||
3 - King Ymiron
|
||||
*/
|
||||
|
||||
enum GameObjects
|
||||
DoorData const doorData[] =
|
||||
{
|
||||
ENTRY_SKADI_THE_RUTHLESS_DOOR = 192173,
|
||||
ENTRY_KING_YMIRON_DOOR = 192174,
|
||||
ENTRY_GORK_PALEHOOF_SPHERE = 188593
|
||||
{ GO_SKADI_THE_RUTHLESS_DOOR, DATA_SKADI_THE_RUTHLESS, DOOR_TYPE_PASSAGE, BOUNDARY_W },
|
||||
{ GO_KING_YMIRON_DOOR, DATA_KING_YMIRON, DOOR_TYPE_PASSAGE, BOUNDARY_N },
|
||||
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END
|
||||
};
|
||||
|
||||
class instance_utgarde_pinnacle : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_utgarde_pinnacle() : InstanceMapScript("instance_utgarde_pinnacle", 575) { }
|
||||
public:
|
||||
instance_utgarde_pinnacle() : InstanceMapScript(UPScriptName, 575) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
|
||||
{
|
||||
return new instance_pinnacle(map);
|
||||
}
|
||||
|
||||
struct instance_pinnacle : public InstanceScript
|
||||
{
|
||||
instance_pinnacle(Map* map) : InstanceScript(map) { }
|
||||
|
||||
uint64 uiSvalaSorrowgrave;
|
||||
uint64 uiGortokPalehoof;
|
||||
uint64 uiSkadiTheRuthless;
|
||||
uint64 uiKingYmiron;
|
||||
|
||||
uint64 uiSkadiTheRuthlessDoor;
|
||||
uint64 uiKingYmironDoor;
|
||||
uint64 uiGortokPalehoofSphere;
|
||||
|
||||
uint64 uiFrenziedWorgen;
|
||||
uint64 uiRavenousFurbolg;
|
||||
uint64 uiFerociousRhino;
|
||||
uint64 uiMassiveJormungar;
|
||||
uint64 uiPalehoofOrb;
|
||||
|
||||
uint64 uiSvala;
|
||||
uint64 uiSacrificedPlayer;
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
std::string str_data;
|
||||
|
||||
void Initialize() OVERRIDE
|
||||
struct instance_utgarde_pinnacle_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
|
||||
uiSvalaSorrowgrave = 0;
|
||||
uiGortokPalehoof = 0;
|
||||
uiSkadiTheRuthless = 0;
|
||||
uiKingYmiron = 0;
|
||||
|
||||
uiSkadiTheRuthlessDoor = 0;
|
||||
uiKingYmironDoor = 0;
|
||||
uiGortokPalehoofSphere = 0;
|
||||
|
||||
uiFrenziedWorgen = 0;
|
||||
uiRavenousFurbolg = 0;
|
||||
uiFerociousRhino = 0;
|
||||
uiMassiveJormungar = 0;
|
||||
uiPalehoofOrb = 0;
|
||||
|
||||
uiSvala = 0;
|
||||
uiSacrificedPlayer = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const OVERRIDE
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) OVERRIDE
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
instance_utgarde_pinnacle_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
case BOSS_SVALA_SORROWGRAVE: uiSvalaSorrowgrave = creature->GetGUID(); break;
|
||||
case BOSS_GORTOK_PALEHOOF: uiGortokPalehoof = creature->GetGUID(); break;
|
||||
case BOSS_SKADI_RUTHLESS: uiSkadiTheRuthless = creature->GetGUID(); break;
|
||||
case BOSS_KING_YMIRON: uiKingYmiron = creature->GetGUID(); break;
|
||||
case NPC_FRENZIED_WORGEN: uiFrenziedWorgen = creature->GetGUID(); break;
|
||||
case NPC_RAVENOUS_FURBOLG: uiRavenousFurbolg = creature->GetGUID(); break;
|
||||
case NPC_MASSIVE_JORMUNGAR: uiMassiveJormungar = creature->GetGUID(); break;
|
||||
case NPC_FEROCIOUS_RHINO: uiFerociousRhino = creature->GetGUID(); break;
|
||||
case NPC_SVALA: uiSvala = creature->GetGUID(); break;
|
||||
case NPC_PALEHOOF_ORB: uiPalehoofOrb = creature->GetGUID(); break;
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadDoorData(doorData);
|
||||
|
||||
SvalaSorrowgraveGUID = 0;
|
||||
GortokPalehoofGUID = 0;
|
||||
SkadiTheRuthlessGUID = 0;
|
||||
KingYmironGUID = 0;
|
||||
|
||||
UtgardeMirrorGUID = 0;
|
||||
GortokPalehoofSphereGUID = 0;
|
||||
|
||||
FrenziedWorgenGUID = 0;
|
||||
RavenousFurbolgGUID = 0;
|
||||
FerociousRhinoGUID = 0;
|
||||
MassiveJormungarGUID = 0;
|
||||
PalehoofOrbGUID = 0;
|
||||
|
||||
SvalaGUID = 0;
|
||||
SacrificedPlayerGUID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) OVERRIDE
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
void OnCreatureCreate(Creature* creature) OVERRIDE
|
||||
{
|
||||
case ENTRY_SKADI_THE_RUTHLESS_DOOR:
|
||||
uiSkadiTheRuthlessDoor = go->GetGUID();
|
||||
if (m_auiEncounter[2] == DONE) HandleGameObject(0, true, go);
|
||||
break;
|
||||
case ENTRY_KING_YMIRON_DOOR:
|
||||
uiKingYmironDoor = go->GetGUID();
|
||||
if (m_auiEncounter[3] == DONE) HandleGameObject(0, true, go);
|
||||
break;
|
||||
case ENTRY_GORK_PALEHOOF_SPHERE:
|
||||
uiGortokPalehoofSphere = go->GetGUID();
|
||||
if (m_auiEncounter[1] == DONE)
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_SVALA_SORROWGRAVE:
|
||||
SvalaSorrowgraveGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_GORTOK_PALEHOOF:
|
||||
GortokPalehoofGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_SKADI_THE_RUTHLESS:
|
||||
SkadiTheRuthlessGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_KING_YMIRON:
|
||||
KingYmironGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_FRENZIED_WORGEN:
|
||||
FrenziedWorgenGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_RAVENOUS_FURBOLG:
|
||||
RavenousFurbolgGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_MASSIVE_JORMUNGAR:
|
||||
MassiveJormungarGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_FEROCIOUS_RHINO:
|
||||
FerociousRhinoGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_SVALA:
|
||||
SvalaGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_PALEHOOF_ORB:
|
||||
PalehoofOrbGUID = creature->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) OVERRIDE
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_UTGARDE_MIRROR:
|
||||
UtgardeMirrorGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_GORTOK_PALEHOOF_SPHERE:
|
||||
GortokPalehoofSphereGUID = go->GetGUID();
|
||||
if (GetBossState(DATA_GORTOK_PALEHOOF) == DONE)
|
||||
{
|
||||
HandleGameObject(0, true, go);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
break;
|
||||
case GO_SKADI_THE_RUTHLESS_DOOR:
|
||||
case GO_KING_YMIRON_DOOR:
|
||||
AddDoor(go, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectRemove(GameObject* go) OVERRIDE
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_SKADI_THE_RUTHLESS_DOOR:
|
||||
case GO_KING_YMIRON_DOOR:
|
||||
AddDoor(go, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData64(uint32 type, uint64 data) OVERRIDE
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_SACRIFICED_PLAYER:
|
||||
SacrificedPlayerGUID = data;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type) const OVERRIDE
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_SVALA_SORROWGRAVE:
|
||||
return SvalaSorrowgraveGUID;
|
||||
case DATA_GORTOK_PALEHOOF:
|
||||
return GortokPalehoofGUID;
|
||||
case DATA_SKADI_THE_RUTHLESS:
|
||||
return SkadiTheRuthlessGUID;
|
||||
case DATA_KING_YMIRON:
|
||||
return KingYmironGUID;
|
||||
case DATA_FRENZIED_WORGEN:
|
||||
return FrenziedWorgenGUID;
|
||||
case DATA_RAVENOUS_FURBOLG:
|
||||
return RavenousFurbolgGUID;
|
||||
case DATA_MASSIVE_JORMUNGAR:
|
||||
return MassiveJormungarGUID;
|
||||
case DATA_FEROCIOUS_RHINO:
|
||||
return FerociousRhinoGUID;
|
||||
case DATA_GORTOK_ORB:
|
||||
return PalehoofOrbGUID;
|
||||
case DATA_GORTOK_PALEHOOF_SPHERE:
|
||||
return GortokPalehoofSphereGUID;
|
||||
case DATA_UTGARDE_MIRROR:
|
||||
return UtgardeMirrorGUID;
|
||||
case DATA_SVALA:
|
||||
return SvalaGUID;
|
||||
case DATA_SACRIFICED_PLAYER:
|
||||
return SacrificedPlayerGUID;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetSaveData() OVERRIDE
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "U P " << GetBossSaveData();
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(char const* str) OVERRIDE
|
||||
{
|
||||
if (!str)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(str);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
|
||||
std::istringstream loadStream(str);
|
||||
loadStream >> dataHead1 >> dataHead2;
|
||||
|
||||
if (dataHead1 == 'U' && dataHead2 == 'P')
|
||||
{
|
||||
for (uint32 i = 0; i < EncounterCount; ++i)
|
||||
{
|
||||
HandleGameObject(0, true, go);
|
||||
go->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
|
||||
void SetData(uint32 type, uint32 data) OVERRIDE
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_SVALA_SORROWGRAVE_EVENT:
|
||||
m_auiEncounter[0] = data;
|
||||
break;
|
||||
case DATA_GORTOK_PALEHOOF_EVENT:
|
||||
m_auiEncounter[1] = data;
|
||||
break;
|
||||
case DATA_SKADI_THE_RUTHLESS_EVENT:
|
||||
if (data == DONE)
|
||||
HandleGameObject(uiSkadiTheRuthlessDoor, true);
|
||||
m_auiEncounter[2] = data;
|
||||
break;
|
||||
case DATA_KING_YMIRON_EVENT:
|
||||
if (data == DONE)
|
||||
HandleGameObject(uiKingYmironDoor, true);
|
||||
m_auiEncounter[3] = data;
|
||||
break;
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
if (data == DONE)
|
||||
SaveToDB();
|
||||
}
|
||||
protected:
|
||||
uint64 SvalaSorrowgraveGUID;
|
||||
uint64 GortokPalehoofGUID;
|
||||
uint64 SkadiTheRuthlessGUID;
|
||||
uint64 KingYmironGUID;
|
||||
|
||||
void SetData64(uint32 type, uint64 data) OVERRIDE
|
||||
uint64 UtgardeMirrorGUID;
|
||||
uint64 GortokPalehoofSphereGUID;
|
||||
|
||||
uint64 FrenziedWorgenGUID;
|
||||
uint64 RavenousFurbolgGUID;
|
||||
uint64 FerociousRhinoGUID;
|
||||
uint64 MassiveJormungarGUID;
|
||||
|
||||
uint64 PalehoofOrbGUID;
|
||||
|
||||
uint64 SvalaGUID;
|
||||
uint64 SacrificedPlayerGUID;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_SACRIFICED_PLAYER:
|
||||
uiSacrificedPlayer = data;
|
||||
break;
|
||||
}
|
||||
return new instance_utgarde_pinnacle_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const OVERRIDE
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_SVALA_SORROWGRAVE_EVENT: return m_auiEncounter[0];
|
||||
case DATA_GORTOK_PALEHOOF_EVENT: return m_auiEncounter[1];
|
||||
case DATA_SKADI_THE_RUTHLESS_EVENT: return m_auiEncounter[2];
|
||||
case DATA_KING_YMIRON_EVENT: return m_auiEncounter[3];
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier) const OVERRIDE
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
case DATA_SVALA_SORROWGRAVE: return uiSvalaSorrowgrave;
|
||||
case DATA_GORTOK_PALEHOOF: return uiGortokPalehoof;
|
||||
case DATA_SKADI_THE_RUTHLESS: return uiSkadiTheRuthless;
|
||||
case DATA_KING_YMIRON: return uiKingYmiron;
|
||||
case DATA_NPC_FRENZIED_WORGEN: return uiFrenziedWorgen;
|
||||
case DATA_NPC_RAVENOUS_FURBOLG: return uiRavenousFurbolg;
|
||||
case DATA_NPC_MASSIVE_JORMUNGAR: return uiMassiveJormungar;
|
||||
case DATA_NPC_FEROCIOUS_RHINO: return uiFerociousRhino;
|
||||
case DATA_NPC_ORB: return uiPalehoofOrb;
|
||||
case DATA_SVALA: return uiSvala;
|
||||
case DATA_GORTOK_PALEHOOF_SPHERE: return uiGortokPalehoofSphere;
|
||||
case DATA_SACRIFICED_PLAYER: return uiSacrificedPlayer;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetSaveData() OVERRIDE
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "U P " << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' '
|
||||
<< m_auiEncounter[2] << ' ' << m_auiEncounter[3];
|
||||
|
||||
str_data = saveStream.str();
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return str_data;
|
||||
}
|
||||
|
||||
void Load(const char* in) OVERRIDE
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
uint16 data0, data1, data2, data3;
|
||||
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3;
|
||||
|
||||
if (dataHead1 == 'U' && dataHead2 == 'P')
|
||||
{
|
||||
m_auiEncounter[0] = data0;
|
||||
m_auiEncounter[1] = data1;
|
||||
m_auiEncounter[2] = data2;
|
||||
m_auiEncounter[3] = data3;
|
||||
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
|
||||
} else OUT_LOAD_INST_DATA_FAIL;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_instance_utgarde_pinnacle()
|
||||
|
||||
@@ -15,46 +15,64 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DEF_PINNACLE_H
|
||||
#define DEF_PINNACLE_H
|
||||
#ifndef UTGARDE_PINNACLE_H_
|
||||
#define UTGARDE_PINNACLE_H_
|
||||
|
||||
enum Data
|
||||
#define UPScriptName "instance_utgarde_pinnacle"
|
||||
|
||||
uint32 const EncounterCount = 4;
|
||||
|
||||
enum DataTypes
|
||||
{
|
||||
DATA_SVALA_SORROWGRAVE_EVENT,
|
||||
DATA_GORTOK_PALEHOOF_EVENT,
|
||||
DATA_SKADI_THE_RUTHLESS_EVENT,
|
||||
DATA_KING_YMIRON_EVENT
|
||||
// Encounter States/Boss GUIDs
|
||||
DATA_SVALA_SORROWGRAVE = 0,
|
||||
DATA_GORTOK_PALEHOOF = 1,
|
||||
DATA_SKADI_THE_RUTHLESS = 2,
|
||||
DATA_KING_YMIRON = 3,
|
||||
|
||||
// Additional Data
|
||||
DATA_UTGARDE_MIRROR = 4,
|
||||
DATA_SVALA = 5,
|
||||
DATA_SACRIFICED_PLAYER = 6,
|
||||
|
||||
DATA_FRENZIED_WORGEN = 7,
|
||||
DATA_RAVENOUS_FURBOLG = 8,
|
||||
DATA_MASSIVE_JORMUNGAR = 9,
|
||||
DATA_FEROCIOUS_RHINO = 10,
|
||||
DATA_GORTOK_ORB = 11,
|
||||
DATA_GORTOK_PALEHOOF_SPHERE = 12
|
||||
};
|
||||
|
||||
enum Data64
|
||||
enum CreatureIds
|
||||
{
|
||||
DATA_SVALA,
|
||||
DATA_SVALA_SORROWGRAVE,
|
||||
DATA_GORTOK_PALEHOOF,
|
||||
DATA_SKADI_THE_RUTHLESS,
|
||||
DATA_NPC_GRAUF,
|
||||
DATA_KING_YMIRON,
|
||||
DATA_NPC_FRENZIED_WORGEN,
|
||||
DATA_NPC_RAVENOUS_FURBOLG,
|
||||
DATA_NPC_MASSIVE_JORMUNGAR,
|
||||
DATA_NPC_FEROCIOUS_RHINO,
|
||||
DATA_NPC_ORB,
|
||||
DATA_GORTOK_PALEHOOF_SPHERE,
|
||||
DATA_SACRIFICED_PLAYER
|
||||
NPC_SVALA_SORROWGRAVE = 26668,
|
||||
NPC_GORTOK_PALEHOOF = 26687,
|
||||
NPC_SKADI_THE_RUTHLESS = 26693,
|
||||
NPC_KING_YMIRON = 26861,
|
||||
|
||||
// Svala
|
||||
NPC_SVALA = 29281,
|
||||
|
||||
// Gortok Palehoof
|
||||
NPC_FRENZIED_WORGEN = 26683,
|
||||
NPC_RAVENOUS_FURBOLG = 26684,
|
||||
NPC_MASSIVE_JORMUNGAR = 26685,
|
||||
NPC_FEROCIOUS_RHINO = 26686,
|
||||
NPC_PALEHOOF_ORB = 26688
|
||||
};
|
||||
|
||||
enum CreatureID
|
||||
enum GameObjectIds
|
||||
{
|
||||
BOSS_SVALA_SORROWGRAVE = 26668,
|
||||
BOSS_GORTOK_PALEHOOF = 26687,
|
||||
BOSS_SKADI_RUTHLESS = 26693,
|
||||
BOSS_KING_YMIRON = 26861,
|
||||
NPC_FRENZIED_WORGEN = 26683,
|
||||
NPC_RAVENOUS_FURBOLG = 26684,
|
||||
NPC_MASSIVE_JORMUNGAR = 26685,
|
||||
NPC_FEROCIOUS_RHINO = 26686,
|
||||
NPC_SVALA = 29281,
|
||||
NPC_PALEHOOF_ORB = 26688
|
||||
GO_GORTOK_PALEHOOF_SPHERE = 188593,
|
||||
GO_UTGARDE_MIRROR = 191745,
|
||||
GO_SKADI_THE_RUTHLESS_DOOR = 192173,
|
||||
GO_KING_YMIRON_DOOR = 192174
|
||||
};
|
||||
|
||||
#endif
|
||||
template<class AI>
|
||||
AI* GetUtgardePinnacleAI(Creature* creature)
|
||||
{
|
||||
return GetInstanceAI<AI>(creature, UPScriptName);
|
||||
}
|
||||
|
||||
#endif // UTGARDE_PINNACLE_H_
|
||||
@@ -64,11 +64,11 @@ public:
|
||||
creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true);
|
||||
}
|
||||
|
||||
void Reset()OVERRIDE { }
|
||||
void Reset() OVERRIDE { }
|
||||
|
||||
void EnterCombat(Unit* /*who*/)OVERRIDE { }
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void AttackStart(Unit* /*who*/)OVERRIDE { }
|
||||
void AttackStart(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/)OVERRIDE { }
|
||||
void UpdateAI(uint32 /*diff*/) OVERRIDE { }
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
|
||||
@@ -303,10 +303,111 @@ class npc_wyrmrest_defender : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
/*#####
|
||||
# npc_torturer_lecraft
|
||||
#####*/
|
||||
|
||||
enum TorturerLeCraft
|
||||
{
|
||||
SPELL_HEMORRHAGE = 30478,
|
||||
SPELL_KIDNEY_SHOT = 30621,
|
||||
SPELL_HIGH_EXECUTORS_BRANDING_IRON = 48603,
|
||||
NPC_TORTURER_LECRAFT = 27394,
|
||||
EVENT_HEMORRHAGE = 1,
|
||||
EVENT_KIDNEY_SHOT = 2,
|
||||
SAY_AGGRO = 0
|
||||
};
|
||||
|
||||
class npc_torturer_lecraft : public CreatureScript
|
||||
{
|
||||
public: npc_torturer_lecraft() : CreatureScript("npc_torturer_lecraft") {}
|
||||
|
||||
struct npc_torturer_lecraftAI : public ScriptedAI
|
||||
{
|
||||
npc_torturer_lecraftAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_textCounter = 1;
|
||||
_playerGUID = 0;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) OVERRIDE
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_HEMORRHAGE, urand(5000, 8000));
|
||||
_events.ScheduleEvent(EVENT_KIDNEY_SHOT, urand(12000, 15000));
|
||||
|
||||
if (Player* player = who->ToPlayer())
|
||||
Talk (SAY_AGGRO, player->GetGUID());
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spell) OVERRIDE
|
||||
{
|
||||
if (spell->Id != SPELL_HIGH_EXECUTORS_BRANDING_IRON)
|
||||
return;
|
||||
|
||||
if (Player* player = caster->ToPlayer())
|
||||
{
|
||||
if (_textCounter == 1)
|
||||
_playerGUID = player->GetGUID();
|
||||
|
||||
if (_playerGUID != player->GetGUID())
|
||||
return;
|
||||
|
||||
Talk(_textCounter, player->GetGUID());
|
||||
|
||||
if (_textCounter == 5)
|
||||
player->KilledMonsterCredit(NPC_TORTURER_LECRAFT, 0);
|
||||
|
||||
++_textCounter;
|
||||
|
||||
if (_textCounter == 13)
|
||||
_textCounter = 6;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_HEMORRHAGE:
|
||||
DoCastVictim(SPELL_HEMORRHAGE);
|
||||
_events.ScheduleEvent(EVENT_HEMORRHAGE, urand(12000, 168000));
|
||||
break;
|
||||
case EVENT_KIDNEY_SHOT:
|
||||
DoCastVictim(SPELL_KIDNEY_SHOT);
|
||||
_events.ScheduleEvent(EVENT_KIDNEY_SHOT, urand(20000, 26000));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
private:
|
||||
EventMap _events;
|
||||
uint8 _textCounter;
|
||||
uint64 _playerGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_torturer_lecraftAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_dragonblight()
|
||||
{
|
||||
new npc_alexstrasza_wr_gate;
|
||||
new spell_q12096_q12092_dummy;
|
||||
new spell_q12096_q12092_bark;
|
||||
new npc_wyrmrest_defender;
|
||||
new npc_torturer_lecraft;
|
||||
}
|
||||
@@ -20,7 +20,9 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedEscortAI.h"
|
||||
#include "Player.h"
|
||||
#include "Spell.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellScript.h"
|
||||
#include "CreatureTextMgr.h"
|
||||
|
||||
/*######
|
||||
@@ -749,6 +751,43 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
enum ShredderDelivery
|
||||
{
|
||||
NPC_BROKEN_DOWN_SHREDDER = 27354
|
||||
};
|
||||
|
||||
class spell_shredder_delivery : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_shredder_delivery() : SpellScriptLoader("spell_shredder_delivery") { }
|
||||
|
||||
class spell_shredder_delivery_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_shredder_delivery_SpellScript);
|
||||
|
||||
bool Load() OVERRIDE
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (GetCaster()->ToCreature()->GetEntry() == NPC_BROKEN_DOWN_SHREDDER)
|
||||
GetCaster()->ToCreature()->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_shredder_delivery_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const OVERRIDE
|
||||
{
|
||||
return new spell_shredder_delivery_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_grizzly_hills()
|
||||
{
|
||||
new npc_emily();
|
||||
@@ -759,4 +798,5 @@ void AddSC_grizzly_hills()
|
||||
new npc_wounded_skirmisher();
|
||||
new npc_venture_co_straggler();
|
||||
new npc_lake_frog();
|
||||
new spell_shredder_delivery();
|
||||
}
|
||||
@@ -24,91 +24,6 @@
|
||||
#include "TemporarySummon.h"
|
||||
#include "CombatAI.h"
|
||||
|
||||
/*######
|
||||
## npc_arete
|
||||
######*/
|
||||
|
||||
#define GOSSIP_ARETE_ITEM1 "Lord-Commander, I would hear your tale."
|
||||
#define GOSSIP_ARETE_ITEM2 "<You nod slightly but do not complete the motion as the Lord-Commander narrows his eyes before he continues.>"
|
||||
#define GOSSIP_ARETE_ITEM3 "I thought that they now called themselves the Scarlet Onslaught?"
|
||||
#define GOSSIP_ARETE_ITEM4 "Where did the grand admiral go?"
|
||||
#define GOSSIP_ARETE_ITEM5 "That's fine. When do I start?"
|
||||
#define GOSSIP_ARETE_ITEM6 "Let's finish this!"
|
||||
#define GOSSIP_ARETE_ITEM7 "That's quite a tale, Lord-Commander."
|
||||
|
||||
enum Arete
|
||||
{
|
||||
GOSSIP_TEXTID_ARETE1 = 13525,
|
||||
GOSSIP_TEXTID_ARETE2 = 13526,
|
||||
GOSSIP_TEXTID_ARETE3 = 13527,
|
||||
GOSSIP_TEXTID_ARETE4 = 13528,
|
||||
GOSSIP_TEXTID_ARETE5 = 13529,
|
||||
GOSSIP_TEXTID_ARETE6 = 13530,
|
||||
GOSSIP_TEXTID_ARETE7 = 13531,
|
||||
|
||||
QUEST_THE_STORY_THUS_FAR = 12807
|
||||
};
|
||||
|
||||
class npc_arete : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_arete() : CreatureScript("npc_arete") { }
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature) OVERRIDE
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (player->GetQuestStatus(QUEST_THE_STORY_THUS_FAR) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE1, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) OVERRIDE
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
switch (action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF+1:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE2, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+2:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE3, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE4, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+4:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE5, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+5:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE6, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+6:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ARETE_ITEM7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
|
||||
player->SEND_GOSSIP_MENU(GOSSIP_TEXTID_ARETE7, creature->GetGUID());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+7:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
player->AreaExploredOrEventHappens(QUEST_THE_STORY_THUS_FAR);
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_squire_david
|
||||
######*/
|
||||
@@ -483,7 +398,7 @@ class npc_tournament_training_dummy : public CreatureScript
|
||||
me->SetControlled(true, UNIT_STATE_STUNNED);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*who*/)OVERRIDE { }
|
||||
void MoveInLineOfSight(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
};
|
||||
|
||||
@@ -1149,7 +1064,6 @@ class npc_morbidus : public CreatureScript
|
||||
|
||||
void AddSC_icecrown()
|
||||
{
|
||||
new npc_arete;
|
||||
new npc_squire_david;
|
||||
new npc_argent_valiant;
|
||||
new npc_guardian_pavilion;
|
||||
|
||||
@@ -1082,6 +1082,57 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## Quest Dreadsaber Mastery: Stalking the Prey (12550)
|
||||
######*/
|
||||
|
||||
enum ShangoTracks
|
||||
{
|
||||
SPELL_CORRECT_TRACKS = 52160,
|
||||
SPELL_INCORRECT_TRACKS = 52163,
|
||||
SAY_CORRECT_TRACKS = 28634,
|
||||
SAY_INCORRECT_TRACKS = 28635
|
||||
};
|
||||
|
||||
class spell_shango_tracks : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_shango_tracks() : SpellScriptLoader("spell_shango_tracks") { }
|
||||
|
||||
class spell_shango_tracks_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_shango_tracks_SpellScript);
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Player* player = GetHitUnit()->ToPlayer())
|
||||
{
|
||||
switch (GetSpellInfo()->Id)
|
||||
{
|
||||
case SPELL_CORRECT_TRACKS:
|
||||
player->MonsterSay(sObjectMgr->GetTrinityStringForDBCLocale(SAY_CORRECT_TRACKS), LANG_UNIVERSAL, player->GetGUID());
|
||||
break;
|
||||
case SPELL_INCORRECT_TRACKS:
|
||||
player->MonsterSay(sObjectMgr->GetTrinityStringForDBCLocale(SAY_INCORRECT_TRACKS), LANG_UNIVERSAL, player->GetGUID());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_shango_tracks_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const OVERRIDE
|
||||
{
|
||||
return new spell_shango_tracks_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_sholazar_basin()
|
||||
{
|
||||
new npc_injured_rainspeaker_oracle();
|
||||
@@ -1095,4 +1146,5 @@ void AddSC_sholazar_basin()
|
||||
new spell_q12589_shoot_rjr();
|
||||
new npc_haiphoon();
|
||||
new npc_vics_flying_machine();
|
||||
new spell_shango_tracks();
|
||||
}
|
||||
@@ -460,6 +460,52 @@ class spell_close_rift : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
/*#####
|
||||
# spell_jokkum_scriptcast
|
||||
#####*/
|
||||
|
||||
enum JokkumScriptcast
|
||||
{
|
||||
SPELL_JOKKUM_KILL_CREDIT = 56545,
|
||||
SPELL_JOKKUM_SUMMON = 56541
|
||||
};
|
||||
|
||||
class spell_jokkum_scriptcast : public SpellScriptLoader
|
||||
{
|
||||
public: spell_jokkum_scriptcast() : SpellScriptLoader("spell_jokkum_scriptcast") { }
|
||||
|
||||
class spell_jokkum_scriptcast_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_jokkum_scriptcast_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_JOKKUM_KILL_CREDIT) || !sSpellMgr->GetSpellInfo(SPELL_JOKKUM_SUMMON))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Player* player = GetTarget()->ToPlayer())
|
||||
{
|
||||
player->CastSpell(player, SPELL_JOKKUM_KILL_CREDIT, true);
|
||||
player->CastSpell(player, SPELL_JOKKUM_SUMMON, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_jokkum_scriptcast_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_jokkum_scriptcast_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_storm_peaks()
|
||||
{
|
||||
new npc_injured_goblin();
|
||||
@@ -469,4 +515,5 @@ void AddSC_storm_peaks()
|
||||
new npc_icefang();
|
||||
new npc_hyldsmeet_protodrake();
|
||||
new spell_close_rift();
|
||||
new spell_jokkum_scriptcast();
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1990,7 +1990,7 @@ public:
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)OVERRIDE { }
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
|
||||
|
||||
@@ -43,9 +43,13 @@ set(scripts_STAT_SRCS
|
||||
Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp
|
||||
Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp
|
||||
Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp
|
||||
Outland/CoilfangReservoir/TheSlavePens/the_slave_pens.h
|
||||
Outland/CoilfangReservoir/TheSlavePens/boss_mennu_the_betrayer.cpp
|
||||
Outland/CoilfangReservoir/TheSlavePens/boss_rokmar_the_crackler.cpp
|
||||
Outland/CoilfangReservoir/TheSlavePens/boss_quagmirran.cpp
|
||||
Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp
|
||||
Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp
|
||||
Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp
|
||||
Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp
|
||||
Outland/zone_shattrath_city.cpp
|
||||
Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp
|
||||
Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp
|
||||
@@ -68,6 +72,9 @@ set(scripts_STAT_SRCS
|
||||
Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp
|
||||
Outland/TempestKeep/botanica/boss_warp_splinter.cpp
|
||||
Outland/TempestKeep/botanica/boss_laj.cpp
|
||||
Outland/TempestKeep/arcatraz/boss_zereketh_the_unbound.cpp
|
||||
Outland/TempestKeep/arcatraz/boss_dalliah_the_doomsayer.cpp
|
||||
Outland/TempestKeep/arcatraz/boss_wrath_scryer_soccothrates.cpp
|
||||
Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp
|
||||
Outland/TempestKeep/arcatraz/instance_arcatraz.cpp
|
||||
Outland/TempestKeep/arcatraz/arcatraz.h
|
||||
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_mennu_the_betrayer
|
||||
SD%Complete: 95%
|
||||
SDComment:
|
||||
SDCategory: Coilfang Reservoir, The Slave Pens
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "the_slave_pens.h"
|
||||
|
||||
enum Say
|
||||
{
|
||||
SAY_AGGRO = 0,
|
||||
SAY_SLAY = 1,
|
||||
SAY_DEATH = 2
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_TAINTED_STONESKIN_TOTEM = 31985, // every 30 sec if health below 100%
|
||||
SPELL_TAINTED_EARTHGRAB_TOTEM = 31981, // ?
|
||||
SPELL_CORRUPTED_NOVA_TOTEM = 31991, // ?
|
||||
SPELL_MENNUS_HEALING_WARD = 34980, // every 14 - 25 sec
|
||||
SPELL_LIGHTNING_BOLT = 35010 // every 14 - 19 sec
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_TAINTED_STONESKIN_TOTEM = 1,
|
||||
EVENT_TAINTED_EARTHGRAB_TOTEM = 2,
|
||||
EVENT_CORRUPTED_NOVA_TOTEM = 3,
|
||||
EVENT_MENNUS_HEALING_WARD = 4,
|
||||
EVENT_LIGHTNING_BOLT = 5
|
||||
};
|
||||
|
||||
class boss_mennu_the_betrayer : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_mennu_the_betrayer() : CreatureScript("boss_mennu_the_betrayer") { }
|
||||
|
||||
struct boss_mennu_the_betrayerAI : public BossAI
|
||||
{
|
||||
boss_mennu_the_betrayerAI(Creature* creature) : BossAI(creature, DATA_MENNU_THE_BETRAYER) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_TAINTED_STONESKIN_TOTEM, 30000);
|
||||
events.ScheduleEvent(EVENT_TAINTED_EARTHGRAB_TOTEM, 20000);
|
||||
events.ScheduleEvent(EVENT_CORRUPTED_NOVA_TOTEM, 60000);
|
||||
events.ScheduleEvent(EVENT_MENNUS_HEALING_WARD, urand(14000, 25000));
|
||||
events.ScheduleEvent(EVENT_LIGHTNING_BOLT, urand(14000, 19000));
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_TAINTED_STONESKIN_TOTEM:
|
||||
if (HealthBelowPct(100))
|
||||
DoCast(me, SPELL_TAINTED_STONESKIN_TOTEM);
|
||||
events.ScheduleEvent(EVENT_TAINTED_STONESKIN_TOTEM, 30000);
|
||||
break;
|
||||
case EVENT_TAINTED_EARTHGRAB_TOTEM:
|
||||
DoCast(me, SPELL_TAINTED_EARTHGRAB_TOTEM);
|
||||
break;
|
||||
case EVENT_CORRUPTED_NOVA_TOTEM:
|
||||
DoCast(me, SPELL_CORRUPTED_NOVA_TOTEM);
|
||||
break;
|
||||
case EVENT_MENNUS_HEALING_WARD:
|
||||
DoCast(me, SPELL_MENNUS_HEALING_WARD);
|
||||
events.ScheduleEvent(EVENT_MENNUS_HEALING_WARD, urand(14000, 25000));
|
||||
break;
|
||||
case EVENT_LIGHTNING_BOLT:
|
||||
DoCastVictim(SPELL_LIGHTNING_BOLT, true);
|
||||
events.ScheduleEvent(EVENT_LIGHTNING_BOLT, urand(14000, 25000));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_mennu_the_betrayerAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_mennu_the_betrayer()
|
||||
{
|
||||
new boss_mennu_the_betrayer();
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_quagmirran
|
||||
SD%Complete: 100%
|
||||
SDComment:
|
||||
SDCategory: Coilfang Reservoir, The Slave Pens
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "the_slave_pens.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_ACID_SPRAY = 38153,
|
||||
SPELL_CLEAVE = 40504,
|
||||
SPELL_UPPERCUT = 32055,
|
||||
SPELL_POISON_BOLT_VOLLEY = 34780 // 39340
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_ACID_SPRAY = 1,
|
||||
EVENT_CLEAVE = 2,
|
||||
EVENT_UPPERCUT = 3,
|
||||
EVENT_POISON_BOLT_VOLLEY = 4
|
||||
};
|
||||
|
||||
class boss_quagmirran : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_quagmirran() : CreatureScript("boss_quagmirran") { }
|
||||
|
||||
struct boss_quagmirranAI : public BossAI
|
||||
{
|
||||
boss_quagmirranAI(Creature* creature) : BossAI(creature, DATA_QUAGMIRRAN) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_ACID_SPRAY, 25000);
|
||||
events.ScheduleEvent(EVENT_CLEAVE, 9000);
|
||||
events.ScheduleEvent(EVENT_UPPERCUT, 20000);
|
||||
events.ScheduleEvent(EVENT_POISON_BOLT_VOLLEY, 31000);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE { }
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_ACID_SPRAY:
|
||||
DoCastAOE(SPELL_ACID_SPRAY);
|
||||
events.ScheduleEvent(EVENT_ACID_SPRAY, urand(20000, 25000));
|
||||
break;
|
||||
case EVENT_CLEAVE:
|
||||
DoCastVictim(SPELL_CLEAVE, true);
|
||||
events.ScheduleEvent(EVENT_CLEAVE, urand(18000, 34000));
|
||||
break;
|
||||
case EVENT_UPPERCUT:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 10.0f, true))
|
||||
DoCast(target, SPELL_UPPERCUT);
|
||||
events.ScheduleEvent(EVENT_UPPERCUT, 22000);
|
||||
break;
|
||||
case EVENT_POISON_BOLT_VOLLEY:
|
||||
DoCast(me, SPELL_POISON_BOLT_VOLLEY);
|
||||
events.ScheduleEvent(EVENT_POISON_BOLT_VOLLEY, 24000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_quagmirranAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_quagmirran()
|
||||
{
|
||||
new boss_quagmirran();
|
||||
}
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_rokmar_the_crackler
|
||||
SD%Complete: 100%
|
||||
SDComment:
|
||||
SDCategory: Coilfang Reservoir, The Slave Pens
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "the_slave_pens.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_GRIEVOUS_WOUND = 31956,
|
||||
SPELL_ENSNARING_MOSS = 31948,
|
||||
SPELL_WATER_SPIT = 35008,
|
||||
SPELL_FRENZY = 34970
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_GRIEVOUS_WOUND = 1,
|
||||
EVENT_ENSNARING_MOSS = 2,
|
||||
EVENT_WATER_SPIT = 3
|
||||
};
|
||||
|
||||
class boss_rokmar_the_crackler : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_rokmar_the_crackler() : CreatureScript("boss_rokmar_the_crackler") { }
|
||||
|
||||
struct boss_rokmar_the_cracklerAI : public BossAI
|
||||
{
|
||||
boss_rokmar_the_cracklerAI(Creature* creature) : BossAI(creature, DATA_MENNU_THE_BETRAYER) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
rokmarFrenzy = false;
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_GRIEVOUS_WOUND, 10000);
|
||||
events.ScheduleEvent(EVENT_ENSNARING_MOSS, 20000);
|
||||
events.ScheduleEvent(EVENT_WATER_SPIT, 14000);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE { }
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_GRIEVOUS_WOUND:
|
||||
DoCastVictim(SPELL_GRIEVOUS_WOUND, true);
|
||||
events.ScheduleEvent(EVENT_GRIEVOUS_WOUND, urand(20000, 30000));
|
||||
break;
|
||||
case EVENT_ENSNARING_MOSS:
|
||||
DoCastAOE(SPELL_ENSNARING_MOSS);
|
||||
events.ScheduleEvent(EVENT_ENSNARING_MOSS, urand(20000, 30000));
|
||||
break;
|
||||
case EVENT_WATER_SPIT:
|
||||
DoCastAOE(SPELL_WATER_SPIT);
|
||||
events.ScheduleEvent(EVENT_WATER_SPIT, urand(14000, 18000));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (HealthBelowPct(10) && !rokmarFrenzy)
|
||||
{
|
||||
DoCast(me, SPELL_FRENZY);
|
||||
rokmarFrenzy = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool rokmarFrenzy;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_rokmar_the_cracklerAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_rokmar_the_crackler()
|
||||
{
|
||||
new boss_rokmar_the_crackler();
|
||||
}
|
||||
+2
-1
@@ -24,11 +24,12 @@ gets instead the deserter debuff.
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "the_slave_pens.h"
|
||||
|
||||
class instance_the_slave_pens : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_the_slave_pens() : InstanceMapScript("instance_the_slave_pens", 547) { }
|
||||
instance_the_slave_pens() : InstanceMapScript(SPScriptName, 547) { }
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
|
||||
{
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SLAVE_PENS_H
|
||||
#define SLAVE_PENS_H
|
||||
|
||||
uint32 const EncounterCount = 3;
|
||||
|
||||
#define SPScriptName "instance_the_slave_pens"
|
||||
|
||||
enum DataTypes
|
||||
{
|
||||
DATA_MENNU_THE_BETRAYER = 1,
|
||||
DATA_ROKMAR_THE_CRACKLER = 2,
|
||||
DATA_QUAGMIRRAN = 3
|
||||
};
|
||||
|
||||
#endif // SLAVE_PENS_H
|
||||
@@ -16,7 +16,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "mechanar.h"
|
||||
@@ -26,7 +25,7 @@ static DoorData const doorData[] =
|
||||
{ GO_DOOR_MOARG_1, DATA_GATEWATCHER_IRON_HAND, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
||||
{ GO_DOOR_MOARG_2, DATA_GATEWATCHER_GYROKILL, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
||||
{ GO_DOOR_NETHERMANCER, DATA_NETHERMANCER_SEPRETHREA, DOOR_TYPE_ROOM, BOUNDARY_NONE },
|
||||
{0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE }
|
||||
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE }
|
||||
};
|
||||
|
||||
class instance_mechanar : public InstanceMapScript
|
||||
@@ -42,7 +41,6 @@ class instance_mechanar : public InstanceMapScript
|
||||
LoadDoorData(doorData);
|
||||
}
|
||||
|
||||
|
||||
void OnGameObjectCreate(GameObject* gameObject)
|
||||
{
|
||||
switch (gameObject->GetEntry())
|
||||
|
||||
@@ -69,11 +69,8 @@ enum MillhouseSpells
|
||||
class npc_millhouse_manastorm : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_millhouse_manastorm() : CreatureScript("npc_millhouse_manastorm") { }
|
||||
|
||||
npc_millhouse_manastorm()
|
||||
: CreatureScript("npc_millhouse_manastorm")
|
||||
{
|
||||
}
|
||||
struct npc_millhouse_manastormAI : public ScriptedAI
|
||||
{
|
||||
npc_millhouse_manastormAI(Creature* creature) : ScriptedAI(creature)
|
||||
@@ -101,14 +98,11 @@ class npc_millhouse_manastorm : public CreatureScript
|
||||
Pyroblast_Timer = 1000;
|
||||
Fireball_Timer = 2500;
|
||||
|
||||
if (instance)
|
||||
{
|
||||
if (instance->GetData(TYPE_WARDEN_2) == DONE)
|
||||
Init = true;
|
||||
if (instance->GetData(DATA_WARDEN_2) == DONE)
|
||||
Init = true;
|
||||
|
||||
if (instance->GetData(TYPE_HARBINGERSKYRISS) == DONE)
|
||||
Talk(SAY_COMPLETE);
|
||||
}
|
||||
if (instance->GetBossState(DATA_HARBINGER_SKYRISS) == DONE)
|
||||
Talk(SAY_COMPLETE);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) OVERRIDE
|
||||
@@ -122,7 +116,7 @@ class npc_millhouse_manastorm : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)OVERRIDE { }
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
{
|
||||
@@ -134,7 +128,7 @@ class npc_millhouse_manastorm : public CreatureScript
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
/*for questId 10886 (heroic mode only)
|
||||
if (instance && instance->GetData(TYPE_HARBINGERSKYRISS) != DONE)
|
||||
if (instance->GetBossState(DATA_HARBINGER_SKYRISS) != DONE)
|
||||
->FailQuest();*/
|
||||
}
|
||||
|
||||
@@ -176,8 +170,7 @@ class npc_millhouse_manastorm : public CreatureScript
|
||||
EventProgress_Timer = 6000;
|
||||
break;
|
||||
case 7:
|
||||
if (instance)
|
||||
instance->SetData(TYPE_WARDEN_2, DONE);
|
||||
instance->SetData(DATA_WARDEN_2, DONE);
|
||||
Init = true;
|
||||
break;
|
||||
}
|
||||
@@ -223,7 +216,7 @@ class npc_millhouse_manastorm : public CreatureScript
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_millhouse_manastormAI(creature);
|
||||
return GetArcatrazAI<npc_millhouse_manastormAI>(creature);
|
||||
}
|
||||
};
|
||||
/*#####
|
||||
@@ -273,10 +266,7 @@ enum WardenSpells
|
||||
class npc_warden_mellichar : public CreatureScript
|
||||
{
|
||||
public:
|
||||
|
||||
npc_warden_mellichar() : CreatureScript("npc_warden_mellichar")
|
||||
{
|
||||
}
|
||||
npc_warden_mellichar() : CreatureScript("npc_warden_mellichar") { }
|
||||
|
||||
struct npc_warden_mellicharAI : public ScriptedAI
|
||||
{
|
||||
@@ -304,14 +294,12 @@ class npc_warden_mellichar : public CreatureScript
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
DoCast(me, SPELL_TARGET_OMEGA);
|
||||
|
||||
if (instance)
|
||||
instance->SetData(TYPE_HARBINGERSKYRISS, NOT_STARTED);
|
||||
instance->SetBossState(DATA_HARBINGER_SKYRISS, NOT_STARTED);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
|
||||
{
|
||||
if (IsRunning)
|
||||
return;
|
||||
@@ -334,69 +322,60 @@ class npc_warden_mellichar : public CreatureScript
|
||||
Talk(YELL_INTRO1);
|
||||
DoCast(me, SPELL_BUBBLE_VISUAL);
|
||||
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(TYPE_HARBINGERSKYRISS, IN_PROGRESS);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_SPHERE_SHIELD), false);
|
||||
IsRunning = true;
|
||||
}
|
||||
instance->SetBossState(DATA_HARBINGER_SKYRISS, IN_PROGRESS);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_WARDENS_SHIELD), false);
|
||||
IsRunning = true;
|
||||
}
|
||||
|
||||
bool CanProgress()
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
if (Phase == 7 && instance->GetData(TYPE_WARDEN_4) == DONE)
|
||||
return true;
|
||||
if (Phase == 6 && instance->GetData(TYPE_WARDEN_3) == DONE)
|
||||
return true;
|
||||
if (Phase == 5 && instance->GetData(TYPE_WARDEN_2) == DONE)
|
||||
return true;
|
||||
if (Phase == 4)
|
||||
return true;
|
||||
if (Phase == 3 && instance->GetData(TYPE_WARDEN_1) == DONE)
|
||||
return true;
|
||||
if (Phase == 2 && instance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS)
|
||||
return true;
|
||||
if (Phase == 1 && instance->GetData(TYPE_HARBINGERSKYRISS) == IN_PROGRESS)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
if (Phase == 7 && instance->GetData(DATA_WARDEN_4) == DONE)
|
||||
return true;
|
||||
if (Phase == 6 && instance->GetData(DATA_WARDEN_3) == DONE)
|
||||
return true;
|
||||
if (Phase == 5 && instance->GetData(DATA_WARDEN_2) == DONE)
|
||||
return true;
|
||||
if (Phase == 4)
|
||||
return true;
|
||||
if (Phase == 3 && instance->GetData(DATA_WARDEN_1) == DONE)
|
||||
return true;
|
||||
if (Phase == 2 && instance->GetBossState(DATA_HARBINGER_SKYRISS) == IN_PROGRESS)
|
||||
return true;
|
||||
if (Phase == 1 && instance->GetBossState(DATA_HARBINGER_SKYRISS) == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void DoPrepareForPhase()
|
||||
{
|
||||
if (instance)
|
||||
{
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
me->RemoveAurasByType(SPELL_AURA_DUMMY);
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
me->RemoveAurasByType(SPELL_AURA_DUMMY);
|
||||
|
||||
switch (Phase)
|
||||
{
|
||||
switch (Phase)
|
||||
{
|
||||
case 2:
|
||||
DoCast(me, SPELL_TARGET_ALPHA);
|
||||
instance->SetData(TYPE_WARDEN_1, IN_PROGRESS);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_SPHERE_SHIELD), false);
|
||||
instance->SetData(DATA_WARDEN_1, IN_PROGRESS);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_WARDENS_SHIELD), false);
|
||||
break;
|
||||
case 3:
|
||||
DoCast(me, SPELL_TARGET_BETA);
|
||||
instance->SetData(TYPE_WARDEN_2, IN_PROGRESS);
|
||||
instance->SetData(DATA_WARDEN_2, IN_PROGRESS);
|
||||
break;
|
||||
case 5:
|
||||
DoCast(me, SPELL_TARGET_DELTA);
|
||||
instance->SetData(TYPE_WARDEN_3, IN_PROGRESS);
|
||||
instance->SetData(DATA_WARDEN_3, IN_PROGRESS);
|
||||
break;
|
||||
case 6:
|
||||
DoCast(me, SPELL_TARGET_GAMMA);
|
||||
instance->SetData(TYPE_WARDEN_4, IN_PROGRESS);
|
||||
instance->SetData(DATA_WARDEN_4, IN_PROGRESS);
|
||||
break;
|
||||
case 7:
|
||||
instance->SetData(TYPE_WARDEN_5, IN_PROGRESS);
|
||||
instance->SetData(DATA_WARDEN_5, IN_PROGRESS);
|
||||
break;
|
||||
}
|
||||
CanSpawn = true;
|
||||
}
|
||||
CanSpawn = true;
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
@@ -406,13 +385,10 @@ class npc_warden_mellichar : public CreatureScript
|
||||
|
||||
if (EventProgress_Timer <= diff)
|
||||
{
|
||||
if (instance)
|
||||
if (instance->GetBossState(DATA_HARBINGER_SKYRISS) == FAIL)
|
||||
{
|
||||
if (instance->GetData(TYPE_HARBINGERSKYRISS) == FAIL)
|
||||
{
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
Reset();
|
||||
return;
|
||||
}
|
||||
|
||||
if (CanSpawn)
|
||||
@@ -517,7 +493,7 @@ class npc_warden_mellichar : public CreatureScript
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_warden_mellicharAI(creature);
|
||||
return GetArcatrazAI<npc_warden_mellicharAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* 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
|
||||
@@ -16,23 +15,56 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef ARCATRAZ_H_
|
||||
#define ARCATRAZ_H_
|
||||
#ifndef ARCATRAZ_H
|
||||
#define ARCATRAZ_H
|
||||
|
||||
#define ArcatrazScriptName "instance_arcatraz"
|
||||
|
||||
uint32 const EncounterCount = 4;
|
||||
|
||||
enum DataTypes
|
||||
{
|
||||
TYPE_ZEREKETH = 1,
|
||||
TYPE_DALLIAH = 2,
|
||||
TYPE_SOCCOTHRATES = 3,
|
||||
TYPE_HARBINGERSKYRISS = 4,
|
||||
TYPE_WARDEN_1 = 5,
|
||||
TYPE_WARDEN_2 = 6,
|
||||
TYPE_WARDEN_3 = 7,
|
||||
TYPE_WARDEN_4 = 8,
|
||||
TYPE_WARDEN_5 = 9,
|
||||
DATA_MELLICHAR = 10,
|
||||
TYPE_SHIELD_OPEN = 11,
|
||||
DATA_SPHERE_SHIELD = 12
|
||||
// Encounter States/Boss GUIDs
|
||||
DATA_ZEREKETH = 0,
|
||||
DATA_DALLIAH = 1,
|
||||
DATA_SOCCOTHRATES = 2,
|
||||
DATA_HARBINGER_SKYRISS = 3,
|
||||
|
||||
// Additional Data
|
||||
DATA_CONVERSATION = 4,
|
||||
DATA_WARDEN_1 = 5, // used by EventAI
|
||||
DATA_WARDEN_2 = 6, // used by EventAI
|
||||
DATA_WARDEN_3 = 7, // used by EventAI
|
||||
DATA_WARDEN_4 = 8, // used by EventAI
|
||||
DATA_WARDEN_5 = 9, // used by EventAI
|
||||
DATA_MELLICHAR = 10,
|
||||
DATA_WARDENS_SHIELD = 11
|
||||
};
|
||||
|
||||
#endif // ARCATRAZ_H_
|
||||
enum CreatureIds
|
||||
{
|
||||
NPC_DALLIAH = 20885,
|
||||
NPC_SOCCOTHRATES = 20886,
|
||||
NPC_MELLICHAR = 20904, // skyriss will kill this unit
|
||||
NPC_ALPHA_POD_TARGET = 21436
|
||||
};
|
||||
|
||||
enum GameObjectIds
|
||||
{
|
||||
GO_CONTAINMENT_CORE_SECURITY_FIELD_ALPHA = 184318, // door opened when Wrath-Scryer Soccothrates dies
|
||||
GO_CONTAINMENT_CORE_SECURITY_FIELD_BETA = 184319, // door opened when Dalliah the Doomsayer dies
|
||||
GO_STASIS_POD_ALPHA = 183961, // pod first boss wave
|
||||
GO_STASIS_POD_BETA = 183963, // pod second boss wave
|
||||
GO_STASIS_POD_DELTA = 183964, // pod third boss wave
|
||||
GO_STASIS_POD_GAMMA = 183962, // pod fourth boss wave
|
||||
GO_STASIS_POD_OMEGA = 183965, // pod fifth boss wave
|
||||
GO_WARDENS_SHIELD = 184802 // shield 'protecting' mellichar
|
||||
};
|
||||
|
||||
template<class AI>
|
||||
AI* GetArcatrazAI(Creature* creature)
|
||||
{
|
||||
return GetInstanceAI<AI>(creature, ArcatrazScriptName);
|
||||
}
|
||||
|
||||
#endif // ARCATRAZ_H
|
||||
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "arcatraz.h"
|
||||
|
||||
enum Say
|
||||
{
|
||||
// Dalliah the Doomsayer
|
||||
SAY_AGGRO = 1,
|
||||
SAY_SLAY = 2,
|
||||
SAY_WHIRLWIND = 3,
|
||||
SAY_HEAL = 4,
|
||||
SAY_DEATH = 5,
|
||||
SAY_SOCCOTHRATES_DEATH = 7,
|
||||
|
||||
// Wrath-Scryer Soccothrates
|
||||
SAY_AGGRO_DALLIAH_FIRST = 0,
|
||||
SAY_DALLIAH_25_PERCENT = 5
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_GIFT_OF_THE_DOOMSAYER = 36173,
|
||||
SPELL_WHIRLWIND = 36142,
|
||||
SPELL_HEAL = 36144,
|
||||
SPELL_SHADOW_WAVE = 39016 // Heroic only
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_GIFT_OF_THE_DOOMSAYER = 1,
|
||||
EVENT_WHIRLWIND = 2,
|
||||
EVENT_HEAL = 3,
|
||||
EVENT_SHADOW_WAVE = 4, // Heroic only
|
||||
EVENT_ME_FIRST = 5,
|
||||
EVENT_SOCCOTHRATES_DEATH = 6
|
||||
};
|
||||
|
||||
class boss_dalliah_the_doomsayer : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_dalliah_the_doomsayer() : CreatureScript("boss_dalliah_the_doomsayer") { }
|
||||
|
||||
struct boss_dalliah_the_doomsayerAI : public BossAI
|
||||
{
|
||||
boss_dalliah_the_doomsayerAI(Creature* creature) : BossAI(creature, DATA_DALLIAH) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
soccothratesDeath = false;
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (Creature* soccothrates = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SOCCOTHRATES)))
|
||||
if (soccothrates->IsAlive() && !soccothrates->IsInCombat())
|
||||
soccothrates->AI()->SetData(1, 1);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_GIFT_OF_THE_DOOMSAYER, urand(1000, 4000));
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, urand(7000, 9000));
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_SHADOW_WAVE, urand(11000, 16000));
|
||||
events.ScheduleEvent(EVENT_ME_FIRST, 6000);
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void SetData(uint32 /*type*/, uint32 data) OVERRIDE
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
case 1:
|
||||
events.ScheduleEvent(EVENT_SOCCOTHRATES_DEATH, 6000);
|
||||
soccothratesDeath = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
if (soccothratesDeath)
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SOCCOTHRATES_DEATH:
|
||||
Talk(SAY_SOCCOTHRATES_DEATH);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_GIFT_OF_THE_DOOMSAYER:
|
||||
DoCastVictim(SPELL_GIFT_OF_THE_DOOMSAYER, true);
|
||||
events.ScheduleEvent(EVENT_GIFT_OF_THE_DOOMSAYER, urand(16000, 21000));
|
||||
break;
|
||||
case EVENT_WHIRLWIND:
|
||||
DoCast(me, SPELL_WHIRLWIND);
|
||||
Talk(SAY_WHIRLWIND);
|
||||
events.ScheduleEvent(EVENT_WHIRLWIND, urand(19000, 21000));
|
||||
events.ScheduleEvent(EVENT_HEAL, 6000);
|
||||
break;
|
||||
case EVENT_HEAL:
|
||||
DoCast(me, SPELL_HEAL);
|
||||
Talk(SAY_HEAL);
|
||||
break;
|
||||
case EVENT_SHADOW_WAVE:
|
||||
DoCastVictim(SPELL_SHADOW_WAVE, true);
|
||||
events.ScheduleEvent(EVENT_SHADOW_WAVE, urand(11000, 16000));
|
||||
break;
|
||||
case EVENT_ME_FIRST:
|
||||
if (Creature* soccothrates = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SOCCOTHRATES)))
|
||||
if (soccothrates->IsAlive() && !soccothrates->IsInCombat())
|
||||
soccothrates->AI()->Talk(SAY_AGGRO_DALLIAH_FIRST);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (HealthBelowPct(25) && !soccothratesTaunt)
|
||||
{
|
||||
if (Creature* soccothrates = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SOCCOTHRATES)))
|
||||
soccothrates->AI()->Talk(SAY_DALLIAH_25_PERCENT);
|
||||
soccothratesTaunt = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool soccothratesTaunt;
|
||||
bool soccothratesDeath;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetArcatrazAI<boss_dalliah_the_doomsayerAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_dalliah_the_doomsayer()
|
||||
{
|
||||
new boss_dalliah_the_doomsayer();
|
||||
}
|
||||
@@ -61,21 +61,15 @@ enum Spells
|
||||
class boss_harbinger_skyriss : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_harbinger_skyriss() : CreatureScript("boss_harbinger_skyriss") { }
|
||||
|
||||
boss_harbinger_skyriss()
|
||||
: CreatureScript("boss_harbinger_skyriss")
|
||||
struct boss_harbinger_skyrissAI : public BossAI
|
||||
{
|
||||
}
|
||||
struct boss_harbinger_skyrissAI : public ScriptedAI
|
||||
{
|
||||
boss_harbinger_skyrissAI(Creature* creature) : ScriptedAI(creature)
|
||||
boss_harbinger_skyrissAI(Creature* creature) : BossAI(creature, DATA_HARBINGER_SKYRISS)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
Intro = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
bool Intro;
|
||||
bool IsImage33;
|
||||
bool IsImage66;
|
||||
@@ -104,7 +98,6 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
|
||||
{
|
||||
if (!Intro)
|
||||
return;
|
||||
@@ -117,8 +110,7 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (instance)
|
||||
instance->SetData(TYPE_HARBINGERSKYRISS, DONE);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) OVERRIDE
|
||||
@@ -137,7 +129,7 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
{
|
||||
//won't yell killing pet/other unit
|
||||
if (victim->GetEntry() == 21436)
|
||||
if (victim->GetEntry() == NPC_ALPHA_POD_TARGET)
|
||||
return;
|
||||
|
||||
Talk(SAY_KILL);
|
||||
@@ -160,27 +152,24 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
{
|
||||
if (!Intro)
|
||||
{
|
||||
if (!instance)
|
||||
return;
|
||||
|
||||
if (Intro_Timer <= diff)
|
||||
{
|
||||
switch (Intro_Phase)
|
||||
{
|
||||
case 1:
|
||||
Talk(SAY_INTRO);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_SPHERE_SHIELD), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_WARDENS_SHIELD), true);
|
||||
++Intro_Phase;
|
||||
Intro_Timer = 25000;
|
||||
break;
|
||||
case 2:
|
||||
Talk(SAY_AGGRO);
|
||||
if (Unit* mellic = Unit::GetUnit(*me, instance->GetData64(DATA_MELLICHAR)))
|
||||
if (Unit* mellic = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_MELLICHAR)))
|
||||
{
|
||||
//should have a better way to do this. possibly spell exist.
|
||||
mellic->setDeathState(JUST_DIED);
|
||||
mellic->SetHealth(0);
|
||||
instance->SetData(TYPE_SHIELD_OPEN, IN_PROGRESS);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_WARDENS_SHIELD), false);
|
||||
}
|
||||
++Intro_Phase;
|
||||
Intro_Timer = 3000;
|
||||
@@ -275,18 +264,15 @@ class boss_harbinger_skyriss : public CreatureScript
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_harbinger_skyrissAI(creature);
|
||||
return GetArcatrazAI<boss_harbinger_skyrissAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class boss_harbinger_skyriss_illusion : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_harbinger_skyriss_illusion() : CreatureScript("boss_harbinger_skyriss_illusion") { }
|
||||
|
||||
boss_harbinger_skyriss_illusion()
|
||||
: CreatureScript("boss_harbinger_skyriss_illusion")
|
||||
{
|
||||
}
|
||||
struct boss_harbinger_skyriss_illusionAI : public ScriptedAI
|
||||
{
|
||||
boss_harbinger_skyriss_illusionAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
@@ -0,0 +1,283 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_wrath_scryer_soccothrates
|
||||
SD%Complete: 95%
|
||||
SDComment: charge left to script
|
||||
SDCategory: Tempest Keep, The Arcatraz
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "arcatraz.h"
|
||||
|
||||
enum Say
|
||||
{
|
||||
// Wrath-Scryer Soccothrates
|
||||
SAY_AGGRO = 1,
|
||||
SAY_SLAY = 2,
|
||||
SAY_KNOCK_AWAY = 3,
|
||||
SAY_DEATH = 4,
|
||||
SAY_DALLIAH_DEATH = 6,
|
||||
SAY_SOCCOTHRATES_CONVO_1 = 7,
|
||||
SAY_SOCCOTHRATES_CONVO_2 = 8,
|
||||
SAY_SOCCOTHRATES_CONVO_3 = 9,
|
||||
SAY_SOCCOTHRATES_CONVO_4 = 10,
|
||||
|
||||
// Dalliah the Doomsayer
|
||||
SAY_AGGRO_SOCCOTHRATES_FIRST = 0,
|
||||
SAY_SOCCOTHRATES_25_PERCENT = 6,
|
||||
SAY_DALLIAH_CONVO_1 = 8,
|
||||
SAY_DALLIAH_CONVO_2 = 9,
|
||||
SAY_DALLIAH_CONVO_3 = 10
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_FEL_IMMOLATION = 36051,
|
||||
SPELL_FELFIRE_SHOCK = 35759,
|
||||
SPELL_KNOCK_AWAY = 36512,
|
||||
SPELL_FELFIRE_LINE_UP = 35770,
|
||||
SPELL_CHARGE_TARGETING = 36038,
|
||||
SPELL_CHARGE = 35754
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_FELFIRE_SHOCK = 1,
|
||||
EVENT_KNOCK_AWAY = 2,
|
||||
|
||||
EVENT_PREFIGHT_1 = 3,
|
||||
EVENT_PREFIGHT_2 = 4,
|
||||
EVENT_PREFIGHT_3 = 5,
|
||||
EVENT_PREFIGHT_4 = 6,
|
||||
EVENT_PREFIGHT_5 = 7,
|
||||
EVENT_PREFIGHT_6 = 8,
|
||||
EVENT_PREFIGHT_7 = 9,
|
||||
EVENT_PREFIGHT_8 = 10,
|
||||
EVENT_PREFIGHT_9 = 11,
|
||||
EVENT_ME_FIRST = 12,
|
||||
EVENT_DALLIAH_DEATH = 13
|
||||
};
|
||||
|
||||
class boss_wrath_scryer_soccothrates : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_wrath_scryer_soccothrates() : CreatureScript("boss_wrath_scryer_soccothrates") { }
|
||||
|
||||
struct boss_wrath_scryer_soccothratesAI : public BossAI
|
||||
{
|
||||
boss_wrath_scryer_soccothratesAI(Creature* creature) : BossAI(creature, DATA_SOCCOTHRATES) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
preFight = false;
|
||||
dalliahTaunt = false;
|
||||
dalliahDeath = false;
|
||||
DoCast(me, SPELL_FEL_IMMOLATION);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
|
||||
if (dalliah->IsAlive() && !dalliah->IsInCombat())
|
||||
dalliah->AI()->SetData(1, 1);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_FELFIRE_SHOCK, urand(12000, 14000));
|
||||
events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(11000, 12000));
|
||||
events.ScheduleEvent(EVENT_ME_FIRST, 6000);
|
||||
Talk(SAY_AGGRO);
|
||||
preFight = false;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) OVERRIDE
|
||||
{
|
||||
if (instance->GetData(DATA_CONVERSATION) == NOT_STARTED && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 70.0f))
|
||||
{
|
||||
Talk(SAY_SOCCOTHRATES_CONVO_1);
|
||||
instance->SetData(DATA_CONVERSATION, DONE);
|
||||
|
||||
preFight = true;
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_1, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 /*type*/, uint32 data) OVERRIDE
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
case 1:
|
||||
events.ScheduleEvent(EVENT_DALLIAH_DEATH, 6000);
|
||||
dalliahDeath = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
{
|
||||
if (preFight)
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_PREFIGHT_1:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
|
||||
dalliah->AI()->Talk(SAY_DALLIAH_CONVO_1);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_2, 3000);
|
||||
break;
|
||||
case EVENT_PREFIGHT_2:
|
||||
Talk(SAY_SOCCOTHRATES_CONVO_2);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_3, 3000);
|
||||
break;
|
||||
case EVENT_PREFIGHT_3:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
|
||||
dalliah->AI()->Talk(SAY_DALLIAH_CONVO_2);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_4, 6000);
|
||||
break;
|
||||
case EVENT_PREFIGHT_4:
|
||||
Talk(SAY_SOCCOTHRATES_CONVO_3);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_5, 2000);
|
||||
break;
|
||||
case EVENT_PREFIGHT_5:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
|
||||
dalliah->AI()->Talk(SAY_DALLIAH_CONVO_3);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_6, 3000);
|
||||
break;
|
||||
case EVENT_PREFIGHT_6:
|
||||
Talk(SAY_SOCCOTHRATES_CONVO_4);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_7, 2000);
|
||||
break;
|
||||
case EVENT_PREFIGHT_7:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
|
||||
dalliah->GetMotionMaster()->MovePoint(0, 118.6048f, 96.84852f, 22.44115f);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_8, 4000);
|
||||
break;
|
||||
case EVENT_PREFIGHT_8:
|
||||
me->GetMotionMaster()->MovePoint(0, 122.1035f, 192.7203f, 22.44115f);
|
||||
events.ScheduleEvent(EVENT_PREFIGHT_9, 4000);
|
||||
break;
|
||||
case EVENT_PREFIGHT_9:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
|
||||
{
|
||||
dalliah->SetFacingToObject(me);
|
||||
me->SetFacingToObject(dalliah);
|
||||
dalliah->SetHomePosition(dalliah->GetPositionX(), dalliah->GetPositionY(), dalliah->GetPositionZ(), 1.51737f);
|
||||
me->SetHomePosition(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 4.725722f);
|
||||
preFight = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dalliahDeath)
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_DALLIAH_DEATH:
|
||||
Talk(SAY_DALLIAH_DEATH);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_FELFIRE_SHOCK:
|
||||
DoCastVictim(SPELL_FELFIRE_SHOCK, true);
|
||||
events.ScheduleEvent(EVENT_FELFIRE_SHOCK, urand(12000, 14000));
|
||||
break;
|
||||
case EVENT_KNOCK_AWAY:
|
||||
DoCast(me, SPELL_KNOCK_AWAY);
|
||||
Talk(SAY_KNOCK_AWAY);
|
||||
events.ScheduleEvent(EVENT_KNOCK_AWAY, urand(11000, 12000));
|
||||
break;
|
||||
case EVENT_ME_FIRST:
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
|
||||
if (dalliah->IsAlive() && !dalliah->IsInCombat())
|
||||
dalliah->AI()->Talk(SAY_AGGRO_SOCCOTHRATES_FIRST);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (HealthBelowPct(25) && !dalliahTaunt)
|
||||
{
|
||||
if (Creature* dalliah = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DALLIAH)))
|
||||
dalliah->AI()->Talk(SAY_SOCCOTHRATES_25_PERCENT);
|
||||
dalliahTaunt = true;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool preFight;
|
||||
bool dalliahTaunt;
|
||||
bool dalliahDeath;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetArcatrazAI<boss_wrath_scryer_soccothratesAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_wrath_scryer_soccothrates()
|
||||
{
|
||||
new boss_wrath_scryer_soccothrates();
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "arcatraz.h"
|
||||
|
||||
enum Say
|
||||
{
|
||||
SAY_AGGRO = 0,
|
||||
SAY_SLAY = 1,
|
||||
SAY_SHADOW_NOVA = 2,
|
||||
SAY_DEATH = 3
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_VOID_ZONE = 36119,
|
||||
SPELL_SHADOW_NOVA = 36127,
|
||||
SPELL_SEED_OF_CORRUPTION = 36123
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_VOID_ZONE = 1,
|
||||
EVENT_SHADOW_NOVA = 2,
|
||||
EVENT_SEED_OF_CORRUPTION = 3
|
||||
};
|
||||
|
||||
class boss_zereketh_the_unbound : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_zereketh_the_unbound() : CreatureScript("boss_zereketh_the_unbound") { }
|
||||
|
||||
struct boss_zereketh_the_unboundAI : public BossAI
|
||||
{
|
||||
boss_zereketh_the_unboundAI(Creature* creature) : BossAI(creature, DATA_ZEREKETH) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_EnterCombat();
|
||||
events.ScheduleEvent(EVENT_VOID_ZONE, urand (6000, 10000));
|
||||
events.ScheduleEvent(EVENT_SHADOW_NOVA, urand (6000, 10000));
|
||||
events.ScheduleEvent(EVENT_SEED_OF_CORRUPTION, urand(12000, 20000));
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_VOID_ZONE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
DoCast(target, SPELL_VOID_ZONE);
|
||||
events.ScheduleEvent(EVENT_VOID_ZONE, urand (6000, 10000));
|
||||
break;
|
||||
case EVENT_SHADOW_NOVA:
|
||||
DoCastVictim(SPELL_SHADOW_NOVA, true);
|
||||
Talk(SAY_SHADOW_NOVA);
|
||||
events.ScheduleEvent(EVENT_SHADOW_NOVA, urand (6000, 10000));
|
||||
break;
|
||||
case EVENT_SEED_OF_CORRUPTION:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
DoCast(target, SPELL_SEED_OF_CORRUPTION);
|
||||
events.ScheduleEvent(EVENT_SEED_OF_CORRUPTION, urand(12000, 20000));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new boss_zereketh_the_unboundAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_zereketh_the_unbound()
|
||||
{
|
||||
new boss_zereketh_the_unbound();
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* 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
|
||||
@@ -16,217 +15,120 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Instance_Arcatraz
|
||||
SD%Complete: 80
|
||||
SDComment: Mainly Harbringer Skyriss event
|
||||
SDCategory: Tempest Keep, The Arcatraz
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "arcatraz.h"
|
||||
|
||||
#define MAX_ENCOUNTER 9
|
||||
|
||||
enum Units
|
||||
DoorData const doorData[] =
|
||||
{
|
||||
CONTAINMENT_CORE_SECURITY_FIELD_ALPHA = 184318, //door opened when Wrath-Scryer Soccothrates dies
|
||||
CONTAINMENT_CORE_SECURITY_FIELD_BETA = 184319, //door opened when Dalliah the Doomsayer dies
|
||||
POD_ALPHA = 183961, //pod first boss wave
|
||||
POD_BETA = 183963, //pod second boss wave
|
||||
POD_DELTA = 183964, //pod third boss wave
|
||||
POD_GAMMA = 183962, //pod fourth boss wave
|
||||
POD_OMEGA = 183965, //pod fifth boss wave
|
||||
WARDENS_SHIELD = 184802, // warden shield
|
||||
SEAL_SPHERE = 184802, //shield 'protecting' mellichar
|
||||
|
||||
MELLICHAR = 20904, //skyriss will kill this unit
|
||||
{ GO_CONTAINMENT_CORE_SECURITY_FIELD_ALPHA, DATA_SOCCOTHRATES, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
||||
{ GO_CONTAINMENT_CORE_SECURITY_FIELD_BETA, DATA_DALLIAH, DOOR_TYPE_PASSAGE, BOUNDARY_NONE },
|
||||
{ 0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE } // END
|
||||
};
|
||||
|
||||
/* Arcatraz encounters:
|
||||
1 - Zereketh the Unbound event
|
||||
2 - Dalliah the Doomsayer event
|
||||
3 - Wrath-Scryer Soccothrates event
|
||||
4 - Harbinger Skyriss event, 5 sub-events
|
||||
*/
|
||||
|
||||
class instance_arcatraz : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
instance_arcatraz()
|
||||
: InstanceMapScript("instance_arcatraz", 552)
|
||||
{
|
||||
}
|
||||
instance_arcatraz() : InstanceMapScript(ArcatrazScriptName, 552) { }
|
||||
|
||||
struct instance_arcatraz_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_arcatraz_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
uint64 Containment_Core_Security_Field_AlphaGUID;
|
||||
uint64 Containment_Core_Security_Field_BetaGUID;
|
||||
uint64 Pod_AlphaGUID;
|
||||
uint64 Pod_GammaGUID;
|
||||
uint64 Pod_BetaGUID;
|
||||
uint64 Pod_DeltaGUID;
|
||||
uint64 Pod_OmegaGUID;
|
||||
uint64 Wardens_ShieldGUID;
|
||||
uint64 GoSphereGUID;
|
||||
uint64 MellicharGUID;
|
||||
|
||||
void Initialize() OVERRIDE
|
||||
instance_arcatraz_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadDoorData(doorData);
|
||||
|
||||
Containment_Core_Security_Field_AlphaGUID = 0;
|
||||
Containment_Core_Security_Field_BetaGUID = 0;
|
||||
Pod_AlphaGUID = 0;
|
||||
Pod_GammaGUID = 0;
|
||||
Pod_BetaGUID = 0;
|
||||
Pod_DeltaGUID = 0;
|
||||
Pod_OmegaGUID = 0;
|
||||
Wardens_ShieldGUID = 0;
|
||||
GoSphereGUID = 0;
|
||||
MellicharGUID = 0;
|
||||
DalliahGUID = 0;
|
||||
SoccothratesGUID = 0;
|
||||
MellicharGUID = 0;
|
||||
WardensShieldGUID = 0;
|
||||
|
||||
ConversationState = NOT_STARTED;
|
||||
|
||||
memset(StasisPodGUIDs, 0, 5 * sizeof(uint64));
|
||||
memset(StasisPodStates, NOT_STARTED, 5 * sizeof(uint8));
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const OVERRIDE
|
||||
void OnCreatureCreate(Creature* creature) OVERRIDE
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
switch (creature->GetEntry())
|
||||
{
|
||||
case NPC_DALLIAH:
|
||||
DalliahGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_SOCCOTHRATES:
|
||||
SoccothratesGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_MELLICHAR:
|
||||
MellicharGUID = creature->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) OVERRIDE
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case CONTAINMENT_CORE_SECURITY_FIELD_ALPHA:
|
||||
Containment_Core_Security_Field_AlphaGUID = go->GetGUID();
|
||||
break;
|
||||
|
||||
case CONTAINMENT_CORE_SECURITY_FIELD_BETA:
|
||||
Containment_Core_Security_Field_BetaGUID = go->GetGUID();
|
||||
break;
|
||||
|
||||
case POD_ALPHA:
|
||||
Pod_AlphaGUID = go->GetGUID();
|
||||
break;
|
||||
|
||||
case POD_GAMMA:
|
||||
Pod_GammaGUID = go->GetGUID();
|
||||
break;
|
||||
|
||||
case POD_BETA:
|
||||
Pod_BetaGUID = go->GetGUID();
|
||||
break;
|
||||
|
||||
case POD_DELTA:
|
||||
Pod_DeltaGUID = go->GetGUID();
|
||||
break;
|
||||
|
||||
case POD_OMEGA:
|
||||
Pod_OmegaGUID = go->GetGUID();
|
||||
break;
|
||||
|
||||
case SEAL_SPHERE:
|
||||
GoSphereGUID = go->GetGUID();
|
||||
break;
|
||||
|
||||
/*case WARDENS_SHIELD:
|
||||
Wardens_ShieldGUID = go->GetGUID();
|
||||
break;*/
|
||||
case GO_CONTAINMENT_CORE_SECURITY_FIELD_ALPHA:
|
||||
case GO_CONTAINMENT_CORE_SECURITY_FIELD_BETA:
|
||||
AddDoor(go, true);
|
||||
break;
|
||||
case GO_STASIS_POD_ALPHA:
|
||||
StasisPodGUIDs[0] = go->GetGUID();
|
||||
break;
|
||||
case GO_STASIS_POD_BETA:
|
||||
StasisPodGUIDs[1] = go->GetGUID();
|
||||
break;
|
||||
case GO_STASIS_POD_DELTA:
|
||||
StasisPodGUIDs[2] = go->GetGUID();
|
||||
break;
|
||||
case GO_STASIS_POD_GAMMA:
|
||||
StasisPodGUIDs[3] = go->GetGUID();
|
||||
break;
|
||||
case GO_STASIS_POD_OMEGA:
|
||||
StasisPodGUIDs[4] = go->GetGUID();
|
||||
break;
|
||||
case GO_WARDENS_SHIELD:
|
||||
WardensShieldGUID = go->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) OVERRIDE
|
||||
void OnGameObjectRemove(GameObject* go) OVERRIDE
|
||||
{
|
||||
if (creature->GetEntry() == MELLICHAR)
|
||||
MellicharGUID = creature->GetGUID();
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_CONTAINMENT_CORE_SECURITY_FIELD_ALPHA:
|
||||
case GO_CONTAINMENT_CORE_SECURITY_FIELD_BETA:
|
||||
AddDoor(go, false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data) OVERRIDE
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case TYPE_ZEREKETH:
|
||||
m_auiEncounter[0] = data;
|
||||
break;
|
||||
case TYPE_DALLIAH:
|
||||
if (data == DONE)
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(Containment_Core_Security_Field_BetaGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[1] = data;
|
||||
break;
|
||||
case TYPE_SOCCOTHRATES:
|
||||
if (data == DONE)
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(Containment_Core_Security_Field_AlphaGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[2] = data;
|
||||
break;
|
||||
case TYPE_HARBINGERSKYRISS:
|
||||
if (data == NOT_STARTED || data == FAIL)
|
||||
{
|
||||
m_auiEncounter[4] = NOT_STARTED;
|
||||
m_auiEncounter[5] = NOT_STARTED;
|
||||
m_auiEncounter[6] = NOT_STARTED;
|
||||
m_auiEncounter[7] = NOT_STARTED;
|
||||
m_auiEncounter[8] = NOT_STARTED;
|
||||
}
|
||||
m_auiEncounter[3] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_1:
|
||||
if (data == IN_PROGRESS)
|
||||
if (GameObject* go = instance->GetGameObject(Pod_AlphaGUID))
|
||||
go->UseDoorOrButton();
|
||||
m_auiEncounter[4] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_2:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(Pod_BetaGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[5] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_3:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(Pod_DeltaGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[6] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_4:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(Pod_GammaGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[7] = data;
|
||||
break;
|
||||
case TYPE_WARDEN_5:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(Pod_OmegaGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
m_auiEncounter[8] = data;
|
||||
break;
|
||||
case TYPE_SHIELD_OPEN:
|
||||
if (data == IN_PROGRESS)
|
||||
{
|
||||
if (GameObject* go = instance->GetGameObject(Wardens_ShieldGUID))
|
||||
go->UseDoorOrButton();
|
||||
}
|
||||
break;
|
||||
case DATA_WARDEN_1:
|
||||
case DATA_WARDEN_2:
|
||||
case DATA_WARDEN_3:
|
||||
case DATA_WARDEN_4:
|
||||
case DATA_WARDEN_5:
|
||||
if (data == IN_PROGRESS)
|
||||
HandleGameObject(StasisPodGUIDs[type - DATA_WARDEN_1], true);
|
||||
StasisPodStates[type - DATA_WARDEN_1] = uint8(data);
|
||||
break;
|
||||
case DATA_CONVERSATION:
|
||||
ConversationState = uint8(data);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,12 +136,16 @@ class instance_arcatraz : public InstanceMapScript
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case TYPE_HARBINGERSKYRISS: return m_auiEncounter[3];
|
||||
case TYPE_WARDEN_1: return m_auiEncounter[4];
|
||||
case TYPE_WARDEN_2: return m_auiEncounter[5];
|
||||
case TYPE_WARDEN_3: return m_auiEncounter[6];
|
||||
case TYPE_WARDEN_4: return m_auiEncounter[7];
|
||||
case TYPE_WARDEN_5: return m_auiEncounter[8];
|
||||
case DATA_WARDEN_1:
|
||||
case DATA_WARDEN_2:
|
||||
case DATA_WARDEN_3:
|
||||
case DATA_WARDEN_4:
|
||||
case DATA_WARDEN_5:
|
||||
return StasisPodStates[type - DATA_WARDEN_1];
|
||||
case DATA_CONVERSATION:
|
||||
return ConversationState;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -248,11 +154,95 @@ class instance_arcatraz : public InstanceMapScript
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
case DATA_MELLICHAR: return MellicharGUID;
|
||||
case DATA_SPHERE_SHIELD: return GoSphereGUID;
|
||||
case DATA_DALLIAH:
|
||||
return DalliahGUID;
|
||||
case DATA_SOCCOTHRATES:
|
||||
return SoccothratesGUID;
|
||||
case DATA_MELLICHAR:
|
||||
return MellicharGUID;
|
||||
case DATA_WARDENS_SHIELD:
|
||||
return WardensShieldGUID;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state) OVERRIDE
|
||||
{
|
||||
if (!InstanceScript::SetBossState(type, state))
|
||||
return false;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DATA_HARBINGER_SKYRISS:
|
||||
if (state == NOT_STARTED || state == FAIL)
|
||||
{
|
||||
SetData(DATA_WARDEN_1, NOT_STARTED);
|
||||
SetData(DATA_WARDEN_2, NOT_STARTED);
|
||||
SetData(DATA_WARDEN_3, NOT_STARTED);
|
||||
SetData(DATA_WARDEN_4, NOT_STARTED);
|
||||
SetData(DATA_WARDEN_5, NOT_STARTED);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string GetSaveData() OVERRIDE
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "A Z " << GetBossSaveData();
|
||||
|
||||
OUT_SAVE_INST_DATA_COMPLETE;
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(char const* str) OVERRIDE
|
||||
{
|
||||
if (!str)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(str);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
|
||||
std::istringstream loadStream(str);
|
||||
loadStream >> dataHead1 >> dataHead2;
|
||||
|
||||
if (dataHead1 == 'A' && dataHead2 == 'Z')
|
||||
{
|
||||
for (uint32 i = 0; i < EncounterCount; ++i)
|
||||
{
|
||||
uint32 tmpState;
|
||||
loadStream >> tmpState;
|
||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||
tmpState = NOT_STARTED;
|
||||
SetBossState(i, EncounterState(tmpState));
|
||||
}
|
||||
}
|
||||
else
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
|
||||
protected:
|
||||
uint64 DalliahGUID;
|
||||
uint64 SoccothratesGUID;
|
||||
uint64 StasisPodGUIDs[5];
|
||||
uint64 MellicharGUID;
|
||||
uint64 WardensShieldGUID;
|
||||
|
||||
uint8 ConversationState;
|
||||
uint8 StasisPodStates[5];
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE
|
||||
@@ -263,6 +253,6 @@ class instance_arcatraz : public InstanceMapScript
|
||||
|
||||
void AddSC_instance_arcatraz()
|
||||
{
|
||||
new instance_arcatraz;
|
||||
new instance_arcatraz();
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/* ScriptData
|
||||
SDName: Blades_Edge_Mountains
|
||||
SD%Complete: 90
|
||||
SDComment: Quest support: 10503, 10504, 10556, 10609, 10682, 10821, 10980. Ogri'la->Skettis Flight. (npc_daranelle needs bit more work before consider complete)
|
||||
SDComment: Quest support: 10503, 10504, 10556, 10594, 10609, 10682, 10821, 10980. Ogri'la->Skettis Flight. (npc_daranelle needs bit more work before consider complete)
|
||||
SDCategory: Blade's Edge Mountains
|
||||
EndScriptData */
|
||||
|
||||
@@ -40,6 +40,10 @@ EndContentData */
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "Cell.h"
|
||||
#include "CellImpl.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
|
||||
//Support for quest: You're Fired! (10821)
|
||||
bool obelisk_one, obelisk_two, obelisk_three, obelisk_four, obelisk_five;
|
||||
@@ -1143,6 +1147,99 @@ class go_apexis_relic : public GameObjectScript
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_oscillating_frequency_scanner_master_bunny used for quest 10594 "Gauging the Resonant Frequency"
|
||||
######*/
|
||||
|
||||
enum ScannerMasterBunny
|
||||
{
|
||||
NPC_OSCILLATING_FREQUENCY_SCANNER_TOP_BUNNY = 21759,
|
||||
SPELL_OSCILLATION_FIELD = 37408,
|
||||
QUEST_GAUGING_THE_RESONANT_FREQUENCY = 10594
|
||||
};
|
||||
|
||||
class npc_oscillating_frequency_scanner_master_bunny : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_oscillating_frequency_scanner_master_bunny() : CreatureScript("npc_oscillating_frequency_scanner_master_bunny") { }
|
||||
|
||||
struct npc_oscillating_frequency_scanner_master_bunnyAI : public ScriptedAI
|
||||
{
|
||||
npc_oscillating_frequency_scanner_master_bunnyAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (GetClosestCreatureWithEntry(me, NPC_OSCILLATING_FREQUENCY_SCANNER_TOP_BUNNY, 25.0f))
|
||||
me->DespawnOrUnsummon();
|
||||
else
|
||||
{
|
||||
// Spell 37392 does not exist in dbc, manually spawning
|
||||
me->SummonCreature(21759, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 0.5f, me->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 50000);
|
||||
me->SummonGameObject(184926, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), 0, 0, 0, 0, 50000);
|
||||
me->DespawnOrUnsummon(50000);
|
||||
}
|
||||
|
||||
timer = 500;
|
||||
}
|
||||
|
||||
void IsSummonedBy(Unit* summoner) OVERRIDE
|
||||
{
|
||||
if (summoner->isType(TYPEMASK_PLAYER))
|
||||
playerGuid = summoner->GetGUID();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (timer <= diff)
|
||||
{
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, playerGuid))
|
||||
DoCast(player, SPELL_OSCILLATION_FIELD);
|
||||
|
||||
timer = 3000;
|
||||
}
|
||||
else
|
||||
timer -= diff;
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 playerGuid;
|
||||
uint32 timer;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_oscillating_frequency_scanner_master_bunnyAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_oscillating_field : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_oscillating_field() : SpellScriptLoader("spell_oscillating_field") { }
|
||||
|
||||
class spell_oscillating_field_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_oscillating_field_SpellScript);
|
||||
|
||||
void HandleEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Player* player = GetHitPlayer())
|
||||
if (player->GetAuraCount(SPELL_OSCILLATION_FIELD) == 5 && player->GetQuestStatus(QUEST_GAUGING_THE_RESONANT_FREQUENCY) == QUEST_STATUS_INCOMPLETE)
|
||||
player->CompleteQuest(QUEST_GAUGING_THE_RESONANT_FREQUENCY);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_oscillating_field_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const OVERRIDE
|
||||
{
|
||||
return new spell_oscillating_field_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_blades_edge_mountains()
|
||||
{
|
||||
new npc_bladespire_ogre();
|
||||
@@ -1157,4 +1254,6 @@ void AddSC_blades_edge_mountains()
|
||||
new npc_simon_bunny();
|
||||
new go_simon_cluster();
|
||||
new go_apexis_relic();
|
||||
new npc_oscillating_frequency_scanner_master_bunny();
|
||||
new spell_oscillating_field();
|
||||
}
|
||||
@@ -1286,7 +1286,7 @@ public:
|
||||
me->SetTarget(0);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)OVERRIDE { }
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void HandleAnimation()
|
||||
{
|
||||
@@ -1818,7 +1818,7 @@ public:
|
||||
|
||||
void Reset() OVERRIDE { }
|
||||
|
||||
void EnterCombat(Unit* /*who*/)OVERRIDE { }
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
|
||||
@@ -458,7 +458,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)OVERRIDE { }
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void ReceiveEmote(Player* player, uint32 emote) OVERRIDE
|
||||
{
|
||||
@@ -753,7 +753,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)OVERRIDE { }
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE { }
|
||||
|
||||
void SpellHit(Unit* caster, SpellInfo const* spell) OVERRIDE
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user