Scripts/Icecrown Citadel: Changed spell timers for Lord Marrowgar, taken from sniffs
Scripts/Icecrown Citadel: Converted texts to new TextMgr Scripts/Icecrown Citadel: General cleanup & coding style consistency Scripts/Icecrown Citadel: Added missing spell script names --HG-- branch : trunk
This commit is contained in:
@@ -25,37 +25,34 @@
|
||||
enum eTexts
|
||||
{
|
||||
// Blood Queen Lana'Thel
|
||||
SAY_INTRO_1 = -1631115,
|
||||
SAY_INTRO_2 = -1631116,
|
||||
SAY_INTRO_1 = 0,
|
||||
SAY_INTRO_2 = 1,
|
||||
|
||||
// Prince Keleseth
|
||||
SAY_KELESETH_INVOCATION = -1631117,
|
||||
EMOTE_KELESETH_INVOCATION = -1631118,
|
||||
SAY_KELESETH_SPECIAL = -1631119,
|
||||
SAY_KELESETH_KILL_1 = -1631120,
|
||||
SAY_KELESETH_KILL_2 = -1631121,
|
||||
EMOTE_KELESETH_BERSERK = -1631122,
|
||||
SAY_KELESETH_DEATH = -1631123,
|
||||
SAY_KELESETH_INVOCATION = 0,
|
||||
EMOTE_KELESETH_INVOCATION = 1,
|
||||
SAY_KELESETH_SPECIAL = 2,
|
||||
SAY_KELESETH_KILL = 3,
|
||||
EMOTE_KELESETH_BERSERK = 4,
|
||||
SAY_KELESETH_DEATH = 5,
|
||||
|
||||
// Prince Taldaram
|
||||
SAY_TALDARAM_INVOCATION = -1631124,
|
||||
EMOTE_TALDARAM_INVOCATION = -1631125,
|
||||
SAY_TALDARAM_SPECIAL = -1631126,
|
||||
EMOTE_TALDARAM_FLAME = -1631127,
|
||||
SAY_TALDARAM_KILL_1 = -1631128,
|
||||
SAY_TALDARAM_KILL_2 = -1631129,
|
||||
EMOTE_TALDARAM_BERSERK = -1631130,
|
||||
EMOTE_TALDARAM_DEATH = -1631131,
|
||||
SAY_TALDARAM_INVOCATION = 0,
|
||||
EMOTE_TALDARAM_INVOCATION = 1,
|
||||
SAY_TALDARAM_SPECIAL = 2,
|
||||
EMOTE_TALDARAM_FLAME = 3,
|
||||
SAY_TALDARAM_KILL = 4,
|
||||
EMOTE_TALDARAM_BERSERK = 5,
|
||||
EMOTE_TALDARAM_DEATH = 6,
|
||||
|
||||
// Prince Valanar
|
||||
SAY_VALANAR_INVOCATION = -1631132,
|
||||
EMOTE_VALANAR_INVOCATION = -1631133,
|
||||
SAY_VALANAR_SPECIAL = -1631134,
|
||||
EMOTE_VALANAR_SHOCK_VORTEX = -1631135,
|
||||
SAY_VALANAR_KILL_1 = -1631136,
|
||||
SAY_VALANAR_KILL_2 = -1631137,
|
||||
SAY_VALANAR_BERSERK = -1631138,
|
||||
SAY_VALANAR_DEATH = -1631139
|
||||
SAY_VALANAR_INVOCATION = 0,
|
||||
EMOTE_VALANAR_INVOCATION = 1,
|
||||
SAY_VALANAR_SPECIAL = 2,
|
||||
EMOTE_VALANAR_SHOCK_VORTEX = 3,
|
||||
SAY_VALANAR_KILL = 4,
|
||||
SAY_VALANAR_BERSERK = 5,
|
||||
SAY_VALANAR_DEATH = 6,
|
||||
};
|
||||
|
||||
enum eSpells
|
||||
@@ -181,7 +178,7 @@ class boss_blood_council_controller : public CreatureScript
|
||||
|
||||
struct boss_blood_council_controllerAI : public BossAI
|
||||
{
|
||||
boss_blood_council_controllerAI(Creature* pCreature) : BossAI(pCreature, DATA_BLOOD_PRINCE_COUNCIL)
|
||||
boss_blood_council_controllerAI(Creature* creature) : BossAI(creature, DATA_BLOOD_PRINCE_COUNCIL)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -305,7 +302,7 @@ class boss_blood_council_controller : public CreatureScript
|
||||
newPrince->SetHealth(me->GetHealth());
|
||||
|
||||
DoCast(me, invocationOrder[invocationStage].spellId);
|
||||
DoScriptText(invocationOrder[invocationStage].textId, me);
|
||||
Talk(invocationOrder[invocationStage].textId);
|
||||
events.ScheduleEvent(EVENT_INVOCATION_OF_BLOOD, 30000);
|
||||
break;
|
||||
}
|
||||
@@ -320,7 +317,7 @@ class boss_blood_council_controller : public CreatureScript
|
||||
{
|
||||
uint64 guid;
|
||||
uint32 spellId;
|
||||
int32 textId;
|
||||
uint8 textId;
|
||||
uint32 visualSpell;
|
||||
|
||||
InvocationData(uint64 _guid, uint32 _spellId, int32 _textId, uint32 _visualSpell)
|
||||
@@ -336,9 +333,9 @@ class boss_blood_council_controller : public CreatureScript
|
||||
uint8 invocationStage;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_blood_council_controllerAI(pCreature);
|
||||
return new boss_blood_council_controllerAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -349,10 +346,10 @@ class boss_prince_keleseth_icc : public CreatureScript
|
||||
|
||||
struct boss_prince_kelesethAI : public BossAI
|
||||
{
|
||||
boss_prince_kelesethAI(Creature* pCreature) : BossAI(pCreature, DATA_BLOOD_PRINCE_COUNCIL)
|
||||
boss_prince_kelesethAI(Creature* creature) : BossAI(creature, DATA_BLOOD_PRINCE_COUNCIL)
|
||||
{
|
||||
bIsEmpowered = false;
|
||||
spawnHealth = pCreature->GetMaxHealth();
|
||||
isEmpowered = false;
|
||||
spawnHealth = creature->GetMaxHealth();
|
||||
}
|
||||
|
||||
void InitializeAI()
|
||||
@@ -375,7 +372,7 @@ class boss_prince_keleseth_icc : public CreatureScript
|
||||
summons.DespawnAll();
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
bIsEmpowered = false;
|
||||
isEmpowered = false;
|
||||
me->SetHealth(spawnHealth);
|
||||
instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, uint32(true));
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
@@ -400,7 +397,13 @@ class boss_prince_keleseth_icc : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_KELESETH_DEATH, me);
|
||||
Talk(SAY_KELESETH_DEATH);
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
me->SetHealth(spawnHealth);
|
||||
isEmpowered = false;
|
||||
}
|
||||
|
||||
void JustRespawned()
|
||||
@@ -431,14 +434,14 @@ class boss_prince_keleseth_icc : public CreatureScript
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage)
|
||||
{
|
||||
if (!bIsEmpowered)
|
||||
if (!isEmpowered)
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
DoScriptText(RAND(SAY_KELESETH_KILL_1, SAY_KELESETH_KILL_2), me);
|
||||
Talk(SAY_KELESETH_KILL);
|
||||
}
|
||||
|
||||
void DoAction(const int32 action)
|
||||
@@ -454,15 +457,15 @@ class boss_prince_keleseth_icc : public CreatureScript
|
||||
me->m_Events.AddEvent(new StandUpEvent(*me), me->m_Events.CalculateTime(1000));
|
||||
break;
|
||||
case ACTION_CAST_INVOCATION:
|
||||
DoScriptText(SAY_KELESETH_INVOCATION, me);
|
||||
Talk(SAY_KELESETH_INVOCATION);
|
||||
DoCast(me, SPELL_INVOCATION_VISUAL_ACTIVE, true);
|
||||
bIsEmpowered = true;
|
||||
isEmpowered = true;
|
||||
break;
|
||||
case ACTION_REMOVE_INVOCATION:
|
||||
me->SetHealth(spawnHealth);
|
||||
me->RemoveAurasDueToSpell(SPELL_INVOCATION_VISUAL_ACTIVE);
|
||||
me->RemoveAurasDueToSpell(SPELL_INVOCATION_OF_BLOOD_KELESETH);
|
||||
bIsEmpowered = false;
|
||||
isEmpowered = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -485,15 +488,15 @@ class boss_prince_keleseth_icc : public CreatureScript
|
||||
{
|
||||
case EVENT_BERSERK:
|
||||
DoCast(me, SPELL_BERSERK);
|
||||
DoScriptText(EMOTE_KELESETH_BERSERK, me);
|
||||
Talk(EMOTE_KELESETH_BERSERK);
|
||||
break;
|
||||
case EVENT_SHADOW_RESONANCE:
|
||||
DoScriptText(SAY_KELESETH_SPECIAL, me);
|
||||
Talk(SAY_KELESETH_SPECIAL);
|
||||
DoCast(me, SPELL_SHADOW_RESONANCE);
|
||||
events.ScheduleEvent(EVENT_SHADOW_RESONANCE, urand(10000, 15000));
|
||||
break;
|
||||
case EVENT_SHADOW_LANCE:
|
||||
if (bIsEmpowered)
|
||||
if (isEmpowered)
|
||||
DoCastVictim(SPELL_EMPOWERED_SHADOW_LANCE);
|
||||
else
|
||||
DoCastVictim(SPELL_SHADOW_LANCE);
|
||||
@@ -508,13 +511,13 @@ class boss_prince_keleseth_icc : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
bool bIsEmpowered; // bool check faster than map lookup
|
||||
bool isEmpowered; // bool check faster than map lookup
|
||||
uint32 spawnHealth;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_prince_kelesethAI(pCreature);
|
||||
return new boss_prince_kelesethAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -525,10 +528,10 @@ class boss_prince_taldaram_icc : public CreatureScript
|
||||
|
||||
struct boss_prince_taldaramAI : public BossAI
|
||||
{
|
||||
boss_prince_taldaramAI(Creature* pCreature) : BossAI(pCreature, DATA_BLOOD_PRINCE_COUNCIL)
|
||||
boss_prince_taldaramAI(Creature* creature) : BossAI(creature, DATA_BLOOD_PRINCE_COUNCIL)
|
||||
{
|
||||
bIsEmpowered = false;
|
||||
spawnHealth = pCreature->GetMaxHealth();
|
||||
isEmpowered = false;
|
||||
spawnHealth = creature->GetMaxHealth();
|
||||
}
|
||||
|
||||
void InitializeAI()
|
||||
@@ -551,7 +554,7 @@ class boss_prince_taldaram_icc : public CreatureScript
|
||||
summons.DespawnAll();
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
bIsEmpowered = false;
|
||||
isEmpowered = false;
|
||||
me->SetHealth(spawnHealth);
|
||||
instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, uint32(true));
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
@@ -576,7 +579,13 @@ class boss_prince_taldaram_icc : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(EMOTE_TALDARAM_DEATH, me);
|
||||
Talk(EMOTE_TALDARAM_DEATH);
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
me->SetHealth(spawnHealth);
|
||||
isEmpowered = false;
|
||||
}
|
||||
|
||||
void JustRespawned()
|
||||
@@ -598,8 +607,8 @@ class boss_prince_taldaram_icc : public CreatureScript
|
||||
if (!target)
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0/*1*/, 0.0f, true); // too bad for you raiders, its going to boom
|
||||
|
||||
if (summon->GetEntry() == NPC_BALL_OF_INFERNO_FLAME)
|
||||
DoScriptText(EMOTE_TALDARAM_FLAME, summon, target); // safe, has NULL checks
|
||||
if (summon->GetEntry() == NPC_BALL_OF_INFERNO_FLAME && target)
|
||||
Talk(EMOTE_TALDARAM_FLAME, target->GetGUID());
|
||||
|
||||
if (target)
|
||||
summon->AI()->SetGUID(target->GetGUID());
|
||||
@@ -616,14 +625,14 @@ class boss_prince_taldaram_icc : public CreatureScript
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage)
|
||||
{
|
||||
if (!bIsEmpowered)
|
||||
if (!isEmpowered)
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
DoScriptText(RAND(SAY_TALDARAM_KILL_1, SAY_TALDARAM_KILL_2), me);
|
||||
Talk(SAY_TALDARAM_KILL);
|
||||
}
|
||||
|
||||
void DoAction(const int32 action)
|
||||
@@ -639,15 +648,15 @@ class boss_prince_taldaram_icc : public CreatureScript
|
||||
me->m_Events.AddEvent(new StandUpEvent(*me), me->m_Events.CalculateTime(1000));
|
||||
break;
|
||||
case ACTION_CAST_INVOCATION:
|
||||
DoScriptText(SAY_TALDARAM_INVOCATION, me);
|
||||
Talk(SAY_TALDARAM_INVOCATION);
|
||||
DoCast(me, SPELL_INVOCATION_VISUAL_ACTIVE, true);
|
||||
bIsEmpowered = true;
|
||||
isEmpowered = true;
|
||||
break;
|
||||
case ACTION_REMOVE_INVOCATION:
|
||||
me->SetHealth(spawnHealth);
|
||||
me->RemoveAurasDueToSpell(SPELL_INVOCATION_VISUAL_ACTIVE);
|
||||
me->RemoveAurasDueToSpell(SPELL_INVOCATION_OF_BLOOD_TALDARAM);
|
||||
bIsEmpowered = false;
|
||||
isEmpowered = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -670,14 +679,14 @@ class boss_prince_taldaram_icc : public CreatureScript
|
||||
{
|
||||
case EVENT_BERSERK:
|
||||
DoCast(me, SPELL_BERSERK);
|
||||
DoScriptText(EMOTE_TALDARAM_BERSERK, me);
|
||||
Talk(EMOTE_TALDARAM_BERSERK);
|
||||
break;
|
||||
case EVENT_GLITTERING_SPARKS:
|
||||
DoCastVictim(SPELL_GLITTERING_SPARKS);
|
||||
events.ScheduleEvent(EVENT_GLITTERING_SPARKS, urand(15000, 50000));
|
||||
break;
|
||||
case EVENT_CONJURE_FLAME:
|
||||
if (bIsEmpowered)
|
||||
if (isEmpowered)
|
||||
{
|
||||
DoCast(me, SPELL_CONJURE_EMPOWERED_FLAME);
|
||||
events.ScheduleEvent(EVENT_CONJURE_FLAME, urand(15000, 25000));
|
||||
@@ -687,7 +696,7 @@ class boss_prince_taldaram_icc : public CreatureScript
|
||||
DoCast(me, SPELL_CONJURE_FLAME);
|
||||
events.ScheduleEvent(EVENT_CONJURE_FLAME, urand(20000, 30000));
|
||||
}
|
||||
DoScriptText(SAY_TALDARAM_SPECIAL, me);
|
||||
Talk(SAY_TALDARAM_SPECIAL);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -698,13 +707,13 @@ class boss_prince_taldaram_icc : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
bool bIsEmpowered; // bool check faster than map lookup
|
||||
bool isEmpowered; // bool check faster than map lookup
|
||||
uint32 spawnHealth;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_prince_taldaramAI(pCreature);
|
||||
return new boss_prince_taldaramAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -715,10 +724,10 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
|
||||
struct boss_prince_valanarAI : public BossAI
|
||||
{
|
||||
boss_prince_valanarAI(Creature* pCreature) : BossAI(pCreature, DATA_BLOOD_PRINCE_COUNCIL)
|
||||
boss_prince_valanarAI(Creature* creature) : BossAI(creature, DATA_BLOOD_PRINCE_COUNCIL)
|
||||
{
|
||||
bIsEmpowered = false;
|
||||
spawnHealth = pCreature->GetMaxHealth();
|
||||
isEmpowered = false;
|
||||
spawnHealth = creature->GetMaxHealth();
|
||||
}
|
||||
|
||||
void InitializeAI()
|
||||
@@ -741,7 +750,7 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
summons.DespawnAll();
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
bIsEmpowered = false;
|
||||
isEmpowered = false;
|
||||
me->SetHealth(me->GetMaxHealth());
|
||||
instance->SetData(DATA_ORB_WHISPERER_ACHIEVEMENT, uint32(true));
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
@@ -766,7 +775,13 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_VALANAR_DEATH, me);
|
||||
Talk(SAY_VALANAR_DEATH);
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
{
|
||||
me->SetHealth(me->GetMaxHealth());
|
||||
isEmpowered = false;
|
||||
}
|
||||
|
||||
void JustRespawned()
|
||||
@@ -820,14 +835,14 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage)
|
||||
{
|
||||
if (!bIsEmpowered)
|
||||
if (!isEmpowered)
|
||||
damage = 0;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
DoScriptText(RAND(SAY_VALANAR_KILL_1, SAY_VALANAR_KILL_2), me);
|
||||
Talk(SAY_VALANAR_KILL);
|
||||
}
|
||||
|
||||
void DoAction(const int32 action)
|
||||
@@ -843,15 +858,15 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
me->m_Events.AddEvent(new StandUpEvent(*me), me->m_Events.CalculateTime(1000));
|
||||
break;
|
||||
case ACTION_CAST_INVOCATION:
|
||||
DoScriptText(SAY_VALANAR_INVOCATION, me);
|
||||
Talk(SAY_VALANAR_INVOCATION);
|
||||
DoCast(me, SPELL_INVOCATION_VISUAL_ACTIVE, true);
|
||||
bIsEmpowered = true;
|
||||
isEmpowered = true;
|
||||
break;
|
||||
case ACTION_REMOVE_INVOCATION:
|
||||
me->SetHealth(spawnHealth);
|
||||
me->RemoveAurasDueToSpell(SPELL_INVOCATION_VISUAL_ACTIVE);
|
||||
me->RemoveAurasDueToSpell(SPELL_INVOCATION_OF_BLOOD_VALANAR);
|
||||
bIsEmpowered = false;
|
||||
isEmpowered = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -874,21 +889,21 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
{
|
||||
case EVENT_BERSERK:
|
||||
DoCast(me, SPELL_BERSERK);
|
||||
DoScriptText(SAY_VALANAR_BERSERK, me);
|
||||
Talk(SAY_VALANAR_BERSERK);
|
||||
break;
|
||||
case EVENT_KINETIC_BOMB:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
|
||||
{
|
||||
DoCast(target, SPELL_KINETIC_BOMB_TARGET);
|
||||
DoScriptText(SAY_VALANAR_SPECIAL, me);
|
||||
Talk(SAY_VALANAR_SPECIAL);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_KINETIC_BOMB, urand(18000, 24000));
|
||||
break;
|
||||
case EVENT_SHOCK_VORTEX:
|
||||
if (bIsEmpowered)
|
||||
if (isEmpowered)
|
||||
{
|
||||
DoCast(me, SPELL_EMPOWERED_SHOCK_VORTEX);
|
||||
DoScriptText(EMOTE_VALANAR_SHOCK_VORTEX, me);
|
||||
Talk(EMOTE_VALANAR_SHOCK_VORTEX);
|
||||
events.ScheduleEvent(EVENT_SHOCK_VORTEX, 30000);
|
||||
}
|
||||
else
|
||||
@@ -907,13 +922,13 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
bool bIsEmpowered; // bool check faster than map lookup
|
||||
bool isEmpowered; // bool check faster than map lookup
|
||||
uint32 spawnHealth;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_prince_valanarAI(pCreature);
|
||||
return new boss_prince_valanarAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -924,10 +939,10 @@ class npc_blood_queen_lana_thel : public CreatureScript
|
||||
|
||||
struct npc_blood_queen_lana_thelAI : public ScriptedAI
|
||||
{
|
||||
npc_blood_queen_lana_thelAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_blood_queen_lana_thelAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
bIntroDone = false;
|
||||
instance = pCreature->GetInstanceScript();
|
||||
introDone = false;
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void InitializeAI()
|
||||
@@ -945,7 +960,7 @@ class npc_blood_queen_lana_thel : public CreatureScript
|
||||
if (instance->GetBossState(DATA_BLOOD_PRINCE_COUNCIL) == DONE)
|
||||
{
|
||||
me->SetVisible(false);
|
||||
bIntroDone = true;
|
||||
introDone = true;
|
||||
}
|
||||
else
|
||||
me->SetVisible(true);
|
||||
@@ -953,14 +968,14 @@ class npc_blood_queen_lana_thel : public CreatureScript
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (bIntroDone)
|
||||
if (introDone)
|
||||
return;
|
||||
|
||||
if (!me->IsWithinDistInMap(who, 35.0f))
|
||||
return;
|
||||
|
||||
bIntroDone = true;
|
||||
DoScriptText(SAY_INTRO_1, me);
|
||||
introDone = true;
|
||||
Talk(SAY_INTRO_1);
|
||||
events.SetPhase(1);
|
||||
events.ScheduleEvent(EVENT_INTRO_1, 14000);
|
||||
// summon a visual trigger
|
||||
@@ -987,7 +1002,7 @@ class npc_blood_queen_lana_thel : public CreatureScript
|
||||
|
||||
if (events.ExecuteEvent() == EVENT_INTRO_1)
|
||||
{
|
||||
DoScriptText(SAY_INTRO_2, me);
|
||||
Talk(SAY_INTRO_2);
|
||||
me->GetMotionMaster()->MovePoint(POINT_INTRO_DESPAWN, introFinalPos);
|
||||
events.Reset();
|
||||
|
||||
@@ -1007,14 +1022,14 @@ class npc_blood_queen_lana_thel : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
bool bIntroDone;
|
||||
bool introDone;
|
||||
EventMap events;
|
||||
InstanceScript* instance;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_blood_queen_lana_thelAI(pCreature);
|
||||
return new npc_blood_queen_lana_thelAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1025,7 +1040,7 @@ class npc_ball_of_flame : public CreatureScript
|
||||
|
||||
struct npc_ball_of_flameAI : public ScriptedAI
|
||||
{
|
||||
npc_ball_of_flameAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_ball_of_flameAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
despawnTimer = 0;
|
||||
}
|
||||
@@ -1087,9 +1102,9 @@ class npc_ball_of_flame : public CreatureScript
|
||||
uint64 chaseGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_ball_of_flameAI(pCreature);
|
||||
return new npc_ball_of_flameAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1100,7 +1115,7 @@ class npc_kinetic_bomb : public CreatureScript
|
||||
|
||||
struct npc_kinetic_bombAI : public ScriptedAI
|
||||
{
|
||||
npc_kinetic_bombAI(Creature* pCreature) : ScriptedAI(pCreature) { }
|
||||
npc_kinetic_bombAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -1152,9 +1167,9 @@ class npc_kinetic_bomb : public CreatureScript
|
||||
float x, y, groundZ;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_kinetic_bombAI(pCreature);
|
||||
return new npc_kinetic_bombAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1165,7 +1180,7 @@ class npc_dark_nucleus : public CreatureScript
|
||||
|
||||
struct npc_dark_nucleusAI : public ScriptedAI
|
||||
{
|
||||
npc_dark_nucleusAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_dark_nucleusAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
lockedTarget = false;
|
||||
targetAuraCheck = 0;
|
||||
@@ -1250,9 +1265,9 @@ class npc_dark_nucleus : public CreatureScript
|
||||
bool lockedTarget;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_dark_nucleusAI(pCreature);
|
||||
return new npc_dark_nucleusAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -15,64 +15,73 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "icecrown_citadel.h"
|
||||
|
||||
enum eScriptTexts
|
||||
{
|
||||
SAY_INTRO_ALLIANCE_1 = -1631029,
|
||||
SAY_INTRO_ALLIANCE_2 = -1631030,
|
||||
SAY_INTRO_ALLIANCE_3 = -1631031,
|
||||
SAY_INTRO_ALLIANCE_4 = -1631032,
|
||||
SAY_INTRO_ALLIANCE_5 = -1631033,
|
||||
SAY_INTRO_ALLIANCE_6 = -1631034,
|
||||
SAY_INTRO_ALLIANCE_7 = -1631035,
|
||||
// Deathbringer Saurfang
|
||||
SAY_INTRO_ALLIANCE_2 = 0,
|
||||
SAY_INTRO_ALLIANCE_3 = 1,
|
||||
SAY_INTRO_ALLIANCE_6 = 2,
|
||||
SAY_INTRO_ALLIANCE_7 = 3,
|
||||
SAY_INTRO_HORDE_2 = 4,
|
||||
SAY_INTRO_HORDE_4 = 5,
|
||||
SAY_INTRO_HORDE_9 = 6,
|
||||
SAY_AGGRO = 7,
|
||||
SAY_MARK_OF_THE_FALLEN_CHAMPION = 8,
|
||||
SAY_BLOOD_BEASTS = 9,
|
||||
SAY_KILL = 10,
|
||||
SAY_FRENZY = 11,
|
||||
SAY_BERSERK = 12,
|
||||
SAY_DEATH = 13,
|
||||
|
||||
SAY_INTRO_HORDE_1 = -1631036,
|
||||
SAY_INTRO_HORDE_2 = -1631037,
|
||||
SAY_INTRO_HORDE_3 = -1631038,
|
||||
SAY_INTRO_HORDE_4 = -1631039,
|
||||
SAY_INTRO_HORDE_5 = -1631040,
|
||||
SAY_INTRO_HORDE_6 = -1631041,
|
||||
SAY_INTRO_HORDE_7 = -1631042,
|
||||
SAY_INTRO_HORDE_8 = -1631043,
|
||||
SAY_INTRO_HORDE_9 = -1631044,
|
||||
// High Overlord Saurfang
|
||||
SAY_INTRO_HORDE_1 = 0,
|
||||
SAY_INTRO_HORDE_3 = 1,
|
||||
SAY_INTRO_HORDE_5 = 2,
|
||||
SAY_INTRO_HORDE_6 = 3,
|
||||
SAY_INTRO_HORDE_7 = 4,
|
||||
SAY_INTRO_HORDE_8 = 5,
|
||||
SAY_OUTRO_ALLIANCE_8 = 6,
|
||||
SAY_OUTRO_ALLIANCE_12 = 7, // kneel after WP reached
|
||||
SAY_OUTRO_ALLIANCE_13 = 8,
|
||||
SAY_OUTRO_ALLIANCE_14 = 9,
|
||||
SAY_OUTRO_ALLIANCE_15 = 10,
|
||||
SAY_OUTRO_HORDE_1 = 11,
|
||||
SAY_OUTRO_HORDE_2 = 12,
|
||||
SAY_OUTRO_HORDE_3 = 13,
|
||||
SAY_OUTRO_HORDE_4 = 14,
|
||||
|
||||
SAY_AGGRO = -1631045,
|
||||
SAY_MARK_OF_THE_FALLEN_CHAMPION = -1631046,
|
||||
SAY_BLOOD_BEASTS = -1631047,
|
||||
SAY_KILL_1 = -1631048,
|
||||
SAY_KILL_2 = -1631049,
|
||||
SAY_FRENZY = -1631050,
|
||||
SAY_BERSERK = -1631051,
|
||||
SAY_DEATH = -1631052,
|
||||
// Muradin Bronzebeard
|
||||
SAY_INTRO_ALLIANCE_1 = 0,
|
||||
SAY_INTRO_ALLIANCE_4 = 1,
|
||||
SAY_INTRO_ALLIANCE_5 = 2,
|
||||
SAY_OUTRO_ALLIANCE_1 = 3, // TODO ALLIANCE OUTRO
|
||||
SAY_OUTRO_ALLIANCE_2 = 4,
|
||||
SAY_OUTRO_ALLIANCE_3 = 5,
|
||||
SAY_OUTRO_ALLIANCE_4 = 6,
|
||||
SAY_OUTRO_ALLIANCE_5 = 7,
|
||||
SAY_OUTRO_ALLIANCE_6 = 8,
|
||||
SAY_OUTRO_ALLIANCE_7 = 9,
|
||||
SAY_OUTRO_ALLIANCE_9 = 10,
|
||||
SAY_OUTRO_ALLIANCE_10 = 11,
|
||||
SAY_OUTRO_ALLIANCE_21 = 12,
|
||||
|
||||
SAY_OUTRO_ALLIANCE_1 = -1631053, // TODO ALLIANCE OUTRO
|
||||
SAY_OUTRO_ALLIANCE_2 = -1631054,
|
||||
SAY_OUTRO_ALLIANCE_3 = -1631055,
|
||||
SAY_OUTRO_ALLIANCE_4 = -1631056,
|
||||
SAY_OUTRO_ALLIANCE_5 = -1631057,
|
||||
SAY_OUTRO_ALLIANCE_6 = -1631058,
|
||||
SAY_OUTRO_ALLIANCE_7 = -1631059,
|
||||
SAY_OUTRO_ALLIANCE_8 = -1631060,
|
||||
SAY_OUTRO_ALLIANCE_9 = -1631061,
|
||||
SAY_OUTRO_ALLIANCE_10 = -1631062,
|
||||
SAY_OUTRO_ALLIANCE_11 = -1631063,
|
||||
SAY_OUTRO_ALLIANCE_12 = -1631064, // kneel after WP reached
|
||||
SAY_OUTRO_ALLIANCE_13 = -1631065,
|
||||
SAY_OUTRO_ALLIANCE_14 = -1631066,
|
||||
SAY_OUTRO_ALLIANCE_15 = -1631067,
|
||||
SAY_OUTRO_ALLIANCE_16 = -1631068,
|
||||
SAY_OUTRO_ALLIANCE_17 = -1631069,
|
||||
SAY_OUTRO_ALLIANCE_18 = -1631070,
|
||||
SAY_OUTRO_ALLIANCE_19 = -1631071,
|
||||
SAY_OUTRO_ALLIANCE_20 = -1631072,
|
||||
SAY_OUTRO_ALLIANCE_21 = -1631073,
|
||||
// Lady Jaina Proudmoore
|
||||
SAY_OUTRO_ALLIANCE_17 = 0,
|
||||
SAY_OUTRO_ALLIANCE_19 = 1,
|
||||
|
||||
SAY_OUTRO_HORDE_1 = -1631074,
|
||||
SAY_OUTRO_HORDE_2 = -1631075,
|
||||
SAY_OUTRO_HORDE_3 = -1631076,
|
||||
SAY_OUTRO_HORDE_4 = -1631077
|
||||
// King Varian Wrynn
|
||||
SAY_OUTRO_ALLIANCE_11 = 0,
|
||||
SAY_OUTRO_ALLIANCE_16 = 1,
|
||||
SAY_OUTRO_ALLIANCE_18 = 2,
|
||||
SAY_OUTRO_ALLIANCE_20 = 3,
|
||||
};
|
||||
|
||||
enum eSpells
|
||||
@@ -102,7 +111,7 @@ enum eSpells
|
||||
SPELL_SCENT_OF_BLOOD = 72769, // Heroic only
|
||||
|
||||
SPELL_RIDE_VEHICLE = 70640, // Outro
|
||||
SPELL_ACHIEVEMENT = 72928
|
||||
SPELL_ACHIEVEMENT = 72928,
|
||||
};
|
||||
|
||||
// Helper to get id of the aura on different modes (HasAura(baseId) wont work)
|
||||
@@ -165,7 +174,7 @@ enum eEvents
|
||||
EVENT_OUTRO_HORDE_5 = 48,
|
||||
EVENT_OUTRO_HORDE_6 = 49,
|
||||
EVENT_OUTRO_HORDE_7 = 50,
|
||||
EVENT_OUTRO_HORDE_8 = 51
|
||||
EVENT_OUTRO_HORDE_8 = 51,
|
||||
};
|
||||
|
||||
enum ePhases
|
||||
@@ -231,11 +240,11 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
|
||||
struct boss_deathbringer_saurfangAI : public BossAI
|
||||
{
|
||||
boss_deathbringer_saurfangAI(Creature* pCreature) : BossAI(pCreature, DATA_DEATHBRINGER_SAURFANG)
|
||||
boss_deathbringer_saurfangAI(Creature* creature) : BossAI(creature, DATA_DEATHBRINGER_SAURFANG)
|
||||
{
|
||||
ASSERT(pCreature->GetVehicleKit()); // we dont actually use it, just check if exists
|
||||
bIntroDone = false;
|
||||
uiFallenChampionCount = 0;
|
||||
ASSERT(creature->GetVehicleKit()); // we dont actually use it, just check if exists
|
||||
introDone = false;
|
||||
fallenChampionCount = 0;
|
||||
}
|
||||
|
||||
void InitializeAI()
|
||||
@@ -250,7 +259,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
{
|
||||
events.Reset();
|
||||
events.SetPhase(PHASE_COMBAT);
|
||||
bFrenzy = false;
|
||||
frenzy = false;
|
||||
me->SetPower(POWER_ENERGY, 0);
|
||||
DoCast(me, SPELL_ZERO_POWER, true);
|
||||
DoCast(me, SPELL_BLOOD_LINK, true);
|
||||
@@ -265,14 +274,14 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
Talk(SAY_AGGRO);
|
||||
events.ScheduleEvent(EVENT_SUMMON_BLOOD_BEAST, 30000, 0, PHASE_COMBAT);
|
||||
events.ScheduleEvent(EVENT_BERSERK, 480000, 0, PHASE_COMBAT);
|
||||
events.ScheduleEvent(EVENT_BOILING_BLOOD, 15500, 0, PHASE_COMBAT);
|
||||
events.ScheduleEvent(EVENT_BLOOD_NOVA, 17000, 0, PHASE_COMBAT);
|
||||
events.ScheduleEvent(EVENT_RUNE_OF_BLOOD, 20000, 0, PHASE_COMBAT);
|
||||
|
||||
uiFallenChampionCount = 0;
|
||||
fallenChampionCount = 0;
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MARK_OF_THE_FALLEN_CHAMPION);
|
||||
instance->SetBossState(DATA_DEATHBRINGER_SAURFANG, IN_PROGRESS);
|
||||
}
|
||||
@@ -280,7 +289,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoCastAOE(SPELL_ACHIEVEMENT, true);
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MARK_OF_THE_FALLEN_CHAMPION);
|
||||
instance->SetBossState(DATA_DEATHBRINGER_SAURFANG, DONE);
|
||||
@@ -304,7 +313,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
if (bIntroDone)
|
||||
if (introDone)
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
}
|
||||
|
||||
@@ -314,26 +323,26 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MARK_OF_THE_FALLEN_CHAMPION);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/)
|
||||
{
|
||||
if (!bFrenzy && HealthBelowPct(31)) // AT 30%, not below
|
||||
if (!frenzy && HealthBelowPct(31)) // AT 30%, not below
|
||||
{
|
||||
bFrenzy = true;
|
||||
frenzy = true;
|
||||
DoCast(me, SPELL_FRENZY);
|
||||
DoScriptText(SAY_FRENZY, me);
|
||||
Talk(SAY_FRENZY);
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon)
|
||||
{
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
summon->AI()->AttackStart(pTarget);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1))
|
||||
summon->AI()->AttackStart(target);
|
||||
|
||||
if (IsHeroic())
|
||||
DoCast(summon, SPELL_SCENT_OF_BLOOD);
|
||||
@@ -361,7 +370,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_MARK_OF_THE_FALLEN_CHAMPION:
|
||||
DoScriptText(SAY_MARK_OF_THE_FALLEN_CHAMPION, me);
|
||||
Talk(SAY_MARK_OF_THE_FALLEN_CHAMPION);
|
||||
break;
|
||||
case 72255: // Mark of the Fallen Champion, triggered id
|
||||
case 72444:
|
||||
@@ -390,29 +399,29 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_INTRO_ALLIANCE_2:
|
||||
DoScriptText(SAY_INTRO_ALLIANCE_2, me);
|
||||
Talk(SAY_INTRO_ALLIANCE_2);
|
||||
break;
|
||||
case EVENT_INTRO_ALLIANCE_3:
|
||||
DoScriptText(SAY_INTRO_ALLIANCE_3, me);
|
||||
Talk(SAY_INTRO_ALLIANCE_3);
|
||||
break;
|
||||
case EVENT_INTRO_ALLIANCE_6:
|
||||
DoScriptText(SAY_INTRO_ALLIANCE_6, me);
|
||||
DoScriptText(SAY_INTRO_ALLIANCE_7, me);
|
||||
Talk(SAY_INTRO_ALLIANCE_6);
|
||||
Talk(SAY_INTRO_ALLIANCE_7);
|
||||
DoCast(me, SPELL_GRIP_OF_AGONY);
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_2:
|
||||
DoScriptText(SAY_INTRO_HORDE_2, me);
|
||||
Talk(SAY_INTRO_HORDE_2);
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_4:
|
||||
DoScriptText(SAY_INTRO_HORDE_4, me);
|
||||
Talk(SAY_INTRO_HORDE_4);
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_9:
|
||||
DoCast(me, SPELL_GRIP_OF_AGONY);
|
||||
DoScriptText(SAY_INTRO_HORDE_9, me);
|
||||
Talk(SAY_INTRO_HORDE_9);
|
||||
break;
|
||||
case EVENT_INTRO_FINISH:
|
||||
events.SetPhase(PHASE_COMBAT);
|
||||
bIntroDone = true;
|
||||
introDone = true;
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
break;
|
||||
case EVENT_SUMMON_BLOOD_BEAST:
|
||||
@@ -421,7 +430,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
if (Is25ManRaid())
|
||||
for (uint8 i25 = 0; i25 < 3; ++i25)
|
||||
DoCast(me, SPELL_SUMMON_BLOOD_BEAST_25_MAN+i25);
|
||||
DoScriptText(SAY_BLOOD_BEASTS, me);
|
||||
Talk(SAY_BLOOD_BEASTS);
|
||||
events.ScheduleEvent(EVENT_SUMMON_BLOOD_BEAST, 40000, 0, PHASE_COMBAT);
|
||||
break;
|
||||
case EVENT_BLOOD_NOVA:
|
||||
@@ -446,7 +455,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
break;
|
||||
case EVENT_BERSERK:
|
||||
DoCast(me, SPELL_BERSERK);
|
||||
DoScriptText(SAY_BERSERK, me);
|
||||
Talk(SAY_BERSERK);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -459,7 +468,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
if (type == DATA_MADE_A_MESS)
|
||||
if (uiFallenChampionCount < RAID_MODE<uint32>(3, 5, 3, 5))
|
||||
if (fallenChampionCount < RAID_MODE<uint32>(3, 5, 3, 5))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
@@ -501,7 +510,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
case ACTION_MARK_OF_THE_FALLEN_CHAMPION:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true, -SPELL_MARK_OF_THE_FALLEN_CHAMPION))
|
||||
{
|
||||
++uiFallenChampionCount;
|
||||
++fallenChampionCount;
|
||||
DoCast(target, SPELL_MARK_OF_THE_FALLEN_CHAMPION);
|
||||
me->SetPower(POWER_ENERGY, 0);
|
||||
if (Aura* bloodPower = me->GetAura(SPELL_BLOOD_POWER))
|
||||
@@ -514,14 +523,14 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
bool bIntroDone;
|
||||
bool bFrenzy; // faster than iterating all auras to find Frenzy
|
||||
uint32 uiFallenChampionCount;
|
||||
bool introDone;
|
||||
bool frenzy; // faster than iterating all auras to find Frenzy
|
||||
uint32 fallenChampionCount;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_deathbringer_saurfangAI(pCreature);
|
||||
return new boss_deathbringer_saurfangAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -532,10 +541,10 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
|
||||
struct npc_high_overlord_saurfangAI : public ScriptedAI
|
||||
{
|
||||
npc_high_overlord_saurfangAI(Creature* pCreature) : ScriptedAI(pCreature), vehicle(pCreature->GetVehicleKit())
|
||||
npc_high_overlord_saurfangAI(Creature* creature) : ScriptedAI(creature), vehicle(creature->GetVehicleKit())
|
||||
{
|
||||
ASSERT(vehicle);
|
||||
pInstance = me->GetInstanceScript();
|
||||
instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
@@ -558,21 +567,21 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
(*itr)->AI()->SetData(0, x);
|
||||
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
DoScriptText(SAY_INTRO_HORDE_1, me);
|
||||
Talk(SAY_INTRO_HORDE_1);
|
||||
events.SetPhase(PHASE_INTRO_H);
|
||||
events.ScheduleEvent(EVENT_INTRO_HORDE_3, 18500, 0, PHASE_INTRO_H);
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
uiDeathbringerSaurfangGUID = pInstance->GetData64(DATA_DEATHBRINGER_SAURFANG);
|
||||
pInstance->HandleGameObject(pInstance->GetData64(GO_SAURFANG_S_DOOR), true);
|
||||
deathbringerSaurfangGUID = instance->GetData64(DATA_DEATHBRINGER_SAURFANG);
|
||||
instance->HandleGameObject(instance->GetData64(GO_SAURFANG_S_DOOR), true);
|
||||
}
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, uiDeathbringerSaurfangGUID))
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, deathbringerSaurfangGUID))
|
||||
deathbringer->AI()->DoAction(PHASE_INTRO_H);
|
||||
}
|
||||
else if (action == ACTION_START_OUTRO)
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_GRIP_OF_AGONY);
|
||||
DoScriptText(SAY_OUTRO_HORDE_1, me);
|
||||
Talk(SAY_OUTRO_HORDE_1);
|
||||
events.ScheduleEvent(EVENT_OUTRO_HORDE_2, 10000); // say
|
||||
events.ScheduleEvent(EVENT_OUTRO_HORDE_3, 18000); // say
|
||||
events.ScheduleEvent(EVENT_OUTRO_HORDE_4, 24000); // cast
|
||||
@@ -603,19 +612,17 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
if (id == POINT_FIRST_STEP)
|
||||
{
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
DoScriptText(SAY_INTRO_HORDE_3, me);
|
||||
Talk(SAY_INTRO_HORDE_3);
|
||||
events.ScheduleEvent(EVENT_INTRO_HORDE_5, 15500, 0, PHASE_INTRO_H);
|
||||
events.ScheduleEvent(EVENT_INTRO_HORDE_6, 29500, 0, PHASE_INTRO_H);
|
||||
events.ScheduleEvent(EVENT_INTRO_HORDE_7, 43800, 0, PHASE_INTRO_H);
|
||||
events.ScheduleEvent(EVENT_INTRO_HORDE_8, 47000, 0, PHASE_INTRO_H);
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, uiDeathbringerSaurfangGUID))
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, deathbringerSaurfangGUID))
|
||||
deathbringer->AI()->DoAction(ACTION_CONTINUE_INTRO);
|
||||
}
|
||||
//else if (id == EVENT_FALL_GROUND)
|
||||
// me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
else if (id == POINT_CORPSE)
|
||||
{
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, uiDeathbringerSaurfangGUID))
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, deathbringerSaurfangGUID))
|
||||
{
|
||||
deathbringer->CastSpell(me, SPELL_RIDE_VEHICLE, true); // for the packet logs.
|
||||
deathbringer->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -627,7 +634,7 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
}
|
||||
else if (id == POINT_FINAL)
|
||||
{
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, uiDeathbringerSaurfangGUID))
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, deathbringerSaurfangGUID))
|
||||
deathbringer->ForcedDespawn();
|
||||
me->ForcedDespawn();
|
||||
}
|
||||
@@ -645,30 +652,30 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
me->GetMotionMaster()->MovePoint(POINT_FIRST_STEP, firstStepPos.GetPositionX(), firstStepPos.GetPositionY(), firstStepPos.GetPositionZ());
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_5:
|
||||
DoScriptText(SAY_INTRO_HORDE_5, me);
|
||||
Talk(SAY_INTRO_HORDE_5);
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_6:
|
||||
DoScriptText(SAY_INTRO_HORDE_6, me);
|
||||
Talk(SAY_INTRO_HORDE_6);
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_7:
|
||||
DoScriptText(SAY_INTRO_HORDE_7, me);
|
||||
Talk(SAY_INTRO_HORDE_7);
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_8:
|
||||
DoScriptText(SAY_INTRO_HORDE_8, me);
|
||||
Talk(SAY_INTRO_HORDE_8);
|
||||
for (std::list<Creature*>::iterator itr = guardList.begin(); itr != guardList.end(); ++itr)
|
||||
(*itr)->AI()->DoAction(ACTION_CHARGE);
|
||||
me->GetMotionMaster()->MoveCharge(chargePos[0].GetPositionX(), chargePos[0].GetPositionY(), chargePos[0].GetPositionZ(), 8.5f, POINT_CHARGE);
|
||||
break;
|
||||
case EVENT_OUTRO_HORDE_2: // say
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, uiDeathbringerSaurfangGUID))
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, deathbringerSaurfangGUID))
|
||||
me->SetFacingToObject(deathbringer);
|
||||
DoScriptText(SAY_OUTRO_HORDE_2, me);
|
||||
Talk(SAY_OUTRO_HORDE_2);
|
||||
break;
|
||||
case EVENT_OUTRO_HORDE_3: // say
|
||||
DoScriptText(SAY_OUTRO_HORDE_3, me);
|
||||
Talk(SAY_OUTRO_HORDE_3);
|
||||
break;
|
||||
case EVENT_OUTRO_HORDE_4: // move
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, uiDeathbringerSaurfangGUID))
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, deathbringerSaurfangGUID))
|
||||
{
|
||||
float x, y, z;
|
||||
deathbringer->GetClosePoint(x, y, z, deathbringer->GetObjectSize());
|
||||
@@ -680,7 +687,7 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
me->GetMotionMaster()->MovePoint(POINT_FINAL, finalPos);
|
||||
break;
|
||||
case EVENT_OUTRO_HORDE_6: // say
|
||||
DoScriptText(SAY_OUTRO_HORDE_4, me);
|
||||
Talk(SAY_OUTRO_HORDE_4);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -688,40 +695,40 @@ class npc_high_overlord_saurfang_icc : public CreatureScript
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
Vehicle* vehicle;
|
||||
uint64 uiDeathbringerSaurfangGUID;
|
||||
uint64 deathbringerSaurfangGUID;
|
||||
std::list<Creature*> guardList;
|
||||
};
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
if (pCreature->GetPositionZ() < 530.0f)
|
||||
if (creature->GetPositionZ() < 530.0f)
|
||||
return false;
|
||||
|
||||
InstanceScript* pInstance = pCreature->GetInstanceScript();
|
||||
if (pInstance && pInstance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE)
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE)
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let it begin...", 631, -ACTION_START_EVENT);
|
||||
pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID());
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Let it begin...", 631, -ACTION_START_EVENT);
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* pCreature, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
if (action == -ACTION_START_EVENT)
|
||||
pCreature->AI()->DoAction(ACTION_START_EVENT);
|
||||
creature->AI()->DoAction(ACTION_START_EVENT);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_high_overlord_saurfangAI(pCreature);
|
||||
return new npc_high_overlord_saurfangAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -732,9 +739,9 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
|
||||
struct npc_muradin_bronzebeard_iccAI : public ScriptedAI
|
||||
{
|
||||
npc_muradin_bronzebeard_iccAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_muradin_bronzebeard_iccAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
pInstance = me->GetInstanceScript();
|
||||
instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
@@ -758,20 +765,20 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
(*itr)->AI()->SetData(0, x);
|
||||
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
DoScriptText(SAY_INTRO_ALLIANCE_1, me);
|
||||
Talk(SAY_INTRO_ALLIANCE_1);
|
||||
events.ScheduleEvent(EVENT_INTRO_ALLIANCE_4, 2500+17500+9500, 0, PHASE_INTRO_A);
|
||||
if (pInstance)
|
||||
if (instance)
|
||||
{
|
||||
uiDeathbringerSaurfangGUID = pInstance->GetData64(DATA_DEATHBRINGER_SAURFANG);
|
||||
pInstance->HandleGameObject(pInstance->GetData64(GO_SAURFANG_S_DOOR), true);
|
||||
deathbringerSaurfangGUID = instance->GetData64(DATA_DEATHBRINGER_SAURFANG);
|
||||
instance->HandleGameObject(instance->GetData64(GO_SAURFANG_S_DOOR), true);
|
||||
}
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, uiDeathbringerSaurfangGUID))
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, deathbringerSaurfangGUID))
|
||||
deathbringer->AI()->DoAction(PHASE_INTRO_A);
|
||||
}
|
||||
else if (action == ACTION_START_OUTRO)
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_GRIP_OF_AGONY);
|
||||
DoScriptText(SAY_OUTRO_ALLIANCE_1, me);
|
||||
Talk(SAY_OUTRO_ALLIANCE_1);
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
|
||||
me->SendMovementFlagUpdate();
|
||||
me->Relocate(me->GetPositionX(), me->GetPositionY(), 539.2917f);
|
||||
@@ -796,9 +803,9 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
return;
|
||||
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
DoScriptText(SAY_INTRO_ALLIANCE_4, me);
|
||||
Talk(SAY_INTRO_ALLIANCE_4);
|
||||
events.ScheduleEvent(EVENT_INTRO_ALLIANCE_5, 5000, 0, PHASE_INTRO_A);
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, uiDeathbringerSaurfangGUID))
|
||||
if (Creature* deathbringer = ObjectAccessor::GetCreature(*me, deathbringerSaurfangGUID))
|
||||
deathbringer->AI()->DoAction(ACTION_CONTINUE_INTRO);
|
||||
}
|
||||
|
||||
@@ -814,7 +821,7 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
me->GetMotionMaster()->MovePoint(POINT_FIRST_STEP, firstStepPos.GetPositionX(), firstStepPos.GetPositionY(), firstStepPos.GetPositionZ());
|
||||
break;
|
||||
case EVENT_INTRO_ALLIANCE_5:
|
||||
DoScriptText(SAY_INTRO_ALLIANCE_5, me);
|
||||
Talk(SAY_INTRO_ALLIANCE_5);
|
||||
for (std::list<Creature*>::iterator itr = guardList.begin(); itr != guardList.end(); ++itr)
|
||||
(*itr)->AI()->DoAction(ACTION_CHARGE);
|
||||
me->GetMotionMaster()->MoveCharge(chargePos[0].GetPositionX(), chargePos[0].GetPositionY(), chargePos[0].GetPositionZ(), 8.5f, POINT_CHARGE);
|
||||
@@ -825,39 +832,39 @@ class npc_muradin_bronzebeard_icc : public CreatureScript
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
InstanceScript* pInstance;
|
||||
uint64 uiDeathbringerSaurfangGUID;
|
||||
InstanceScript* instance;
|
||||
uint64 deathbringerSaurfangGUID;
|
||||
std::list<Creature*> guardList;
|
||||
};
|
||||
|
||||
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
if (pCreature->GetPositionZ() < 530.0f)
|
||||
if (creature->GetPositionZ() < 530.0f)
|
||||
return false;
|
||||
|
||||
InstanceScript* pInstance = pCreature->GetInstanceScript();
|
||||
if (pInstance && pInstance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE)
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance && instance->GetBossState(DATA_DEATHBRINGER_SAURFANG) != DONE)
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(0, "Let it begin...", 631, -ACTION_START_EVENT+1);
|
||||
pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, pCreature->GetGUID());
|
||||
player->ADD_GOSSIP_ITEM(0, "Let it begin...", 631, -ACTION_START_EVENT+1);
|
||||
player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, creature->GetGUID());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* pCreature, uint32 /*sender*/, uint32 action)
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
if (action == -ACTION_START_EVENT+1)
|
||||
pCreature->AI()->DoAction(ACTION_START_EVENT);
|
||||
creature->AI()->DoAction(ACTION_START_EVENT);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_muradin_bronzebeard_iccAI(pCreature);
|
||||
return new npc_muradin_bronzebeard_iccAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -868,7 +875,7 @@ class npc_saurfang_event : public CreatureScript
|
||||
|
||||
struct npc_saurfang_eventAI : public ScriptedAI
|
||||
{
|
||||
npc_saurfang_eventAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_saurfang_eventAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
uiNPCindex = 0;
|
||||
}
|
||||
@@ -901,9 +908,9 @@ class npc_saurfang_event : public CreatureScript
|
||||
uint32 uiNPCindex;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_saurfang_eventAI(pCreature);
|
||||
return new npc_saurfang_eventAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -914,7 +921,8 @@ class spell_deathbringer_blood_link : public SpellScriptLoader
|
||||
|
||||
class spell_deathbringer_blood_link_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_deathbringer_blood_link_SpellScript)
|
||||
PrepareSpellScript(spell_deathbringer_blood_link_SpellScript);
|
||||
|
||||
bool Validate(SpellEntry const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(SPELL_BLOOD_LINK_POWER))
|
||||
@@ -936,13 +944,6 @@ class spell_deathbringer_blood_link : public SpellScriptLoader
|
||||
{
|
||||
OnEffect += SpellEffectFn(spell_deathbringer_blood_link_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
|
||||
bool Load()
|
||||
{
|
||||
if (GetSpellInfo()->Id != SPELL_BLOOD_LINK_DUMMY)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
@@ -958,7 +959,8 @@ class spell_deathbringer_blood_link_aura : public SpellScriptLoader
|
||||
|
||||
class spell_deathbringer_blood_link_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_deathbringer_blood_link_AuraScript)
|
||||
PrepareAuraScript(spell_deathbringer_blood_link_AuraScript);
|
||||
|
||||
bool Validate(SpellEntry const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(SPELL_MARK_OF_THE_FALLEN_CHAMPION))
|
||||
@@ -966,26 +968,18 @@ class spell_deathbringer_blood_link_aura : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandlePeriodicTick(AuraEffect const * /*aurEff*/, AuraApplication const * /*aurApp*/)
|
||||
void HandlePeriodicTick(AuraEffect const* /*aurEff*/, AuraApplication const* /*aurApp*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
if (GetUnitOwner()->getPowerType() == POWER_ENERGY && GetUnitOwner()->GetPower(POWER_ENERGY) == GetUnitOwner()->GetMaxPower(POWER_ENERGY))
|
||||
if (Creature* saurfang = GetUnitOwner()->ToCreature())
|
||||
saurfang->AI()->DoAction(ACTION_MARK_OF_THE_FALLEN_CHAMPION);
|
||||
|
||||
PreventDefaultAction();
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_deathbringer_blood_link_AuraScript::HandlePeriodicTick, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
|
||||
bool Load()
|
||||
{
|
||||
if (GetSpellProto()->Id != SPELL_BLOOD_LINK)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const
|
||||
@@ -1001,7 +995,8 @@ class spell_deathbringer_blood_power : public SpellScriptLoader
|
||||
|
||||
class spell_deathbringer_blood_power_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_deathbringer_blood_power_SpellScript)
|
||||
PrepareSpellScript(spell_deathbringer_blood_power_SpellScript);
|
||||
|
||||
void ModAuraValue()
|
||||
{
|
||||
if (Aura* aura = GetHitAura())
|
||||
@@ -1016,7 +1011,8 @@ class spell_deathbringer_blood_power : public SpellScriptLoader
|
||||
|
||||
class spell_deathbringer_blood_power_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_deathbringer_blood_power_AuraScript)
|
||||
PrepareAuraScript(spell_deathbringer_blood_power_AuraScript);
|
||||
|
||||
void RecalculateHook(AuraEffect const* /*aurEffect*/, int32& amount, bool& canBeRecalculated)
|
||||
{
|
||||
amount = GetUnitOwner()->GetPower(POWER_ENERGY);
|
||||
@@ -1055,7 +1051,8 @@ class spell_deathbringer_rune_of_blood : public SpellScriptLoader
|
||||
|
||||
class spell_deathbringer_rune_of_blood_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_deathbringer_rune_of_blood_SpellScript)
|
||||
PrepareSpellScript(spell_deathbringer_rune_of_blood_SpellScript);
|
||||
|
||||
bool Validate(SpellEntry const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(SPELL_BLOOD_LINK_DUMMY))
|
||||
@@ -1063,9 +1060,9 @@ class spell_deathbringer_rune_of_blood : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
void HandleScript(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(EFFECT_1); // make this the default handler
|
||||
PreventHitDefaultEffect(effIndex); // make this the default handler
|
||||
if (GetCaster()->GetPower(POWER_ENERGY) != GetCaster()->GetMaxPower(POWER_ENERGY))
|
||||
GetHitUnit()->CastCustomSpell(SPELL_BLOOD_LINK_DUMMY, SPELLVALUE_BASE_POINT0, 1, GetCaster(), true);
|
||||
}
|
||||
@@ -1089,7 +1086,8 @@ class spell_deathbringer_blood_nova : public SpellScriptLoader
|
||||
|
||||
class spell_deathbringer_blood_nova_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_deathbringer_blood_nova_SpellScript)
|
||||
PrepareSpellScript(spell_deathbringer_blood_nova_SpellScript);
|
||||
|
||||
bool Validate(SpellEntry const* /*spellInfo*/)
|
||||
{
|
||||
if (!sSpellStore.LookupEntry(SPELL_BLOOD_LINK_DUMMY))
|
||||
|
||||
@@ -15,22 +15,25 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "icecrown_citadel.h"
|
||||
|
||||
enum eScriptTexts
|
||||
{
|
||||
SAY_STINKY_DEAD = -1631078,
|
||||
SAY_AGGRO = -1631079,
|
||||
EMOTE_GAS_SPORE = -1631081,
|
||||
EMOTE_WARN_GAS_SPORE = -1631082,
|
||||
SAY_PUNGENT_BLIGHT = -1631083,
|
||||
EMOTE_WARN_PUNGENT_BLIGHT = -1631084,
|
||||
EMOTE_PUNGENT_BLIGHT = -1631085,
|
||||
SAY_KILL_1 = -1631086,
|
||||
SAY_KILL_2 = -1631087,
|
||||
SAY_BERSERK = -1631088,
|
||||
SAY_DEATH = -1631089
|
||||
SAY_STINKY_DEAD = 0,
|
||||
SAY_AGGRO = 1,
|
||||
EMOTE_GAS_SPORE = 2,
|
||||
EMOTE_WARN_GAS_SPORE = 3,
|
||||
SAY_PUNGENT_BLIGHT = 4,
|
||||
EMOTE_WARN_PUNGENT_BLIGHT = 5,
|
||||
EMOTE_PUNGENT_BLIGHT = 6,
|
||||
SAY_KILL = 7,
|
||||
SAY_BERSERK = 8,
|
||||
SAY_DEATH = 9,
|
||||
};
|
||||
|
||||
enum eSpells
|
||||
@@ -47,7 +50,7 @@ enum eSpells
|
||||
// Stinky
|
||||
SPELL_MORTAL_WOUND = 71127,
|
||||
SPELL_DECIMATE = 71123,
|
||||
SPELL_PLAGUE_STENCH = 71805
|
||||
SPELL_PLAGUE_STENCH = 71805,
|
||||
};
|
||||
|
||||
// Used for HasAura checks
|
||||
@@ -66,7 +69,7 @@ enum eEvents
|
||||
EVENT_GASTRIC_BLOAT = 5,
|
||||
|
||||
EVENT_DECIMATE = 6,
|
||||
EVENT_MORTAL_WOUND = 7
|
||||
EVENT_MORTAL_WOUND = 7,
|
||||
};
|
||||
|
||||
#define DATA_INOCULATED_STACK 69291
|
||||
@@ -78,10 +81,10 @@ class boss_festergut : public CreatureScript
|
||||
|
||||
struct boss_festergutAI : public BossAI
|
||||
{
|
||||
boss_festergutAI(Creature* pCreature) : BossAI(pCreature, DATA_FESTERGUT)
|
||||
boss_festergutAI(Creature* creature) : BossAI(creature, DATA_FESTERGUT)
|
||||
{
|
||||
uiMaxInoculatedStack = 0;
|
||||
uiInhaleCounter = 0;
|
||||
maxInoculatedStack = 0;
|
||||
inhaleCounter = 0;
|
||||
gasDummyGUID = 0;
|
||||
}
|
||||
|
||||
@@ -101,17 +104,13 @@ class boss_festergut : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_VILE_GAS, urand(30000, 32500));
|
||||
events.ScheduleEvent(EVENT_GAS_SPORE, urand(20000, 25000));
|
||||
events.ScheduleEvent(EVENT_GASTRIC_BLOAT, urand(12500, 15000));
|
||||
uiMaxInoculatedStack = 0;
|
||||
uiInhaleCounter = 0;
|
||||
maxInoculatedStack = 0;
|
||||
inhaleCounter = 0;
|
||||
me->RemoveAurasDueToSpell(SPELL_BERSERK2);
|
||||
if (Creature* gasDummy = GetClosestCreatureWithEntry(me, NPC_GAS_DUMMY, 100.0f, true))
|
||||
if (Creature* gasDummy = me->FindNearestCreature(NPC_GAS_DUMMY, 100.0f, true))
|
||||
{
|
||||
gasDummyGUID = gasDummy->GetGUID();
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlight[i]);
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlightVisual[i]);
|
||||
}
|
||||
_RemoveBlight();
|
||||
}
|
||||
|
||||
instance->SetBossState(DATA_FESTERGUT, NOT_STARTED);
|
||||
@@ -119,8 +118,8 @@ class boss_festergut : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
if (Creature* gasDummy = GetClosestCreatureWithEntry(me, NPC_GAS_DUMMY, 100.0f, true))
|
||||
Talk(SAY_AGGRO);
|
||||
if (Creature* gasDummy = me->FindNearestCreature(NPC_GAS_DUMMY, 100.0f, true))
|
||||
gasDummyGUID = gasDummy->GetGUID();
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_FESTERGUT_COMBAT);
|
||||
@@ -130,17 +129,12 @@ class boss_festergut : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
Talk(SAY_DEATH);
|
||||
instance->SetBossState(DATA_FESTERGUT, DONE);
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_FESTERGUT_DEATH);
|
||||
|
||||
if (Creature* gasDummy = ObjectAccessor::GetCreature(*me, gasDummyGUID))
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlight[i]);
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlightVisual[i]);
|
||||
}
|
||||
_RemoveBlight();
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
@@ -155,10 +149,10 @@ class boss_festergut : public CreatureScript
|
||||
professor->AI()->EnterEvadeMode();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*who*/)
|
||||
@@ -188,18 +182,13 @@ class boss_festergut : public CreatureScript
|
||||
{
|
||||
case EVENT_INHALE_BLIGHT:
|
||||
{
|
||||
if (Creature* gasDummy = ObjectAccessor::GetCreature(*me, gasDummyGUID))
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlight[i]);
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlightVisual[i]);
|
||||
}
|
||||
if (uiInhaleCounter == 3)
|
||||
_RemoveBlight();
|
||||
if (inhaleCounter == 3)
|
||||
{
|
||||
DoScriptText(EMOTE_WARN_PUNGENT_BLIGHT, me);
|
||||
DoScriptText(SAY_PUNGENT_BLIGHT, me);
|
||||
Talk(EMOTE_WARN_PUNGENT_BLIGHT);
|
||||
Talk(SAY_PUNGENT_BLIGHT);
|
||||
DoCast(me, SPELL_PUNGENT_BLIGHT);
|
||||
uiInhaleCounter = 0;
|
||||
inhaleCounter = 0;
|
||||
if (Creature* professor = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_FESTERGUT_GAS);
|
||||
}
|
||||
@@ -207,9 +196,9 @@ class boss_festergut : public CreatureScript
|
||||
{
|
||||
DoCast(me, SPELL_INHALE_BLIGHT);
|
||||
// just cast and dont bother with target, conditions will handle it
|
||||
++uiInhaleCounter;
|
||||
if (uiInhaleCounter < 3)
|
||||
me->CastSpell(me, gaseousBlight[uiInhaleCounter], true, NULL, NULL, me->GetGUID());
|
||||
++inhaleCounter;
|
||||
if (inhaleCounter < 3)
|
||||
me->CastSpell(me, gaseousBlight[inhaleCounter], true, NULL, NULL, me->GetGUID());
|
||||
}
|
||||
events.ScheduleEvent(EVENT_INHALE_BLIGHT, urand(33500, 35000));
|
||||
break;
|
||||
@@ -229,9 +218,9 @@ class boss_festergut : public CreatureScript
|
||||
break;
|
||||
}
|
||||
case EVENT_GAS_SPORE:
|
||||
DoScriptText(EMOTE_WARN_GAS_SPORE, me);
|
||||
Talk(EMOTE_WARN_GAS_SPORE);
|
||||
Talk(EMOTE_GAS_SPORE);
|
||||
me->CastCustomSpell(SPELL_GAS_SPORE, SPELLVALUE_MAX_TARGETS, RAID_MODE<int32>(2,3,2,3), me);
|
||||
DoScriptText(EMOTE_GAS_SPORE, me);
|
||||
events.ScheduleEvent(EVENT_GAS_SPORE, urand(40000, 45000));
|
||||
break;
|
||||
case EVENT_GASTRIC_BLOAT:
|
||||
@@ -240,7 +229,7 @@ class boss_festergut : public CreatureScript
|
||||
break;
|
||||
case EVENT_BERSERK:
|
||||
DoCast(me, SPELL_BERSERK2);
|
||||
DoScriptText(SAY_BERSERK, me);
|
||||
Talk(SAY_BERSERK);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -252,27 +241,37 @@ class boss_festergut : public CreatureScript
|
||||
|
||||
void SetData(uint32 type, uint32 data)
|
||||
{
|
||||
if (type == DATA_INOCULATED_STACK && data > uiMaxInoculatedStack)
|
||||
uiMaxInoculatedStack = data;
|
||||
if (type == DATA_INOCULATED_STACK && data > maxInoculatedStack)
|
||||
maxInoculatedStack = data;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
if (type == DATA_INOCULATED_STACK)
|
||||
return uint32(uiMaxInoculatedStack);
|
||||
return uint32(maxInoculatedStack);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void _RemoveBlight()
|
||||
{
|
||||
if (Creature* gasDummy = ObjectAccessor::GetCreature(*me, gasDummyGUID))
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
{
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlight[i]);
|
||||
gasDummy->RemoveAurasDueToSpell(gaseousBlightVisual[i]);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 uiMaxInoculatedStack;
|
||||
uint8 uiInhaleCounter;
|
||||
uint32 maxInoculatedStack;
|
||||
uint8 inhaleCounter;
|
||||
uint64 gasDummyGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_festergutAI(pCreature);
|
||||
return new boss_festergutAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -283,9 +282,9 @@ class npc_stinky_icc : public CreatureScript
|
||||
|
||||
struct npc_stinky_iccAI : public ScriptedAI
|
||||
{
|
||||
npc_stinky_iccAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_stinky_iccAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
pInstance = pCreature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
@@ -328,20 +327,20 @@ class npc_stinky_icc : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*who*/)
|
||||
{
|
||||
uint64 festergutGUID = pInstance ? pInstance->GetData64(DATA_FESTERGUT) : 0;
|
||||
if (Creature *festergut = me->GetCreature(*me, festergutGUID))
|
||||
uint64 festergutGUID = instance ? instance->GetData64(DATA_FESTERGUT) : 0;
|
||||
if (Creature* festergut = me->GetCreature(*me, festergutGUID))
|
||||
if (festergut->isAlive())
|
||||
DoScriptText(SAY_STINKY_DEAD, festergut);
|
||||
festergut->AI()->Talk(SAY_STINKY_DEAD);
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_stinky_iccAI(pCreature);
|
||||
return new npc_stinky_iccAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -352,11 +351,12 @@ class spell_festergut_pungent_blight : public SpellScriptLoader
|
||||
|
||||
class spell_festergut_pungent_blight_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_festergut_pungent_blight_SpellScript)
|
||||
PrepareSpellScript(spell_festergut_pungent_blight_SpellScript);
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
SpellEntry const* spellInfo = sSpellStore.LookupEntry(GetEffectValue());
|
||||
if (!spellInfo)
|
||||
if (!spellInfo || GetCaster()->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
// Get Inhaled Blight id for our difficulty
|
||||
@@ -364,7 +364,7 @@ class spell_festergut_pungent_blight : public SpellScriptLoader
|
||||
|
||||
// ...and remove it
|
||||
GetCaster()->RemoveAurasDueToSpell(spellInfo->Id);
|
||||
DoScriptText(EMOTE_PUNGENT_BLIGHT, GetCaster());
|
||||
GetCaster()->ToCreature()->AI()->Talk(EMOTE_PUNGENT_BLIGHT);
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -386,7 +386,8 @@ class spell_festergut_gastric_bloat : public SpellScriptLoader
|
||||
|
||||
class spell_festergut_gastric_bloat_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_festergut_gastric_bloat_SpellScript)
|
||||
PrepareSpellScript(spell_festergut_gastric_bloat_SpellScript);
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Aura const* aura = GetHitUnit()->GetAura(GetSpellInfo()->Id);
|
||||
@@ -422,7 +423,8 @@ class spell_festergut_blighted_spores : public SpellScriptLoader
|
||||
|
||||
class spell_festergut_blighted_spores_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_festergut_blighted_spores_AuraScript)
|
||||
PrepareAuraScript(spell_festergut_blighted_spores_AuraScript);
|
||||
|
||||
void ExtraEffect(AuraEffect const* /*aurEff*/, AuraApplication const* aurApp, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (!GetCaster()->IsAIEnabled || GetCaster()->GetTypeId() != TYPEID_UNIT)
|
||||
@@ -435,8 +437,7 @@ class spell_festergut_blighted_spores : public SpellScriptLoader
|
||||
|
||||
aurApp->GetTarget()->CastSpell(aurApp->GetTarget(), SPELL_INOCULATED, true);
|
||||
++currStack;
|
||||
if (GetCaster())
|
||||
GetCaster()->ToCreature()->AI()->SetData(DATA_INOCULATED_STACK, currStack);
|
||||
GetCaster()->ToCreature()->AI()->SetData(DATA_INOCULATED_STACK, currStack);
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
@@ -15,29 +15,31 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "icecrown_citadel.h"
|
||||
|
||||
enum eScriptTexts
|
||||
{
|
||||
SAY_INTRO_1 = -1631011,
|
||||
SAY_INTRO_2 = -1631012,
|
||||
SAY_INTRO_3 = -1631013,
|
||||
SAY_INTRO_4 = -1631014,
|
||||
SAY_INTRO_5 = -1631015,
|
||||
SAY_INTRO_6 = -1631016,
|
||||
SAY_INTRO_7 = -1631017,
|
||||
SAY_AGGRO = -1631018,
|
||||
SAY_PHASE_2 = -1631019,
|
||||
SAY_PHASE_2_EMOTE = -1631020,
|
||||
SAY_DOMINATE_MIND = -1631021,
|
||||
SAY_DARK_EMPOWERMENT = -1631022,
|
||||
SAY_DARK_TRANSFORMATION = -1631023,
|
||||
SAY_ANIMATE_DEAD = -1631024,
|
||||
SAY_KILL_1 = -1631025,
|
||||
SAY_KILL_2 = -1631026,
|
||||
SAY_BERSERK = -1631027,
|
||||
SAY_DEATH = -1631028
|
||||
SAY_INTRO_1 = 0,
|
||||
SAY_INTRO_2 = 1,
|
||||
SAY_INTRO_3 = 2,
|
||||
SAY_INTRO_4 = 3,
|
||||
SAY_INTRO_5 = 4,
|
||||
SAY_INTRO_6 = 5,
|
||||
SAY_INTRO_7 = 6,
|
||||
SAY_AGGRO = 7,
|
||||
SAY_PHASE_2 = 8,
|
||||
EMOTE_PHASE_2 = 9,
|
||||
SAY_DOMINATE_MIND = 10,
|
||||
SAY_DARK_EMPOWERMENT = 11,
|
||||
SAY_DARK_TRANSFORMATION = 12,
|
||||
SAY_ANIMATE_DEAD = 13,
|
||||
SAY_KILL = 14,
|
||||
SAY_BERSERK = 15,
|
||||
SAY_DEATH = 16,
|
||||
};
|
||||
|
||||
enum eSpells
|
||||
@@ -82,7 +84,10 @@ enum eSpells
|
||||
|
||||
// Vengeful Shade
|
||||
SPELL_VENGEFUL_BLAST = 71544,
|
||||
SPELL_VENGEFUL_BLAST_PASSIVE = 71494
|
||||
SPELL_VENGEFUL_BLAST_PASSIVE = 71494,
|
||||
SPELL_VENGEFUL_BLAST_25N = 72010,
|
||||
SPELL_VENGEFUL_BLAST_10H = 72011,
|
||||
SPELL_VENGEFUL_BLAST_25H = 72012,
|
||||
};
|
||||
|
||||
enum eEvents
|
||||
@@ -124,7 +129,7 @@ enum eEvents
|
||||
EVENT_ADHERENT_FROST_FEVER = 24,
|
||||
EVENT_ADHERENT_DEATHCHILL = 25,
|
||||
EVENT_ADHERENT_CURSE_OF_TORPOR = 26,
|
||||
EVENT_ADHERENT_SHORUD_OF_THE_OCCULT = 27
|
||||
EVENT_ADHERENT_SHORUD_OF_THE_OCCULT = 27,
|
||||
};
|
||||
|
||||
enum ePhases
|
||||
@@ -138,7 +143,7 @@ enum ePhases
|
||||
PHASE_ONE_MASK = 1 << PHASE_ONE,
|
||||
};
|
||||
|
||||
static const uint32 uiAddEntries[2] = {NPC_CULT_FANATIC, NPC_CULT_ADHERENT};
|
||||
static const uint32 addEntries[2] = {NPC_CULT_FANATIC, NPC_CULT_ADHERENT};
|
||||
|
||||
static const Position addSpawnPos[7] =
|
||||
{
|
||||
@@ -148,7 +153,7 @@ static const Position addSpawnPos[7] =
|
||||
{-578.6996f, 2269.856f, 51.01529f, 4.590216f}, // 4 Right Door 1 (Cult Adherent)
|
||||
{-598.9688f, 2269.264f, 51.01529f, 4.590216f}, // 5 Right Door 2 (Cult Fanatic)
|
||||
{-619.4323f, 2268.523f, 51.01530f, 4.590216f}, // 6 Right Door 3 (Cult Adherent)
|
||||
{-524.2480f, 2211.920f, 62.90960f, 3.141592f} // 7 Upper (Random Cultist)
|
||||
{-524.2480f, 2211.920f, 62.90960f, 3.141592f}, // 7 Upper (Random Cultist)
|
||||
};
|
||||
|
||||
class boss_lady_deathwhisper : public CreatureScript
|
||||
@@ -158,10 +163,10 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
|
||||
struct boss_lady_deathwhisperAI : public BossAI
|
||||
{
|
||||
boss_lady_deathwhisperAI(Creature* pCreature) : BossAI(pCreature, DATA_LADY_DEATHWHISPER)
|
||||
boss_lady_deathwhisperAI(Creature* creature) : BossAI(creature, DATA_LADY_DEATHWHISPER)
|
||||
{
|
||||
bIntroDone = false;
|
||||
uiDominateMindCount = RAID_MODE(0,1,1,3);
|
||||
introDone = false;
|
||||
dominateMindCount = RAID_MODE(0,1,1,3);
|
||||
}
|
||||
|
||||
void InitializeAI()
|
||||
@@ -178,8 +183,8 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
me->SetLastManaUse(0xFFFFFFFF); // hacky, but no other way atm to prevent mana regen
|
||||
events.Reset();
|
||||
events.SetPhase(PHASE_ONE);
|
||||
uiAddWaveCounter = 0;
|
||||
uiNextVengefulShadeTarget = 0;
|
||||
addWaveCounter = 0;
|
||||
nextVengefulShadeTarget = 0;
|
||||
DoCast(me, SPELL_SHADOW_CHANNELING);
|
||||
me->RemoveAurasDueToSpell(SPELL_BERSERK);
|
||||
me->RemoveAurasDueToSpell(SPELL_MANA_BARRIER);
|
||||
@@ -190,11 +195,11 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!bIntroDone && me->IsWithinDistInMap(who, 100.0f))
|
||||
if (!introDone && me->IsWithinDistInMap(who, 100.0f))
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
bIntroDone = true;
|
||||
DoScriptText(SAY_INTRO_1, me);
|
||||
introDone = true;
|
||||
Talk(SAY_INTRO_1);
|
||||
events.SetPhase(PHASE_INTRO);
|
||||
events.ScheduleEvent(EVENT_INTRO_2, 11000, 0, PHASE_INTRO);
|
||||
events.ScheduleEvent(EVENT_INTRO_3, 21000, 0, PHASE_INTRO);
|
||||
@@ -229,7 +234,7 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
if (getDifficulty() != RAID_DIFFICULTY_10MAN_NORMAL)
|
||||
events.ScheduleEvent(EVENT_DOMINATE_MIND_H, 27000);
|
||||
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
Talk(SAY_AGGRO);
|
||||
DoStartNoMovement(who);
|
||||
me->RemoveAurasDueToSpell(SPELL_SHADOW_CHANNELING);
|
||||
DoCast(me, SPELL_MANA_BARRIER, true);
|
||||
@@ -239,7 +244,7 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
instance->SetBossState(DATA_LADY_DEATHWHISPER, DONE);
|
||||
|
||||
@@ -281,10 +286,10 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
summons.DespawnAll();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*damageDealer*/, uint32& uiDamage)
|
||||
@@ -292,8 +297,8 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
// phase transition
|
||||
if (events.GetPhaseMask() & PHASE_ONE_MASK && uiDamage > me->GetPower(POWER_MANA))
|
||||
{
|
||||
DoScriptText(SAY_PHASE_2, me);
|
||||
DoScriptText(SAY_PHASE_2_EMOTE, me);
|
||||
Talk(SAY_PHASE_2);
|
||||
Talk(EMOTE_PHASE_2);
|
||||
DoStartMovement(me->getVictim());
|
||||
uiDamage -= me->GetPower(POWER_MANA);
|
||||
me->SetPower(POWER_MANA, 0);
|
||||
@@ -319,8 +324,8 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
Unit* target = NULL;
|
||||
if (summon->GetEntry() == NPC_VENGEFUL_SHADE)
|
||||
{
|
||||
target = ObjectAccessor::GetUnit(*me, uiNextVengefulShadeTarget); // Vengeful Shade
|
||||
uiNextVengefulShadeTarget = 0;
|
||||
target = ObjectAccessor::GetUnit(*me, nextVengefulShadeTarget); // Vengeful Shade
|
||||
nextVengefulShadeTarget = 0;
|
||||
}
|
||||
else
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM); // Wave adds
|
||||
@@ -332,11 +337,6 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
summon->AI()->DoCast(summon, SPELL_ADHERENT_S_DETERMINATION);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon)
|
||||
{
|
||||
summons.remove(summon->GetGUID());
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if ((!UpdateVictim() && !(events.GetPhaseMask() & PHASE_INTRO_MASK)) || !CheckInRoom())
|
||||
@@ -352,34 +352,34 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_INTRO_2:
|
||||
DoScriptText(SAY_INTRO_2, me);
|
||||
Talk(SAY_INTRO_2);
|
||||
break;
|
||||
case EVENT_INTRO_3:
|
||||
DoScriptText(SAY_INTRO_3, me);
|
||||
Talk(SAY_INTRO_3);
|
||||
break;
|
||||
case EVENT_INTRO_4:
|
||||
DoScriptText(SAY_INTRO_4, me);
|
||||
Talk(SAY_INTRO_4);
|
||||
break;
|
||||
case EVENT_INTRO_5:
|
||||
DoScriptText(SAY_INTRO_5, me);
|
||||
Talk(SAY_INTRO_5);
|
||||
break;
|
||||
case EVENT_INTRO_6:
|
||||
DoScriptText(SAY_INTRO_6, me);
|
||||
Talk(SAY_INTRO_6);
|
||||
break;
|
||||
case EVENT_INTRO_7:
|
||||
DoScriptText(SAY_INTRO_7, me);
|
||||
Talk(SAY_INTRO_7);
|
||||
break;
|
||||
case EVENT_INTRO_FINISH:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
break;
|
||||
case EVENT_DEATH_AND_DECAY:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
DoCast(pTarget, SPELL_DEATH_AND_DECAY);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
DoCast(target, SPELL_DEATH_AND_DECAY);
|
||||
events.ScheduleEvent(EVENT_DEATH_AND_DECAY, urand(10000, 12000));
|
||||
break;
|
||||
case EVENT_DOMINATE_MIND_H:
|
||||
DoScriptText(SAY_DOMINATE_MIND, me);
|
||||
for (uint8 i = 0; i < uiDominateMindCount; i++)
|
||||
Talk(SAY_DOMINATE_MIND);
|
||||
for (uint8 i = 0; i < dominateMindCount; i++)
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_DOMINATE_MIND_H))
|
||||
DoCast(target, SPELL_DOMINATE_MIND_H);
|
||||
events.ScheduleEvent(EVENT_DOMINATE_MIND_H, urand(18000, 22000));
|
||||
@@ -389,8 +389,8 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_P1_SUMMON_WAVE, 60000, 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_P1_SHADOW_BOLT:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
DoCast(pTarget, SPELL_SHADOW_BOLT);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
|
||||
DoCast(target, SPELL_SHADOW_BOLT);
|
||||
events.ScheduleEvent(EVENT_P1_SHADOW_BOLT, urand(5000, 8000), 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_P1_REANIMATE_CULTIST:
|
||||
@@ -413,10 +413,10 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_P2_TOUCH_OF_INSIGNIFICANCE, urand(9000, 13000), 0, PHASE_TWO);
|
||||
break;
|
||||
case EVENT_P2_SUMMON_SHADE:
|
||||
if (Unit* pShadeTarget = SelectUnit(SELECT_TARGET_RANDOM, 1))
|
||||
if (Unit* shadeTarget = SelectUnit(SELECT_TARGET_RANDOM, 1))
|
||||
{
|
||||
uiNextVengefulShadeTarget = pShadeTarget->GetGUID();
|
||||
DoCast(pShadeTarget, SPELL_SUMMON_SHADE);
|
||||
nextVengefulShadeTarget = shadeTarget->GetGUID();
|
||||
DoCast(shadeTarget, SPELL_SUMMON_SHADE);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_P2_SUMMON_SHADE, urand(18000, 23000), 0, PHASE_TWO);
|
||||
break;
|
||||
@@ -426,7 +426,7 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
break;
|
||||
case EVENT_BERSERK:
|
||||
DoCast(me, SPELL_BERSERK);
|
||||
DoScriptText(SAY_BERSERK, me);
|
||||
Talk(SAY_BERSERK);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -441,34 +441,34 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
// summoning function for first phase
|
||||
void SummonWaveP1()
|
||||
{
|
||||
uint8 addIndex = uiAddWaveCounter & 1;
|
||||
uint8 addIndex = addWaveCounter & 1;
|
||||
uint8 addIndexOther = addIndex ^ 1;
|
||||
_SummonAdd(uiAddEntries[addIndex], addSpawnPos[addIndex*3]);
|
||||
_SummonAdd(uiAddEntries[addIndexOther], addSpawnPos[addIndex*3+1]);
|
||||
_SummonAdd(uiAddEntries[addIndex], addSpawnPos[addIndex*3+2]);
|
||||
if (getDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || getDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC)
|
||||
_SummonAdd(addEntries[addIndex], addSpawnPos[addIndex*3]);
|
||||
_SummonAdd(addEntries[addIndexOther], addSpawnPos[addIndex*3+1]);
|
||||
_SummonAdd(addEntries[addIndex], addSpawnPos[addIndex*3+2]);
|
||||
if (Is25ManRaid())
|
||||
{
|
||||
_SummonAdd(uiAddEntries[addIndexOther], addSpawnPos[addIndexOther*3]);
|
||||
_SummonAdd(uiAddEntries[addIndex], addSpawnPos[addIndexOther*3+1]);
|
||||
_SummonAdd(uiAddEntries[addIndexOther], addSpawnPos[addIndexOther*3+2]);
|
||||
_SummonAdd(uiAddEntries[urand(0,1)], addSpawnPos[6]);
|
||||
_SummonAdd(addEntries[addIndexOther], addSpawnPos[addIndexOther*3]);
|
||||
_SummonAdd(addEntries[addIndex], addSpawnPos[addIndexOther*3+1]);
|
||||
_SummonAdd(addEntries[addIndexOther], addSpawnPos[addIndexOther*3+2]);
|
||||
_SummonAdd(addEntries[urand(0,1)], addSpawnPos[6]);
|
||||
}
|
||||
++uiAddWaveCounter;
|
||||
++addWaveCounter;
|
||||
}
|
||||
|
||||
// summoning function for second phase
|
||||
void SummonWaveP2()
|
||||
{
|
||||
if (getDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC)
|
||||
if (Is25ManRaid())
|
||||
{
|
||||
uint8 addIndex = uiAddWaveCounter & 1;
|
||||
_SummonAdd(uiAddEntries[addIndex], addSpawnPos[addIndex*3]);
|
||||
_SummonAdd(uiAddEntries[addIndex ^ 1], addSpawnPos[addIndex*3+1]);
|
||||
_SummonAdd(uiAddEntries[addIndex], addSpawnPos[addIndex*3+2]);
|
||||
uint8 addIndex = addWaveCounter & 1;
|
||||
_SummonAdd(addEntries[addIndex], addSpawnPos[addIndex*3]);
|
||||
_SummonAdd(addEntries[addIndex ^ 1], addSpawnPos[addIndex*3+1]);
|
||||
_SummonAdd(addEntries[addIndex], addSpawnPos[addIndex*3+2]);
|
||||
}
|
||||
else
|
||||
_SummonAdd(uiAddEntries[urand(0,1)], addSpawnPos[6]);
|
||||
++uiAddWaveCounter;
|
||||
_SummonAdd(addEntries[urand(0,1)], addSpawnPos[6]);
|
||||
++addWaveCounter;
|
||||
}
|
||||
|
||||
// helper for summoning wave mobs
|
||||
@@ -495,11 +495,11 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
if (!cultist)
|
||||
return;
|
||||
|
||||
DoScriptText(SAY_ANIMATE_DEAD, me);
|
||||
Talk(SAY_ANIMATE_DEAD);
|
||||
DoCast(cultist, SPELL_DARK_MARTYRDOM_T);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit * target, const SpellEntry * spell)
|
||||
void SpellHitTarget(Unit* target, const SpellEntry* spell)
|
||||
{
|
||||
if (spell->Id == SPELL_DARK_MARTYRDOM_T)
|
||||
{
|
||||
@@ -536,20 +536,20 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
|
||||
Creature* cultist = *cultistItr;
|
||||
DoCast(cultist, cultist->GetEntry() == NPC_CULT_FANATIC ? SPELL_DARK_TRANSFORMATION_T : SPELL_DARK_EMPOWERMENT_T, true);
|
||||
DoScriptText(cultist->GetEntry() == NPC_CULT_FANATIC ? SAY_DARK_TRANSFORMATION : SAY_DARK_EMPOWERMENT, me);
|
||||
Talk(cultist->GetEntry() == NPC_CULT_FANATIC ? SAY_DARK_TRANSFORMATION : SAY_DARK_EMPOWERMENT);
|
||||
}
|
||||
|
||||
private:
|
||||
bool bIntroDone;
|
||||
uint32 uiAddWaveCounter;
|
||||
uint64 uiNextVengefulShadeTarget;
|
||||
bool introDone;
|
||||
uint32 addWaveCounter;
|
||||
uint64 nextVengefulShadeTarget;
|
||||
std::deque<uint64> reanimationQueue;
|
||||
uint8 uiDominateMindCount;
|
||||
uint8 dominateMindCount;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_lady_deathwhisperAI(pCreature);
|
||||
return new boss_lady_deathwhisperAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -560,7 +560,7 @@ class npc_cult_fanatic : public CreatureScript
|
||||
|
||||
struct npc_cult_fanaticAI : public ScriptedAI
|
||||
{
|
||||
npc_cult_fanaticAI(Creature* pCreature) : ScriptedAI(pCreature) {}
|
||||
npc_cult_fanaticAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -572,7 +572,7 @@ class npc_cult_fanatic : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_CULTIST_DARK_MARTYRDOM, urand(18000, 32000));
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellEntry * spell)
|
||||
void SpellHit(Unit* /*caster*/, const SpellEntry* spell)
|
||||
{
|
||||
if (spell->Id == SPELL_DARK_TRANSFORMATION)
|
||||
me->UpdateEntry(NPC_DEFORMED_FANATIC);
|
||||
@@ -624,9 +624,9 @@ class npc_cult_fanatic : public CreatureScript
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_cult_fanaticAI(pCreature);
|
||||
return new npc_cult_fanaticAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -637,7 +637,7 @@ class npc_cult_adherent : public CreatureScript
|
||||
|
||||
struct npc_cult_adherentAI : public ScriptedAI
|
||||
{
|
||||
npc_cult_adherentAI(Creature* pCreature) : ScriptedAI(pCreature) {}
|
||||
npc_cult_adherentAI(Creature* creature) : ScriptedAI(creature) {}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
@@ -650,7 +650,7 @@ class npc_cult_adherent : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_CULTIST_DARK_MARTYRDOM, urand(18000, 32000));
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, const SpellEntry * spell)
|
||||
void SpellHit(Unit* /*caster*/, const SpellEntry* spell)
|
||||
{
|
||||
if (spell->Id == SPELL_DARK_EMPOWERMENT)
|
||||
me->UpdateEntry(NPC_EMPOWERED_ADHERENT);
|
||||
@@ -688,8 +688,8 @@ class npc_cult_adherent : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_ADHERENT_DEATHCHILL, urand(9000, 13000));
|
||||
break;
|
||||
case EVENT_ADHERENT_CURSE_OF_TORPOR:
|
||||
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(pTarget, SPELL_CURSE_OF_TORPOR);
|
||||
if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1))
|
||||
DoCast(target, SPELL_CURSE_OF_TORPOR);
|
||||
events.ScheduleEvent(EVENT_ADHERENT_CURSE_OF_TORPOR, urand(9000, 13000));
|
||||
break;
|
||||
case EVENT_ADHERENT_SHORUD_OF_THE_OCCULT:
|
||||
@@ -723,7 +723,7 @@ class npc_vengeful_shade : public CreatureScript
|
||||
|
||||
struct npc_vengeful_shadeAI : public ScriptedAI
|
||||
{
|
||||
npc_vengeful_shadeAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_vengeful_shadeAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
@@ -734,14 +734,14 @@ class npc_vengeful_shade : public CreatureScript
|
||||
me->AddAura(SPELL_VENGEFUL_BLAST_PASSIVE, me);
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit * /*pTarget*/, const SpellEntry * spell)
|
||||
void SpellHitTarget(Unit* /*pTarget*/, const SpellEntry* spell)
|
||||
{
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_VENGEFUL_BLAST:
|
||||
case 72010:
|
||||
case 72011:
|
||||
case 72012:
|
||||
case SPELL_VENGEFUL_BLAST_25N:
|
||||
case SPELL_VENGEFUL_BLAST_10H:
|
||||
case SPELL_VENGEFUL_BLAST_25H:
|
||||
me->Kill(me);
|
||||
break;
|
||||
default:
|
||||
@@ -750,9 +750,9 @@ class npc_vengeful_shade : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_vengeful_shadeAI(pCreature);
|
||||
return new npc_vengeful_shadeAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -763,14 +763,15 @@ class spell_deathwhisper_mana_barrier : public SpellScriptLoader
|
||||
|
||||
class spell_deathwhisper_mana_barrier_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_deathwhisper_mana_barrier_AuraScript)
|
||||
void HandlePeriodicTick(AuraEffect const * /*aurEff*/, AuraApplication const * /*aurApp*/)
|
||||
PrepareAuraScript(spell_deathwhisper_mana_barrier_AuraScript);
|
||||
|
||||
void HandlePeriodicTick(AuraEffect const* /*aurEff*/, AuraApplication const* /*aurApp*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* caster = GetCaster();
|
||||
int32 missingHealth = caster->GetMaxHealth() - caster->GetHealth();
|
||||
caster->ModifyHealth(missingHealth);
|
||||
caster->ModifyPower(POWER_MANA, -missingHealth);
|
||||
PreventDefaultAction();
|
||||
}
|
||||
|
||||
void Register()
|
||||
@@ -792,16 +793,7 @@ class spell_cultist_dark_martyrdom : public SpellScriptLoader
|
||||
|
||||
class spell_cultist_dark_martyrdom_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_cultist_dark_martyrdom_SpellScript)
|
||||
bool Validate(SpellEntry const* /*spellEntry*/)
|
||||
{
|
||||
if (uint32 scriptId = sObjectMgr.GetScriptId("boss_lady_deathwhisper"))
|
||||
if (CreatureInfo const* creInfo = ObjectMgr::GetCreatureTemplate(NPC_LADY_DEATHWHISPER))
|
||||
if (creInfo->ScriptID == scriptId)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
PrepareSpellScript(spell_cultist_dark_martyrdom_SpellScript);
|
||||
|
||||
void HandleEffect(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
|
||||
@@ -15,24 +15,24 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "icecrown_citadel.h"
|
||||
#include "MapManager.h"
|
||||
#include "Spell.h"
|
||||
|
||||
enum eScriptTexts
|
||||
{
|
||||
SAY_ENTER_ZONE = -1631000,
|
||||
SAY_AGGRO = -1631001,
|
||||
SAY_BONE_STORM = -1631002,
|
||||
SAY_BONESPIKE_1 = -1631003,
|
||||
SAY_BONESPIKE_2 = -1631004,
|
||||
SAY_BONESPIKE_3 = -1631005,
|
||||
SAY_KILL_1 = -1631006,
|
||||
SAY_KILL_2 = -1631007,
|
||||
SAY_DEATH = -1631008,
|
||||
SAY_BERSERK = -1631009,
|
||||
SAY_BONE_STORM_EMOTE = -1631010
|
||||
SAY_ENTER_ZONE = 0,
|
||||
SAY_AGGRO = 1,
|
||||
SAY_BONE_STORM = 2,
|
||||
SAY_BONESPIKE = 3,
|
||||
SAY_KILL = 4,
|
||||
SAY_DEATH = 5,
|
||||
SAY_BERSERK = 6,
|
||||
EMOTE_BONE_STORM = 7,
|
||||
};
|
||||
|
||||
enum eSpells
|
||||
@@ -45,6 +45,7 @@ enum eSpells
|
||||
SPELL_COLDFLAME_BONE_STORM = 72705,
|
||||
|
||||
// Bone Spike
|
||||
SPELL_IMPALE = 69062,
|
||||
SPELL_IMPALED = 69065,
|
||||
|
||||
// Coldflame
|
||||
@@ -63,13 +64,15 @@ enum eEvents
|
||||
EVENT_WARN_BONE_STORM = 8,
|
||||
|
||||
EVENT_COLDFLAME_TRIGGER = 9,
|
||||
EVENT_FAIL_BONED = 10
|
||||
EVENT_FAIL_BONED = 10,
|
||||
|
||||
EVENT_GROUP_SPECIAL = 1,
|
||||
};
|
||||
|
||||
enum eMovementPoints
|
||||
{
|
||||
POINT_TARGET_BONESTORM_PLAYER = 36612631, // entry+mapid
|
||||
POINT_TARGET_COLDFLAME = 36672631
|
||||
POINT_TARGET_BONESTORM_PLAYER = 36612631,
|
||||
POINT_TARGET_COLDFLAME = 36672631,
|
||||
};
|
||||
|
||||
class boss_lord_marrowgar : public CreatureScript
|
||||
@@ -79,13 +82,13 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
|
||||
struct boss_lord_marrowgarAI : public BossAI
|
||||
{
|
||||
boss_lord_marrowgarAI(Creature *pCreature) : BossAI(pCreature, DATA_LORD_MARROWGAR)
|
||||
boss_lord_marrowgarAI(Creature* creature) : BossAI(creature, DATA_LORD_MARROWGAR)
|
||||
{
|
||||
bIntroDone = false;
|
||||
uiBoneStormDuration = RAID_MODE(20000,30000,20000,30000);
|
||||
fBaseSpeed = pCreature->GetSpeedRate(MOVE_RUN);
|
||||
bBoneSlice = false;
|
||||
coldflameLastPos.Relocate(pCreature);
|
||||
introDone = false;
|
||||
boneStormDuration = RAID_MODE(20000, 30000, 20000, 30000);
|
||||
baseSpeed = creature->GetSpeedRate(MOVE_RUN);
|
||||
boneSlice = false;
|
||||
coldflameLastPos.Relocate(creature);
|
||||
}
|
||||
|
||||
void InitializeAI()
|
||||
@@ -98,28 +101,28 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->SetSpeed(MOVE_RUN, fBaseSpeed, true);
|
||||
me->SetSpeed(MOVE_RUN, baseSpeed, true);
|
||||
me->RemoveAurasDueToSpell(SPELL_BONE_STORM);
|
||||
me->RemoveAurasDueToSpell(SPELL_BERSERK);
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_ENABLE_BONE_SLICE, 10000);
|
||||
events.ScheduleEvent(EVENT_BONE_SPIKE_GRAVEYARD, urand(20000, 30000));
|
||||
events.ScheduleEvent(EVENT_COLDFLAME, urand(10000, 15000));
|
||||
events.ScheduleEvent(EVENT_WARN_BONE_STORM, urand(35000, 50000));
|
||||
events.ScheduleEvent(EVENT_BONE_SPIKE_GRAVEYARD, urand(10000, 15000), EVENT_GROUP_SPECIAL);
|
||||
events.ScheduleEvent(EVENT_COLDFLAME, 5000, EVENT_GROUP_SPECIAL);
|
||||
events.ScheduleEvent(EVENT_WARN_BONE_STORM, urand(45000, 50000));
|
||||
events.ScheduleEvent(EVENT_ENRAGE, 600000);
|
||||
instance->SetBossState(DATA_LORD_MARROWGAR, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
instance->SetBossState(DATA_LORD_MARROWGAR, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
instance->SetBossState(DATA_LORD_MARROWGAR, DONE);
|
||||
}
|
||||
@@ -130,18 +133,18 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
instance->SetData(DATA_BONED_ACHIEVEMENT, uint32(true)); // reset
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who)
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if (!bIntroDone && me->IsWithinDistInMap(who, 70.0f))
|
||||
if (!introDone && me->IsWithinDistInMap(who, 70.0f))
|
||||
{
|
||||
DoScriptText(SAY_ENTER_ZONE, me);
|
||||
bIntroDone = true;
|
||||
Talk(SAY_ENTER_ZONE);
|
||||
introDone = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +165,7 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
case EVENT_BONE_SPIKE_GRAVEYARD:
|
||||
if (IsHeroic() || !me->HasAura(SPELL_BONE_STORM))
|
||||
DoCast(me, SPELL_BONE_SPIKE_GRAVEYARD);
|
||||
events.ScheduleEvent(EVENT_BONE_SPIKE_GRAVEYARD, urand(25000, 35000));
|
||||
events.ScheduleEvent(EVENT_BONE_SPIKE_GRAVEYARD, urand(15000, 20000), EVENT_GROUP_SPECIAL);
|
||||
break;
|
||||
case EVENT_COLDFLAME:
|
||||
coldflameLastPos.Relocate(me);
|
||||
@@ -170,47 +173,48 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
me->CastCustomSpell(SPELL_COLDFLAME_NORMAL, SPELLVALUE_MAX_TARGETS, 1, me);
|
||||
else
|
||||
DoCast(me, SPELL_COLDFLAME_BONE_STORM);
|
||||
events.ScheduleEvent(EVENT_COLDFLAME, urand(10000, 15000));
|
||||
events.ScheduleEvent(EVENT_COLDFLAME, 5000, EVENT_GROUP_SPECIAL);
|
||||
break;
|
||||
case EVENT_WARN_BONE_STORM:
|
||||
bBoneSlice = false;
|
||||
DoScriptText(SAY_BONE_STORM_EMOTE, me);
|
||||
events.ScheduleEvent(EVENT_BONE_STORM_BEGIN, 3050);
|
||||
boneSlice = false;
|
||||
Talk(EMOTE_BONE_STORM);
|
||||
me->FinishSpell(CURRENT_MELEE_SPELL, false);
|
||||
DoCast(me, SPELL_BONE_STORM);
|
||||
events.DelayEvents(3000, EVENT_GROUP_SPECIAL);
|
||||
events.ScheduleEvent(EVENT_BONE_STORM_BEGIN, 3050);
|
||||
break;
|
||||
case EVENT_BONE_STORM_BEGIN:
|
||||
if (Aura* pStorm = me->GetAura(SPELL_BONE_STORM))
|
||||
pStorm->SetDuration(int32(uiBoneStormDuration));
|
||||
me->SetSpeed(MOVE_RUN, fBaseSpeed*3.0f, true);
|
||||
DoScriptText(SAY_BONE_STORM, me);
|
||||
events.ScheduleEvent(EVENT_BONE_STORM_END, uiBoneStormDuration+1);
|
||||
pStorm->SetDuration(int32(boneStormDuration));
|
||||
me->SetSpeed(MOVE_RUN, baseSpeed*3.0f, true);
|
||||
Talk(SAY_BONE_STORM);
|
||||
events.ScheduleEvent(EVENT_BONE_STORM_END, boneStormDuration+1);
|
||||
// no break here
|
||||
case EVENT_BONE_STORM_MOVE:
|
||||
{
|
||||
events.ScheduleEvent(EVENT_BONE_STORM_MOVE, uiBoneStormDuration/3);
|
||||
Unit* pUnit = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
if (!pUnit)
|
||||
pUnit = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if (pUnit)
|
||||
me->GetMotionMaster()->MovePoint(POINT_TARGET_BONESTORM_PLAYER, pUnit->GetPositionX(), pUnit->GetPositionY(), pUnit->GetPositionZ());
|
||||
events.ScheduleEvent(EVENT_BONE_STORM_MOVE, boneStormDuration/3);
|
||||
Unit* unit = SelectUnit(SELECT_TARGET_RANDOM, 1);
|
||||
if (!unit)
|
||||
unit = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
if (unit)
|
||||
me->GetMotionMaster()->MovePoint(POINT_TARGET_BONESTORM_PLAYER, unit->GetPositionX(), unit->GetPositionY(), unit->GetPositionZ());
|
||||
break;
|
||||
}
|
||||
case EVENT_BONE_STORM_END:
|
||||
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
DoStartMovement(me->getVictim());
|
||||
me->SetSpeed(MOVE_RUN, fBaseSpeed, true);
|
||||
me->SetSpeed(MOVE_RUN, baseSpeed, true);
|
||||
events.CancelEvent(EVENT_BONE_STORM_MOVE);
|
||||
events.ScheduleEvent(EVENT_ENABLE_BONE_SLICE, 10000);
|
||||
events.ScheduleEvent(EVENT_WARN_BONE_STORM, urand(35000, 50000));
|
||||
events.ScheduleEvent(EVENT_WARN_BONE_STORM, urand(70000, 75000));
|
||||
break;
|
||||
case EVENT_ENABLE_BONE_SLICE:
|
||||
bBoneSlice = true;
|
||||
boneSlice = true;
|
||||
break;
|
||||
case EVENT_ENRAGE:
|
||||
DoCast(me, SPELL_BERSERK, true);
|
||||
DoScriptText(SAY_BERSERK, me);
|
||||
Talk(SAY_BERSERK);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -220,7 +224,7 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
return;
|
||||
|
||||
// After 10 seconds since encounter start Bone Slice replaces melee attacks
|
||||
if (bBoneSlice && !me->GetCurrentSpell(CURRENT_MELEE_SPELL))
|
||||
if (boneSlice && !me->GetCurrentSpell(CURRENT_MELEE_SPELL))
|
||||
DoCastVictim(SPELL_BONE_SLICE);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
@@ -241,19 +245,21 @@ class boss_lord_marrowgar : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
bool bIntroDone;
|
||||
uint32 uiBoneStormDuration;
|
||||
float fBaseSpeed;
|
||||
bool bBoneSlice;
|
||||
bool introDone;
|
||||
uint32 boneStormDuration;
|
||||
float baseSpeed;
|
||||
bool boneSlice;
|
||||
Position coldflameLastPos;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_lord_marrowgarAI(pCreature);
|
||||
return new boss_lord_marrowgarAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
typedef boss_lord_marrowgar::boss_lord_marrowgarAI MarrowgarAI;
|
||||
|
||||
class npc_coldflame : public CreatureScript
|
||||
{
|
||||
public:
|
||||
@@ -261,18 +267,20 @@ class npc_coldflame : public CreatureScript
|
||||
|
||||
struct npc_coldflameAI : public ScriptedAI
|
||||
{
|
||||
npc_coldflameAI(Creature *pCreature) : ScriptedAI(pCreature)
|
||||
npc_coldflameAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
}
|
||||
|
||||
void IsSummonedBy(Unit* owner)
|
||||
{
|
||||
if (owner->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
Creature* creOwner = owner->ToCreature();
|
||||
DoCast(me, SPELL_COLDFLAME_PASSIVE, true);
|
||||
float x, y, z;
|
||||
// random target case
|
||||
if (!owner->HasAura(SPELL_BONE_STORM) && owner->GetTypeId() == TYPEID_UNIT)
|
||||
if (!owner->HasAura(SPELL_BONE_STORM))
|
||||
{
|
||||
Creature* creOwner = owner->ToCreature();
|
||||
// select any unit but not the tank (by owners threatlist)
|
||||
Unit* target = creOwner->AI()->SelectTarget(SELECT_TARGET_RANDOM, 1, 40.0f, true);
|
||||
if (!target)
|
||||
@@ -291,7 +299,8 @@ class npc_coldflame : public CreatureScript
|
||||
else
|
||||
{
|
||||
me->GetPosition(x, y, z);
|
||||
Position const* ownerPos = CAST_AI(boss_lord_marrowgar::boss_lord_marrowgarAI, owner->ToCreature()->AI())->GetLastColdflamePosition();
|
||||
MarrowgarAI* marrowgarAI = CAST_AI(MarrowgarAI, creOwner->AI());
|
||||
Position const* ownerPos = marrowgarAI->GetLastColdflamePosition();
|
||||
float ang = me->GetAngle(ownerPos) - static_cast<float>(M_PI);
|
||||
MapManager::NormalizeOrientation(ang);
|
||||
x += 50.0f * cosf(ang);
|
||||
@@ -305,14 +314,11 @@ class npc_coldflame : public CreatureScript
|
||||
{
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
if (events.ExecuteEvent() == EVENT_COLDFLAME_TRIGGER)
|
||||
{
|
||||
if (eventId == EVENT_COLDFLAME_TRIGGER)
|
||||
{
|
||||
if (me->HasAura(SPELL_COLDFLAME_PASSIVE))
|
||||
DoCast(SPELL_COLDFLAME_PASSIVE);
|
||||
events.ScheduleEvent(EVENT_COLDFLAME_TRIGGER, 400);
|
||||
}
|
||||
if (me->HasAura(SPELL_COLDFLAME_PASSIVE))
|
||||
DoCast(SPELL_COLDFLAME_PASSIVE);
|
||||
events.ScheduleEvent(EVENT_COLDFLAME_TRIGGER, 400);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,9 +335,9 @@ class npc_coldflame : public CreatureScript
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_coldflameAI(pCreature);
|
||||
return new npc_coldflameAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -342,69 +348,52 @@ class npc_bone_spike : public CreatureScript
|
||||
|
||||
struct npc_bone_spikeAI : public Scripted_NoMovementAI
|
||||
{
|
||||
npc_bone_spikeAI(Creature *pCreature) : Scripted_NoMovementAI(pCreature), vehicle(pCreature->GetVehicleKit())
|
||||
npc_bone_spikeAI(Creature* creature) : Scripted_NoMovementAI(creature), vehicle(creature->GetVehicleKit())
|
||||
{
|
||||
ASSERT(vehicle);
|
||||
uiTrappedGUID = 0;
|
||||
trappedGUID = 0;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
uiTrappedGUID = 0;
|
||||
trappedGUID = 0;
|
||||
}
|
||||
|
||||
void JustDied(Unit * /*killer*/)
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
events.Reset();
|
||||
if (Player* trapped = ObjectAccessor::GetPlayer(*me, uiTrappedGUID))
|
||||
if (Player* trapped = ObjectAccessor::GetPlayer(*me, trappedGUID))
|
||||
trapped->RemoveAurasDueToSpell(SPELL_IMPALED);
|
||||
trappedGUID = 0;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit * /*pVictim*/)
|
||||
void IsSummonedBy(Unit* summoner)
|
||||
{
|
||||
me->Kill(me);
|
||||
trappedGUID = summoner->GetGUID();
|
||||
summoner->EnterVehicle(vehicle, 0);
|
||||
DoCast(summoner, SPELL_IMPALED);
|
||||
events.ScheduleEvent(EVENT_FAIL_BONED, 8000);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!uiTrappedGUID)
|
||||
if (!trappedGUID)
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
Player* trapped = ObjectAccessor::GetPlayer(*me, uiTrappedGUID);
|
||||
if ((trapped && trapped->isAlive() && !trapped->HasAura(SPELL_IMPALED)) || !trapped)
|
||||
me->Kill(me);
|
||||
|
||||
if (events.ExecuteEvent() == EVENT_FAIL_BONED)
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
instance->SetData(DATA_BONED_ACHIEVEMENT, uint32(false));
|
||||
}
|
||||
|
||||
void SetGUID(const uint64& guid, int32 /*type = 0*/)
|
||||
{
|
||||
uiTrappedGUID = guid;
|
||||
if (Player* target = ObjectAccessor::GetPlayer(*me, guid))
|
||||
target->EnterVehicle(vehicle, 0);
|
||||
}
|
||||
|
||||
void PassengerBoarded(Unit * who, int8 /*seatId*/, bool apply)
|
||||
{
|
||||
if (!apply)
|
||||
return;
|
||||
|
||||
me->AddAura(SPELL_IMPALED, who);
|
||||
events.ScheduleEvent(EVENT_FAIL_BONED, 8000);
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 uiTrappedGUID;
|
||||
uint64 trappedGUID;
|
||||
EventMap events;
|
||||
Vehicle* vehicle;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_bone_spikeAI(pCreature);
|
||||
return new npc_bone_spikeAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -415,9 +404,11 @@ class spell_marrowgar_coldflame : public SpellScriptLoader
|
||||
|
||||
class spell_marrowgar_coldflame_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_marrowgar_coldflame_SpellScript)
|
||||
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
|
||||
PrepareSpellScript(spell_marrowgar_coldflame_SpellScript);
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
Unit* caster = GetCaster();
|
||||
uint8 count = 1;
|
||||
if (GetSpellInfo()->Id == 72705)
|
||||
@@ -431,13 +422,6 @@ class spell_marrowgar_coldflame : public SpellScriptLoader
|
||||
{
|
||||
OnEffect += SpellEffectFn(spell_marrowgar_coldflame_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
|
||||
bool Load()
|
||||
{
|
||||
if (GetCaster()->GetEntry() != NPC_LORD_MARROWGAR)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
@@ -453,40 +437,36 @@ class spell_marrowgar_bone_spike_graveyard : public SpellScriptLoader
|
||||
|
||||
class spell_marrowgar_bone_spike_graveyard_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_marrowgar_bone_spike_graveyard_SpellScript)
|
||||
void HandleApplyAura(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
CreatureAI* marrowgarAI = GetCaster()->ToCreature()->AI();
|
||||
bool yell = false;
|
||||
uint8 boneSpikeCount = GetCaster()->GetMap()->GetSpawnMode() & 1 ? 3 : 1;
|
||||
for (uint8 i = 0; i < boneSpikeCount; ++i)
|
||||
{
|
||||
// select any unit but not the tank
|
||||
Unit* target = marrowgarAI->SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true, -SPELL_IMPALED);
|
||||
if (!target && !i)
|
||||
target = marrowgarAI->SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true, -SPELL_IMPALED);
|
||||
if (!target)
|
||||
break;
|
||||
yell = true;
|
||||
//GetCaster()->CastSpell(target, SPELL_IMPALE, true); // this is the proper spell but if we use it we dont have any way to assign a victim to it
|
||||
Creature* pBone = GetCaster()->SummonCreature(NPC_BONE_SPIKE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_CORPSE_DESPAWN);
|
||||
pBone->AI()->SetGUID(target->GetGUID());
|
||||
}
|
||||
PrepareSpellScript(spell_marrowgar_bone_spike_graveyard_SpellScript);
|
||||
|
||||
if (yell)
|
||||
DoScriptText(RAND(SAY_BONESPIKE_1, SAY_BONESPIKE_2, SAY_BONESPIKE_3), GetCaster());
|
||||
void HandleScript(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
if (Creature* marrowgar = GetCaster()->ToCreature())
|
||||
{
|
||||
CreatureAI* marrowgarAI = marrowgar->AI();
|
||||
bool yell = false;
|
||||
uint8 boneSpikeCount = GetCaster()->GetMap()->GetSpawnMode() & 1 ? 3 : 1;
|
||||
for (uint8 i = 0; i < boneSpikeCount; ++i)
|
||||
{
|
||||
// select any unit but not the tank
|
||||
Unit* target = marrowgarAI->SelectTarget(SELECT_TARGET_RANDOM, 1, 100.0f, true, -SPELL_IMPALED);
|
||||
if (!target && !i)
|
||||
target = marrowgarAI->SelectTarget(SELECT_TARGET_RANDOM, 0, 100.0f, true, -SPELL_IMPALED);
|
||||
if (!target)
|
||||
break;
|
||||
yell = true;
|
||||
target->CastCustomSpell(SPELL_IMPALE, SPELLVALUE_BASE_POINT0, 0, target, true);
|
||||
}
|
||||
|
||||
if (yell)
|
||||
marrowgarAI->Talk(SAY_BONESPIKE);
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffect += SpellEffectFn(spell_marrowgar_bone_spike_graveyard_SpellScript::HandleApplyAura, EFFECT_1, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
|
||||
bool Load()
|
||||
{
|
||||
if (GetCaster()->GetEntry() != NPC_LORD_MARROWGAR)
|
||||
return false;
|
||||
return true;
|
||||
OnEffect += SpellEffectFn(spell_marrowgar_bone_spike_graveyard_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -503,7 +483,8 @@ class spell_marrowgar_bone_storm : public SpellScriptLoader
|
||||
|
||||
class spell_marrowgar_bone_storm_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_marrowgar_bone_storm_SpellScript)
|
||||
PrepareSpellScript(spell_marrowgar_bone_storm_SpellScript);
|
||||
|
||||
void RecalculateDamage(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
int32 dmg = GetHitDamage();
|
||||
@@ -519,13 +500,6 @@ class spell_marrowgar_bone_storm : public SpellScriptLoader
|
||||
{
|
||||
OnEffect += SpellEffectFn(spell_marrowgar_bone_storm_SpellScript::RecalculateDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
|
||||
bool Load()
|
||||
{
|
||||
if (GetCaster()->GetEntry() != NPC_LORD_MARROWGAR)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
|
||||
@@ -25,26 +25,24 @@
|
||||
enum eScriptTexts
|
||||
{
|
||||
// Festergut
|
||||
SAY_FESTERGUT_GASEOUS_BLIGHT = -1631080,
|
||||
SAY_FESTERGUT_DEATH = -1631090,
|
||||
SAY_FESTERGUT_GASEOUS_BLIGHT = 0,
|
||||
SAY_FESTERGUT_DEATH = 1,
|
||||
|
||||
// Rotface
|
||||
SAY_ROTFACE_OOZE_FLOOD1 = -1631091,
|
||||
SAY_ROTFACE_OOZE_FLOOD2 = -1631092,
|
||||
SAY_ROTFACE_DEATH = -1631093,
|
||||
SAY_ROTFACE_OOZE_FLOOD = 2,
|
||||
SAY_ROTFACE_DEATH = 3,
|
||||
|
||||
// Professor Putricide
|
||||
SAY_AGGRO = -1631104,
|
||||
EMOTE_UNSTABLE_EXPERIMENT = -1631105,
|
||||
SAY_PHASE_TRANSITION_HEROIC = -1631106,
|
||||
SAY_TRANSFORM_1 = -1631107,
|
||||
SAY_TRANSFORM_2 = -1631108,
|
||||
EMOTE_MALLEABLE_GOO = -1631109,
|
||||
EMOTE_CHOKING_GAS_BOMB = -1631110,
|
||||
SAY_KILL_1 = -1631111,
|
||||
SAY_KILL_2 = -1631112,
|
||||
SAY_BERSERK = -1631113,
|
||||
SAY_DEATH = -1631114
|
||||
SAY_AGGRO = 4,
|
||||
EMOTE_UNSTABLE_EXPERIMENT = 5,
|
||||
SAY_PHASE_TRANSITION_HEROIC = 6,
|
||||
SAY_TRANSFORM_1 = 7,
|
||||
SAY_TRANSFORM_2 = 8, // always used for phase2 change, DO NOT GROUP WITH SAY_TRANSFORM_1
|
||||
EMOTE_MALLEABLE_GOO = 9,
|
||||
EMOTE_CHOKING_GAS_BOMB = 10,
|
||||
SAY_KILL = 11,
|
||||
SAY_BERSERK = 12,
|
||||
SAY_DEATH = 13,
|
||||
};
|
||||
|
||||
enum eSpells
|
||||
@@ -131,6 +129,7 @@ enum eEvents
|
||||
|
||||
enum ePhases
|
||||
{
|
||||
PHASE_NONE = 0,
|
||||
PHASE_FESTERGUT = 1,
|
||||
PHASE_ROTFACE = 2,
|
||||
PHASE_COMBAT_1 = 4,
|
||||
@@ -138,7 +137,7 @@ enum ePhases
|
||||
PHASE_COMBAT_3 = 6,
|
||||
|
||||
PHASE_MASK_COMBAT = (1 << PHASE_COMBAT_1) | (1 << PHASE_COMBAT_2) | (1 << PHASE_COMBAT_3),
|
||||
PHASE_MASK_NOT_SELF = (1 << PHASE_FESTERGUT) | (1 << PHASE_ROTFACE)
|
||||
PHASE_MASK_NOT_SELF = (1 << PHASE_FESTERGUT) | (1 << PHASE_ROTFACE),
|
||||
};
|
||||
|
||||
enum ePoints
|
||||
@@ -179,10 +178,10 @@ class boss_professor_putricide : public CreatureScript
|
||||
|
||||
struct boss_professor_putricideAI : public BossAI
|
||||
{
|
||||
boss_professor_putricideAI(Creature* pCreature) : BossAI(pCreature, DATA_PROFESSOR_PUTRICIDE),
|
||||
fBaseSpeed(pCreature->GetSpeedRate(MOVE_RUN)), bExperimentState(EXPERIMENT_STATE_OOZE)
|
||||
boss_professor_putricideAI(Creature* creature) : BossAI(creature, DATA_PROFESSOR_PUTRICIDE),
|
||||
baseSpeed(creature->GetSpeedRate(MOVE_RUN)), experimentState(EXPERIMENT_STATE_OOZE)
|
||||
{
|
||||
phase = ePhases(0);
|
||||
phase = PHASE_NONE;
|
||||
}
|
||||
|
||||
void InitializeAI()
|
||||
@@ -202,11 +201,13 @@ class boss_professor_putricide : public CreatureScript
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
_SetPhase(PHASE_COMBAT_1);
|
||||
bExperimentState = EXPERIMENT_STATE_OOZE;
|
||||
experimentState = EXPERIMENT_STATE_OOZE;
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE)
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
if (GameObject* table = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_PUTRICIDE_TABLE)))
|
||||
table->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
@@ -215,7 +216,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
return;
|
||||
|
||||
_SetPhase(PHASE_COMBAT_1);
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
Talk(SAY_AGGRO);
|
||||
DoCast(me, SPELL_OOZE_TANK_PROTECTION, true);
|
||||
DoZoneInCombat(me);
|
||||
|
||||
@@ -227,6 +228,8 @@ class boss_professor_putricide : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_UNBOUND_PLAGUE, 20000);
|
||||
|
||||
instance->SetBossState(DATA_PROFESSOR_PUTRICIDE, IN_PROGRESS);
|
||||
if (GameObject* table = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_PUTRICIDE_TABLE)))
|
||||
table->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
@@ -236,15 +239,15 @@ class boss_professor_putricide : public CreatureScript
|
||||
instance->SetBossState(DATA_PROFESSOR_PUTRICIDE, FAIL);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
Talk(SAY_DEATH);
|
||||
instance->SetBossState(DATA_PROFESSOR_PUTRICIDE, DONE);
|
||||
DoCastAOE(SPELL_UNHOLY_INFUSION_CREDIT, true);
|
||||
}
|
||||
@@ -324,21 +327,21 @@ class boss_professor_putricide : public CreatureScript
|
||||
{
|
||||
case POINT_FESTERGUT:
|
||||
instance->SetBossState(DATA_FESTERGUT, IN_PROGRESS); // needed here for delayed gate close
|
||||
me->SetSpeed(MOVE_RUN, fBaseSpeed, true);
|
||||
me->SetSpeed(MOVE_RUN, baseSpeed, true);
|
||||
DoAction(ACTION_FESTERGUT_GAS);
|
||||
if (Creature* festergut = Unit::GetCreature(*me, instance->GetData64(DATA_FESTERGUT)))
|
||||
festergut->CastSpell(festergut, SPELL_GASEOUS_BLIGHT_LARGE, false, NULL, NULL, festergut->GetGUID());
|
||||
break;
|
||||
case POINT_ROTFACE:
|
||||
instance->SetBossState(DATA_ROTFACE, IN_PROGRESS); // needed here for delayed gate close
|
||||
me->SetSpeed(MOVE_RUN, fBaseSpeed, true);
|
||||
me->SetSpeed(MOVE_RUN, baseSpeed, true);
|
||||
DoAction(ACTION_ROTFACE_OOZE);
|
||||
events.ScheduleEvent(EVENT_ROTFACE_OOZE_FLOOD, 25000, 0, PHASE_ROTFACE);
|
||||
break;
|
||||
case POINT_TABLE:
|
||||
// stop attack
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetSpeed(MOVE_RUN, fBaseSpeed, true);
|
||||
me->SetSpeed(MOVE_RUN, baseSpeed, true);
|
||||
if (GameObject* table = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_PUTRICIDE_TABLE)))
|
||||
me->SetFacingToObject(table);
|
||||
// operating on new phase already
|
||||
@@ -375,7 +378,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
{
|
||||
case ACTION_FESTERGUT_COMBAT:
|
||||
_SetPhase(PHASE_FESTERGUT);
|
||||
me->SetSpeed(MOVE_RUN, fBaseSpeed*2.0f, true);
|
||||
me->SetSpeed(MOVE_RUN, baseSpeed*2.0f, true);
|
||||
me->GetMotionMaster()->MovePoint(POINT_FESTERGUT, festergutWatchPos);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
if (IsHeroic())
|
||||
@@ -385,7 +388,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
}
|
||||
break;
|
||||
case ACTION_FESTERGUT_GAS:
|
||||
DoScriptText(SAY_FESTERGUT_GASEOUS_BLIGHT, me);
|
||||
Talk(SAY_FESTERGUT_GASEOUS_BLIGHT);
|
||||
DoCast(me, SPELL_RELEASE_GAS_VISUAL, true);
|
||||
break;
|
||||
case ACTION_FESTERGUT_DEATH:
|
||||
@@ -394,7 +397,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
case ACTION_ROTFACE_COMBAT:
|
||||
{
|
||||
_SetPhase(PHASE_ROTFACE);
|
||||
me->SetSpeed(MOVE_RUN, fBaseSpeed*2.0f, true);
|
||||
me->SetSpeed(MOVE_RUN, baseSpeed*2.0f, true);
|
||||
me->GetMotionMaster()->MovePoint(POINT_ROTFACE, rotfaceWatchPos);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
oozeFloodStage = 0;
|
||||
@@ -429,7 +432,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
break;
|
||||
}
|
||||
case ACTION_ROTFACE_OOZE:
|
||||
DoScriptText(RAND(SAY_ROTFACE_OOZE_FLOOD1, SAY_ROTFACE_OOZE_FLOOD2), me);
|
||||
Talk(SAY_ROTFACE_OOZE_FLOOD);
|
||||
if (Creature* dummy = Unit::GetCreature(*me, oozeFloodDummy[oozeFloodStage]))
|
||||
dummy->CastSpell(dummy, oozeFloodSpells[oozeFloodStage], true, NULL, NULL, me->GetGUID()); // cast from self for LoS (with prof's GUID for logs)
|
||||
if (++oozeFloodStage == 4)
|
||||
@@ -439,7 +442,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_ROTFACE_DIES, 4500, 0, PHASE_ROTFACE);
|
||||
break;
|
||||
case ACTION_CHANGE_PHASE:
|
||||
me->SetSpeed(MOVE_RUN, fBaseSpeed*2.0f, true);
|
||||
me->SetSpeed(MOVE_RUN, baseSpeed*2.0f, true);
|
||||
events.DelayEvents(30000);
|
||||
me->AttackStop();
|
||||
if (!IsHeroic())
|
||||
@@ -449,7 +452,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
}
|
||||
else
|
||||
{
|
||||
DoScriptText(SAY_PHASE_TRANSITION_HEROIC, me);
|
||||
Talk(SAY_PHASE_TRANSITION_HEROIC);
|
||||
DoCast(me, SPELL_UNSTABLE_EXPERIMENT, true);
|
||||
DoCast(me, SPELL_UNSTABLE_EXPERIMENT, true);
|
||||
// cast variables
|
||||
@@ -491,6 +494,8 @@ class boss_professor_putricide : public CreatureScript
|
||||
events.CancelEvent(EVENT_UNSTABLE_EXPERIMENT);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MUTATED_TRANSFORMATION);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(71503); // SPELL_MUTATED_TRANSFORMATION2
|
||||
if (GameObject* table = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_PUTRICIDE_TABLE)))
|
||||
table->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -506,8 +511,8 @@ class boss_professor_putricide : public CreatureScript
|
||||
if (type == DATA_EXPERIMENT_STAGE)
|
||||
{
|
||||
// ALSO MODIFIES!
|
||||
uint32 ret = uint32(bExperimentState);
|
||||
bExperimentState ^= true;
|
||||
uint32 ret = uint32(experimentState);
|
||||
experimentState ^= true;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -529,7 +534,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_FESTERGUT_DIES:
|
||||
DoScriptText(SAY_FESTERGUT_DEATH, me);
|
||||
Talk(SAY_FESTERGUT_DEATH);
|
||||
EnterEvadeMode();
|
||||
break;
|
||||
case EVENT_FESTERGUT_GOO:
|
||||
@@ -538,7 +543,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_FESTERGUT_GOO, urand(15000, 20000), 0, PHASE_FESTERGUT);
|
||||
break;
|
||||
case EVENT_ROTFACE_DIES:
|
||||
DoScriptText(SAY_ROTFACE_DEATH, me);
|
||||
Talk(SAY_ROTFACE_DEATH);
|
||||
EnterEvadeMode();
|
||||
break;
|
||||
case EVENT_ROTFACE_VILE_GAS:
|
||||
@@ -551,7 +556,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_ROTFACE_OOZE_FLOOD, 25000, 0, PHASE_ROTFACE);
|
||||
break;
|
||||
case EVENT_BERSERK:
|
||||
DoScriptText(SAY_BERSERK, me);
|
||||
Talk(SAY_BERSERK);
|
||||
DoCast(me, SPELL_BERSERK2);
|
||||
break;
|
||||
case EVENT_SLIME_PUDDLE:
|
||||
@@ -565,7 +570,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
break;
|
||||
}
|
||||
case EVENT_UNSTABLE_EXPERIMENT:
|
||||
DoScriptText(EMOTE_UNSTABLE_EXPERIMENT, me);
|
||||
Talk(EMOTE_UNSTABLE_EXPERIMENT);
|
||||
DoCast(me, SPELL_UNSTABLE_EXPERIMENT);
|
||||
events.ScheduleEvent(EVENT_UNSTABLE_EXPERIMENT, urand(35000, 40000));
|
||||
break;
|
||||
@@ -586,7 +591,7 @@ class boss_professor_putricide : public CreatureScript
|
||||
SelectTargetList(targets, 2, SELECT_TARGET_RANDOM, -7.0f, true);
|
||||
if (!targets.empty())
|
||||
{
|
||||
DoScriptText(EMOTE_MALLEABLE_GOO, me);
|
||||
Talk(EMOTE_MALLEABLE_GOO);
|
||||
for (std::list<Unit*>::iterator itr = targets.begin(); itr != targets.end(); ++itr)
|
||||
DoCast(*itr, SPELL_MALLEABLE_GOO);
|
||||
}
|
||||
@@ -595,14 +600,14 @@ class boss_professor_putricide : public CreatureScript
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, -7.0f, true))
|
||||
{
|
||||
DoScriptText(EMOTE_MALLEABLE_GOO, me);
|
||||
Talk(EMOTE_MALLEABLE_GOO);
|
||||
DoCast(target, SPELL_MALLEABLE_GOO);
|
||||
}
|
||||
}
|
||||
events.ScheduleEvent(EVENT_MALLEABLE_GOO, urand(25000, 30000));
|
||||
break;
|
||||
case EVENT_CHOKING_GAS_BOMB:
|
||||
DoScriptText(EMOTE_CHOKING_GAS_BOMB, me);
|
||||
Talk(EMOTE_CHOKING_GAS_BOMB);
|
||||
DoCast(me, SPELL_CHOKING_GAS_BOMB);
|
||||
events.ScheduleEvent(EVENT_CHOKING_GAS_BOMB, urand(35000, 40000));
|
||||
break;
|
||||
@@ -626,14 +631,14 @@ class boss_professor_putricide : public CreatureScript
|
||||
if (Creature* face = me->FindNearestCreature(NPC_TEAR_GAS_TARGET_STALKER, 50.0f))
|
||||
me->SetFacingToObject(face);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL);
|
||||
DoScriptText(SAY_TRANSFORM_1, me);
|
||||
Talk(SAY_TRANSFORM_1);
|
||||
events.ScheduleEvent(EVENT_RESUME_ATTACK, 5500, 0, PHASE_COMBAT_2);
|
||||
break;
|
||||
case PHASE_COMBAT_3:
|
||||
if (Creature* face = me->FindNearestCreature(NPC_TEAR_GAS_TARGET_STALKER, 50.0f))
|
||||
me->SetFacingToObject(face);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_KNEEL);
|
||||
DoScriptText(SAY_TRANSFORM_2, me);
|
||||
Talk(SAY_TRANSFORM_2);
|
||||
events.ScheduleEvent(EVENT_RESUME_ATTACK, 8500, 0, PHASE_COMBAT_3);
|
||||
break;
|
||||
default:
|
||||
@@ -657,15 +662,15 @@ class boss_professor_putricide : public CreatureScript
|
||||
|
||||
ePhases phase; // external of EventMap because event phase gets reset on evade
|
||||
// Festergut & Rotface variables
|
||||
const float fBaseSpeed;
|
||||
const float baseSpeed;
|
||||
uint64 oozeFloodDummy[4];
|
||||
uint8 oozeFloodStage;
|
||||
bool bExperimentState;
|
||||
bool experimentState;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_professor_putricideAI(pCreature);
|
||||
return new boss_professor_putricideAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -676,9 +681,9 @@ class npc_volatile_ooze : public CreatureScript
|
||||
|
||||
struct npc_volatile_oozeAI : public ScriptedAI
|
||||
{
|
||||
npc_volatile_oozeAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_volatile_oozeAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
uiNewTargetSelectTimer = 0;
|
||||
newTargetSelectTimer = 0;
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* /*pTarget*/, const SpellEntry* spell)
|
||||
@@ -687,7 +692,7 @@ class npc_volatile_ooze : public CreatureScript
|
||||
explode = sSpellMgr.GetSpellForDifficultyFromSpell(explode, me);
|
||||
if (explode->Id == spell->Id)
|
||||
{
|
||||
uiNewTargetSelectTimer = 5000;
|
||||
newTargetSelectTimer = 5000;
|
||||
DoStartNoMovement(me);
|
||||
}
|
||||
}
|
||||
@@ -697,12 +702,12 @@ class npc_volatile_ooze : public CreatureScript
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (!uiNewTargetSelectTimer)
|
||||
if (!newTargetSelectTimer)
|
||||
return;
|
||||
|
||||
if (uiNewTargetSelectTimer <= diff)
|
||||
if (newTargetSelectTimer <= diff)
|
||||
{
|
||||
uiNewTargetSelectTimer = 0;
|
||||
newTargetSelectTimer = 0;
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true, -SPELL_VOLATILE_OOZE_PROTECTION))
|
||||
{
|
||||
AttackStart(target);
|
||||
@@ -714,17 +719,17 @@ class npc_volatile_ooze : public CreatureScript
|
||||
me->ForcedDespawn();
|
||||
}
|
||||
else
|
||||
uiNewTargetSelectTimer -= diff;
|
||||
newTargetSelectTimer -= diff;
|
||||
}
|
||||
|
||||
private:
|
||||
// no need to use EventMap for just one event
|
||||
uint32 uiNewTargetSelectTimer;
|
||||
uint32 newTargetSelectTimer;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_volatile_oozeAI(pCreature);
|
||||
return new npc_volatile_oozeAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1132,7 +1137,7 @@ class spell_putricide_mutated_plague : public SpellScriptLoader
|
||||
multiplier = 3.0f;
|
||||
|
||||
damage *= int32(pow(multiplier, aurApp->GetBase()->GetStackAmount()));
|
||||
damage = int32(damage * 1.5f);
|
||||
damage = int32(damage * 1.5f);
|
||||
|
||||
aurApp->GetTarget()->CastCustomSpell(triggerSpell, SPELLVALUE_BASE_POINT0, damage, aurApp->GetTarget(), true, NULL, aurEff, GetCasterGUID());
|
||||
}
|
||||
|
||||
@@ -27,16 +27,15 @@
|
||||
|
||||
enum eTexts
|
||||
{
|
||||
SAY_PRECIOUS_DIES = -1631094,
|
||||
SAY_AGGRO = -1631095,
|
||||
EMOTE_SLIME_SPRAY = -1631096,
|
||||
SAY_SLIME_SPRAY = -1631097,
|
||||
EMOTE_UNSTABLE_EXPLOSION = -1631098,
|
||||
SAY_UNSTABLE_EXPLOSION = -1631099,
|
||||
SAY_KILL_1 = -1631100,
|
||||
SAY_KILL_2 = -1631101,
|
||||
SAY_BERSERK = -1631102,
|
||||
SAY_DEATH = -1631103
|
||||
SAY_PRECIOUS_DIES = 0,
|
||||
SAY_AGGRO = 1,
|
||||
EMOTE_SLIME_SPRAY = 2,
|
||||
SAY_SLIME_SPRAY = 3,
|
||||
EMOTE_UNSTABLE_EXPLOSION = 4,
|
||||
SAY_UNSTABLE_EXPLOSION = 5,
|
||||
SAY_KILL = 6,
|
||||
SAY_BERSERK = 7,
|
||||
SAY_DEATH = 8,
|
||||
};
|
||||
|
||||
enum eSpells
|
||||
@@ -60,7 +59,7 @@ enum eSpells
|
||||
|
||||
// Precious
|
||||
SPELL_MORTAL_WOUND = 71127,
|
||||
SPELL_DECIMATE = 71123
|
||||
SPELL_DECIMATE = 71123,
|
||||
};
|
||||
|
||||
#define MUTATED_INFECTION RAID_MODE<int32>(69674,71224,73022,73023)
|
||||
@@ -75,7 +74,7 @@ enum eEvents
|
||||
EVENT_MORTAL_WOUND = 5,
|
||||
|
||||
EVENT_STICKY_OOZE = 6,
|
||||
EVENT_UNSTABLE_DESPAWN = 7
|
||||
EVENT_UNSTABLE_DESPAWN = 7,
|
||||
};
|
||||
|
||||
class boss_rotface : public CreatureScript
|
||||
@@ -85,7 +84,7 @@ class boss_rotface : public CreatureScript
|
||||
|
||||
struct boss_rotfaceAI : public BossAI
|
||||
{
|
||||
boss_rotfaceAI(Creature* pCreature) : BossAI(pCreature, DATA_ROTFACE)
|
||||
boss_rotfaceAI(Creature* creature) : BossAI(creature, DATA_ROTFACE)
|
||||
{
|
||||
infectionStage = 0;
|
||||
infectionCooldown = 14000;
|
||||
@@ -114,7 +113,7 @@ class boss_rotface : public CreatureScript
|
||||
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
DoScriptText(SAY_AGGRO, me);
|
||||
Talk(SAY_AGGRO);
|
||||
if (Creature* professor = Unit::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_ROTFACE_COMBAT);
|
||||
|
||||
@@ -123,7 +122,7 @@ class boss_rotface : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
DoScriptText(SAY_DEATH, me);
|
||||
Talk(SAY_DEATH);
|
||||
instance->SetBossState(DATA_ROTFACE, DONE);
|
||||
if (Creature* professor = Unit::GetCreature(*me, instance->GetData64(DATA_PROFESSOR_PUTRICIDE)))
|
||||
professor->AI()->DoAction(ACTION_ROTFACE_DEATH);
|
||||
@@ -135,10 +134,10 @@ class boss_rotface : public CreatureScript
|
||||
instance->SetData(DATA_OOZE_DANCE_ACHIEVEMENT, uint32(true)); // reset
|
||||
}
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
@@ -151,7 +150,7 @@ class boss_rotface : public CreatureScript
|
||||
void SpellHitTarget(Unit* /*target*/, SpellEntry const* spell)
|
||||
{
|
||||
if (spell->Id == SPELL_SLIME_SPRAY)
|
||||
DoScriptText(SAY_SLIME_SPRAY, me);
|
||||
Talk(SAY_SLIME_SPRAY);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*who*/)
|
||||
@@ -198,7 +197,7 @@ class boss_rotface : public CreatureScript
|
||||
Position pos;
|
||||
target->GetPosition(&pos);
|
||||
DoSummon(NPC_OOZE_SPRAY_STALKER, pos, 8000, TEMPSUMMON_TIMED_DESPAWN);
|
||||
DoScriptText(EMOTE_SLIME_SPRAY, me);
|
||||
Talk(EMOTE_SLIME_SPRAY);
|
||||
DoCastAOE(SPELL_SLIME_SPRAY);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_SLIME_SPRAY, 20000);
|
||||
@@ -233,9 +232,9 @@ class boss_rotface : public CreatureScript
|
||||
uint32 infectionCooldown;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new boss_rotfaceAI(pCreature);
|
||||
return new boss_rotfaceAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -246,7 +245,7 @@ class npc_little_ooze : public CreatureScript
|
||||
|
||||
struct npc_little_oozeAI : public ScriptedAI
|
||||
{
|
||||
npc_little_oozeAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_little_oozeAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -293,9 +292,9 @@ class npc_little_ooze : public CreatureScript
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_little_oozeAI(pCreature);
|
||||
return new npc_little_oozeAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -306,7 +305,7 @@ class npc_big_ooze : public CreatureScript
|
||||
|
||||
struct npc_big_oozeAI : public ScriptedAI
|
||||
{
|
||||
npc_big_oozeAI(Creature* pCreature) : ScriptedAI(pCreature), bExploded(false)
|
||||
npc_big_oozeAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -341,7 +340,6 @@ class npc_big_ooze : public CreatureScript
|
||||
events.CancelEvent(EVENT_STICKY_OOZE);
|
||||
else if (action == EVENT_UNSTABLE_DESPAWN)
|
||||
{
|
||||
bExploded = true;
|
||||
me->RemoveAllAuras();
|
||||
me->SetVisible(false);
|
||||
events.Reset();
|
||||
@@ -371,19 +369,18 @@ class npc_big_ooze : public CreatureScript
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bExploded)
|
||||
|
||||
if (me->IsVisible())
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
bool bExploded;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_big_oozeAI(pCreature);
|
||||
return new npc_big_oozeAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -394,9 +391,9 @@ class npc_precious_icc : public CreatureScript
|
||||
|
||||
struct npc_precious_iccAI : public ScriptedAI
|
||||
{
|
||||
npc_precious_iccAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
npc_precious_iccAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
pInstance = pCreature->GetInstanceScript();
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Reset()
|
||||
@@ -438,20 +435,20 @@ class npc_precious_icc : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*who*/)
|
||||
{
|
||||
uint64 rotfaceGUID = pInstance ? pInstance->GetData64(DATA_ROTFACE) : 0;
|
||||
if (Creature *rotface = Unit::GetCreature(*me, rotfaceGUID))
|
||||
uint64 rotfaceGUID = instance ? instance->GetData64(DATA_ROTFACE) : 0;
|
||||
if (Creature* rotface = Unit::GetCreature(*me, rotfaceGUID))
|
||||
if (rotface->isAlive())
|
||||
DoScriptText(SAY_PRECIOUS_DIES, rotface);
|
||||
rotface->AI()->Talk(SAY_PRECIOUS_DIES);
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
InstanceScript* pInstance;
|
||||
InstanceScript* instance;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_precious_iccAI(pCreature);
|
||||
return new npc_precious_iccAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -591,11 +588,13 @@ class spell_rotface_large_ooze_buff_combine : public SpellScriptLoader
|
||||
{
|
||||
GetCaster()->RemoveAurasDueToSpell(SPELL_LARGE_OOZE_BUFF_COMBINE);
|
||||
GetCaster()->RemoveAurasDueToSpell(SPELL_LARGE_OOZE_COMBINE);
|
||||
DoScriptText(EMOTE_UNSTABLE_EXPLOSION, GetCaster());
|
||||
if (InstanceScript* instance = GetCaster()->GetInstanceScript())
|
||||
if (Creature* rotface = Unit::GetCreature(*GetCaster(), instance->GetData64(DATA_ROTFACE)))
|
||||
if (rotface->isAlive())
|
||||
DoScriptText(SAY_UNSTABLE_EXPLOSION, rotface);
|
||||
{
|
||||
rotface->AI()->Talk(EMOTE_UNSTABLE_EXPLOSION);
|
||||
rotface->AI()->Talk(SAY_UNSTABLE_EXPLOSION);
|
||||
}
|
||||
|
||||
if (Creature* cre = GetCaster()->ToCreature())
|
||||
cre->AI()->DoAction(EVENT_STICKY_OOZE);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#define ICCScriptName "instance_icecrown_citadel"
|
||||
|
||||
// Shared spells used by every boss
|
||||
enum eSharedSpells
|
||||
{
|
||||
SPELL_BERSERK = 26662,
|
||||
@@ -28,6 +29,7 @@ enum eSharedSpells
|
||||
|
||||
enum eData
|
||||
{
|
||||
// Encounter States/Boss GUIDs
|
||||
DATA_LORD_MARROWGAR = 0,
|
||||
DATA_LADY_DEATHWHISPER = 1,
|
||||
DATA_GUNSHIP_EVENT = 2,
|
||||
@@ -41,6 +43,7 @@ enum eData
|
||||
DATA_SINDRAGOSA = 10,
|
||||
DATA_THE_LICH_KING = 11,
|
||||
|
||||
// Additional data
|
||||
DATA_SAURFANG_EVENT_NPC = 12,
|
||||
DATA_BONED_ACHIEVEMENT = 13,
|
||||
DATA_OOZE_DANCE_ACHIEVEMENT = 14,
|
||||
@@ -137,17 +140,24 @@ enum eCreatures
|
||||
|
||||
enum eGameobjects
|
||||
{
|
||||
// Lord Marrogar
|
||||
GO_DOODAD_ICECROWN_ICEWALL02 = 201910,
|
||||
GO_ICEWALL = 201911,
|
||||
GO_LORD_MARROWGAR_S_ENTRANCE = 201857,
|
||||
|
||||
// Lady Deathwhisper
|
||||
GO_ORATORY_OF_THE_DAMNED_ENTRANCE = 201563,
|
||||
GO_LADY_DEATHWHISPER_ELEVATOR = 202220,
|
||||
|
||||
// Deathbringer Saurfang
|
||||
GO_SAURFANG_S_DOOR = 201825,
|
||||
GO_DEATHBRINGER_S_CACHE_10N = 202239,
|
||||
GO_DEATHBRINGER_S_CACHE_25N = 202240,
|
||||
GO_DEATHBRINGER_S_CACHE_10H = 202238,
|
||||
GO_DEATHBRINGER_S_CACHE_25H = 202241,
|
||||
GO_SCOURGE_TRANSPORTER_SAURFANG = 202244,
|
||||
|
||||
// Professor Putricide
|
||||
GO_ORANGE_PLAGUE_MONSTER_ENTRANCE = 201371,
|
||||
GO_GREEN_PLAGUE_MONSTER_ENTRANCE = 201370,
|
||||
GO_SCIENTIST_AIRLOCK_DOOR_COLLISION = 201612,
|
||||
@@ -157,13 +167,21 @@ enum eGameobjects
|
||||
GO_DOODAD_ICECROWN_GREENTUBES02 = 201618,
|
||||
GO_SCIENTIST_ENTRANCE = 201372,
|
||||
GO_DRINK_ME = 201584,
|
||||
|
||||
// Blood Prince Council
|
||||
GO_CRIMSON_HALL_DOOR = 201376,
|
||||
GO_BLOOD_ELF_COUNCIL_DOOR = 201378,
|
||||
GO_BLOOD_ELF_COUNCIL_DOOR_RIGHT = 201377,
|
||||
|
||||
// Blood-Queen Lana'thel
|
||||
GO_DOODAD_ICECROWN_BLOODPRINCE_DOOR_01 = 201746,
|
||||
GO_DOODAD_ICECROWN_GRATE_01 = 201755,
|
||||
|
||||
// Valithria Dreamwalker
|
||||
GO_GREEN_DRAGON_BOSS_ENTRANCE = 201375,
|
||||
GO_GREEN_DRAGON_BOSS_EXIT = 201374,
|
||||
|
||||
// Sindragosa
|
||||
GO_SINDRAGOSA_ENTRANCE_DOOR = 201373,
|
||||
GO_SINDRAGOSA_SHORTCUT_ENTRANCE_DOOR = 201369,
|
||||
GO_SINDRAGOSA_SHORTCUT_EXIT_DOOR = 201379,
|
||||
@@ -171,29 +189,39 @@ enum eGameobjects
|
||||
|
||||
enum eAchievementCriteria
|
||||
{
|
||||
// Lord Marrowgar
|
||||
CRITERIA_BONED_10N = 12775,
|
||||
CRITERIA_BONED_25N = 12962,
|
||||
CRITERIA_BONED_10H = 13393,
|
||||
CRITERIA_BONED_25H = 13394,
|
||||
|
||||
// Rotface
|
||||
CRITERIA_DANCES_WITH_OOZES_10N = 12984,
|
||||
CRITERIA_DANCES_WITH_OOZES_25N = 12966,
|
||||
CRITERIA_DANCES_WITH_OOZES_10H = 12985,
|
||||
CRITERIA_DANCES_WITH_OOZES_25H = 12983,
|
||||
|
||||
// Professor Putricide
|
||||
CRITERIA_NAUSEA_10N = 12987,
|
||||
CRITERIA_NAUSEA_25N = 12968,
|
||||
CRITERIA_NAUSEA_10H = 12988,
|
||||
CRITERIA_NAUSEA_25H = 12981,
|
||||
|
||||
// Blood Prince Council
|
||||
CRITERIA_ORB_WHISPERER_10N = 13033,
|
||||
CRITERIA_ORB_WHISPERER_25N = 12969,
|
||||
CRITERIA_ORB_WHISPERER_10H = 13034,
|
||||
CRITERIA_ORB_WHISPERER_25H = 13032,
|
||||
};
|
||||
|
||||
enum ePutricideActions
|
||||
enum eSharedActions
|
||||
{
|
||||
// Festergut
|
||||
ACTION_FESTERGUT_COMBAT = -366260,
|
||||
ACTION_FESTERGUT_GAS = -366261,
|
||||
ACTION_FESTERGUT_DEATH = -366262,
|
||||
|
||||
// Rotface
|
||||
ACTION_ROTFACE_COMBAT = -366270,
|
||||
ACTION_ROTFACE_OOZE = -366271,
|
||||
ACTION_ROTFACE_DEATH = -366272,
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "icecrown_citadel.h"
|
||||
#include "Spell.h"
|
||||
|
||||
|
||||
@@ -15,7 +15,9 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ScriptPCH.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "icecrown_citadel.h"
|
||||
|
||||
static const DoorData doorData[] =
|
||||
@@ -47,25 +49,25 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
|
||||
struct instance_icecrown_citadel_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_icecrown_citadel_InstanceMapScript(InstanceMap* pMap) : InstanceScript(pMap)
|
||||
instance_icecrown_citadel_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
|
||||
{
|
||||
SetBossNumber(MAX_ENCOUNTER);
|
||||
LoadDoorData(doorData);
|
||||
uiLadyDeathwisperElevator = 0;
|
||||
uiDeathbringerSaurfang = 0;
|
||||
uiSaurfangDoor = 0;
|
||||
uiSaurfangEventNPC = 0;
|
||||
uiDeathbringersCache = 0;
|
||||
uiSaurfangTeleport = 0;
|
||||
memset(uiPutricidePipes, 0, 2*sizeof(uint64));
|
||||
memset(uiPutricideGates, 0, 2*sizeof(uint64));
|
||||
uiPutricideCollision = 0;
|
||||
uiFestergut = 0;
|
||||
uiRotface = 0;
|
||||
uiProfessorPutricide = 0;
|
||||
uiPutricideTable = 0;
|
||||
memset(uiBloodCouncil, 0, 3*sizeof(uint64));
|
||||
uiBloodCouncilController = 0;
|
||||
ladyDeathwisperElevator = 0;
|
||||
deathbringerSaurfang = 0;
|
||||
saurfangDoor = 0;
|
||||
saurfangEventNPC = 0;
|
||||
deathbringersCache = 0;
|
||||
saurfangTeleport = 0;
|
||||
memset(putricidePipes, 0, 2*sizeof(uint64));
|
||||
memset(putricideGates, 0, 2*sizeof(uint64));
|
||||
putricideCollision = 0;
|
||||
festergut = 0;
|
||||
rotface = 0;
|
||||
professorPutricide = 0;
|
||||
putricideTable = 0;
|
||||
memset(bloodCouncil, 0, 3*sizeof(uint64));
|
||||
bloodCouncilController = 0;
|
||||
isBonedEligible = true;
|
||||
isOozeDanceEligible = true;
|
||||
isNauseaEligible = true;
|
||||
@@ -122,13 +124,13 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
creature->UpdateEntry(NPC_KING_VARIAN_WRYNN, ALLIANCE);
|
||||
break;
|
||||
case NPC_DEATHBRINGER_SAURFANG:
|
||||
uiDeathbringerSaurfang = creature->GetGUID();
|
||||
deathbringerSaurfang = creature->GetGUID();
|
||||
break;
|
||||
case NPC_SE_HIGH_OVERLORD_SAURFANG:
|
||||
if (TeamInInstance == ALLIANCE)
|
||||
creature->UpdateEntry(NPC_SE_MURADIN_BRONZEBEARD, ALLIANCE);
|
||||
case NPC_SE_MURADIN_BRONZEBEARD:
|
||||
uiSaurfangEventNPC = creature->GetGUID();
|
||||
saurfangEventNPC = creature->GetGUID();
|
||||
creature->LastUsedScriptID = creature->GetScriptId();
|
||||
break;
|
||||
case NPC_SE_KOR_KRON_REAVER:
|
||||
@@ -136,34 +138,34 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
creature->UpdateEntry(NPC_SE_SKYBREAKER_MARINE, ALLIANCE);
|
||||
break;
|
||||
case NPC_FESTERGUT:
|
||||
uiFestergut = creature->GetGUID();
|
||||
festergut = creature->GetGUID();
|
||||
break;
|
||||
case NPC_ROTFACE:
|
||||
uiRotface = creature->GetGUID();
|
||||
rotface = creature->GetGUID();
|
||||
break;
|
||||
case NPC_PROFESSOR_PUTRICIDE:
|
||||
uiProfessorPutricide = creature->GetGUID();
|
||||
professorPutricide = creature->GetGUID();
|
||||
break;
|
||||
case NPC_PRINCE_KELESETH:
|
||||
uiBloodCouncil[0] = creature->GetGUID();
|
||||
bloodCouncil[0] = creature->GetGUID();
|
||||
break;
|
||||
case NPC_PRINCE_TALDARAM:
|
||||
uiBloodCouncil[1] = creature->GetGUID();
|
||||
bloodCouncil[1] = creature->GetGUID();
|
||||
break;
|
||||
case NPC_PRINCE_VALANAR:
|
||||
uiBloodCouncil[2] = creature->GetGUID();
|
||||
bloodCouncil[2] = creature->GetGUID();
|
||||
break;
|
||||
case NPC_BLOOD_ORB_CONTROLLER:
|
||||
uiBloodCouncilController = creature->GetGUID();
|
||||
bloodCouncilController = creature->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* pGo, bool add)
|
||||
void OnGameObjectCreate(GameObject* go, bool add)
|
||||
{
|
||||
switch (pGo->GetEntry())
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case GO_DOODAD_ICECROWN_ICEWALL02:
|
||||
case GO_ICEWALL:
|
||||
@@ -182,59 +184,59 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
case GO_SINDRAGOSA_ENTRANCE_DOOR:
|
||||
case GO_SINDRAGOSA_SHORTCUT_ENTRANCE_DOOR:
|
||||
case GO_SINDRAGOSA_SHORTCUT_EXIT_DOOR:
|
||||
AddDoor(pGo, add);
|
||||
AddDoor(go, add);
|
||||
break;
|
||||
case GO_LADY_DEATHWHISPER_ELEVATOR:
|
||||
uiLadyDeathwisperElevator = pGo->GetGUID();
|
||||
ladyDeathwisperElevator = go->GetGUID();
|
||||
if (GetBossState(DATA_LADY_DEATHWHISPER) == DONE)
|
||||
{
|
||||
pGo->SetUInt32Value(GAMEOBJECT_LEVEL, 0);
|
||||
pGo->SetGoState(GO_STATE_READY);
|
||||
go->SetUInt32Value(GAMEOBJECT_LEVEL, 0);
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
break;
|
||||
case GO_SAURFANG_S_DOOR:
|
||||
uiSaurfangDoor = pGo->GetGUID();
|
||||
saurfangDoor = go->GetGUID();
|
||||
break;
|
||||
case GO_DEATHBRINGER_S_CACHE_10N:
|
||||
case GO_DEATHBRINGER_S_CACHE_25N:
|
||||
case GO_DEATHBRINGER_S_CACHE_10H:
|
||||
case GO_DEATHBRINGER_S_CACHE_25H:
|
||||
uiDeathbringersCache = pGo->GetGUID();
|
||||
deathbringersCache = go->GetGUID();
|
||||
break;
|
||||
case GO_SCOURGE_TRANSPORTER_SAURFANG:
|
||||
uiSaurfangTeleport = pGo->GetGUID();
|
||||
saurfangTeleport = go->GetGUID();
|
||||
break;
|
||||
case GO_SCIENTIST_AIRLOCK_DOOR_COLLISION:
|
||||
uiPutricideCollision = pGo->GetGUID();
|
||||
putricideCollision = go->GetGUID();
|
||||
if (GetBossState(DATA_FESTERGUT) == DONE && GetBossState(DATA_ROTFACE) == DONE)
|
||||
HandleGameObject(uiPutricideCollision, true, pGo);
|
||||
HandleGameObject(putricideCollision, true, go);
|
||||
break;
|
||||
case GO_SCIENTIST_AIRLOCK_DOOR_ORANGE:
|
||||
uiPutricideGates[0] = pGo->GetGUID();
|
||||
putricideGates[0] = go->GetGUID();
|
||||
if (GetBossState(DATA_FESTERGUT) == DONE && GetBossState(DATA_ROTFACE) == DONE)
|
||||
pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
else if (GetBossState(DATA_FESTERGUT) == DONE)
|
||||
HandleGameObject(uiPutricideGates[1], false, pGo);
|
||||
HandleGameObject(putricideGates[1], false, go);
|
||||
break;
|
||||
case GO_SCIENTIST_AIRLOCK_DOOR_GREEN:
|
||||
uiPutricideGates[1] = pGo->GetGUID();
|
||||
putricideGates[1] = go->GetGUID();
|
||||
if (GetBossState(DATA_ROTFACE) == DONE && GetBossState(DATA_FESTERGUT) == DONE)
|
||||
pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
else if (GetBossState(DATA_ROTFACE) == DONE)
|
||||
HandleGameObject(uiPutricideGates[1], false, pGo);
|
||||
HandleGameObject(putricideGates[1], false, go);
|
||||
break;
|
||||
case GO_DOODAD_ICECROWN_ORANGETUBES02:
|
||||
uiPutricidePipes[0] = pGo->GetGUID();
|
||||
putricidePipes[0] = go->GetGUID();
|
||||
if (GetBossState(DATA_FESTERGUT) == DONE)
|
||||
HandleGameObject(uiPutricidePipes[0], true, pGo);
|
||||
HandleGameObject(putricidePipes[0], true, go);
|
||||
break;
|
||||
case GO_DOODAD_ICECROWN_GREENTUBES02:
|
||||
uiPutricidePipes[1] = pGo->GetGUID();
|
||||
putricidePipes[1] = go->GetGUID();
|
||||
if (GetBossState(DATA_ROTFACE) == DONE)
|
||||
HandleGameObject(uiPutricidePipes[1], true, pGo);
|
||||
HandleGameObject(putricidePipes[1], true, go);
|
||||
break;
|
||||
case GO_DRINK_ME:
|
||||
uiPutricideTable = pGo->GetGUID();
|
||||
putricideTable = go->GetGUID();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -246,29 +248,29 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
switch (type)
|
||||
{
|
||||
case DATA_DEATHBRINGER_SAURFANG:
|
||||
return uiDeathbringerSaurfang;
|
||||
return deathbringerSaurfang;
|
||||
case DATA_SAURFANG_EVENT_NPC:
|
||||
return uiSaurfangEventNPC;
|
||||
return saurfangEventNPC;
|
||||
case GO_SAURFANG_S_DOOR:
|
||||
return uiSaurfangDoor;
|
||||
return saurfangDoor;
|
||||
case GO_SCOURGE_TRANSPORTER_SAURFANG:
|
||||
return uiSaurfangTeleport;
|
||||
return saurfangTeleport;
|
||||
case DATA_FESTERGUT:
|
||||
return uiFestergut;
|
||||
return festergut;
|
||||
case DATA_ROTFACE:
|
||||
return uiRotface;
|
||||
return rotface;
|
||||
case DATA_PROFESSOR_PUTRICIDE:
|
||||
return uiProfessorPutricide;
|
||||
return professorPutricide;
|
||||
case DATA_PUTRICIDE_TABLE:
|
||||
return uiPutricideTable;
|
||||
return putricideTable;
|
||||
case DATA_PRINCE_KELESETH_GUID:
|
||||
return uiBloodCouncil[0];
|
||||
return bloodCouncil[0];
|
||||
case DATA_PRINCE_TALDARAM_GUID:
|
||||
return uiBloodCouncil[1];
|
||||
return bloodCouncil[1];
|
||||
case DATA_PRINCE_VALANAR_GUID:
|
||||
return uiBloodCouncil[2];
|
||||
return bloodCouncil[2];
|
||||
case DATA_BLOOD_PRINCES_CONTROL:
|
||||
return uiBloodCouncilController;
|
||||
return bloodCouncilController;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -286,7 +288,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
case DATA_LADY_DEATHWHISPER:
|
||||
SetBossState(DATA_GUNSHIP_EVENT, state); // TEMP HACK UNTIL GUNSHIP SCRIPTED
|
||||
if (state == DONE)
|
||||
if (GameObject* elevator = instance->GetGameObject(uiLadyDeathwisperElevator))
|
||||
if (GameObject* elevator = instance->GetGameObject(ladyDeathwisperElevator))
|
||||
{
|
||||
elevator->SetUInt32Value(GAMEOBJECT_LEVEL, 0);
|
||||
elevator->SetGoState(GO_STATE_READY);
|
||||
@@ -296,11 +298,11 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
switch (state)
|
||||
{
|
||||
case DONE:
|
||||
DoRespawnGameObject(uiDeathbringersCache, 7*DAY);
|
||||
DoRespawnGameObject(deathbringersCache, 7*DAY);
|
||||
case NOT_STARTED:
|
||||
if (GameObject* teleporter = instance->GetGameObject(uiSaurfangTeleport))
|
||||
if (GameObject* teleporter = instance->GetGameObject(saurfangTeleport))
|
||||
{
|
||||
HandleGameObject(uiSaurfangTeleport, true, teleporter);
|
||||
HandleGameObject(saurfangTeleport, true, teleporter);
|
||||
teleporter->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE);
|
||||
}
|
||||
break;
|
||||
@@ -313,15 +315,15 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
{
|
||||
if (GetBossState(DATA_ROTFACE) == DONE)
|
||||
{
|
||||
HandleGameObject(uiPutricideCollision, true);
|
||||
if (GameObject* pGo = instance->GetGameObject(uiPutricideGates[0]))
|
||||
pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
if (GameObject* pGo = instance->GetGameObject(uiPutricideGates[1]))
|
||||
pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
HandleGameObject(putricideCollision, true);
|
||||
if (GameObject* go = instance->GetGameObject(putricideGates[0]))
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
if (GameObject* go = instance->GetGameObject(putricideGates[1]))
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
}
|
||||
else
|
||||
HandleGameObject(uiPutricideGates[0], false);
|
||||
HandleGameObject(uiPutricidePipes[0], true);
|
||||
HandleGameObject(putricideGates[0], false);
|
||||
HandleGameObject(putricidePipes[0], true);
|
||||
}
|
||||
break;
|
||||
case DATA_ROTFACE:
|
||||
@@ -329,15 +331,15 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
{
|
||||
if (GetBossState(DATA_FESTERGUT) == DONE)
|
||||
{
|
||||
HandleGameObject(uiPutricideCollision, true);
|
||||
if (GameObject* pGo = instance->GetGameObject(uiPutricideGates[0]))
|
||||
pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
if (GameObject* pGo = instance->GetGameObject(uiPutricideGates[1]))
|
||||
pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
HandleGameObject(putricideCollision, true);
|
||||
if (GameObject* go = instance->GetGameObject(putricideGates[0]))
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
if (GameObject* go = instance->GetGameObject(putricideGates[1]))
|
||||
go->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE);
|
||||
}
|
||||
else
|
||||
HandleGameObject(uiPutricideGates[1], false);
|
||||
HandleGameObject(uiPutricidePipes[1], true);
|
||||
HandleGameObject(putricideGates[1], false);
|
||||
HandleGameObject(putricidePipes[1], true);
|
||||
}
|
||||
break;
|
||||
case DATA_BLOOD_PRINCE_COUNCIL:
|
||||
@@ -447,30 +449,30 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 uiLadyDeathwisperElevator;
|
||||
uint64 uiDeathbringerSaurfang;
|
||||
uint64 uiSaurfangDoor;
|
||||
uint64 uiSaurfangEventNPC; // Muradin Bronzebeard or High Overlord Saurfang
|
||||
uint64 uiDeathbringersCache;
|
||||
uint64 uiSaurfangTeleport;
|
||||
uint64 uiPutricidePipes[2];
|
||||
uint64 uiPutricideGates[2];
|
||||
uint64 uiPutricideCollision;
|
||||
uint64 uiFestergut;
|
||||
uint64 uiRotface;
|
||||
uint64 uiProfessorPutricide;
|
||||
uint64 uiPutricideTable;
|
||||
uint64 uiBloodCouncil[3];
|
||||
uint64 uiBloodCouncilController;
|
||||
uint64 ladyDeathwisperElevator;
|
||||
uint64 deathbringerSaurfang;
|
||||
uint64 saurfangDoor;
|
||||
uint64 saurfangEventNPC; // Muradin Bronzebeard or High Overlord Saurfang
|
||||
uint64 deathbringersCache;
|
||||
uint64 saurfangTeleport;
|
||||
uint64 putricidePipes[2];
|
||||
uint64 putricideGates[2];
|
||||
uint64 putricideCollision;
|
||||
uint64 festergut;
|
||||
uint64 rotface;
|
||||
uint64 professorPutricide;
|
||||
uint64 putricideTable;
|
||||
uint64 bloodCouncil[3];
|
||||
uint64 bloodCouncilController;
|
||||
bool isBonedEligible;
|
||||
bool isOozeDanceEligible;
|
||||
bool isNauseaEligible;
|
||||
bool isOrbWhispererEligible;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* pMap) const
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
return new instance_icecrown_citadel_InstanceMapScript(pMap);
|
||||
return new instance_icecrown_citadel_InstanceMapScript(map);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user