Scripts/ToC: Trial of the Crusader rewrite

Closes #8272
Closes #7013
Closes #7552
Closes #5561
Closes #4221
Closes #2701
Closes #2079
Closes #5082
Closes #6503
Closes #6784

Signed-off-by: Nay <dnpd.dd@gmail.com>
This commit is contained in:
tibbi
2012-11-19 00:42:25 +00:00
committed by Nay
parent aea5fec30d
commit 1f9db80b69
10 changed files with 4881 additions and 4033 deletions

View File

@@ -0,0 +1,151 @@
-- Trial of the Crusader Death knight Death grip scriptname
DELETE FROM `spell_script_names` WHERE `spell_id` IN (66017, 68753, 68754, 68755);
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(66017, 'spell_faction_champion_death_grip'),
(68753, 'spell_faction_champion_death_grip'),
(68754, 'spell_faction_champion_death_grip'),
(68755, 'spell_faction_champion_death_grip');
-- Trial of the Crusader shaman heroism/bloodlust
DELETE FROM `spell_script_names` WHERE `spell_id` IN (65983, 65980);
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(65983, 'spell_toc_heroism'),
(65980, 'spell_toc_bloodlust');
-- impale scriptname
DELETE FROM `spell_script_names` WHERE `spell_id`=65919;
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(65919, 'spell_impale');
-- firebomb scriptname and modelid (ToC Gormok encounter)
UPDATE `creature_template` SET `ScriptName`="npc_firebomb" WHERE `entry`=34854;
-- frost sphere corrections
UPDATE `creature_template` SET `minlevel`=80, `InhabitType`=4, `RegenHealth`=0 WHERE `entry` IN (34606, 34649);
-- Dark / Light essence removing
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (-67222, -67223, -67224, -65686, -67176, -67177, -67178, -65684);
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
(-67222, -67511, 0, 'Light Essence 25M'),
(-67223, -67512, 0, 'Light Essence 10M H'),
(-67224, -67513, 0, 'Light Essence 25M H'),
(-65686, -65811, 0, 'Light Essence 10M'),
(-67176, -67179, 0, 'Dark Essence 25M'),
(-67177, -67180, 0, 'Dark Essence 10M H'),
(-67178, -67181, 0, 'Dark Essence 25M H'),
(-65684, -65827, 0, 'Dark Essence 10M');
-- Gormoks Fire Bomb scriptname
DELETE FROM `spell_script_names` WHERE `spell_id`=66313;
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(66313, 'spell_gormok_fire_bomb');
-- correcting hitbox of Anub'Arak
UPDATE `creature_model_info` SET `bounding_radius`=1.085, `combat_reach`=10.5 WHERE `modelid`=29268;
-- correcting hitbox of Acidmaw
UPDATE `creature_model_info` SET `bounding_radius`=1.24, `combat_reach`=12 WHERE `modelid`=29815;
-- spawn the Anub'arak gate in all versions of the instance
UPDATE `gameobject` SET `spawnMask`=15 WHERE `guid`=151192;
-- adding ToC boss immunities
UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask` | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096 | 8192 | 65536 | 131072 | 524288 | 4194304 | 8388608 | 67108864 | 536870912
WHERE `entry` IN (34796, 35438, 35439, 35440, 34799, 35514, 35515, 35516, 35144, 35511, 35512, 35513, 34797, 35447, 35448, 35449, 34780, 35216, 35268, 35269, 36066, 35347, 35348, 35349, 34497, 35350, 35351, 35352, 34564, 34566, 35615, 35616);
-- adding Teleport locations to Trial of the Crusader/champion for GMs
DELETE FROM `game_tele` WHERE `name` LIKE '%TrialOfTheCrusader%' OR `name` LIKE '%TrialOfTheChampion%';
INSERT INTO `game_tele` (`position_x`, `position_y`, `position_z`, `orientation`, `map`, `name`) VALUES
(8515.63, 714.174, 558.248, 1.57298, 571, 'TrialOfTheCrusader'),
(8588.42, 791.888, 558.236, 3.23819, 571, 'TrialOfTheChampion');
-- misc fixes for higher boss brackets
UPDATE `creature_template` SET `dmg_multiplier`=70 WHERE `entry` IN (35440, 35513, 35516, 35449, 35269, 35352, 35349, 35616, 35664, 35670, 35673, 35676, 35682, 35685, 35688, 35691, 35694, 35697, 35701, 35704, 35707, 35710, 35713, 35716, 35720, 35723, 35726, 35730, 35733, 35736, 35739, 35742, 35745, 35748, 35749);
UPDATE `creature_template` SET `flags_extra`=`flags_extra` | 1 WHERE `entry` IN (35438, 35439, 35440, 35511, 35512, 35513, 35514, 35515, 35516, 35662, 35663, 35664, 35665, 35666, 35667, 35668, 35669, 35670, 35671, 35672, 35673, 35674, 35675, 35676, 35680, 35681, 35682, 35683, 35684, 35685, 35686, 35687, 35688, 35689, 35690, 35691, 35692, 35693, 35694, 35695, 35696, 35697, 35699, 35700, 35701, 35702, 35703, 35704, 35705, 35706, 35707, 35708, 35709, 35710, 35711, 35712, 35713, 35714, 35715, 35716, 35718, 35719, 35720, 35721, 35722, 35723, 35724, 35725, 35726, 35728, 35729, 35730, 35731, 35732, 35733, 35734, 35735, 35736, 35737, 35738, 35739, 35740, 35741, 35742, 35743, 35744, 35745, 35746, 35747, 35748, 34442, 34443, 35749);
UPDATE `creature_template` SET `speed_walk`=2.8, `speed_run`=1.71429 WHERE `entry` IN (35350, 35351, 35352, 35347, 35348, 35349);
UPDATE `creature_template` SET `speed_walk`=2, `speed_run`=1.14286 WHERE `entry` IN (34566, 35615, 35616);
UPDATE `creature_template` SET `skinloot`=34797 WHERE `entry` IN (35447, 35448, 35449);
UPDATE `creature_template` SET `skinloot`=70214 WHERE `entry` IN (34566, 35615, 35616);
UPDATE `creature_template` SET `mindmg`=388, `maxdmg`=583, `attackpower`=146 WHERE `entry` IN (35711, 35712, 35713);
UPDATE `creature_template` SET `mindmg`=468, `maxdmg`=702, `attackpower`=175 WHERE `entry` IN (35699, 35700, 35701);
UPDATE `creature_template` SET `dmg_multiplier`=35 WHERE `entry` IN (34472, 34454);
UPDATE `creature_template` SET `unit_class`=1 WHERE `entry` IN (34461, 35743, 35744, 35745);
-- adding Jaraxxus add immunities
UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask` | 1024 | 2048 WHERE `entry` IN (34815, 35262, 35263, 35264, 34826, 35270, 35271, 35272);
UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask` | 262144 WHERE `entry` IN (35263, 35264);
-- adding Nether portal and Infernal volcano immunities to knockout/grip
UPDATE `creature_template` SET `mechanic_immune_mask`=`mechanic_immune_mask` | 32 | 8192 WHERE `entry` IN (34825, 35278, 35279, 35280, 34813, 35265, 35266, 35267);
-- cast Forbearance together with Divine shield (ToC Faction Champions paladin)
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=66010;
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
(66010, 25771, 0, 'Divine Shield - Forbearance');
-- make all Diminishing returns rules apply in faction champions
UPDATE `creature_template` SET `flags_extra`=`flags_extra` | 1048576 WHERE `entry` IN
(34445,35705,35706,35707,
34459,35686,35687,35688,
34447,35683,35684,35685,
34455,35680,35681,35682,
34453,35718,35719,35720,
34458,35692,35693,35694,
34454,35711,35712,35713,
34448,35724,35725,35726,
34441,34442,34443,35749,
34450,35695,35696,35697,
35610,35774,35775,35776,
35465,36301,36302,36303,
34451,35671,35672,35673,
34449,35689,35690,35691,
34444,35740,35741,35742,
34456,35708,35709,35710,
34460,35702,35703,35704,
34461,35743,35744,35745,
34463,35734,35735,35736,
34465,35746,35747,35748,
34466,35665,35666,35667,
34467,35662,35663,35664,
34468,35721,35722,35723,
34469,35714,35715,35716,
34470,35728,35729,35730,
34473,35674,35675,35676,
34474,35731,35732,35733,
34475,35737,35738,35739,
34471,35668,35669,35670,
34472,35699,35700,35701);
-- correcting faction champions dmg multipliers
UPDATE `creature_template` SET `dmg_multiplier`=10.8 WHERE `entry` IN (34445,34459,34447,34455,34453,34458,34454,34448,34441,34450,35610,35465,34451,34449,34444,34456,34460,34461,34463,34465,34466,34467,34468,34469,34470,34473,34474,34475,34472, 34471);
UPDATE `creature_template` SET `dmg_multiplier`=16.1 WHERE `entry` IN (35705,35706,35686,35687,35683,35684,35680,35681,35718,35719,35692,35693,35711,35712,35724,35725,34442,34443,35695,35696,35774,35775,36301,36302,35671,35672,35689,35690,35740,35741,35708,35709,35702,35703,35743,35744,35734,35735,35746,35747,35665,35666,35662,35663,35721,35722,35714,35715,35728,35729,35674,35675,35731,35732,35737,35738,35699,35700, 35668, 35669);
UPDATE `creature_template` SET `dmg_multiplier`=21.5 WHERE `entry` IN (35707,35688,35685,35682,35720,35694,35713,35726,35749,35697,35776,36303,35673,35691,35742,35710,35704,35745,35736,35748,35667,35664,35723,35716,35730,35676,35733,35739,35701, 35670);
-- ToC warlock pet db corrections
UPDATE `creature_template` SET `minlevel`=80, `maxlevel`=80, `exp`=2, `faction_A`=16, `faction_H`=16, `mindmg`=417, `maxdmg`=582, `attackpower`=608, `unit_class`=2, `dynamicflags`=8, `minrangedmg`=341, `maxrangedmg`=506, `rangedattackpower`=80 WHERE `entry` IN (36301, 36302, 36303);
UPDATE `creature_template` SET `faction_A`=16, `faction_H`=16, `difficulty_entry_1`=36301, `difficulty_entry_2`=36302, `difficulty_entry_3`=36303 WHERE `entry`=35465;
UPDATE `creature_template` SET `name`="Zhaagrym (1)" WHERE `entry`=36301;
-- Jaraxxus Mistress Kiss
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_mistress_kiss_area';
INSERT INTO `spell_script_names` (spell_id, `ScriptName`) VALUES
(66336, 'spell_mistress_kiss_area'),
(67076, 'spell_mistress_kiss_area'),
(67077, 'spell_mistress_kiss_area'),
(67078, 'spell_mistress_kiss_area');
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_mistress_kiss';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(66334, 'spell_mistress_kiss'),
(67905, 'spell_mistress_kiss'),
(67906, 'spell_mistress_kiss'),
(67907, 'spell_mistress_kiss');
-- Gormoks Rising anger targeting
DELETE FROM `conditions` WHERE `SourceEntry`=66636;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `ConditionTypeOrReference`, `ConditionValue1`, `ConditionValue2`, `Comment`) VALUES
(13, 1, 66636, 31, 3, 34796, 'Rising Anger');
-- Twins loot correction
UPDATE `creature_loot_template` SET `maxcount`=1 WHERE `entry`=34497 AND `mincountOrRef` IN (-34296, -34302);
-- Anubarak loot correction
UPDATE `creature_loot_template` SET `maxcount`=2 WHERE `entry`=34564 AND `mincountOrRef` IN (-34298, -34304);

View File

@@ -81,6 +81,9 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto,
// Gnaw
else if (spellproto->Id == 47481)
return DIMINISHING_CONTROLLED_STUN;
// ToC Icehowl Arctic Breath
else if (spellproto->SpellVisual[0] == 14153)
return DIMINISHING_NONE;
break;
}
// Event spells

View File

@@ -16,20 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: trial_of_the_crusader
SD%Complete: ??%
SDComment: based on /dev/rsa
SDCategory: Crusader Coliseum
EndScriptData */
// Known bugs:
// Some visuals aren't appearing right sometimes
//
// TODO:
// Redone summon's scripts in SAI
// Add immunities to the boss and summons
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "trial_of_the_crusader.h"
@@ -47,15 +33,7 @@ enum Yells
SAY_INFERNAL_ERUPTION = 8,
SAY_KILL_PLAYER = 9,
SAY_DEATH = 10,
SAY_BERSERK = 11,
};
enum Equipment
{
EQUIP_MAIN = 47266,
EQUIP_OFFHAND = 46996,
EQUIP_RANGED = 47267,
EQUIP_DONE = EQUIP_NO_CHANGE,
SAY_BERSERK = 11
};
enum Summons
@@ -64,7 +42,7 @@ enum Summons
NPC_INFERNAL_VOLCANO = 34813,
NPC_FEL_INFERNAL = 34815, // immune to all CC on Heroic (stuns, banish, interrupt, etc)
NPC_NETHER_PORTAL = 34825,
NPC_MISTRESS_OF_PAIN = 34826,
NPC_MISTRESS_OF_PAIN = 34826
};
enum BossSpells
@@ -84,442 +62,530 @@ enum BossSpells
SPELL_BERSERK = 64238, // unused
// Mistress of Pain spells
SPELL_SHIVAN_SLASH = 67098,
SPELL_SPINNING_STRIKE = 66283,
SPELL_MISTRESS_KISS = 67077,
SPELL_FEL_INFERNO = 67047,
SPELL_FEL_STREAK = 66494,
SPELL_SHIVAN_SLASH = 67098,
SPELL_SPINNING_STRIKE = 66283,
SPELL_MISTRESS_KISS = 66336,
SPELL_FEL_INFERNO = 67047,
SPELL_FEL_STREAK = 66494,
SPELL_LORD_HITTIN = 66326, // special effect preventing more specific spells be cast on the same player within 10 seconds
SPELL_MISTRESS_KISS_DEBUFF = 66334,
SPELL_MISTRESS_KISS_DAMAGE_SILENCE = 66359
};
/*######
## boss_jaraxxus
######*/
enum Events
{
// Lord Jaraxxus
EVENT_FEL_FIREBALL = 1,
EVENT_FEL_LIGHTNING = 2,
EVENT_INCINERATE_FLESH = 3,
EVENT_NETHER_POWER = 4,
EVENT_LEGION_FLAME = 5,
EVENT_SUMMONO_NETHER_PORTAL = 6,
EVENT_SUMMON_INFERNAL_ERUPTION = 7,
// Mistress of Pain
EVENT_SHIVAN_SLASH = 8,
EVENT_SPINNING_STRIKE = 9,
EVENT_MISTRESS_KISS = 10
};
class boss_jaraxxus : public CreatureScript
{
public:
boss_jaraxxus() : CreatureScript("boss_jaraxxus") { }
public:
boss_jaraxxus() : CreatureScript("boss_jaraxxus") { }
CreatureAI* GetAI(Creature* creature) const
{
return new boss_jaraxxusAI(creature);
}
struct boss_jaraxxusAI : public ScriptedAI
{
boss_jaraxxusAI(Creature* creature) : ScriptedAI(creature), Summons(me)
struct boss_jaraxxusAI : public BossAI
{
instance = creature->GetInstanceScript();
Reset();
}
InstanceScript* instance;
SummonList Summons;
uint32 m_uiFelFireballTimer;
uint32 m_uiFelLightningTimer;
uint32 m_uiIncinerateFleshTimer;
uint32 m_uiNetherPowerTimer;
uint32 m_uiLegionFlameTimer;
uint32 m_uiSummonNetherPortalTimer;
uint32 m_uiSummonInfernalEruptionTimer;
void Reset()
{
if (instance)
instance->SetData(TYPE_JARAXXUS, NOT_STARTED);
SetEquipmentSlots(false, EQUIP_MAIN, EQUIP_OFFHAND, EQUIP_RANGED);
m_uiFelFireballTimer = 5*IN_MILLISECONDS;
m_uiFelLightningTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
m_uiIncinerateFleshTimer = urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS);
m_uiNetherPowerTimer = 40*IN_MILLISECONDS;
m_uiLegionFlameTimer = 30*IN_MILLISECONDS;
m_uiSummonNetherPortalTimer = 1*MINUTE*IN_MILLISECONDS;
m_uiSummonInfernalEruptionTimer = 2*MINUTE*IN_MILLISECONDS;
Summons.DespawnAll();
}
void JustReachedHome()
{
if (instance)
instance->SetData(TYPE_JARAXXUS, FAIL);
DoCast(me, SPELL_JARAXXUS_CHAINS);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetReactState(REACT_PASSIVE);
}
void KilledUnit(Unit* who)
{
if (who->GetTypeId() == TYPEID_PLAYER)
boss_jaraxxusAI(Creature* creature) : BossAI(creature, BOSS_JARAXXUS)
{
if (instance)
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
}
}
void JustDied(Unit* /*killer*/)
{
Summons.DespawnAll();
Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_JARAXXUS, DONE);
}
void JustSummoned(Creature* summoned)
{
Summons.Summon(summoned);
}
void EnterCombat(Unit* /*who*/)
{
me->SetInCombatWithZone();
if (instance)
instance->SetData(TYPE_JARAXXUS, IN_PROGRESS);
Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim())
return;
if (m_uiSummonInfernalEruptionTimer <= uiDiff)
void Reset()
{
Talk(EMOTE_INFERNAL_ERUPTION);
Talk(SAY_INFERNAL_ERUPTION);
DoCast(SPELL_INFERNAL_ERUPTION);
m_uiSummonInfernalEruptionTimer = 2*MINUTE*IN_MILLISECONDS;
} else m_uiSummonInfernalEruptionTimer -= uiDiff;
_Reset();
events.ScheduleEvent(EVENT_FEL_FIREBALL, 5*IN_MILLISECONDS);
events.ScheduleEvent(EVENT_FEL_LIGHTNING, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
events.ScheduleEvent(EVENT_INCINERATE_FLESH, urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS));
events.ScheduleEvent(EVENT_NETHER_POWER, 40*IN_MILLISECONDS);
events.ScheduleEvent(EVENT_LEGION_FLAME, 30*IN_MILLISECONDS);
events.ScheduleEvent(EVENT_SUMMONO_NETHER_PORTAL, 20*IN_MILLISECONDS);
events.ScheduleEvent(EVENT_SUMMON_INFERNAL_ERUPTION, 80*IN_MILLISECONDS);
}
if (m_uiSummonNetherPortalTimer <= uiDiff)
void JustReachedHome()
{
Talk(EMOTE_NETHER_PORTAL);
Talk(SAY_MISTRESS_OF_PAIN);
DoCast(SPELL_NETHER_PORTAL);
m_uiSummonNetherPortalTimer = 2*MINUTE*IN_MILLISECONDS;
} else m_uiSummonNetherPortalTimer -= uiDiff;
_JustReachedHome();
if (instance)
instance->SetBossState(BOSS_JARAXXUS, FAIL);
DoCast(me, SPELL_JARAXXUS_CHAINS);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
if (m_uiFelFireballTimer <= uiDiff)
void KilledUnit(Unit* who)
{
DoCastVictim(SPELL_FEL_FIREBALL);
m_uiFelFireballTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
} else m_uiFelFireballTimer -= uiDiff;
if (m_uiFelLightningTimer <= uiDiff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
DoCast(target, SPELL_FEL_LIGHTING);
m_uiFelLightningTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
} else m_uiFelLightningTimer -= uiDiff;
if (m_uiIncinerateFleshTimer <= uiDiff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true))
if (who->GetTypeId() == TYPEID_PLAYER)
{
Talk(EMOTE_INCINERATE, target->GetGUID());
Talk(SAY_INCINERATE);
DoCast(target, SPELL_INCINERATE_FLESH);
Talk(SAY_KILL_PLAYER);
if (instance)
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
}
m_uiIncinerateFleshTimer = urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS);
} else m_uiIncinerateFleshTimer -= uiDiff;
}
if (m_uiNetherPowerTimer <= uiDiff)
void JustDied(Unit* /*killer*/)
{
me->CastCustomSpell(SPELL_NETHER_POWER, SPELLVALUE_AURA_STACK, RAID_MODE<uint32>(5, 10, 5,10), me, true);
m_uiNetherPowerTimer = 40*IN_MILLISECONDS;
} else m_uiNetherPowerTimer -= uiDiff;
_JustDied();
Talk(SAY_DEATH);
}
if (m_uiLegionFlameTimer <= uiDiff)
void JustSummoned(Creature* summoned)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0, true))
summons.Summon(summoned);
}
void EnterCombat(Unit* /*who*/)
{
_EnterCombat();
Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
return;
events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = events.ExecuteEvent())
{
Talk(EMOTE_LEGION_FLAME, target->GetGUID());
DoCast(target, SPELL_LEGION_FLAME);
switch (eventId)
{
case EVENT_FEL_FIREBALL:
DoCastVictim(SPELL_FEL_FIREBALL);
events.ScheduleEvent(EVENT_FEL_FIREBALL, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
return;
case EVENT_FEL_LIGHTNING:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_LORD_HITTIN))
DoCast(target, SPELL_FEL_LIGHTING);
events.ScheduleEvent(EVENT_FEL_LIGHTNING, urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS));
return;
case EVENT_INCINERATE_FLESH:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_LORD_HITTIN))
{
Talk(EMOTE_INCINERATE, target->GetGUID());
Talk(SAY_INCINERATE);
DoCast(target, SPELL_INCINERATE_FLESH);
}
events.ScheduleEvent(EVENT_INCINERATE_FLESH, urand(20*IN_MILLISECONDS, 25*IN_MILLISECONDS));
return;
case EVENT_NETHER_POWER:
me->CastCustomSpell(SPELL_NETHER_POWER, SPELLVALUE_AURA_STACK, RAID_MODE<uint32>(5, 10, 5,10), me, true);
events.ScheduleEvent(EVENT_NETHER_POWER, 40*IN_MILLISECONDS);
return;
case EVENT_LEGION_FLAME:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_LORD_HITTIN))
{
Talk(EMOTE_LEGION_FLAME, target->GetGUID());
DoCast(target, SPELL_LEGION_FLAME);
}
events.ScheduleEvent(EVENT_LEGION_FLAME, 30*IN_MILLISECONDS);
return;
case EVENT_SUMMONO_NETHER_PORTAL:
Talk(EMOTE_NETHER_PORTAL);
Talk(SAY_MISTRESS_OF_PAIN);
DoCast(SPELL_NETHER_PORTAL);
events.ScheduleEvent(EVENT_SUMMONO_NETHER_PORTAL, 2*MINUTE*IN_MILLISECONDS);
return;
case EVENT_SUMMON_INFERNAL_ERUPTION:
Talk(EMOTE_INFERNAL_ERUPTION);
Talk(SAY_INFERNAL_ERUPTION);
DoCast(SPELL_INFERNAL_ERUPTION);
events.ScheduleEvent(EVENT_SUMMON_INFERNAL_ERUPTION, 2*MINUTE*IN_MILLISECONDS);
return;
}
}
m_uiLegionFlameTimer = 30*IN_MILLISECONDS;
} else m_uiLegionFlameTimer -= uiDiff;
DoMeleeAttackIfReady();
DoMeleeAttackIfReady();
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new boss_jaraxxusAI(creature);
}
};
};
class mob_legion_flame : public CreatureScript
{
public:
mob_legion_flame() : CreatureScript("mob_legion_flame") { }
public:
mob_legion_flame() : CreatureScript("mob_legion_flame") { }
CreatureAI* GetAI(Creature* creature) const
{
return new mob_legion_flameAI(creature);
}
struct mob_legion_flameAI : public Scripted_NoMovementAI
{
mob_legion_flameAI(Creature* creature) : Scripted_NoMovementAI(creature)
struct mob_legion_flameAI : public Scripted_NoMovementAI
{
Reset();
}
mob_legion_flameAI(Creature* creature) : Scripted_NoMovementAI(creature)
{
_instance = creature->GetInstanceScript();
}
void Reset()
void Reset()
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->SetInCombatWithZone();
DoCast(SPELL_LEGION_FLAME_EFFECT);
}
void UpdateAI(const uint32 /*diff*/)
{
UpdateVictim();
if (_instance && _instance->GetBossState(BOSS_JARAXXUS) != IN_PROGRESS)
me->DespawnOrUnsummon();
}
private:
InstanceScript* _instance;
};
CreatureAI* GetAI(Creature* creature) const
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->SetInCombatWithZone();
DoCast(SPELL_LEGION_FLAME_EFFECT);
return new mob_legion_flameAI(creature);
}
void UpdateAI(const uint32 /*uiDiff*/)
{
UpdateVictim();
}
};
};
class mob_infernal_volcano : public CreatureScript
{
public:
mob_infernal_volcano() : CreatureScript("mob_infernal_volcano") { }
public:
mob_infernal_volcano() : CreatureScript("mob_infernal_volcano") { }
CreatureAI* GetAI(Creature* creature) const
{
return new mob_infernal_volcanoAI(creature);
}
struct mob_infernal_volcanoAI : public Scripted_NoMovementAI
{
mob_infernal_volcanoAI(Creature* creature) : Scripted_NoMovementAI(creature), Summons(me)
struct mob_infernal_volcanoAI : public Scripted_NoMovementAI
{
instance = creature->GetInstanceScript();
Reset();
}
mob_infernal_volcanoAI(Creature* creature) : Scripted_NoMovementAI(creature), _summons(me)
{
}
InstanceScript* instance;
void Reset()
{
me->SetReactState(REACT_PASSIVE);
SummonList Summons;
if (!IsHeroic())
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
else
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
void Reset()
_summons.DespawnAll();
}
void IsSummonedBy(Unit* /*summoner*/)
{
DoCast(SPELL_INFERNAL_ERUPTION_EFFECT);
}
void JustSummoned(Creature* summoned)
{
_summons.Summon(summoned);
// makes immediate corpse despawn of summoned Felflame Infernals
summoned->SetCorpseDelay(0);
}
void JustDied(Unit* /*killer*/)
{
// used to despawn corpse immediately
me->DespawnOrUnsummon();
}
void UpdateAI(uint32 const /*diff*/) {}
private:
SummonList _summons;
};
CreatureAI* GetAI(Creature* creature) const
{
me->SetReactState(REACT_PASSIVE);
if (!IsHeroic())
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
else
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
Summons.DespawnAll();
return new mob_infernal_volcanoAI(creature);
}
void IsSummonedBy(Unit* /*summoner*/)
{
DoCast(SPELL_INFERNAL_ERUPTION_EFFECT);
}
void JustSummoned(Creature* summoned)
{
Summons.Summon(summoned);
// makes immediate corpse despawn of summoned Felflame Infernals
summoned->SetCorpseDelay(0);
}
void JustDied(Unit* /*killer*/)
{
// used to despawn corpse immediately
me->DespawnOrUnsummon();
}
void UpdateAI(uint32 const /*diff*/) {}
};
};
class mob_fel_infernal : public CreatureScript
{
public:
mob_fel_infernal() : CreatureScript("mob_fel_infernal") { }
public:
mob_fel_infernal() : CreatureScript("mob_fel_infernal") { }
CreatureAI* GetAI(Creature* creature) const
{
return new mob_fel_infernalAI(creature);
}
struct mob_fel_infernalAI : public ScriptedAI
{
mob_fel_infernalAI(Creature* creature) : ScriptedAI(creature)
struct mob_fel_infernalAI : public ScriptedAI
{
instance = creature->GetInstanceScript();
Reset();
}
InstanceScript* instance;
uint32 m_uiFelStreakTimer;
void Reset()
{
m_uiFelStreakTimer = 30*IN_MILLISECONDS;
me->SetInCombatWithZone();
}
/*void SpellHitTarget(Unit* target, const SpellInfo* pSpell)
{
if (pSpell->Id == SPELL_FEL_STREAK)
DoCastAOE(SPELL_FEL_INFERNO); //66517
}*/
void UpdateAI(const uint32 uiDiff)
{
if (!UpdateVictim())
return;
if (instance && instance->GetData(TYPE_JARAXXUS) != IN_PROGRESS)
me->DespawnOrUnsummon();
if (m_uiFelStreakTimer <= uiDiff)
mob_fel_infernalAI(Creature* creature) : ScriptedAI(creature)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
DoCast(target, SPELL_FEL_STREAK);
m_uiFelStreakTimer = 30*IN_MILLISECONDS;
} else m_uiFelStreakTimer -= uiDiff;
_instance = creature->GetInstanceScript();
}
DoMeleeAttackIfReady();
void Reset()
{
_felStreakTimer = 30*IN_MILLISECONDS;
me->SetInCombatWithZone();
}
void UpdateAI(const uint32 diff)
{
if (_instance && _instance->GetBossState(BOSS_JARAXXUS) != IN_PROGRESS)
{
me->DespawnOrUnsummon();
return;
}
if (!UpdateVictim())
return;
if (_felStreakTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
DoCast(target, SPELL_FEL_STREAK);
_felStreakTimer = 30*IN_MILLISECONDS;
}
else
_felStreakTimer -= diff;
DoMeleeAttackIfReady();
}
private:
uint32 _felStreakTimer;
InstanceScript* _instance;
};
CreatureAI* GetAI(Creature* creature) const
{
return new mob_fel_infernalAI(creature);
}
};
};
class mob_nether_portal : public CreatureScript
{
public:
mob_nether_portal() : CreatureScript("mob_nether_portal") { }
public:
mob_nether_portal() : CreatureScript("mob_nether_portal") { }
CreatureAI* GetAI(Creature* creature) const
{
return new mob_nether_portalAI(creature);
}
struct mob_nether_portalAI : public ScriptedAI
{
mob_nether_portalAI(Creature* creature) : ScriptedAI(creature), Summons(me)
struct mob_nether_portalAI : public ScriptedAI
{
instance = creature->GetInstanceScript();
Reset();
}
mob_nether_portalAI(Creature* creature) : ScriptedAI(creature), _summons(me)
{
}
InstanceScript* instance;
void Reset()
{
me->SetReactState(REACT_PASSIVE);
SummonList Summons;
if (!IsHeroic())
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
else
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
void Reset()
_summons.DespawnAll();
}
void IsSummonedBy(Unit* /*summoner*/)
{
DoCast(SPELL_NETHER_PORTAL_EFFECT);
}
void JustSummoned(Creature* summoned)
{
_summons.Summon(summoned);
// makes immediate corpse despawn of summoned Mistress of Pain
summoned->SetCorpseDelay(0);
}
void JustDied(Unit* /*killer*/)
{
// used to despawn corpse immediately
me->DespawnOrUnsummon();
}
void UpdateAI(uint32 const /*diff*/) {}
private:
SummonList _summons;
};
CreatureAI* GetAI(Creature* creature) const
{
me->SetReactState(REACT_PASSIVE);
if (!IsHeroic())
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
else
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
Summons.DespawnAll();
return new mob_nether_portalAI(creature);
}
void IsSummonedBy(Unit* /*summoner*/)
{
DoCast(SPELL_NETHER_PORTAL_EFFECT);
}
void JustSummoned(Creature* summoned)
{
Summons.Summon(summoned);
// makes immediate corpse despawn of summoned Mistress of Pain
summoned->SetCorpseDelay(0);
}
void JustDied(Unit* /*killer*/)
{
// used to despawn corpse immediately
me->DespawnOrUnsummon();
}
void UpdateAI(uint32 const /*diff*/) {}
};
};
class mob_mistress_of_pain : public CreatureScript
{
public:
mob_mistress_of_pain() : CreatureScript("mob_mistress_of_pain") { }
public:
mob_mistress_of_pain() : CreatureScript("mob_mistress_of_pain") { }
CreatureAI* GetAI(Creature* creature) const
{
return new mob_mistress_of_painAI(creature);
}
struct mob_mistress_of_painAI : public ScriptedAI
{
mob_mistress_of_painAI(Creature* creature) : ScriptedAI(creature)
struct mob_mistress_of_painAI : public ScriptedAI
{
instance = creature->GetInstanceScript();
if (instance)
instance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, INCREASE);
Reset();
}
InstanceScript* instance;
uint32 m_uiShivanSlashTimer;
uint32 m_uiSpinningStrikeTimer;
uint32 m_uiMistressKissTimer;
void Reset()
{
m_uiShivanSlashTimer = 30*IN_MILLISECONDS;
m_uiSpinningStrikeTimer = 30*IN_MILLISECONDS;
m_uiMistressKissTimer = 15*IN_MILLISECONDS;
me->SetInCombatWithZone();
}
void JustDied(Unit* /*killer*/)
{
if (instance)
instance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, DECREASE);
}
void UpdateAI(const uint32 uiDiff)
{
if (instance && instance->GetData(TYPE_JARAXXUS) != IN_PROGRESS)
mob_mistress_of_painAI(Creature* creature) : ScriptedAI(creature)
{
me->DespawnOrUnsummon();
return;
_instance = creature->GetInstanceScript();
if (_instance)
_instance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, INCREASE);
}
if (!UpdateVictim())
return;
if (m_uiShivanSlashTimer <= uiDiff)
void Reset()
{
DoCastVictim(SPELL_SHIVAN_SLASH);
m_uiShivanSlashTimer = 30*IN_MILLISECONDS;
} else m_uiShivanSlashTimer -= uiDiff;
_events.ScheduleEvent(EVENT_SHIVAN_SLASH, 30*IN_MILLISECONDS);
_events.ScheduleEvent(EVENT_SPINNING_STRIKE, 30*IN_MILLISECONDS);
if (IsHeroic())
_events.ScheduleEvent(EVENT_MISTRESS_KISS, 15*IN_MILLISECONDS);
me->SetInCombatWithZone();
}
if (m_uiSpinningStrikeTimer <= uiDiff)
void JustDied(Unit* /*killer*/)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
DoCast(target, SPELL_SPINNING_STRIKE);
m_uiSpinningStrikeTimer = 30*IN_MILLISECONDS;
} else m_uiSpinningStrikeTimer -= uiDiff;
if (_instance)
_instance->SetData(DATA_MISTRESS_OF_PAIN_COUNT, DECREASE);
}
if (IsHeroic() && m_uiMistressKissTimer <= uiDiff)
void UpdateAI(const uint32 diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
DoCast(target, SPELL_MISTRESS_KISS);
m_uiMistressKissTimer = 30*IN_MILLISECONDS;
} else m_uiMistressKissTimer -= uiDiff;
if (_instance && _instance->GetBossState(BOSS_JARAXXUS) != IN_PROGRESS)
{
me->DespawnOrUnsummon();
return;
}
DoMeleeAttackIfReady();
if (!UpdateVictim())
return;
_events.Update(diff);
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
while (uint32 eventId = _events.ExecuteEvent())
{
switch (eventId)
{
case EVENT_SHIVAN_SLASH:
DoCastVictim(SPELL_SHIVAN_SLASH);
_events.ScheduleEvent(EVENT_SHIVAN_SLASH, 30*IN_MILLISECONDS);
return;
case EVENT_SPINNING_STRIKE:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
DoCast(target, SPELL_SPINNING_STRIKE);
_events.ScheduleEvent(EVENT_SPINNING_STRIKE, 30*IN_MILLISECONDS);
return;
case EVENT_MISTRESS_KISS:
DoCast(me, SPELL_MISTRESS_KISS);
_events.ScheduleEvent(EVENT_MISTRESS_KISS, 30*IN_MILLISECONDS);
return;
default:
break;
}
}
DoMeleeAttackIfReady();
}
private:
InstanceScript* _instance;
EventMap _events;
};
CreatureAI* GetAI(Creature* creature) const
{
return new mob_mistress_of_painAI(creature);
}
};
};
class spell_mistress_kiss : public SpellScriptLoader
{
public:
spell_mistress_kiss() : SpellScriptLoader("spell_mistress_kiss") { }
class spell_mistress_kiss_AuraScript : public AuraScript
{
PrepareAuraScript(spell_mistress_kiss_AuraScript);
bool Load()
{
if (GetCaster())
if (sSpellMgr->GetSpellIdForDifficulty(SPELL_MISTRESS_KISS_DAMAGE_SILENCE, GetCaster()))
return true;
return false;
}
void HandleDummyTick(AuraEffect const* /*aurEff*/)
{
Unit* caster = GetCaster();
Unit* target = GetTarget();
if (caster && target)
{
if (target->HasUnitState(UNIT_STATE_CASTING))
{
caster->CastSpell(target, SPELL_MISTRESS_KISS_DAMAGE_SILENCE, true);
target->RemoveAurasDueToSpell(GetSpellInfo()->Id);
}
}
}
void Register()
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mistress_kiss_AuraScript::HandleDummyTick, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
}
};
AuraScript* GetAuraScript() const
{
return new spell_mistress_kiss_AuraScript();
}
};
class spell_mistress_kiss_area : public SpellScriptLoader
{
public:
spell_mistress_kiss_area() : SpellScriptLoader("spell_mistress_kiss_area") {}
class spell_mistress_kiss_area_SpellScript : public SpellScript
{
PrepareSpellScript(spell_mistress_kiss_area_SpellScript)
bool Load()
{
if (GetCaster())
if (sSpellMgr->GetSpellIdForDifficulty(SPELL_MISTRESS_KISS_DEBUFF, GetCaster()))
return true;
return false;
}
void HandleScript(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
Unit* target = GetHitUnit();
if (caster && target)
caster->CastSpell(target, SPELL_MISTRESS_KISS_DEBUFF, true);
}
void FilterTargets(std::list<WorldObject*>& targets)
{
// get a list of players with mana
std::list<WorldObject*> _targets;
for (std::list<WorldObject*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
if ((*itr)->ToUnit()->getPowerType() == POWER_MANA)
_targets.push_back(*itr);
// pick a random target and kiss him
if (WorldObject* _target = Trinity::Containers::SelectRandomContainerElement(_targets))
{
// correctly fill "targets" for the visual effect
targets.clear();
targets.push_back(_target);
if (Unit* caster = GetCaster())
caster->CastSpell(_target->ToUnit(), SPELL_MISTRESS_KISS_DEBUFF, true);
}
}
void Register()
{
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mistress_kiss_area_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
}
};
SpellScript* GetSpellScript() const
{
return new spell_mistress_kiss_area_SpellScript();
}
};
void AddSC_boss_jaraxxus()
@@ -530,4 +596,7 @@ void AddSC_boss_jaraxxus()
new mob_fel_infernal();
new mob_nether_portal();
new mob_mistress_of_pain();
new spell_mistress_kiss();
new spell_mistress_kiss_area();
}

View File

@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: trial_of_the_crusader
SD%Complete: ??%
SDComment: based on /dev/rsa
SDCategory: Crusader Coliseum
EndScriptData */
// Known bugs:
// - They should be floating but they aren't respecting the floor =(
// - Hardcoded bullets spawner
@@ -48,13 +41,13 @@ enum Yells
SAY_TWINK_PACT = 5,
SAY_KILL_PLAYER = 6,
SAY_BERSERK = 7,
SAY_DEATH = 8,
SAY_DEATH = 8
};
enum Equipment
{
EQUIP_MAIN_1 = 9423,
EQUIP_MAIN_2 = 37377,
EQUIP_MAIN_2 = 37377
};
enum Summons
@@ -62,7 +55,7 @@ enum Summons
NPC_BULLET_CONTROLLER = 34743,
NPC_BULLET_DARK = 34628,
NPC_BULLET_LIGHT = 34630,
NPC_BULLET_LIGHT = 34630
};
enum BossSpells
@@ -72,6 +65,7 @@ enum BossSpells
SPELL_LIGHT_SHIELD = 65858,
SPELL_LIGHT_TWIN_PACT = 65876,
SPELL_LIGHT_VORTEX = 66046,
SPELL_LIGHT_VORTEX_DAMAGE = 66048,
SPELL_LIGHT_TOUCH = 67297,
SPELL_LIGHT_ESSENCE = 65686,
SPELL_EMPOWERED_LIGHT = 65748,
@@ -83,17 +77,18 @@ enum BossSpells
SPELL_DARK_SHIELD = 65874,
SPELL_DARK_TWIN_PACT = 65875,
SPELL_DARK_VORTEX = 66058,
SPELL_DARK_VORTEX_DAMAGE = 66059,
SPELL_DARK_TOUCH = 67282,
SPELL_DARK_ESSENCE = 65684,
SPELL_EMPOWERED_DARK = 65724,
SPELL_TWIN_EMPATHY_DARK = 66132,
SPELL_UNLEASHED_DARK = 65808,
SPELL_CONTROLLER_PERIODIC = 66149,
SPELL_CONTROLLER_PERIODIC = 66149,
SPELL_POWER_TWINS = 65879,
SPELL_BERSERK = 64238,
SPELL_POWERING_UP = 67590,
SPELL_SURGE_OF_SPEED = 65828,
SPELL_SURGE_OF_SPEED = 65828
};
#define SPELL_DARK_ESSENCE_HELPER RAID_MODE<uint32>(65684, 67176, 67177, 67178)
@@ -106,13 +101,12 @@ enum BossSpells
enum Actions
{
ACTION_VORTEX,
ACTION_PACT
ACTION_VORTEX = 0,
ACTION_PACT = 1
};
/*######
## boss_twin_base
######*/
#define ESSENCE_REMOVE 0
#define ESSENCE_APPLY 1
class OrbsDespawner : public BasicEvent
{
@@ -145,61 +139,36 @@ class OrbsDespawner : public BasicEvent
Creature* _creature;
};
struct boss_twin_baseAI : public ScriptedAI
struct boss_twin_baseAI : public BossAI
{
boss_twin_baseAI(Creature* creature) : ScriptedAI(creature), Summons(me)
boss_twin_baseAI(Creature* creature) : BossAI(creature, BOSS_VALKIRIES)
{
instance = creature->GetInstanceScript();
}
InstanceScript* instance;
SummonList Summons;
AuraStateType m_uiAuraState;
uint8 m_uiStage;
bool m_bIsBerserk;
uint32 m_uiWeapon;
uint32 m_uiSpecialAbilityTimer;
uint32 m_uiSpikeTimer;
uint32 m_uiTouchTimer;
uint32 m_uiBerserkTimer;
int32 m_uiVortexEmote;
uint32 m_uiSisterNpcId;
uint32 m_uiMyEmphatySpellId;
uint32 m_uiOtherEssenceSpellId;
uint32 m_uiSurgeSpellId;
uint32 m_uiVortexSpellId;
uint32 m_uiShieldSpellId;
uint32 m_uiTwinPactSpellId;
uint32 m_uiSpikeSpellId;
uint32 m_uiTouchSpellId;
void Reset()
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_PASSIVE);
me->ModifyAuraState(m_uiAuraState, true);
/* Uncomment this once that they are flying above the ground
me->ModifyAuraState(AuraState, true);
/* Uncomment this once that they are floating above the ground
me->SetLevitate(true);
me->SetFlying(true); */
m_bIsBerserk = false;
IsBerserk = false;
m_uiSpecialAbilityTimer = MINUTE*IN_MILLISECONDS;
m_uiSpikeTimer = 20*IN_MILLISECONDS;
m_uiTouchTimer = urand(10, 15)*IN_MILLISECONDS;
m_uiBerserkTimer = IsHeroic() ? 6*MINUTE*IN_MILLISECONDS : 10*MINUTE*IN_MILLISECONDS;
SpecialAbilityTimer = 1*MINUTE*IN_MILLISECONDS;
SpikeTimer = 20*IN_MILLISECONDS;
TouchTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
BerserkTimer = IsHeroic() ? 6*MINUTE*IN_MILLISECONDS : 10*MINUTE*IN_MILLISECONDS;
Summons.DespawnAll();
summons.DespawnAll();
}
void JustReachedHome()
{
if (instance)
instance->SetData(TYPE_VALKIRIES, FAIL);
instance->SetBossState(BOSS_VALKIRIES, FAIL);
Summons.DespawnAll();
summons.DespawnAll();
me->DespawnOrUnsummon();
}
@@ -211,10 +180,11 @@ struct boss_twin_baseAI : public ScriptedAI
switch (uiId)
{
case 1:
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_AGGRESSIVE);
break;
default:
break;
}
}
@@ -230,7 +200,7 @@ struct boss_twin_baseAI : public ScriptedAI
void JustSummoned(Creature* summoned)
{
Summons.Summon(summoned);
summons.Summon(summoned);
}
void SummonedCreatureDespawn(Creature* summoned)
@@ -248,8 +218,10 @@ struct boss_twin_baseAI : public ScriptedAI
case NPC_BULLET_CONTROLLER:
me->m_Events.AddEvent(new OrbsDespawner(me), me->m_Events.CalculateTime(100));
break;
default:
break;
}
Summons.Despawn(summoned);
summons.Despawn(summoned);
}
void JustDied(Unit* /*killer*/)
@@ -263,24 +235,22 @@ struct boss_twin_baseAI : public ScriptedAI
{
me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
pSister->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
instance->SetData(TYPE_VALKIRIES, DONE);
Summons.DespawnAll();
_JustDied();
}
else
{
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
instance->SetData(TYPE_VALKIRIES, SPECIAL);
instance->SetBossState(BOSS_VALKIRIES, SPECIAL);
}
}
}
Summons.DespawnAll();
summons.DespawnAll();
}
// Called when sister pointer needed
Creature* GetSister()
{
return Unit::GetCreature((*me), instance->GetData64(m_uiSisterNpcId));
return Unit::GetCreature((*me), instance->GetData64(SisterNpcId));
}
void EnterCombat(Unit* /*who*/)
@@ -290,14 +260,14 @@ struct boss_twin_baseAI : public ScriptedAI
{
if (Creature* pSister = GetSister())
{
me->AddAura(m_uiMyEmphatySpellId, pSister);
me->AddAura(MyEmphatySpellId, pSister);
pSister->SetInCombatWithZone();
}
instance->SetData(TYPE_VALKIRIES, IN_PROGRESS);
instance->SetBossState(BOSS_VALKIRIES, IN_PROGRESS);
}
Talk(SAY_AGGRO);
DoCast(me, m_uiSurgeSpellId);
DoCast(me, SurgeSpellId);
}
void DoAction(const int32 action)
@@ -305,45 +275,50 @@ struct boss_twin_baseAI : public ScriptedAI
switch (action)
{
case ACTION_VORTEX:
m_uiStage = me->GetEntry() == NPC_LIGHTBANE ? 2 : 1;
Stage = me->GetEntry() == NPC_LIGHTBANE ? 2 : 1;
break;
case ACTION_PACT:
m_uiStage = me->GetEntry() == NPC_LIGHTBANE ? 1 : 2;
Stage = me->GetEntry() == NPC_LIGHTBANE ? 1 : 2;
break;
default:
break;
}
}
void EnableDualWield(bool mode = true)
{
SetEquipmentSlots(false, m_uiWeapon, mode ? m_uiWeapon : int32(EQUIP_UNEQUIP), EQUIP_UNEQUIP);
SetEquipmentSlots(false, Weapon, mode ? Weapon : int32(EQUIP_UNEQUIP), EQUIP_UNEQUIP);
me->SetCanDualWield(mode);
me->UpdateDamagePhysical(mode ? OFF_ATTACK : BASE_ATTACK);
}
void UpdateAI(const uint32 uiDiff)
void UpdateAI(const uint32 diff)
{
if (!instance || !UpdateVictim())
return;
switch (m_uiStage)
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
switch (Stage)
{
case 0:
break;
case 1: // Vortex
if (m_uiSpecialAbilityTimer <= uiDiff)
if (SpecialAbilityTimer <= diff)
{
if (Creature* pSister = GetSister())
pSister->AI()->DoAction(ACTION_VORTEX);
Talk(m_uiVortexEmote);
DoCastAOE(m_uiVortexSpellId);
m_uiStage = 0;
m_uiSpecialAbilityTimer = MINUTE*IN_MILLISECONDS;
Talk(VortexEmote);
DoCastAOE(VortexSpellId);
Stage = 0;
SpecialAbilityTimer = 1*MINUTE*IN_MILLISECONDS;
}
else
m_uiSpecialAbilityTimer -= uiDiff;
SpecialAbilityTimer -= diff;
break;
case 2: // Shield+Pact
if (m_uiSpecialAbilityTimer <= uiDiff)
case 2: // Shield + Pact
if (SpecialAbilityTimer <= diff)
{
Talk(EMOTE_TWINK_PACT);
Talk(SAY_TWINK_PACT);
@@ -352,164 +327,169 @@ struct boss_twin_baseAI : public ScriptedAI
pSister->AI()->DoAction(ACTION_PACT);
pSister->CastSpell(pSister, SPELL_POWER_TWINS, false);
}
DoCast(me, m_uiShieldSpellId);
DoCast(me, m_uiTwinPactSpellId);
m_uiStage = 0;
m_uiSpecialAbilityTimer = MINUTE*IN_MILLISECONDS;
DoCast(me, ShieldSpellId);
DoCast(me, TwinPactSpellId);
Stage = 0;
SpecialAbilityTimer = 1*MINUTE*IN_MILLISECONDS;
}
else
m_uiSpecialAbilityTimer -= uiDiff;
SpecialAbilityTimer -= diff;
break;
default:
break;
}
if (m_uiSpikeTimer <= uiDiff)
if (SpikeTimer <= diff)
{
DoCastVictim(m_uiSpikeSpellId);
m_uiSpikeTimer = 20*IN_MILLISECONDS;
DoCastVictim(SpikeSpellId);
SpikeTimer = 20*IN_MILLISECONDS;
}
else
m_uiSpikeTimer -= uiDiff;
SpikeTimer -= diff;
if (IsHeroic() && m_uiTouchTimer <= uiDiff)
if (IsHeroic() && TouchTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true, m_uiOtherEssenceSpellId))
me->CastCustomSpell(m_uiTouchSpellId, SPELLVALUE_MAX_TARGETS, 1, target, false);
m_uiTouchTimer = urand(10, 15)*IN_MILLISECONDS;
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 200.0f, true, OtherEssenceSpellId))
me->CastCustomSpell(TouchSpellId, SPELLVALUE_MAX_TARGETS, 1, target, false);
TouchTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
}
else
m_uiTouchTimer -= uiDiff;
TouchTimer -= diff;
if (!m_bIsBerserk && m_uiBerserkTimer <= uiDiff)
if (!IsBerserk && BerserkTimer <= diff)
{
DoCast(me, SPELL_BERSERK);
Talk(SAY_BERSERK);
m_bIsBerserk = true;
IsBerserk = true;
}
else
m_uiBerserkTimer -= uiDiff;
BerserkTimer -= diff;
DoMeleeAttackIfReady();
}
};
/*######
## boss_fjola
######*/
protected:
AuraStateType AuraState;
uint8 Stage;
bool IsBerserk;
uint32 Weapon;
uint32 SpecialAbilityTimer;
uint32 SpikeTimer;
uint32 TouchTimer;
uint32 BerserkTimer;
int32 VortexEmote;
uint32 SisterNpcId;
uint32 MyEmphatySpellId;
uint32 OtherEssenceSpellId;
uint32 SurgeSpellId;
uint32 VortexSpellId;
uint32 ShieldSpellId;
uint32 TwinPactSpellId;
uint32 SpikeSpellId;
uint32 TouchSpellId;
};
class boss_fjola : public CreatureScript
{
public:
boss_fjola() : CreatureScript("boss_fjola") { }
public:
boss_fjola() : CreatureScript("boss_fjola") { }
CreatureAI* GetAI(Creature* creature) const
{
return new boss_fjolaAI(creature);
}
struct boss_fjolaAI : public boss_twin_baseAI
{
boss_fjolaAI(Creature* creature) : boss_twin_baseAI(creature)
struct boss_fjolaAI : public boss_twin_baseAI
{
instance = creature->GetInstanceScript();
}
InstanceScript* instance;
void Reset() {
boss_twin_baseAI::Reset();
SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
m_uiStage = 0;
m_uiWeapon = EQUIP_MAIN_1;
m_uiAuraState = AURA_STATE_UNKNOWN22;
m_uiVortexEmote = EMOTE_VORTEX;
m_uiSisterNpcId = NPC_DARKBANE;
m_uiMyEmphatySpellId = SPELL_TWIN_EMPATHY_DARK;
m_uiOtherEssenceSpellId = SPELL_DARK_ESSENCE_HELPER;
m_uiSurgeSpellId = SPELL_LIGHT_SURGE;
m_uiVortexSpellId = SPELL_LIGHT_VORTEX;
m_uiShieldSpellId = SPELL_LIGHT_SHIELD;
m_uiTwinPactSpellId = SPELL_LIGHT_TWIN_PACT;
m_uiTouchSpellId = SPELL_LIGHT_TOUCH;
m_uiSpikeSpellId = SPELL_LIGHT_TWIN_SPIKE;
if (instance)
boss_fjolaAI(Creature* creature) : boss_twin_baseAI(creature)
{
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
}
}
void EnterCombat(Unit* who)
{
if (instance)
{
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
}
me->SummonCreature(NPC_BULLET_CONTROLLER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 0.0f, TEMPSUMMON_MANUAL_DESPAWN);
boss_twin_baseAI::EnterCombat(who);
}
void Reset()
{
SetEquipmentSlots(false, EQUIP_MAIN_1, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
Stage = 0;
Weapon = EQUIP_MAIN_1;
AuraState = AURA_STATE_UNKNOWN22;
VortexEmote = EMOTE_VORTEX;
SisterNpcId = NPC_DARKBANE;
MyEmphatySpellId = SPELL_TWIN_EMPATHY_DARK;
OtherEssenceSpellId = SPELL_DARK_ESSENCE_HELPER;
SurgeSpellId = SPELL_LIGHT_SURGE;
VortexSpellId = SPELL_LIGHT_VORTEX;
ShieldSpellId = SPELL_LIGHT_SHIELD;
TwinPactSpellId = SPELL_LIGHT_TWIN_PACT;
TouchSpellId = SPELL_LIGHT_TOUCH;
SpikeSpellId = SPELL_LIGHT_TWIN_SPIKE;
void EnterEvadeMode()
{
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
boss_twin_baseAI::EnterEvadeMode();
}
if (instance)
instance->DoStopTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
boss_twin_baseAI::Reset();
}
void JustReachedHome()
{
if (instance)
void EnterCombat(Unit* who)
{
if (instance)
instance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, EVENT_START_TWINS_FIGHT);
me->SummonCreature(NPC_BULLET_CONTROLLER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 0.0f, TEMPSUMMON_MANUAL_DESPAWN);
boss_twin_baseAI::EnterCombat(who);
}
void EnterEvadeMode()
{
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
boss_twin_baseAI::EnterEvadeMode();
}
boss_twin_baseAI::JustReachedHome();
void JustReachedHome()
{
if (instance)
instance->DoUseDoorOrButton(instance->GetData64(GO_MAIN_GATE_DOOR));
boss_twin_baseAI::JustReachedHome();
}
};
CreatureAI* GetAI(Creature* creature) const
{
return new boss_fjolaAI(creature);
}
};
};
/*######
## boss_eydis
######*/
class boss_eydis : public CreatureScript
{
public:
boss_eydis() : CreatureScript("boss_eydis") { }
public:
boss_eydis() : CreatureScript("boss_eydis") { }
CreatureAI* GetAI(Creature* creature) const
{
return new boss_eydisAI(creature);
}
struct boss_eydisAI : public boss_twin_baseAI
{
boss_eydisAI(Creature* creature) : boss_twin_baseAI(creature) {}
struct boss_eydisAI : public boss_twin_baseAI
{
boss_eydisAI(Creature* creature) : boss_twin_baseAI(creature) {}
void Reset()
{
SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
Stage = 1;
Weapon = EQUIP_MAIN_2;
AuraState = AURA_STATE_UNKNOWN19;
VortexEmote = EMOTE_VORTEX;
SisterNpcId = NPC_LIGHTBANE;
MyEmphatySpellId = SPELL_TWIN_EMPATHY_LIGHT;
OtherEssenceSpellId = SPELL_LIGHT_ESSENCE_HELPER;
SurgeSpellId = SPELL_DARK_SURGE;
VortexSpellId = SPELL_DARK_VORTEX;
ShieldSpellId = SPELL_DARK_SHIELD;
TwinPactSpellId = SPELL_DARK_TWIN_PACT;
TouchSpellId = SPELL_DARK_TOUCH;
SpikeSpellId = SPELL_DARK_TWIN_SPIKE;
boss_twin_baseAI::Reset();
}
};
void Reset() {
boss_twin_baseAI::Reset();
SetEquipmentSlots(false, EQUIP_MAIN_2, EQUIP_UNEQUIP, EQUIP_NO_CHANGE);
m_uiStage = 1;
m_uiWeapon = EQUIP_MAIN_2;
m_uiAuraState = AURA_STATE_UNKNOWN19;
m_uiVortexEmote = EMOTE_VORTEX;
m_uiSisterNpcId = NPC_LIGHTBANE;
m_uiMyEmphatySpellId = SPELL_TWIN_EMPATHY_LIGHT;
m_uiOtherEssenceSpellId = SPELL_LIGHT_ESSENCE_HELPER;
m_uiSurgeSpellId = SPELL_DARK_SURGE;
m_uiVortexSpellId = SPELL_DARK_VORTEX;
m_uiShieldSpellId = SPELL_DARK_SHIELD;
m_uiTwinPactSpellId = SPELL_DARK_TWIN_PACT;
m_uiTouchSpellId = SPELL_DARK_TOUCH;
m_uiSpikeSpellId = SPELL_DARK_TWIN_SPIKE;
CreatureAI* GetAI(Creature* creature) const
{
return new boss_eydisAI(creature);
}
};
};
#define ESSENCE_REMOVE 0
#define ESSENCE_APPLY 1
class mob_essence_of_twin : public CreatureScript
{
public:
@@ -525,10 +505,10 @@ class mob_essence_of_twin : public CreatureScript
switch (me->GetEntry())
{
case NPC_LIGHT_ESSENCE:
spellReturned = data == ESSENCE_REMOVE? SPELL_DARK_ESSENCE_HELPER : SPELL_LIGHT_ESSENCE_HELPER;
spellReturned = (data == ESSENCE_REMOVE) ? SPELL_DARK_ESSENCE_HELPER : SPELL_LIGHT_ESSENCE_HELPER;
break;
case NPC_DARK_ESSENCE:
spellReturned = data == ESSENCE_REMOVE? SPELL_LIGHT_ESSENCE_HELPER : SPELL_DARK_ESSENCE_HELPER;
spellReturned = (data == ESSENCE_REMOVE) ? SPELL_LIGHT_ESSENCE_HELPER : SPELL_DARK_ESSENCE_HELPER;
break;
default:
break;
@@ -556,12 +536,8 @@ struct mob_unleashed_ballAI : public ScriptedAI
{
mob_unleashed_ballAI(Creature* creature) : ScriptedAI(creature)
{
instance = creature->GetInstanceScript();
}
InstanceScript* instance;
uint32 m_uiRangeCheckTimer;
void MoveToNextPoint()
{
float x0 = ToCCommonLoc[1].GetPositionX(), y0 = ToCCommonLoc[1].GetPositionY(), r = 47.0f;
@@ -578,13 +554,13 @@ struct mob_unleashed_ballAI : public ScriptedAI
void Reset()
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_NOT_SELECTABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
me->SetReactState(REACT_PASSIVE);
me->SetDisableGravity(true);
me->SetCanFly(true);
SetCombatMovement(false);
MoveToNextPoint();
m_uiRangeCheckTimer = IN_MILLISECONDS;
RangeCheckTimer = 0.5*IN_MILLISECONDS;
}
void MovementInform(uint32 uiType, uint32 uiId)
@@ -600,119 +576,106 @@ struct mob_unleashed_ballAI : public ScriptedAI
else
me->DisappearAndDie();
break;
default:
break;
}
}
protected:
uint32 RangeCheckTimer;
};
class mob_unleashed_dark : public CreatureScript
{
public:
mob_unleashed_dark() : CreatureScript("mob_unleashed_dark") { }
public:
mob_unleashed_dark() : CreatureScript("mob_unleashed_dark") { }
CreatureAI* GetAI(Creature* creature) const
{
return new mob_unleashed_darkAI(creature);
}
struct mob_unleashed_darkAI : public mob_unleashed_ballAI
{
mob_unleashed_darkAI(Creature* creature) : mob_unleashed_ballAI(creature) {}
void UpdateAI(const uint32 uiDiff)
struct mob_unleashed_darkAI : public mob_unleashed_ballAI
{
if (m_uiRangeCheckTimer < uiDiff)
mob_unleashed_darkAI(Creature* creature) : mob_unleashed_ballAI(creature) {}
void UpdateAI(const uint32 diff)
{
if (me->SelectNearestPlayer(2.0f))
if (RangeCheckTimer < diff)
{
if (me->SelectNearestPlayer(3.0f))
{
DoCastAOE(SPELL_UNLEASHED_DARK);
DoCastAOE(SPELL_UNLEASHED_DARK_HELPER);
me->GetMotionMaster()->MoveIdle();
me->DespawnOrUnsummon(500);
me->DespawnOrUnsummon(1*IN_MILLISECONDS);
}
m_uiRangeCheckTimer = IN_MILLISECONDS;
RangeCheckTimer = 0.5*IN_MILLISECONDS;
}
else
RangeCheckTimer -= diff;
}
else m_uiRangeCheckTimer -= uiDiff;
}
};
void SpellHitTarget(Unit* who, SpellInfo const* spell)
CreatureAI* GetAI(Creature* creature) const
{
if (spell->Id == SPELL_UNLEASHED_DARK_HELPER)
{
if (who->HasAura(SPELL_DARK_ESSENCE_HELPER))
who->CastSpell(who, SPELL_POWERING_UP, true);
}
return new mob_unleashed_darkAI(creature);
}
};
};
class mob_unleashed_light : public CreatureScript
{
public:
mob_unleashed_light() : CreatureScript("mob_unleashed_light") { }
public:
mob_unleashed_light() : CreatureScript("mob_unleashed_light") { }
CreatureAI* GetAI(Creature* creature) const
{
return new mob_unleashed_lightAI(creature);
}
struct mob_unleashed_lightAI : public mob_unleashed_ballAI
{
mob_unleashed_lightAI(Creature* creature) : mob_unleashed_ballAI(creature) {}
void UpdateAI(const uint32 uiDiff)
struct mob_unleashed_lightAI : public mob_unleashed_ballAI
{
if (m_uiRangeCheckTimer < uiDiff)
mob_unleashed_lightAI(Creature* creature) : mob_unleashed_ballAI(creature) {}
void UpdateAI(const uint32 diff)
{
if (me->SelectNearestPlayer(2.0f))
if (RangeCheckTimer < diff)
{
if (me->SelectNearestPlayer(3.0f))
{
DoCastAOE(SPELL_UNLEASHED_LIGHT);
DoCastAOE(SPELL_UNLEASHED_LIGHT_HELPER);
me->GetMotionMaster()->MoveIdle();
me->DespawnOrUnsummon(500);
me->DespawnOrUnsummon(1*IN_MILLISECONDS);
}
m_uiRangeCheckTimer = IN_MILLISECONDS;
RangeCheckTimer = 0.5*IN_MILLISECONDS;
}
else
RangeCheckTimer -= diff;
}
else m_uiRangeCheckTimer -= uiDiff;
}
};
void SpellHitTarget(Unit* who, SpellInfo const* spell)
CreatureAI* GetAI(Creature* creature) const
{
if (spell->Id == SPELL_UNLEASHED_LIGHT_HELPER)
{
if (who->HasAura(SPELL_LIGHT_ESSENCE_HELPER))
who->CastSpell(who, SPELL_POWERING_UP, true);
}
return new mob_unleashed_lightAI(creature);
}
};
};
class mob_bullet_controller : public CreatureScript
{
public:
mob_bullet_controller() : CreatureScript("mob_bullet_controller") { }
public:
mob_bullet_controller() : CreatureScript("mob_bullet_controller") { }
CreatureAI* GetAI(Creature* creature) const
{
return new mob_bullet_controllerAI(creature);
}
struct mob_bullet_controllerAI : public Scripted_NoMovementAI
{
mob_bullet_controllerAI(Creature* creature) : Scripted_NoMovementAI(creature)
struct mob_bullet_controllerAI : public Scripted_NoMovementAI
{
Reset();
}
mob_bullet_controllerAI(Creature* creature) : Scripted_NoMovementAI(creature)
{
Reset();
}
void Reset()
{
DoCastAOE(SPELL_CONTROLLER_PERIODIC);
}
void Reset()
{
DoCastAOE(SPELL_CONTROLLER_PERIODIC);
}
void UpdateAI(const uint32 /*uiDiff*/)
void UpdateAI(const uint32 /*diff*/)
{
UpdateVictim();
}
};
CreatureAI* GetAI(Creature* creature) const
{
UpdateVictim();
return new mob_bullet_controllerAI(creature);
}
};
};
class spell_powering_up : public SpellScriptLoader
@@ -720,17 +683,34 @@ class spell_powering_up : public SpellScriptLoader
public:
spell_powering_up() : SpellScriptLoader("spell_powering_up") { }
class spell_powering_up_AuraScript : public AuraScript
class spell_powering_up_SpellScript : public SpellScript
{
PrepareAuraScript(spell_powering_up_AuraScript);
public:
PrepareSpellScript(spell_powering_up_SpellScript)
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
uint32 spellId;
uint32 poweringUp;
bool Load()
{
if (Unit* target = GetTarget())
spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_SURGE_OF_SPEED, GetCaster());
if (!sSpellMgr->GetSpellInfo(spellId))
return false;
poweringUp = sSpellMgr->GetSpellIdForDifficulty(SPELL_POWERING_UP, GetCaster());
if (!sSpellMgr->GetSpellInfo(poweringUp))
return false;
return true;
}
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
if (Unit* target = GetHitUnit())
{
if (Aura* pAura = target->GetAura(GetId()))
if (Aura* pAura = target->GetAura(poweringUp))
{
if (pAura->GetStackAmount() == 100)
if (pAura->GetStackAmount() >= 100)
{
if (target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2206, EFFECT_1))
target->CastSpell(target, SPELL_EMPOWERED_DARK, true);
@@ -738,45 +718,12 @@ class spell_powering_up : public SpellScriptLoader
if (target->GetDummyAuraEffect(SPELLFAMILY_GENERIC, 2845, EFFECT_1))
target->CastSpell(target, SPELL_EMPOWERED_LIGHT, true);
target->RemoveAurasDueToSpell(GetId());
target->RemoveAurasDueToSpell(poweringUp);
}
}
}
}
void Register()
{
OnEffectApply += AuraEffectApplyFn(spell_powering_up_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
AuraScript* GetAuraScript() const
{
return new spell_powering_up_AuraScript();
}
class spell_powering_up_SpellScript : public SpellScript
{
public:
PrepareSpellScript(spell_powering_up_SpellScript)
uint32 spellId;
bool Load()
{
spellId = sSpellMgr->GetSpellIdForDifficulty(SPELL_SURGE_OF_SPEED, GetCaster());
if (!sSpellMgr->GetSpellInfo(spellId))
return false;
return true;
}
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
{
if (Unit* target = GetExplTargetUnit())
if (urand(0, 99) < 15)
target->CastSpell(target, spellId, true);
}
void Register()
{
OnEffectHitTarget += SpellEffectFn(spell_powering_up_SpellScript::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
@@ -808,10 +755,68 @@ class spell_valkyr_essences : public SpellScriptLoader
return true;
}
void Absorb(AuraEffect* /*aurEff*/, DamageInfo & /*dmgInfo*/, uint32 & /*absorbAmount*/)
void Absorb(AuraEffect* /*aurEff*/, DamageInfo & dmgInfo, uint32 & /*absorbAmount*/)
{
if (urand(0, 99) < 5)
GetTarget()->CastSpell(GetTarget(), spellId, true);
if (Unit* owner = GetUnitOwner())
{
if (dmgInfo.GetSpellInfo())
{
if (uint32 poweringUp = sSpellMgr->GetSpellIdForDifficulty(SPELL_POWERING_UP, owner))
{
if (urand(0, 99) < 5)
GetTarget()->CastSpell(GetTarget(), spellId, true);
// Twin Vortex part
uint32 lightVortex = sSpellMgr->GetSpellIdForDifficulty(SPELL_LIGHT_VORTEX_DAMAGE, owner);
uint32 darkVortex = sSpellMgr->GetSpellIdForDifficulty(SPELL_DARK_VORTEX_DAMAGE, owner);
int32 stacksCount = int32(dmgInfo.GetSpellInfo()->Effects[EFFECT_0].CalcValue()) * 0.001 - 1;
if (lightVortex && darkVortex && stacksCount)
{
if (dmgInfo.GetSpellInfo()->Id == darkVortex || dmgInfo.GetSpellInfo()->Id == lightVortex)
{
Aura* pAura = owner->GetAura(poweringUp);
if (pAura)
{
pAura->ModStackAmount(stacksCount);
owner->CastSpell(owner, poweringUp, true);
}
else
{
owner->CastSpell(owner, poweringUp, true);
if (Aura* pTemp = owner->GetAura(poweringUp))
pTemp->ModStackAmount(stacksCount);
}
}
}
// Picking floating balls
uint32 unleashedDark = sSpellMgr->GetSpellIdForDifficulty(SPELL_UNLEASHED_DARK, owner);
uint32 unleashedLight = sSpellMgr->GetSpellIdForDifficulty(SPELL_UNLEASHED_LIGHT, owner);
if (unleashedDark && unleashedLight)
{
if (dmgInfo.GetSpellInfo()->Id == unleashedDark || dmgInfo.GetSpellInfo()->Id == unleashedLight)
{
// need to do the things in this order, else players might have 100 charges of Powering Up without anything happening
Aura* pAura = owner->GetAura(poweringUp);
if (pAura)
{
// 2 lines together add the correct amount of buff stacks
pAura->ModStackAmount(stacksCount);
owner->CastSpell(owner, poweringUp, true);
}
else
{
owner->CastSpell(owner, poweringUp, true);
if (Aura* pTemp = owner->GetAura(poweringUp))
pTemp->ModStackAmount(stacksCount);
}
}
}
}
}
}
}
void Register()
@@ -880,6 +885,7 @@ void AddSC_boss_twin_valkyr()
new mob_unleashed_dark();
new mob_essence_of_twin();
new mob_bullet_controller();
new spell_powering_up();
new spell_valkyr_essences();
new spell_power_of_the_twins();

View File

@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* ScriptData
SDName: instance_trial_of_the_crusader
SD%Complete: 80%
SDComment: by /dev/rsa
SDCategory: Trial of the Crusader
EndScriptData */
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "trial_of_the_crusader.h"
@@ -37,82 +30,55 @@ class instance_trial_of_the_crusader : public InstanceMapScript
{
instance_trial_of_the_crusader_InstanceMapScript(Map* map) : InstanceScript(map) {}
uint32 EncounterStatus[MAX_ENCOUNTERS];
uint32 TrialCounter;
uint32 EventStage;
uint32 EventTimer;
uint32 EventNPCId;
uint32 NorthrendBeasts;
std::string SaveDataBuffer;
bool NeedSave;
uint64 BarrentGUID;
uint64 TirionGUID;
uint64 TirionFordringGUID;
uint64 FizzlebangGUID;
uint64 GarroshGUID;
uint64 VarianGUID;
uint64 GormokGUID;
uint64 AcidmawGUID;
uint64 DreadscaleGUID;
uint64 IcehowlGUID;
uint64 JaraxxusGUID;
uint64 ChampionsControllerGUID;
uint64 DarkbaneGUID;
uint64 LightbaneGUID;
uint64 AnubarakGUID;
uint64 CrusadersCacheGUID;
uint64 FloorGUID;
uint64 TributeChestGUID;
uint64 MainGateDoorGUID;
uint64 EastPortcullisGUID;
uint64 WebDoorGUID;
// Achievement stuff
uint32 NotOneButTwoJormungarsTimer;
uint32 ResilienceWillFixItTimer;
uint8 SnoboldCount;
uint8 MistressOfPainCount;
bool TributeToImmortalityElegible;
void Initialize()
{
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
EncounterStatus[i] = NOT_STARTED;
SetBossNumber(MAX_ENCOUNTERS);
TrialCounter = 50;
EventStage = 0;
TirionFordringGUID = 0;
TributeChestGUID = 0;
MainGateDoorGUID = 0;
EastPortcullisGUID = 0;
WebDoorGUID = 0;
NorthrendBeasts = NOT_STARTED;
EventTimer = 1000;
NotOneButTwoJormungarsTimer = 0;
ResilienceWillFixItTimer = 0;
SnoboldCount = 0;
MistressOfPainCount = 0;
TributeToImmortalityElegible = true;
NeedSave = false;
EventNPCId = 0;
TirionFordringGUID = 0;
BarrentGUID = 0;
TirionGUID = 0;
FizzlebangGUID = 0;
GarroshGUID = 0;
VarianGUID = 0;
GormokGUID = 0;
AcidmawGUID = 0;
DreadscaleGUID = 0;
IcehowlGUID = 0;
JaraxxusGUID = 0;
ChampionsControllerGUID = 0;
DarkbaneGUID = 0;
LightbaneGUID = 0;
AnubarakGUID = 0;
TributeChestGUID = 0;
MainGateDoorGUID = 0;
EastPortcullisGUID = 0;
WebDoorGUID = 0;
CrusadersCacheGUID = 0;
FloorGUID = 0;
}
bool IsEncounterInProgress() const
{
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
if (EncounterStatus[i] == IN_PROGRESS)
if (GetBossState(i) == IN_PROGRESS)
return true;
// Special state is set at Faction Champions after first champ dead, encounter is still in combat
if (GetBossState(BOSS_CRUSADERS) == SPECIAL)
return true;
return false;
}
@@ -123,12 +89,26 @@ class instance_trial_of_the_crusader : public InstanceMapScript
player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW, 1);
player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, GetData(TYPE_COUNTER));
}
else
player->SendUpdateWorldState(UPDATE_STATE_UI_SHOW, 0);
// make sure Anub'arak isnt missing and floor is destroyed after a crash
if (GetBossState(BOSS_LICH_KING) == DONE && TrialCounter && GetBossState(BOSS_ANUBARAK) != DONE)
{
Creature* anubArak = Unit::GetCreature(*player, GetData64(NPC_ANUBARAK));
if (!anubArak)
anubArak = player->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
if (GameObject* floor = GameObject::GetGameObject(*player, GetData64(GO_ARGENT_COLISEUM_FLOOR)))
floor->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
}
}
void OpenDoor(uint64 guid)
{
if (!guid)
return;
if (GameObject* go = instance->GetGameObject(guid))
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
}
@@ -137,6 +117,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
{
if (!guid)
return;
if (GameObject* go = instance->GetGameObject(guid))
go->SetGoState(GO_STATE_READY);
}
@@ -147,6 +128,8 @@ class instance_trial_of_the_crusader : public InstanceMapScript
{
case NPC_BARRENT:
BarrentGUID = creature->GetGUID();
if (!TrialCounter)
creature->DespawnOrUnsummon();
break;
case NPC_TIRION:
TirionGUID = creature->GetGUID();
@@ -191,6 +174,8 @@ class instance_trial_of_the_crusader : public InstanceMapScript
case NPC_ANUBARAK:
AnubarakGUID = creature->GetGUID();
break;
default:
break;
}
}
@@ -237,34 +222,41 @@ class instance_trial_of_the_crusader : public InstanceMapScript
case GO_TRIBUTE_CHEST_25H_99:
TributeChestGUID = go->GetGUID();
break;
default:
break;
}
}
void SetData(uint32 type, uint32 data)
bool SetBossState(uint32 type, EncounterState state)
{
if (!InstanceScript::SetBossState(type, state))
return false;
switch (type)
{
case TYPE_JARAXXUS:
case BOSS_BEASTS:
break;
case BOSS_JARAXXUS:
// Cleanup Icehowl
if (Creature* icehowl = instance->GetCreature(IcehowlGUID))
icehowl->DespawnOrUnsummon();
if (data == DONE)
if (state == DONE)
EventStage = 2000;
break;
case TYPE_CRUSADERS:
case BOSS_CRUSADERS:
// Cleanup Jaraxxus
if (Creature* jaraxxus = instance->GetCreature(JaraxxusGUID))
jaraxxus->DespawnOrUnsummon();
if (Creature* fizzlebang = instance->GetCreature(FizzlebangGUID))
fizzlebang->DespawnOrUnsummon();
switch (data)
switch (state)
{
case IN_PROGRESS:
ResilienceWillFixItTimer = 0;
break;
case SPECIAL: //Means the first blood
ResilienceWillFixItTimer = 60*IN_MILLISECONDS;
data = IN_PROGRESS;
state = IN_PROGRESS;
break;
case DONE:
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_DEFEAT_FACTION_CHAMPIONS);
@@ -273,21 +265,23 @@ class instance_trial_of_the_crusader : public InstanceMapScript
DoRespawnGameObject(CrusadersCacheGUID, 7*DAY);
EventStage = 3100;
break;
default:
break;
}
break;
case TYPE_VALKIRIES:
case BOSS_VALKIRIES:
// Cleanup chest
if (GameObject* cache = instance->GetGameObject(CrusadersCacheGUID))
cache->Delete();
switch (data)
switch (state)
{
case FAIL:
if (EncounterStatus[TYPE_VALKIRIES] == NOT_STARTED)
data = NOT_STARTED;
if (GetBossState(BOSS_VALKIRIES) == NOT_STARTED)
state = NOT_STARTED;
break;
case SPECIAL:
if (EncounterStatus[TYPE_VALKIRIES] == SPECIAL)
data = DONE;
if (GetBossState(BOSS_VALKIRIES) == SPECIAL)
state = DONE;
break;
case DONE:
if (instance->GetPlayers().getFirst()->getSource()->GetTeam() == ALLIANCE)
@@ -295,50 +289,122 @@ class instance_trial_of_the_crusader : public InstanceMapScript
else
EventStage = 4030;
break;
default:
break;
}
break;
case TYPE_ANUBARAK:
switch (data)
case BOSS_LICH_KING:
break;
case BOSS_ANUBARAK:
switch (state)
{
case DONE:
{
EventStage = 6000;
break;
case SPECIAL:
uint32 tributeChest = 0;
if (instance->GetSpawnMode() == RAID_DIFFICULTY_10MAN_HEROIC)
{
if (TrialCounter >= 50)
tributeChest = GO_TRIBUTE_CHEST_10H_99;
else
{
if (TrialCounter >= 45)
tributeChest = GO_TRIBUTE_CHEST_10H_50;
else
{
if (TrialCounter >= 25)
tributeChest = GO_TRIBUTE_CHEST_10H_45;
else
tributeChest = GO_TRIBUTE_CHEST_10H_25;
}
}
}
else if (instance->GetSpawnMode() == RAID_DIFFICULTY_25MAN_HEROIC)
{
if (TrialCounter >= 50)
tributeChest = GO_TRIBUTE_CHEST_25H_99;
else
{
if (TrialCounter >= 45)
tributeChest = GO_TRIBUTE_CHEST_25H_50;
else
{
if (TrialCounter >= 25)
tributeChest = GO_TRIBUTE_CHEST_25H_45;
else
tributeChest = GO_TRIBUTE_CHEST_25H_25;
}
}
}
if (tributeChest)
if (Creature* tirion = instance->GetCreature(TirionGUID))
// need proper location.this one is guessed based on videos
if (GameObject* chest = tirion->SummonGameObject(tributeChest, 643.814f, 136.027f, 141.295f, 0, 0, 0, 0, 0, 90000000))
if (GameObject* chest = tirion->SummonGameObject(tributeChest, 805.62f, 134.87f, 142.16f, 3.27f, 0, 0, 0, 0, WEEK))
chest->SetRespawnTime(chest->GetRespawnDelay());
break;
}
default:
break;
}
break;
default:
break;
}
if (IsEncounterInProgress())
{
CloseDoor(GetData64(GO_EAST_PORTCULLIS));
CloseDoor(GetData64(GO_WEB_DOOR));
}
else
{
OpenDoor(GetData64(GO_EAST_PORTCULLIS));
OpenDoor(GetData64(GO_WEB_DOOR));
}
if (type < MAX_ENCOUNTERS)
{
sLog->outInfo(LOG_FILTER_TSCR, "[ToCr] BossState(type %u) %u = state %u;", type, GetBossState(type), state);
if (state == FAIL)
{
if (instance->IsHeroic())
{
--TrialCounter;
// decrease attempt counter at wipe
Map::PlayerList const &PlayerList = instance->GetPlayers();
for (Map::PlayerList::const_iterator itr = PlayerList.begin(); itr != PlayerList.end(); ++itr)
if (Player* player = itr->getSource())
player->SendUpdateWorldState(UPDATE_STATE_UI_COUNT, TrialCounter);
// if theres no more attemps allowed
if (!TrialCounter)
{
if (Unit* announcer = instance->GetCreature(GetData64(NPC_BARRENT)))
announcer->ToCreature()->DespawnOrUnsummon();
if (Creature* anubArak = instance->GetCreature(GetData64(NPC_ANUBARAK)))
anubArak->DespawnOrUnsummon();
}
}
NeedSave = true;
EventStage = (type == BOSS_BEASTS ? 666 : 0);
state = NOT_STARTED;
}
if (state == DONE || NeedSave)
{
if (Unit* announcer = instance->GetCreature(GetData64(NPC_BARRENT)))
announcer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
Save();
}
}
return true;
}
void SetData(uint32 type, uint32 data)
{
switch (type)
{
case TYPE_COUNTER:
TrialCounter = data;
data = DONE;
@@ -358,7 +424,6 @@ class instance_trial_of_the_crusader : public InstanceMapScript
case GORMOK_DONE:
EventStage = 200;
SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS);
SetData(TYPE_BEASTS, IN_PROGRESS);
break;
case SNAKES_IN_PROGRESS:
NotOneButTwoJormungarsTimer = 0;
@@ -371,15 +436,16 @@ class instance_trial_of_the_crusader : public InstanceMapScript
DoUpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, SPELL_WORMS_KILLED_IN_10_SECONDS);
EventStage = 300;
SetData(TYPE_NORTHREND_BEASTS, IN_PROGRESS);
SetData(TYPE_BEASTS, IN_PROGRESS);
break;
case ICEHOWL_DONE:
EventStage = 400;
SetData(TYPE_NORTHREND_BEASTS, DONE);
SetData(TYPE_BEASTS, DONE);
SetBossState(BOSS_BEASTS, DONE);
break;
case FAIL:
SetData(TYPE_BEASTS, FAIL);
SetBossState(BOSS_BEASTS, FAIL);
break;
default:
break;
}
break;
@@ -399,37 +465,8 @@ class instance_trial_of_the_crusader : public InstanceMapScript
case DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE:
TributeToImmortalityElegible = false;
break;
}
if (IsEncounterInProgress())
{
CloseDoor(GetData64(GO_EAST_PORTCULLIS));
CloseDoor(GetData64(GO_WEB_DOOR));
}
else
{
OpenDoor(GetData64(GO_EAST_PORTCULLIS));
OpenDoor(GetData64(GO_WEB_DOOR));
}
if (type < MAX_ENCOUNTERS)
{
sLog->outInfo(LOG_FILTER_TSCR, "[ToCr] EncounterStatus[type %u] %u = data %u;", type, EncounterStatus[type], data);
if (data == FAIL)
{
--TrialCounter;
NeedSave = true;
EventStage = (type == TYPE_BEASTS ? 666 : 0);
data = NOT_STARTED;
}
EncounterStatus[type] = data;
if (data == DONE || NeedSave == true)
{
if (Unit* announcer = instance->GetCreature(GetData64(NPC_BARRENT)))
announcer->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
Save();
}
default:
break;
}
}
@@ -488,18 +525,6 @@ class instance_trial_of_the_crusader : public InstanceMapScript
{
switch (type)
{
case TYPE_BEASTS:
return EncounterStatus[TYPE_BEASTS];
case TYPE_JARAXXUS:
return EncounterStatus[TYPE_JARAXXUS];
case TYPE_CRUSADERS:
return EncounterStatus[TYPE_CRUSADERS];
case TYPE_VALKIRIES:
return EncounterStatus[TYPE_VALKIRIES];
case TYPE_LICH_KING:
return EncounterStatus[TYPE_LICH_KING];
case TYPE_ANUBARAK:
return EncounterStatus[TYPE_ANUBARAK];
case TYPE_COUNTER:
return TrialCounter;
case TYPE_EVENT:
@@ -613,7 +638,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
NotOneButTwoJormungarsTimer -= diff;
}
if (GetData(TYPE_CRUSADERS) == IN_PROGRESS && ResilienceWillFixItTimer)
if (GetBossState(BOSS_CRUSADERS) == SPECIAL && ResilienceWillFixItTimer)
{
if (ResilienceWillFixItTimer <= diff)
ResilienceWillFixItTimer = 0;
@@ -629,7 +654,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
std::ostringstream saveStream;
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
saveStream << EncounterStatus[i] << ' ';
saveStream << GetBossState(i) << ' ';
saveStream << TrialCounter;
SaveDataBuffer = saveStream.str();
@@ -658,10 +683,11 @@ class instance_trial_of_the_crusader : public InstanceMapScript
for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i)
{
loadStream >> EncounterStatus[i];
if (EncounterStatus[i] == IN_PROGRESS)
EncounterStatus[i] = NOT_STARTED;
uint32 tmpState;
loadStream >> tmpState;
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
tmpState = NOT_STARTED;
SetBossState(i, EncounterState(tmpState));
}
loadStream >> TrialCounter;
@@ -700,10 +726,52 @@ class instance_trial_of_the_crusader : public InstanceMapScript
return TrialCounter == 50 && TributeToImmortalityElegible;
case A_TRIBUTE_TO_DEDICATED_INSANITY:
return false/*uiGrandCrusaderAttemptsLeft == 50 && !bHasAtAnyStagePlayerEquippedTooGoodItem*/;
default:
break;
}
return false;
}
protected:
uint32 TrialCounter;
uint32 EventStage;
uint32 EventTimer;
uint32 EventNPCId;
uint32 NorthrendBeasts;
bool NeedSave;
std::string SaveDataBuffer;
uint64 BarrentGUID;
uint64 TirionGUID;
uint64 TirionFordringGUID;
uint64 FizzlebangGUID;
uint64 GarroshGUID;
uint64 VarianGUID;
uint64 GormokGUID;
uint64 AcidmawGUID;
uint64 DreadscaleGUID;
uint64 IcehowlGUID;
uint64 JaraxxusGUID;
uint64 ChampionsControllerGUID;
uint64 DarkbaneGUID;
uint64 LightbaneGUID;
uint64 AnubarakGUID;
uint64 CrusadersCacheGUID;
uint64 FloorGUID;
uint64 TributeChestGUID;
uint64 MainGateDoorGUID;
uint64 EastPortcullisGUID;
uint64 WebDoorGUID;
// Achievement stuff
uint32 NotOneButTwoJormungarsTimer;
uint32 ResilienceWillFixItTimer;
uint8 SnoboldCount;
uint8 MistressOfPainCount;
bool TributeToImmortalityElegible;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const

View File

@@ -7,12 +7,12 @@
enum
{
TYPE_BEASTS = 0,
TYPE_JARAXXUS = 1,
TYPE_CRUSADERS = 2,
TYPE_VALKIRIES = 3,
TYPE_LICH_KING = 4,
TYPE_ANUBARAK = 5,
BOSS_BEASTS = 0,
BOSS_JARAXXUS = 1,
BOSS_CRUSADERS = 2,
BOSS_VALKIRIES = 3,
BOSS_LICH_KING = 4, // not really a boss but oh well
BOSS_ANUBARAK = 5,
MAX_ENCOUNTERS = 6,
TYPE_COUNTER = 8,
@@ -31,15 +31,19 @@ enum
SPELL_WILFRED_PORTAL = 68424,
SPELL_JARAXXUS_CHAINS = 67924,
SPELL_CORPSE_TELEPORT = 69016,
SPELL_DESTROY_FLOOR_KNOCKUP = 68193,
DESPAWN_TIME = 300000,
DISPLAYID_DESTROYED_FLOOR = 9060
};
const Position ToCSpawnLoc[]=
{
{563.912f, 261.625f, 394.73f, 4.70437f}, // 0 Center
{575.451f, 261.496f, 394.73f, 4.6541f}, // 1 Left
{549.951f, 261.55f, 394.73f, 4.74835f}, // 2 Right
{549.951f, 261.55f, 394.73f, 4.74835f} // 2 Right
};
const Position ToCCommonLoc[]=
@@ -68,7 +72,7 @@ const Position ToCCommonLoc[]=
{558.811610f, 195.985779f, 394.671661f, 0}, // 13
{567.641724f, 195.351501f, 394.659943f, 0}, // 14
{560.633972f, 195.391708f, 395.137543f, 0}, // 15
{565.816956f, 195.477921f, 395.136810f, 0}, // 16
{565.816956f, 195.477921f, 395.136810f, 0} // 16
};
const Position JaraxxusLoc[]=
@@ -76,7 +80,7 @@ const Position JaraxxusLoc[]=
{508.104767f, 138.247345f, 395.128052f, 0}, // 0 - Fizzlebang start location
{548.610596f, 139.807800f, 394.321838f, 0}, // 1 - fizzlebang end
{581.854187f, 138.0f, 394.319f, 0}, // 2 - Portal Right
{550.558838f, 138.0f, 394.319f, 0}, // 3 - Portal Left
{550.558838f, 138.0f, 394.319f, 0} // 3 - Portal Left
};
const Position FactionChampionLoc[]=
@@ -102,21 +106,21 @@ const Position FactionChampionLoc[]=
{528.958f, 131.47f, 394.73f, 0}, // 16 - Horde Final Pos 6
{526.309f, 116.667f, 394.833f, 0}, // 17 - Horde Final Pos 7
{524.238f, 122.411f, 394.819f, 0}, // 18 - Horde Final Pos 8
{521.901f, 128.488f, 394.832f, 0}, // 19 - Horde Final Pos 9
{521.901f, 128.488f, 394.832f, 0} // 19 - Horde Final Pos 9
};
const Position TwinValkyrsLoc[]=
{
{586.060242f, 117.514809f, 394.314026f, 0}, // 0 - Dark essence 1
{541.602112f, 161.879837f, 394.587952f, 0}, // 1 - Dark essence 2
{541.021118f, 117.262932f, 395.314819f, 0}, // 2 - Light essence 1
{586.200562f, 162.145523f, 394.626129f, 0}, // 3 - Light essence 2
{586.060242f, 117.514809f, 394.41f, 0}, // 0 - Dark essence 1
{541.602112f, 161.879837f, 394.41f, 0}, // 1 - Dark essence 2
{541.021118f, 117.262932f, 394.41f, 0}, // 2 - Light essence 1
{586.200562f, 162.145523f, 394.41f, 0} // 3 - Light essence 2
};
const Position LichKingLoc[]=
{
{563.549f, 152.474f, 394.393f, 0}, // 0 - Lich king start
{563.547f, 141.613f, 393.908f, 0}, // 1 - Lich king end
{563.547f, 141.613f, 393.908f, 0} // 1 - Lich king end
};
const Position AnubarakLoc[]=
@@ -126,20 +130,20 @@ const Position AnubarakLoc[]=
{694.886353f, 102.484665f, 142.119614f, 0}, // 3 - Nerub Spawn
{694.500671f, 185.363968f, 142.117905f, 0}, // 5 - Nerub Spawn
{731.987244f, 83.3824690f, 142.119614f, 0}, // 2 - Nerub Spawn
{740.184509f, 193.443390f, 142.117584f, 0}, // 4 - Nerub Spawn
{740.184509f, 193.443390f, 142.117584f, 0} // 4 - Nerub Spawn
};
const Position EndSpawnLoc[]=
{
{648.9167f, 131.0208f, 141.6161f, 0}, // 0 - Highlord Tirion Fordring
{649.1614f, 142.0399f, 141.3057f ,0}, // 1 - Argent Mage
{644.6250f, 149.2743f, 140.6015f ,0}, // 2 - Portal to Dalaran
{644.6250f, 149.2743f, 140.6015f ,0} // 2 - Portal to Dalaran
};
enum euiWorldStates
{
UPDATE_STATE_UI_SHOW = 4390,
UPDATE_STATE_UI_COUNT = 4389,
UPDATE_STATE_UI_COUNT = 4389
};
enum eNorthrendBeasts
@@ -152,7 +156,7 @@ enum eNorthrendBeasts
SNAKES_SPECIAL = 2003,
SNAKES_DONE = 2004,
ICEHOWL_IN_PROGRESS = 3000,
ICEHOWL_DONE = 3001,
ICEHOWL_DONE = 3001
};
enum eAnnouncerMessages
@@ -162,7 +166,7 @@ enum eAnnouncerMessages
MSG_CRUSADERS = 724003,
MSG_VALKIRIES = 724004,
MSG_LICH_KING = 724005,
MSG_ANUBARAK = 724006,
MSG_ANUBARAK = 724006
};
enum eCreature
@@ -227,7 +231,7 @@ enum eCreature
NPC_DARK_ESSENCE = 34567,
NPC_LIGHT_ESSENCE = 34568,
NPC_ANUBARAK = 34564,
NPC_ANUBARAK = 34564
};
enum eGameObject
@@ -253,7 +257,7 @@ enum eGameObject
GO_MAIN_GATE_DOOR = 195647,
GO_EAST_PORTCULLIS = 195648,
GO_WEB_DOOR = 195485,
GO_PORTAL_TO_DALARAN = 195682,
GO_PORTAL_TO_DALARAN = 195682
};
enum eAchievementData