Scripts/Ulduar: Cleanup in Flame Leviathan.
This commit is contained in:
@@ -31,7 +31,6 @@
|
|||||||
#include "ObjectMgr.h"
|
#include "ObjectMgr.h"
|
||||||
#include "ulduar.h"
|
#include "ulduar.h"
|
||||||
|
|
||||||
|
|
||||||
enum Spells
|
enum Spells
|
||||||
{
|
{
|
||||||
SPELL_PURSUED = 62374,
|
SPELL_PURSUED = 62374,
|
||||||
@@ -137,6 +136,9 @@ enum Vehicles
|
|||||||
#define EMOTE_REPAIR "Automatic repair sequence initiated."
|
#define EMOTE_REPAIR "Automatic repair sequence initiated."
|
||||||
#define DATA_SHUTOUT 29112912 // 2911, 2912 are achievement IDs
|
#define DATA_SHUTOUT 29112912 // 2911, 2912 are achievement IDs
|
||||||
#define DATA_UNBROKEN 29052906 // 2905, 2906 are achievement IDs
|
#define DATA_UNBROKEN 29052906 // 2905, 2906 are achievement IDs
|
||||||
|
#define DATA_ORBIT_ACHIEVEMENTS 1
|
||||||
|
#define VEHICLE_SPAWNS 5
|
||||||
|
#define FREYA_SPAWNS 4
|
||||||
|
|
||||||
enum Yells
|
enum Yells
|
||||||
{
|
{
|
||||||
@@ -158,12 +160,14 @@ enum Yells
|
|||||||
SAY_OVERLOAD_3 = -1603075,
|
SAY_OVERLOAD_3 = -1603075,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum actions
|
enum MiscellanousData
|
||||||
{
|
{
|
||||||
ACTION_TOWER_OF_STORM_DESTROYED = 1,
|
// Other actions are in Ulduar.h
|
||||||
ACTION_TOWER_OF_FROST_DESTROYED = 2,
|
ACTION_START_HARD_MODE = 5,
|
||||||
ACTION_TOWER_OF_FLAMES_DESTROYED = 3,
|
ACTION_SPAWN_VEHICLES = 6,
|
||||||
ACTION_TOWER_OF_LIFE_DESTROYED = 4,
|
// Amount of seats depending on Raid mode
|
||||||
|
TWO_SEATS = 2,
|
||||||
|
FOUR_SEATS = 4,
|
||||||
};
|
};
|
||||||
|
|
||||||
Position const Center[]=
|
Position const Center[]=
|
||||||
@@ -171,7 +175,12 @@ Position const Center[]=
|
|||||||
{354.8771f, -12.90240f, 409.803650f, 0.0f},
|
{354.8771f, -12.90240f, 409.803650f, 0.0f},
|
||||||
};
|
};
|
||||||
|
|
||||||
Position const PosSiege[5] =
|
Position const InfernoStart[]=
|
||||||
|
{
|
||||||
|
{390.93f, -13.91f, 409.81f, 0.0f},
|
||||||
|
};
|
||||||
|
|
||||||
|
Position const PosSiege[VEHICLE_SPAWNS] =
|
||||||
{
|
{
|
||||||
{-814.59f, -64.54f, 429.92f, 5.969f},
|
{-814.59f, -64.54f, 429.92f, 5.969f},
|
||||||
{-784.37f, -33.31f, 429.92f, 5.096f},
|
{-784.37f, -33.31f, 429.92f, 5.096f},
|
||||||
@@ -180,7 +189,7 @@ Position const PosSiege[5] =
|
|||||||
{-812.83f, -77.71f, 429.92f, 0.046f},
|
{-812.83f, -77.71f, 429.92f, 0.046f},
|
||||||
};
|
};
|
||||||
|
|
||||||
Position const PosChopper[5] =
|
Position const PosChopper[VEHICLE_SPAWNS] =
|
||||||
{
|
{
|
||||||
{-717.83f, -106.56f, 430.02f, 0.122f},
|
{-717.83f, -106.56f, 430.02f, 0.122f},
|
||||||
{-717.83f, -114.23f, 430.44f, 0.122f},
|
{-717.83f, -114.23f, 430.44f, 0.122f},
|
||||||
@@ -189,7 +198,7 @@ Position const PosChopper[5] =
|
|||||||
{-718.45f, -123.58f, 430.41f, 0.085f},
|
{-718.45f, -123.58f, 430.41f, 0.085f},
|
||||||
};
|
};
|
||||||
|
|
||||||
Position const PosDemolisher[5] =
|
Position const PosDemolisher[VEHICLE_SPAWNS] =
|
||||||
{
|
{
|
||||||
{-724.12f, -176.64f, 430.03f, 2.543f},
|
{-724.12f, -176.64f, 430.03f, 2.543f},
|
||||||
{-766.70f, -225.03f, 430.50f, 1.710f},
|
{-766.70f, -225.03f, 430.50f, 1.710f},
|
||||||
@@ -198,7 +207,13 @@ Position const PosDemolisher[5] =
|
|||||||
{-798.01f, -227.24f, 429.84f, 1.446f},
|
{-798.01f, -227.24f, 429.84f, 1.446f},
|
||||||
};
|
};
|
||||||
|
|
||||||
#define DATA_ORBIT_ACHIEVEMENTS 1
|
Position const FreyaBeacons[FREYA_SPAWNS] =
|
||||||
|
{
|
||||||
|
{377.02f, -119.10f, 409.81f, 0.0f},
|
||||||
|
{185.62f, -119.10f, 409.81f, 0.0f},
|
||||||
|
{377.02f, 54.78f, 409.81f, 0.0f},
|
||||||
|
{185.62f, 54.78f, 409.81f, 0.0f},
|
||||||
|
};
|
||||||
|
|
||||||
class boss_flame_leviathan : public CreatureScript
|
class boss_flame_leviathan : public CreatureScript
|
||||||
{
|
{
|
||||||
@@ -244,6 +259,7 @@ class boss_flame_leviathan : public CreatureScript
|
|||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
_Reset();
|
_Reset();
|
||||||
|
//resets shutdown counter to 0. 2 or 4 depending on raid mode
|
||||||
Shutdown = 0;
|
Shutdown = 0;
|
||||||
me->SetReactState(REACT_DEFENSIVE);
|
me->SetReactState(REACT_DEFENSIVE);
|
||||||
}
|
}
|
||||||
@@ -299,6 +315,7 @@ class boss_flame_leviathan : public CreatureScript
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO: effect 0 and effect 1 may be on different target
|
//TODO: effect 0 and effect 1 may be on different target
|
||||||
|
//TODO: Move to spellscript
|
||||||
void SpellHitTarget(Unit* target, SpellEntry const* spell)
|
void SpellHitTarget(Unit* target, SpellEntry const* spell)
|
||||||
{
|
{
|
||||||
if (spell->Id == SPELL_PURSUED)
|
if (spell->Id == SPELL_PURSUED)
|
||||||
@@ -354,7 +371,7 @@ class boss_flame_leviathan : public CreatureScript
|
|||||||
|
|
||||||
events.Update(diff);
|
events.Update(diff);
|
||||||
|
|
||||||
if (Shutdown == RAID_MODE(2, 4))
|
if (Shutdown == RAID_MODE(TWO_SEATS, FOUR_SEATS))
|
||||||
{
|
{
|
||||||
Shutdown = 0;
|
Shutdown = 0;
|
||||||
events.ScheduleEvent(EVENT_SHUTDOWN, 4000);
|
events.ScheduleEvent(EVENT_SHUTDOWN, 4000);
|
||||||
@@ -381,25 +398,22 @@ class boss_flame_leviathan : public CreatureScript
|
|||||||
if (me->HasUnitState(UNIT_STAT_CASTING))
|
if (me->HasUnitState(UNIT_STAT_CASTING))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
uint32 eventId = events.GetEvent();
|
while (uint32 eventId = events.ExecuteEvent())
|
||||||
|
{
|
||||||
switch (eventId)
|
switch (eventId)
|
||||||
{
|
{
|
||||||
case 0:
|
|
||||||
break; // this is a must
|
|
||||||
case EVENT_PURSUE:
|
case EVENT_PURSUE:
|
||||||
DoScriptText(RAND(SAY_TARGET_1, SAY_TARGET_2, SAY_TARGET_3), me);
|
DoScriptText(RAND(SAY_TARGET_1, SAY_TARGET_2, SAY_TARGET_3), me);
|
||||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 75, true))
|
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 75, true))
|
||||||
{
|
{
|
||||||
me->AddAura(SPELL_PURSUED, target);
|
me->CastSpell(target, SPELL_PURSUED, true);
|
||||||
me->MonsterTextEmote(EMOTE_PURSUE, target->GetGUID(), true);
|
me->MonsterTextEmote(EMOTE_PURSUE, target->GetGUID(), true);
|
||||||
}
|
}
|
||||||
events.RepeatEvent(30*IN_MILLISECONDS);
|
events.RepeatEvent(30*IN_MILLISECONDS);
|
||||||
break;
|
break;
|
||||||
case EVENT_MISSILE:
|
case EVENT_MISSILE:
|
||||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
DoCast(me, SPELL_MISSILE_BARRAGE, true);
|
||||||
DoCast(target, SPELL_MISSILE_BARRAGE);
|
events.RepeatEvent(2*IN_MILLISECONDS);
|
||||||
events.RepeatEvent(1500);
|
|
||||||
break;
|
break;
|
||||||
case EVENT_VENT:
|
case EVENT_VENT:
|
||||||
DoCastAOE(SPELL_FLAME_VENTS);
|
DoCastAOE(SPELL_FLAME_VENTS);
|
||||||
@@ -418,7 +432,7 @@ class boss_flame_leviathan : public CreatureScript
|
|||||||
case EVENT_SHUTDOWN:
|
case EVENT_SHUTDOWN:
|
||||||
DoScriptText(RAND(SAY_OVERLOAD_1, SAY_OVERLOAD_2, SAY_OVERLOAD_3), me);
|
DoScriptText(RAND(SAY_OVERLOAD_1, SAY_OVERLOAD_2, SAY_OVERLOAD_3), me);
|
||||||
me->MonsterTextEmote(EMOTE_OVERLOAD, 0, true);
|
me->MonsterTextEmote(EMOTE_OVERLOAD, 0, true);
|
||||||
me->AddAura(SPELL_SYSTEMS_SHUTDOWN, me);
|
me->CastSpell(me, SPELL_SYSTEMS_SHUTDOWN, true);
|
||||||
me->RemoveAurasDueToSpell(SPELL_GATHERING_SPEED);
|
me->RemoveAurasDueToSpell(SPELL_GATHERING_SPEED);
|
||||||
events.ScheduleEvent(EVENT_REPAIR, 4000);
|
events.ScheduleEvent(EVENT_REPAIR, 4000);
|
||||||
events.CancelEvent(EVENT_SHUTDOWN);
|
events.CancelEvent(EVENT_SHUTDOWN);
|
||||||
@@ -439,7 +453,7 @@ class boss_flame_leviathan : public CreatureScript
|
|||||||
events.CancelEvent(EVENT_THORIM_S_HAMMER);
|
events.CancelEvent(EVENT_THORIM_S_HAMMER);
|
||||||
break;
|
break;
|
||||||
case EVENT_MIMIRON_S_INFERNO: // Tower of Flames
|
case EVENT_MIMIRON_S_INFERNO: // Tower of Flames
|
||||||
me->SummonCreature(NPC_MIMIRON_BEACON, 390.93f, -13.91f, 409.81f);
|
me->SummonCreature(NPC_MIMIRON_BEACON, InfernoStart->GetPositionX(), InfernoStart->GetPositionY(), InfernoStart->GetPositionZ());
|
||||||
DoScriptText(SAY_TOWER_FLAME, me);
|
DoScriptText(SAY_TOWER_FLAME, me);
|
||||||
events.CancelEvent(EVENT_MIMIRON_S_INFERNO);
|
events.CancelEvent(EVENT_MIMIRON_S_INFERNO);
|
||||||
break;
|
break;
|
||||||
@@ -454,61 +468,41 @@ class boss_flame_leviathan : public CreatureScript
|
|||||||
break;
|
break;
|
||||||
case EVENT_FREYA_S_WARD: // Tower of Nature
|
case EVENT_FREYA_S_WARD: // Tower of Nature
|
||||||
DoScriptText(SAY_TOWER_NATURE, me);
|
DoScriptText(SAY_TOWER_NATURE, me);
|
||||||
StartFreyaEvent();
|
for (int32 i = 0; i < 4; ++i)
|
||||||
|
me->SummonCreature(NPC_FREYA_BEACON, FreyaBeacons[i]);
|
||||||
|
|
||||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||||
DoCast(target, SPELL_FREYA_S_WARD);
|
DoCast(target, SPELL_FREYA_S_WARD);
|
||||||
events.CancelEvent(EVENT_FREYA_S_WARD);
|
events.CancelEvent(EVENT_FREYA_S_WARD);
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
events.PopEvent();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
//TODO: Fix this spell, gets applied on players who are on leviathan should be excluded?
|
||||||
/*if (me->IsWithinMeleeRange(me->getVictim())) //bugged spell casts on units that are boarded on leviathan
|
/*if (me->IsWithinMeleeRange(me->getVictim())) //bugged spell casts on units that are boarded on leviathan
|
||||||
DoSpellAttackIfReady(SPELL_BATTERING_RAM);*/
|
DoSpellAttackIfReady(SPELL_BATTERING_RAM);*/
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartFreyaEvent()//summon these 4 on each corner wich wil spawn additional hostile mobs
|
|
||||||
{
|
|
||||||
me->SummonCreature(NPC_FREYA_BEACON, 377.02f, -119.10f, 409.81f);
|
|
||||||
me->SummonCreature(NPC_FREYA_BEACON, 377.02f, 54.78f, 409.81f);
|
|
||||||
me->SummonCreature(NPC_FREYA_BEACON, 185.62f, 54.78f, 409.81f);
|
|
||||||
me->SummonCreature(NPC_FREYA_BEACON, 185.62f, -119.10f, 409.81f);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DoAction(int32 const action)
|
void DoAction(int32 const action)
|
||||||
{
|
{
|
||||||
// Start encounter
|
if (action && action <= 4) // Tower destruction, debuff leviathan loot and reduce active tower count
|
||||||
if (action == 10)
|
|
||||||
{
|
{
|
||||||
if (!me->isDead())
|
if (me->HasLootMode(LOOT_MODE_DEFAULT | LOOT_MODE_HARD_MODE_1 | LOOT_MODE_HARD_MODE_2 | LOOT_MODE_HARD_MODE_3 | LOOT_MODE_HARD_MODE_4) && ActiveTowersCount == 4)
|
||||||
{
|
|
||||||
me->SetHomePosition(Center->GetPositionX(), Center->GetPositionY(), Center->GetPositionZ(), 0);
|
|
||||||
me->GetMotionMaster()->MoveCharge(Center->GetPositionX(), Center->GetPositionY(), Center->GetPositionZ()); //position center
|
|
||||||
me->SetReactState(REACT_AGGRESSIVE);
|
|
||||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (action && action <= 4) // Tower destruction, debuff leviathan loot and reduce active tower
|
|
||||||
{
|
|
||||||
if (me->HasLootMode(31) && ActiveTowersCount == 4)
|
|
||||||
{
|
{
|
||||||
me->RemoveLootMode(LOOT_MODE_HARD_MODE_4);
|
me->RemoveLootMode(LOOT_MODE_HARD_MODE_4);
|
||||||
--ActiveTowersCount;
|
--ActiveTowersCount;
|
||||||
}
|
}
|
||||||
if (me->HasLootMode(15) && ActiveTowersCount == 3)
|
if (me->HasLootMode(LOOT_MODE_DEFAULT | LOOT_MODE_HARD_MODE_1 | LOOT_MODE_HARD_MODE_2 | LOOT_MODE_HARD_MODE_3) && ActiveTowersCount == 3)
|
||||||
{
|
{
|
||||||
me->RemoveLootMode(LOOT_MODE_HARD_MODE_3);
|
me->RemoveLootMode(LOOT_MODE_HARD_MODE_3);
|
||||||
--ActiveTowersCount;
|
--ActiveTowersCount;
|
||||||
}
|
}
|
||||||
if (me->HasLootMode(7) && ActiveTowersCount == 2)
|
if (me->HasLootMode(LOOT_MODE_DEFAULT | LOOT_MODE_HARD_MODE_1 | LOOT_MODE_HARD_MODE_2) && ActiveTowersCount == 2)
|
||||||
{
|
{
|
||||||
me->RemoveLootMode(LOOT_MODE_HARD_MODE_2);
|
me->RemoveLootMode(LOOT_MODE_HARD_MODE_2);
|
||||||
--ActiveTowersCount;
|
--ActiveTowersCount;
|
||||||
}
|
}
|
||||||
if (me->HasLootMode(3) && ActiveTowersCount == 1)
|
if (me->HasLootMode(LOOT_MODE_DEFAULT | LOOT_MODE_HARD_MODE_1) && ActiveTowersCount == 1)
|
||||||
{
|
{
|
||||||
me->RemoveLootMode(LOOT_MODE_HARD_MODE_1);
|
me->RemoveLootMode(LOOT_MODE_HARD_MODE_1);
|
||||||
--ActiveTowersCount;
|
--ActiveTowersCount;
|
||||||
@@ -517,25 +511,35 @@ class boss_flame_leviathan : public CreatureScript
|
|||||||
|
|
||||||
switch (action)
|
switch (action)
|
||||||
{
|
{
|
||||||
case 0: // Activate hard-mode setting counter to 4 towers, enable all towers apply buffs on levithian
|
case ACTION_TOWER_OF_STORM_DESTROYED:
|
||||||
|
towerOfStorms = false;
|
||||||
|
break;
|
||||||
|
case ACTION_TOWER_OF_FROST_DESTROYED:
|
||||||
|
towerOfFrost = false;
|
||||||
|
break;
|
||||||
|
case ACTION_TOWER_OF_FLAMES_DESTROYED:
|
||||||
|
towerOfFlames = false;
|
||||||
|
break;
|
||||||
|
case ACTION_TOWER_OF_LIFE_DESTROYED:
|
||||||
|
towerOfLife = false;
|
||||||
|
break;
|
||||||
|
case ACTION_START_HARD_MODE: // Activate hard-mode enable all towers, apply buffs on leviathan
|
||||||
ActiveTowers = true;
|
ActiveTowers = true;
|
||||||
towerOfStorms = true;
|
towerOfStorms = true;
|
||||||
towerOfLife = true;
|
towerOfLife = true;
|
||||||
towerOfFlames = true;
|
towerOfFlames = true;
|
||||||
towerOfFrost = true;
|
towerOfFrost = true;
|
||||||
me->SetLootMode(31);
|
me->SetLootMode(LOOT_MODE_DEFAULT | LOOT_MODE_HARD_MODE_1 | LOOT_MODE_HARD_MODE_2 | LOOT_MODE_HARD_MODE_3 | LOOT_MODE_HARD_MODE_4);
|
||||||
break;
|
break;
|
||||||
case ACTION_TOWER_OF_STORM_DESTROYED: // Tower of Storms destroyed
|
case ACTION_MOVE_TO_CENTER_POSITION: // Triggered by 2 Collossus near door
|
||||||
towerOfStorms = false;
|
if (!me->isDead())
|
||||||
break;
|
{
|
||||||
case ACTION_TOWER_OF_FROST_DESTROYED: // Tower of Frost destroyed
|
me->SetHomePosition(Center->GetPositionX(), Center->GetPositionY(), Center->GetPositionZ(), 0);
|
||||||
towerOfFrost = false;
|
me->GetMotionMaster()->MoveCharge(Center->GetPositionX(), Center->GetPositionY(), Center->GetPositionZ()); //position center
|
||||||
break;
|
me->SetReactState(REACT_AGGRESSIVE);
|
||||||
case ACTION_TOWER_OF_FLAMES_DESTROYED: // Tower of Flames destroyed
|
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_STUNNED);
|
||||||
towerOfFlames = false;
|
return;
|
||||||
break;
|
}
|
||||||
case ACTION_TOWER_OF_LIFE_DESTROYED: // Tower of Nature destroyed
|
|
||||||
towerOfLife = false;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -628,7 +632,7 @@ class boss_flame_leviathan_defense_cannon : public CreatureScript
|
|||||||
|
|
||||||
void Reset ()
|
void Reset ()
|
||||||
{
|
{
|
||||||
NapalmTimer = 5000;
|
NapalmTimer = 5*IN_MILLISECONDS;
|
||||||
DoCast(me, AURA_STEALTH_DETECTION);
|
DoCast(me, AURA_STEALTH_DETECTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -833,7 +837,7 @@ class npc_pool_of_tar : public CreatureScript
|
|||||||
{
|
{
|
||||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
me->SetReactState(REACT_PASSIVE);
|
me->SetReactState(REACT_PASSIVE);
|
||||||
me->AddAura(SPELL_TAR_PASSIVE, me);
|
me->CastSpell(me, SPELL_TAR_PASSIVE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DamageTaken(Unit* /*who*/, uint32& damage)
|
void DamageTaken(Unit* /*who*/, uint32& damage)
|
||||||
@@ -873,7 +877,7 @@ class npc_colossus : public CreatureScript
|
|||||||
void JustDied(Unit* /*Who*/)
|
void JustDied(Unit* /*Who*/)
|
||||||
{
|
{
|
||||||
if (me->GetHomePosition().IsInDist(Center, 50.f))
|
if (me->GetHomePosition().IsInDist(Center, 50.f))
|
||||||
instance->SetData(TYPE_COLOSSUS, instance->GetData(TYPE_COLOSSUS)+1);
|
instance->SetData(DATA_COLOSSUS, instance->GetData(DATA_COLOSSUS)+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 const /*diff*/)
|
void UpdateAI(uint32 const /*diff*/)
|
||||||
@@ -901,7 +905,7 @@ class npc_thorims_hammer : public CreatureScript
|
|||||||
npc_thorims_hammerAI(Creature* creature) : ScriptedAI(creature)
|
npc_thorims_hammerAI(Creature* creature) : ScriptedAI(creature)
|
||||||
{
|
{
|
||||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
me->AddAura(AURA_DUMMY_BLUE, me);
|
me->CastSpell(me, AURA_DUMMY_BLUE, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who)
|
void MoveInLineOfSight(Unit* who)
|
||||||
@@ -916,7 +920,7 @@ class npc_thorims_hammer : public CreatureScript
|
|||||||
void UpdateAI(uint32 const /*diff*/)
|
void UpdateAI(uint32 const /*diff*/)
|
||||||
{
|
{
|
||||||
if (!me->HasAura(AURA_DUMMY_BLUE))
|
if (!me->HasAura(AURA_DUMMY_BLUE))
|
||||||
me->AddAura(AURA_DUMMY_BLUE, me);
|
me->CastSpell(me, AURA_DUMMY_BLUE, true);
|
||||||
|
|
||||||
UpdateVictim();
|
UpdateVictim();
|
||||||
}
|
}
|
||||||
@@ -943,7 +947,7 @@ public:
|
|||||||
npc_mimirons_infernoAI(Creature* creature) : npc_escortAI(creature)
|
npc_mimirons_infernoAI(Creature* creature) : npc_escortAI(creature)
|
||||||
{
|
{
|
||||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||||
me->AddAura(AURA_DUMMY_YELLOW, me);
|
me->CastSpell(me, AURA_DUMMY_YELLOW, true);
|
||||||
me->SetReactState(REACT_PASSIVE);
|
me->SetReactState(REACT_PASSIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -978,7 +982,7 @@ public:
|
|||||||
infernoTimer -= diff;
|
infernoTimer -= diff;
|
||||||
|
|
||||||
if (!me->HasAura(AURA_DUMMY_YELLOW))
|
if (!me->HasAura(AURA_DUMMY_YELLOW))
|
||||||
me->AddAura(AURA_DUMMY_YELLOW, me);
|
me->CastSpell(me, AURA_DUMMY_YELLOW, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -995,7 +999,7 @@ class npc_hodirs_fury : public CreatureScript
|
|||||||
npc_hodirs_furyAI(Creature* creature) : ScriptedAI(creature)
|
npc_hodirs_furyAI(Creature* creature) : ScriptedAI(creature)
|
||||||
{
|
{
|
||||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
me->AddAura(AURA_DUMMY_GREEN, me);
|
me->CastSpell(me, AURA_DUMMY_GREEN, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who)
|
void MoveInLineOfSight(Unit* who)
|
||||||
@@ -1010,7 +1014,7 @@ class npc_hodirs_fury : public CreatureScript
|
|||||||
void UpdateAI(uint32 const /*diff*/)
|
void UpdateAI(uint32 const /*diff*/)
|
||||||
{
|
{
|
||||||
if (!me->HasAura(AURA_DUMMY_GREEN))
|
if (!me->HasAura(AURA_DUMMY_GREEN))
|
||||||
me->AddAura(AURA_DUMMY_GREEN, me);
|
me->CastSpell(me, AURA_DUMMY_GREEN, true);
|
||||||
|
|
||||||
UpdateVictim();
|
UpdateVictim();
|
||||||
}
|
}
|
||||||
@@ -1031,7 +1035,7 @@ class npc_freyas_ward : public CreatureScript
|
|||||||
{
|
{
|
||||||
npc_freyas_wardAI(Creature* creature) : ScriptedAI(creature)
|
npc_freyas_wardAI(Creature* creature) : ScriptedAI(creature)
|
||||||
{
|
{
|
||||||
me->AddAura(AURA_DUMMY_GREEN, me);
|
me->CastSpell(me, AURA_DUMMY_GREEN, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 summonTimer;
|
uint32 summonTimer;
|
||||||
@@ -1053,7 +1057,7 @@ class npc_freyas_ward : public CreatureScript
|
|||||||
summonTimer -= diff;
|
summonTimer -= diff;
|
||||||
|
|
||||||
if (!me->HasAura(AURA_DUMMY_GREEN))
|
if (!me->HasAura(AURA_DUMMY_GREEN))
|
||||||
me->AddAura(AURA_DUMMY_GREEN, me);
|
me->CastSpell(me, AURA_DUMMY_GREEN, true);
|
||||||
|
|
||||||
UpdateVictim();
|
UpdateVictim();
|
||||||
}
|
}
|
||||||
@@ -1110,6 +1114,7 @@ class npc_freya_ward_summon : public CreatureScript
|
|||||||
//npc lore keeper
|
//npc lore keeper
|
||||||
#define GOSSIP_ITEM_1 "Activate secondary defensive systems"
|
#define GOSSIP_ITEM_1 "Activate secondary defensive systems"
|
||||||
#define GOSSIP_ITEM_2 "Confirmed"
|
#define GOSSIP_ITEM_2 "Confirmed"
|
||||||
|
|
||||||
class npc_lorekeeper : public CreatureScript
|
class npc_lorekeeper : public CreatureScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -1124,7 +1129,7 @@ class npc_lorekeeper : public CreatureScript
|
|||||||
void DoAction(int32 const action)
|
void DoAction(int32 const action)
|
||||||
{
|
{
|
||||||
// Start encounter
|
// Start encounter
|
||||||
if (action == 0)
|
if (action == ACTION_SPAWN_VEHICLES)
|
||||||
{
|
{
|
||||||
for (int32 i = 0; i < RAID_MODE(2, 5); ++i)
|
for (int32 i = 0; i < RAID_MODE(2, 5); ++i)
|
||||||
DoSummon(VEHICLE_SIEGE, PosSiege[i], 3000, TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
DoSummon(VEHICLE_SIEGE, PosSiege[i], 3000, TEMPSUMMON_CORPSE_TIMED_DESPAWN);
|
||||||
@@ -1162,9 +1167,9 @@ class npc_lorekeeper : public CreatureScript
|
|||||||
|
|
||||||
if (Creature* leviathan = instance->instance->GetCreature(instance->GetData64(BOSS_LEVIATHAN)))
|
if (Creature* leviathan = instance->instance->GetCreature(instance->GetData64(BOSS_LEVIATHAN)))
|
||||||
{
|
{
|
||||||
CAST_AI(boss_flame_leviathan::boss_flame_leviathanAI, (leviathan->AI()))->DoAction(0); //enable hard mode activating the 4 additional events spawning additional vehicles
|
leviathan->AI()->DoAction(ACTION_START_HARD_MODE);
|
||||||
creature->SetVisible(false);
|
creature->SetVisible(false);
|
||||||
creature->AI()->DoAction(0); // spawn the vehicles
|
creature->AI()->DoAction(ACTION_SPAWN_VEHICLES); // spawn the vehicles
|
||||||
if (Creature* Delorah = creature->FindNearestCreature(NPC_DELORAH, 1000, true))
|
if (Creature* Delorah = creature->FindNearestCreature(NPC_DELORAH, 1000, true))
|
||||||
{
|
{
|
||||||
if (Creature* Branz = creature->FindNearestCreature(NPC_BRANZ_BRONZBEARD, 1000, true))
|
if (Creature* Branz = creature->FindNearestCreature(NPC_BRANZ_BRONZBEARD, 1000, true))
|
||||||
|
|||||||
@@ -390,23 +390,20 @@ class instance_ulduar : public InstanceMapScript
|
|||||||
switch (eventId)
|
switch (eventId)
|
||||||
{
|
{
|
||||||
case EVENT_TOWER_OF_STORM_DESTROYED:
|
case EVENT_TOWER_OF_STORM_DESTROYED:
|
||||||
FlameLeviathan->AI()->DoAction(1);
|
FlameLeviathan->AI()->DoAction(ACTION_TOWER_OF_STORM_DESTROYED);
|
||||||
break;
|
break;
|
||||||
case EVENT_TOWER_OF_FROST_DESTROYED:
|
case EVENT_TOWER_OF_FROST_DESTROYED:
|
||||||
FlameLeviathan->AI()->DoAction(2);
|
FlameLeviathan->AI()->DoAction(ACTION_TOWER_OF_FROST_DESTROYED);
|
||||||
break;
|
break;
|
||||||
case EVENT_TOWER_OF_FLAMES_DESTROYED:
|
case EVENT_TOWER_OF_FLAMES_DESTROYED:
|
||||||
FlameLeviathan->AI()->DoAction(3);
|
FlameLeviathan->AI()->DoAction(ACTION_TOWER_OF_FLAMES_DESTROYED);
|
||||||
break;
|
break;
|
||||||
case EVENT_TOWER_OF_LIFE_DESTROYED:
|
case EVENT_TOWER_OF_LIFE_DESTROYED:
|
||||||
FlameLeviathan->AI()->DoAction(4);
|
FlameLeviathan->AI()->DoAction(ACTION_TOWER_OF_LIFE_DESTROYED);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProcessEvent(Unit* /*unit*/, uint32 /*eventId*/)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SetBossState(uint32 type, EncounterState state)
|
bool SetBossState(uint32 type, EncounterState state)
|
||||||
{
|
{
|
||||||
@@ -475,12 +472,12 @@ class instance_ulduar : public InstanceMapScript
|
|||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case TYPE_COLOSSUS:
|
case DATA_COLOSSUS:
|
||||||
Encounter[TYPE_COLOSSUS] = data;
|
Encounter[DATA_COLOSSUS] = data;
|
||||||
if (data == 2)
|
if (data == 2)
|
||||||
{
|
{
|
||||||
if (Creature* Leviathan = instance->GetCreature(LeviathanGUID))
|
if (Creature* Leviathan = instance->GetCreature(LeviathanGUID))
|
||||||
Leviathan->AI()->DoAction(10);
|
Leviathan->AI()->DoAction(ACTION_MOVE_TO_CENTER_POSITION);
|
||||||
if (GameObject* gameObject = instance->GetGameObject(LeviathanGateGUID))
|
if (GameObject* gameObject = instance->GetGameObject(LeviathanGateGUID))
|
||||||
gameObject->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
gameObject->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||||
SaveToDB();
|
SaveToDB();
|
||||||
@@ -591,7 +588,7 @@ class instance_ulduar : public InstanceMapScript
|
|||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case TYPE_COLOSSUS:
|
case DATA_COLOSSUS:
|
||||||
return Encounter[type];
|
return Encounter[type];
|
||||||
case DATA_HODIR_RARE_CACHE:
|
case DATA_HODIR_RARE_CACHE:
|
||||||
return HodirRareCacheData;
|
return HodirRareCacheData;
|
||||||
@@ -607,7 +604,7 @@ class instance_ulduar : public InstanceMapScript
|
|||||||
OUT_SAVE_INST_DATA;
|
OUT_SAVE_INST_DATA;
|
||||||
|
|
||||||
std::ostringstream saveStream;
|
std::ostringstream saveStream;
|
||||||
saveStream << "U U " << GetBossSaveData() << GetData(TYPE_COLOSSUS);
|
saveStream << "U U " << GetBossSaveData() << GetData(DATA_COLOSSUS);
|
||||||
|
|
||||||
OUT_SAVE_INST_DATA_COMPLETE;
|
OUT_SAVE_INST_DATA_COMPLETE;
|
||||||
return saveStream.str();
|
return saveStream.str();
|
||||||
@@ -637,7 +634,7 @@ class instance_ulduar : public InstanceMapScript
|
|||||||
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
|
||||||
tmpState = NOT_STARTED;
|
tmpState = NOT_STARTED;
|
||||||
|
|
||||||
if (i == TYPE_COLOSSUS)
|
if (i == DATA_COLOSSUS)
|
||||||
SetData(i, tmpState);
|
SetData(i, tmpState);
|
||||||
else
|
else
|
||||||
SetBossState(i, EncounterState(tmpState));
|
SetBossState(i, EncounterState(tmpState));
|
||||||
|
|||||||
@@ -45,24 +45,6 @@ enum UlduarBosses
|
|||||||
BOSS_VEZAX = 17,
|
BOSS_VEZAX = 17,
|
||||||
BOSS_YOGGSARON = 18,
|
BOSS_YOGGSARON = 18,
|
||||||
BOSS_ALGALON = 19,
|
BOSS_ALGALON = 19,
|
||||||
TYPE_COLOSSUS = 20,
|
|
||||||
|
|
||||||
// Razorscale
|
|
||||||
DATA_EXPEDITION_COMMANDER,
|
|
||||||
DATA_RAZORSCALE_CONTROL,
|
|
||||||
|
|
||||||
// XT-002
|
|
||||||
DATA_TOY_PILE_0,
|
|
||||||
DATA_TOY_PILE_1,
|
|
||||||
DATA_TOY_PILE_2,
|
|
||||||
DATA_TOY_PILE_3,
|
|
||||||
|
|
||||||
// Kologarn
|
|
||||||
DATA_LEFT_ARM,
|
|
||||||
DATA_RIGHT_ARM,
|
|
||||||
|
|
||||||
// Hodir
|
|
||||||
DATA_HODIR_RARE_CACHE,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum UlduarNPCs
|
enum UlduarNPCs
|
||||||
@@ -161,12 +143,17 @@ enum UlduarGameObjects
|
|||||||
GO_ARCHIVUM_DOOR = 194556,
|
GO_ARCHIVUM_DOOR = 194556,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum UlduarTowerEvents
|
enum LeviathanData
|
||||||
{
|
{
|
||||||
EVENT_TOWER_OF_STORM_DESTROYED = 21031,
|
EVENT_TOWER_OF_STORM_DESTROYED = 21031,
|
||||||
EVENT_TOWER_OF_FROST_DESTROYED = 21032,
|
EVENT_TOWER_OF_FROST_DESTROYED = 21032,
|
||||||
EVENT_TOWER_OF_FLAMES_DESTROYED = 21033,
|
EVENT_TOWER_OF_FLAMES_DESTROYED = 21033,
|
||||||
EVENT_TOWER_OF_LIFE_DESTROYED = 21030,
|
EVENT_TOWER_OF_LIFE_DESTROYED = 21030,
|
||||||
|
ACTION_TOWER_OF_STORM_DESTROYED = 1,
|
||||||
|
ACTION_TOWER_OF_FROST_DESTROYED = 2,
|
||||||
|
ACTION_TOWER_OF_FLAMES_DESTROYED = 3,
|
||||||
|
ACTION_TOWER_OF_LIFE_DESTROYED = 4,
|
||||||
|
ACTION_MOVE_TO_CENTER_POSITION = 10,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum UlduarAchievementCriteriaIds
|
enum UlduarAchievementCriteriaIds
|
||||||
@@ -175,6 +162,29 @@ enum UlduarAchievementCriteriaIds
|
|||||||
CRITERIA_DISARMED = 21687,
|
CRITERIA_DISARMED = 21687,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum UlduarData
|
||||||
|
{
|
||||||
|
// Collosus (Leviathan)
|
||||||
|
DATA_COLOSSUS = 20,
|
||||||
|
|
||||||
|
// Razorscale
|
||||||
|
DATA_EXPEDITION_COMMANDER,
|
||||||
|
DATA_RAZORSCALE_CONTROL,
|
||||||
|
|
||||||
|
// XT-002
|
||||||
|
DATA_TOY_PILE_0,
|
||||||
|
DATA_TOY_PILE_1,
|
||||||
|
DATA_TOY_PILE_2,
|
||||||
|
DATA_TOY_PILE_3,
|
||||||
|
|
||||||
|
// Kologarn
|
||||||
|
DATA_LEFT_ARM,
|
||||||
|
DATA_RIGHT_ARM,
|
||||||
|
|
||||||
|
// Hodir
|
||||||
|
DATA_HODIR_RARE_CACHE,
|
||||||
|
};
|
||||||
|
|
||||||
template<class AI>
|
template<class AI>
|
||||||
CreatureAI* GetUlduarAI(Creature* creature)
|
CreatureAI* GetUlduarAI(Creature* creature)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class ulduar_teleporter : public GameObjectScript
|
|||||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Expedition Base Camp", GOSSIP_SENDER_MAIN, BASE_CAMP);
|
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Expedition Base Camp", GOSSIP_SENDER_MAIN, BASE_CAMP);
|
||||||
if (InstanceScript* instance = gameObject->GetInstanceScript())
|
if (InstanceScript* instance = gameObject->GetInstanceScript())
|
||||||
{
|
{
|
||||||
if (instance->GetData(TYPE_COLOSSUS) == 2) //count of 2 collossus death
|
if (instance->GetData(DATA_COLOSSUS) == 2) //count of 2 collossus death
|
||||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Formation Grounds", GOSSIP_SENDER_MAIN, GROUNDS);
|
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Formation Grounds", GOSSIP_SENDER_MAIN, GROUNDS);
|
||||||
if (instance->GetBossState(BOSS_LEVIATHAN) == DONE)
|
if (instance->GetBossState(BOSS_LEVIATHAN) == DONE)
|
||||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Colossal Forge", GOSSIP_SENDER_MAIN, FORGE);
|
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Colossal Forge", GOSSIP_SENDER_MAIN, FORGE);
|
||||||
|
|||||||
Reference in New Issue
Block a user