mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
Scripts/Stratholme: Rewrite scripts (#31232)
This commit is contained in:
@@ -15,223 +15,100 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_cannon_master_willey
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Stratholme
|
||||
EndScriptData */
|
||||
/*
|
||||
* Timers requires to be revisited
|
||||
* SPELL_SUMMON_RIFLEMAN should target something but there's nothing spawned in summon position
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "stratholme.h"
|
||||
|
||||
//front, left
|
||||
#define ADD_1X 3553.851807f
|
||||
#define ADD_1Y -2945.885986f
|
||||
#define ADD_1Z 125.001015f
|
||||
#define ADD_1O 0.592007f
|
||||
//front, right
|
||||
#define ADD_2X 3559.206299f
|
||||
#define ADD_2Y -2952.929932f
|
||||
#define ADD_2Z 125.001015f
|
||||
#define ADD_2O 0.592007f
|
||||
//mid, left
|
||||
#define ADD_3X 3552.417480f
|
||||
#define ADD_3Y -2948.667236f
|
||||
#define ADD_3Z 125.001015f
|
||||
#define ADD_3O 0.592007f
|
||||
//mid, right
|
||||
#define ADD_4X 3555.651855f
|
||||
#define ADD_4Y -2953.519043f
|
||||
#define ADD_4Z 125.001015f
|
||||
#define ADD_4O 0.592007f
|
||||
//back, left
|
||||
#define ADD_5X 3547.927246f
|
||||
#define ADD_5Y -2950.977295f
|
||||
#define ADD_5Z 125.001015f
|
||||
#define ADD_5O 0.592007f
|
||||
//back, mid
|
||||
#define ADD_6X 3553.094697f
|
||||
#define ADD_6Y -2952.123291f
|
||||
#define ADD_6Z 125.001015f
|
||||
#define ADD_6O 0.592007f
|
||||
//back, right
|
||||
#define ADD_7X 3552.727539f
|
||||
#define ADD_7Y -2957.776123f
|
||||
#define ADD_7Z 125.001015f
|
||||
#define ADD_7O 0.592007f
|
||||
//behind, left
|
||||
#define ADD_8X 3547.156250f
|
||||
#define ADD_8Y -2953.162354f
|
||||
#define ADD_8Z 125.001015f
|
||||
#define ADD_8O 0.592007f
|
||||
//behind, right
|
||||
#define ADD_9X 3550.202148f
|
||||
#define ADD_9Y -2957.437744f
|
||||
#define ADD_9Z 125.001015f
|
||||
#define ADD_9O 0.592007f
|
||||
|
||||
enum Spells
|
||||
enum WilleySpells
|
||||
{
|
||||
SPELL_KNOCKAWAY = 10101,
|
||||
SPELL_PUMMEL = 15615,
|
||||
SPELL_SHOOT = 16496
|
||||
//SPELL_SUMMONCRIMSONRIFLEMAN = 17279
|
||||
SPELL_SHOOT = 16496,
|
||||
SPELL_KNOCK_AWAY = 10101,
|
||||
SPELL_PUMMEL = 15615,
|
||||
SPELL_SUMMON_RIFLEMAN = 17279
|
||||
};
|
||||
|
||||
class boss_cannon_master_willey : public CreatureScript
|
||||
enum WilleyEvents
|
||||
{
|
||||
public:
|
||||
boss_cannon_master_willey() : CreatureScript("boss_cannon_master_willey") { }
|
||||
EVENT_SHOOT = 1,
|
||||
EVENT_KNOCK_AWAY,
|
||||
EVENT_PUMMEL,
|
||||
EVENT_SUMMON_RIFLEMAN
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
// 10997 - Cannon Master Willey
|
||||
struct boss_cannon_master_willey : public ScriptedAI
|
||||
{
|
||||
boss_cannon_master_willey(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
return GetStratholmeAI<boss_cannon_master_willeyAI>(creature);
|
||||
_events.Reset();
|
||||
}
|
||||
|
||||
struct boss_cannon_master_willeyAI : public ScriptedAI
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
boss_cannon_master_willeyAI(Creature* creature) : ScriptedAI(creature)
|
||||
_events.ScheduleEvent(EVENT_SHOOT, 0s);
|
||||
_events.ScheduleEvent(EVENT_KNOCK_AWAY, 10s, 20s);
|
||||
_events.ScheduleEvent(EVENT_PUMMEL, 10s, 15s);
|
||||
_events.ScheduleEvent(EVENT_SUMMON_RIFLEMAN, 5s, 10s);
|
||||
}
|
||||
|
||||
void AttackStart(Unit* who) override
|
||||
{
|
||||
ScriptedAI::AttackStartCaster(who, 30.0f);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Shoot_Timer = 1000;
|
||||
Pummel_Timer = 7000;
|
||||
KnockAway_Timer = 11000;
|
||||
SummonRifleman_Timer = 15000;
|
||||
}
|
||||
|
||||
uint32 KnockAway_Timer;
|
||||
uint32 Pummel_Timer;
|
||||
uint32 Shoot_Timer;
|
||||
uint32 SummonRifleman_Timer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
me->SummonCreature(11054, ADD_1X, ADD_1Y, ADD_1Z, ADD_1O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_2X, ADD_2Y, ADD_2Z, ADD_2O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_3X, ADD_3Y, ADD_3Z, ADD_3O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_4X, ADD_4Y, ADD_4Z, ADD_4O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_5X, ADD_5Y, ADD_5Z, ADD_5O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_7X, ADD_7Y, ADD_7Z, ADD_7O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_9X, ADD_9Y, ADD_9Z, ADD_9O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//Pummel
|
||||
if (Pummel_Timer <= diff)
|
||||
switch (eventId)
|
||||
{
|
||||
//Cast
|
||||
if (rand32() % 100 < 90) //90% chance to cast
|
||||
{
|
||||
case EVENT_SHOOT:
|
||||
DoCastVictim(SPELL_SHOOT);
|
||||
_events.Repeat(2s, 4s);
|
||||
break;
|
||||
case EVENT_KNOCK_AWAY:
|
||||
DoCastVictim(SPELL_KNOCK_AWAY);
|
||||
_events.Repeat(15s, 25s);
|
||||
break;
|
||||
case EVENT_PUMMEL:
|
||||
DoCastVictim(SPELL_PUMMEL);
|
||||
}
|
||||
//12 seconds until we should cast this again
|
||||
Pummel_Timer = 12000;
|
||||
} else Pummel_Timer -= diff;
|
||||
_events.Repeat(10s, 15s);
|
||||
break;
|
||||
case EVENT_SUMMON_RIFLEMAN:
|
||||
DoCastSelf(SPELL_SUMMON_RIFLEMAN);
|
||||
_events.Repeat(15s, 25s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
//KnockAway
|
||||
if (KnockAway_Timer <= diff)
|
||||
{
|
||||
//Cast
|
||||
if (rand32() % 100 < 80) //80% chance to cast
|
||||
{
|
||||
DoCastVictim(SPELL_KNOCKAWAY);
|
||||
}
|
||||
//14 seconds until we should cast this again
|
||||
KnockAway_Timer = 14000;
|
||||
} else KnockAway_Timer -= diff;
|
||||
|
||||
//Shoot
|
||||
if (Shoot_Timer <= diff)
|
||||
{
|
||||
//Cast
|
||||
DoCastVictim(SPELL_SHOOT);
|
||||
//1 seconds until we should cast this again
|
||||
Shoot_Timer = 1000;
|
||||
} else Shoot_Timer -= diff;
|
||||
|
||||
//SummonRifleman
|
||||
if (SummonRifleman_Timer <= diff)
|
||||
{
|
||||
//Cast
|
||||
switch (rand32() % 9)
|
||||
{
|
||||
case 0:
|
||||
me->SummonCreature(11054, ADD_1X, ADD_1Y, ADD_1Z, ADD_1O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_2X, ADD_2Y, ADD_2Z, ADD_2O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_4X, ADD_4Y, ADD_4Z, ADD_4O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
break;
|
||||
case 1:
|
||||
me->SummonCreature(11054, ADD_2X, ADD_2Y, ADD_2Z, ADD_2O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_3X, ADD_3Y, ADD_3Z, ADD_3O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_5X, ADD_5Y, ADD_5Z, ADD_5O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
break;
|
||||
case 2:
|
||||
me->SummonCreature(11054, ADD_3X, ADD_3Y, ADD_3Z, ADD_3O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_4X, ADD_4Y, ADD_4Z, ADD_4O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_6X, ADD_6Y, ADD_6Z, ADD_6O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
break;
|
||||
case 3:
|
||||
me->SummonCreature(11054, ADD_4X, ADD_4Y, ADD_4Z, ADD_4O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_5X, ADD_5Y, ADD_5Z, ADD_5O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_7X, ADD_7Y, ADD_7Z, ADD_7O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
break;
|
||||
case 4:
|
||||
me->SummonCreature(11054, ADD_5X, ADD_5Y, ADD_5Z, ADD_5O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_6X, ADD_6Y, ADD_6Z, ADD_6O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_8X, ADD_8Y, ADD_8Z, ADD_8O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
break;
|
||||
case 5:
|
||||
me->SummonCreature(11054, ADD_6X, ADD_6Y, ADD_6Z, ADD_6O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_7X, ADD_7Y, ADD_7Z, ADD_7O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_9X, ADD_9Y, ADD_9Z, ADD_9O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
break;
|
||||
case 6:
|
||||
me->SummonCreature(11054, ADD_7X, ADD_7Y, ADD_7Z, ADD_7O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_8X, ADD_8Y, ADD_8Z, ADD_8O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_1X, ADD_1Y, ADD_1Z, ADD_1O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
break;
|
||||
case 7:
|
||||
me->SummonCreature(11054, ADD_8X, ADD_8Y, ADD_8Z, ADD_8O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_9X, ADD_9Y, ADD_9Z, ADD_9O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_2X, ADD_2Y, ADD_2Z, ADD_2O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
break;
|
||||
case 8:
|
||||
me->SummonCreature(11054, ADD_9X, ADD_9Y, ADD_9Z, ADD_9O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_1X, ADD_1Y, ADD_1Z, ADD_1O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
me->SummonCreature(11054, ADD_3X, ADD_3Y, ADD_3Z, ADD_3O, TEMPSUMMON_TIMED_DESPAWN, 4min);
|
||||
break;
|
||||
}
|
||||
//30 seconds until we should cast this again
|
||||
SummonRifleman_Timer = 30000;
|
||||
} else SummonRifleman_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
void AddSC_boss_cannon_master_willey()
|
||||
{
|
||||
new boss_cannon_master_willey();
|
||||
RegisterStratholmeCreatureAI(boss_cannon_master_willey);
|
||||
}
|
||||
|
||||
@@ -15,219 +15,200 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Dathrohan_Balnazzar
|
||||
SD%Complete: 95
|
||||
SDComment: Possibly need to fix/improve summons after death
|
||||
SDCategory: Stratholme
|
||||
EndScriptData */
|
||||
/*
|
||||
* Timers requires to be revisited
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "stratholme.h"
|
||||
|
||||
enum Spells
|
||||
enum DathrohanTexts
|
||||
{
|
||||
//Dathrohan spells
|
||||
SPELL_CRUSADERSHAMMER = 17286, //AOE stun
|
||||
SPELL_CRUSADERSTRIKE = 17281,
|
||||
SPELL_HOLYSTRIKE = 17284, //weapon dmg +3
|
||||
|
||||
//Transform
|
||||
SPELL_BALNAZZARTRANSFORM = 17288, //restore full HP/mana, trigger spell Balnazzar Transform Stun
|
||||
|
||||
//Balnazzar spells
|
||||
SPELL_SHADOWSHOCK = 17399,
|
||||
SPELL_MINDBLAST = 17287,
|
||||
SPELL_PSYCHICSCREAM = 13704,
|
||||
SPELL_SLEEP = 12098,
|
||||
SPELL_MINDCONTROL = 15690
|
||||
SAY_AGGRO = 0,
|
||||
SAY_TRANSFORM = 0,
|
||||
SAY_DEATH = 1
|
||||
};
|
||||
|
||||
enum Creatures
|
||||
enum DathrohanSpells
|
||||
{
|
||||
// Dathrohan
|
||||
SPELL_CRUSADERS_HAMMER = 17286,
|
||||
SPELL_CRUSADER_STRIKE = 17281,
|
||||
SPELL_HOLY_STRIKE = 17284,
|
||||
SPELL_MIND_BLAST = 17287,
|
||||
|
||||
SPELL_BALNAZZAR_TRANSFORM = 17288,
|
||||
|
||||
// Balnazzar
|
||||
SPELL_SHADOW_SHOCK = 17399,
|
||||
SPELL_PSYCHIC_SCREAM = 13704,
|
||||
SPELL_SLEEP = 12098,
|
||||
SPELL_DOMINATION = 17405
|
||||
};
|
||||
|
||||
enum DathrohanEvents
|
||||
{
|
||||
EVENT_CRUSADERS_HAMMER = 1,
|
||||
EVENT_CRUSADER_STRIKE,
|
||||
EVENT_HOLY_STRIKE,
|
||||
|
||||
EVENT_MIND_BLAST,
|
||||
|
||||
EVENT_SHADOW_SHOCK,
|
||||
EVENT_PSYCHIC_SCREAM,
|
||||
EVENT_SLEEP,
|
||||
EVENT_DOMINATION,
|
||||
|
||||
EVENT_TRANSFORM_1,
|
||||
EVENT_TRANSFORM_2,
|
||||
EVENT_TRANSFORM_3,
|
||||
EVENT_TRANSFORM_4
|
||||
};
|
||||
|
||||
enum DathrohanMisc
|
||||
{
|
||||
NPC_DATHROHAN = 10812,
|
||||
NPC_BALNAZZAR = 10813,
|
||||
NPC_ZOMBIE = 10698 //probably incorrect
|
||||
SUMMON_GROUP_DEATH = 0
|
||||
};
|
||||
|
||||
struct SummonDef
|
||||
// 10812 - Grand Crusader Dathrohan
|
||||
struct boss_dathrohan_balnazzar : public ScriptedAI
|
||||
{
|
||||
float m_fX, m_fY, m_fZ, m_fOrient;
|
||||
};
|
||||
boss_dathrohan_balnazzar(Creature* creature) : ScriptedAI(creature), _transformed(false) { }
|
||||
|
||||
SummonDef m_aSummonPoint[]=
|
||||
{
|
||||
{3444.156f, -3090.626f, 135.002f, 2.240f}, //G1 front, left
|
||||
{3449.123f, -3087.009f, 135.002f, 2.240f}, //G1 front, right
|
||||
{3446.246f, -3093.466f, 135.002f, 2.240f}, //G1 back left
|
||||
{3451.160f, -3089.904f, 135.002f, 2.240f}, //G1 back, right
|
||||
|
||||
{3457.995f, -3080.916f, 135.002f, 3.784f}, //G2 front, left
|
||||
{3454.302f, -3076.330f, 135.002f, 3.784f}, //G2 front, right
|
||||
{3460.975f, -3078.901f, 135.002f, 3.784f}, //G2 back left
|
||||
{3457.338f, -3073.979f, 135.002f, 3.784f} //G2 back, right
|
||||
};
|
||||
|
||||
class boss_dathrohan_balnazzar : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_dathrohan_balnazzar() : CreatureScript("boss_dathrohan_balnazzar") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
void Reset() override
|
||||
{
|
||||
return GetStratholmeAI<boss_dathrohan_balnazzarAI>(creature);
|
||||
_events.Reset();
|
||||
_transformed = false;
|
||||
|
||||
if (me->GetEntry() == NPC_BALNAZZAR)
|
||||
me->UpdateEntry(NPC_DATHROHAN);
|
||||
|
||||
SetEquipmentSlots(true);
|
||||
}
|
||||
|
||||
struct boss_dathrohan_balnazzarAI : public ScriptedAI
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
boss_dathrohan_balnazzarAI(Creature* creature) : ScriptedAI(creature)
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
_events.ScheduleEvent(EVENT_CRUSADERS_HAMMER, 15s, 25s);
|
||||
_events.ScheduleEvent(EVENT_CRUSADER_STRIKE, 5s, 10s);
|
||||
_events.ScheduleEvent(EVENT_HOLY_STRIKE, 10s, 20s);
|
||||
_events.ScheduleEvent(EVENT_MIND_BLAST, 5s, 15s);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
|
||||
{
|
||||
if (!_transformed && me->HealthBelowPctDamaged(40, damage))
|
||||
{
|
||||
Initialize();
|
||||
_transformed = true;
|
||||
_events.ScheduleEvent(EVENT_TRANSFORM_1, 0s);
|
||||
}
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
me->SummonCreatureGroup(SUMMON_GROUP_DEATH);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
m_uiCrusadersHammer_Timer = 8000;
|
||||
m_uiCrusaderStrike_Timer = 12000;
|
||||
m_uiMindBlast_Timer = 6000;
|
||||
m_uiHolyStrike_Timer = 18000;
|
||||
m_uiShadowShock_Timer = 4000;
|
||||
m_uiPsychicScream_Timer = 16000;
|
||||
m_uiDeepSleep_Timer = 20000;
|
||||
m_uiMindControl_Timer = 10000;
|
||||
m_bTransformed = false;
|
||||
}
|
||||
|
||||
uint32 m_uiCrusadersHammer_Timer;
|
||||
uint32 m_uiCrusaderStrike_Timer;
|
||||
uint32 m_uiMindBlast_Timer;
|
||||
uint32 m_uiHolyStrike_Timer;
|
||||
uint32 m_uiShadowShock_Timer;
|
||||
uint32 m_uiPsychicScream_Timer;
|
||||
uint32 m_uiDeepSleep_Timer;
|
||||
uint32 m_uiMindControl_Timer;
|
||||
bool m_bTransformed;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
|
||||
if (me->GetEntry() == NPC_BALNAZZAR)
|
||||
me->UpdateEntry(NPC_DATHROHAN);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
static uint32 uiCount = sizeof(m_aSummonPoint)/sizeof(SummonDef);
|
||||
|
||||
for (uint8 i=0; i<uiCount; ++i)
|
||||
me->SummonCreature(NPC_ZOMBIE,
|
||||
m_aSummonPoint[i].m_fX, m_aSummonPoint[i].m_fY, m_aSummonPoint[i].m_fZ, m_aSummonPoint[i].m_fOrient,
|
||||
TEMPSUMMON_TIMED_DESPAWN, 1h);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//START NOT TRANSFORMED
|
||||
if (!m_bTransformed)
|
||||
switch (eventId)
|
||||
{
|
||||
//MindBlast
|
||||
if (m_uiMindBlast_Timer <= uiDiff)
|
||||
{
|
||||
DoCastVictim(SPELL_MINDBLAST);
|
||||
m_uiMindBlast_Timer = urand(15000, 20000);
|
||||
} else m_uiMindBlast_Timer -= uiDiff;
|
||||
case EVENT_CRUSADERS_HAMMER:
|
||||
DoCastSelf(SPELL_CRUSADERS_HAMMER);
|
||||
_events.Repeat(20s, 30s);
|
||||
break;
|
||||
case EVENT_CRUSADER_STRIKE:
|
||||
DoCastVictim(SPELL_CRUSADER_STRIKE);
|
||||
_events.Repeat(10s, 20s);
|
||||
break;
|
||||
case EVENT_HOLY_STRIKE:
|
||||
DoCastVictim(SPELL_HOLY_STRIKE);
|
||||
_events.Repeat(10s, 15s);
|
||||
break;
|
||||
|
||||
//CrusadersHammer
|
||||
if (m_uiCrusadersHammer_Timer <= uiDiff)
|
||||
{
|
||||
DoCastVictim(SPELL_CRUSADERSHAMMER);
|
||||
m_uiCrusadersHammer_Timer = 12000;
|
||||
} else m_uiCrusadersHammer_Timer -= uiDiff;
|
||||
case EVENT_MIND_BLAST:
|
||||
DoCastVictim(SPELL_MIND_BLAST);
|
||||
_events.Repeat(10s, 15s);
|
||||
break;
|
||||
|
||||
//CrusaderStrike
|
||||
if (m_uiCrusaderStrike_Timer <= uiDiff)
|
||||
{
|
||||
DoCastVictim(SPELL_CRUSADERSTRIKE);
|
||||
m_uiCrusaderStrike_Timer = 15000;
|
||||
} else m_uiCrusaderStrike_Timer -= uiDiff;
|
||||
|
||||
//HolyStrike
|
||||
if (m_uiHolyStrike_Timer <= uiDiff)
|
||||
{
|
||||
DoCastVictim(SPELL_HOLYSTRIKE);
|
||||
m_uiHolyStrike_Timer = 15000;
|
||||
} else m_uiHolyStrike_Timer -= uiDiff;
|
||||
|
||||
//BalnazzarTransform
|
||||
if (HealthBelowPct(40))
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
|
||||
//restore hp, mana and stun
|
||||
DoCast(me, SPELL_BALNAZZARTRANSFORM);
|
||||
me->UpdateEntry(NPC_BALNAZZAR);
|
||||
m_bTransformed = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//MindBlast
|
||||
if (m_uiMindBlast_Timer <= uiDiff)
|
||||
{
|
||||
DoCastVictim(SPELL_MINDBLAST);
|
||||
m_uiMindBlast_Timer = urand(15000, 20000);
|
||||
} else m_uiMindBlast_Timer -= uiDiff;
|
||||
|
||||
//ShadowShock
|
||||
if (m_uiShadowShock_Timer <= uiDiff)
|
||||
{
|
||||
DoCastVictim(SPELL_SHADOWSHOCK);
|
||||
m_uiShadowShock_Timer = 11000;
|
||||
} else m_uiShadowShock_Timer -= uiDiff;
|
||||
|
||||
//PsychicScream
|
||||
if (m_uiPsychicScream_Timer <= uiDiff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
DoCast(target, SPELL_PSYCHICSCREAM);
|
||||
|
||||
m_uiPsychicScream_Timer = 20000;
|
||||
} else m_uiPsychicScream_Timer -= uiDiff;
|
||||
|
||||
//DeepSleep
|
||||
if (m_uiDeepSleep_Timer <= uiDiff)
|
||||
{
|
||||
case EVENT_SHADOW_SHOCK:
|
||||
DoCastSelf(SPELL_SHADOW_SHOCK);
|
||||
_events.Repeat(10s, 15s);
|
||||
break;
|
||||
case EVENT_PSYCHIC_SCREAM:
|
||||
DoCastSelf(SPELL_PSYCHIC_SCREAM);
|
||||
_events.Repeat(20s, 30s);
|
||||
break;
|
||||
case EVENT_SLEEP:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
DoCast(target, SPELL_SLEEP);
|
||||
_events.Repeat(15s, 20s);
|
||||
break;
|
||||
case EVENT_DOMINATION:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
DoCast(target, SPELL_DOMINATION);
|
||||
_events.Repeat(20s, 25s);
|
||||
break;
|
||||
|
||||
m_uiDeepSleep_Timer = 15000;
|
||||
} else m_uiDeepSleep_Timer -= uiDiff;
|
||||
|
||||
//MindControl
|
||||
if (m_uiMindControl_Timer <= uiDiff)
|
||||
{
|
||||
DoCastVictim(SPELL_MINDCONTROL);
|
||||
m_uiMindControl_Timer = 15000;
|
||||
} else m_uiMindControl_Timer -= uiDiff;
|
||||
case EVENT_TRANSFORM_1:
|
||||
_events.CancelEvent(EVENT_CRUSADERS_HAMMER);
|
||||
_events.CancelEvent(EVENT_CRUSADER_STRIKE);
|
||||
_events.CancelEvent(EVENT_HOLY_STRIKE);
|
||||
_events.CancelEvent(EVENT_MIND_BLAST);
|
||||
DoCastSelf(SPELL_BALNAZZAR_TRANSFORM);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
_events.ScheduleEvent(EVENT_TRANSFORM_2, 2s);
|
||||
break;
|
||||
case EVENT_TRANSFORM_2:
|
||||
me->UpdateEntry(NPC_BALNAZZAR);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
SetEquipmentSlots(false, EQUIP_UNEQUIP);
|
||||
_events.ScheduleEvent(EVENT_TRANSFORM_3, 2s);
|
||||
break;
|
||||
case EVENT_TRANSFORM_3:
|
||||
Talk(SAY_TRANSFORM);
|
||||
_events.ScheduleEvent(EVENT_TRANSFORM_4, 4s);
|
||||
break;
|
||||
case EVENT_TRANSFORM_4:
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
_events.ScheduleEvent(EVENT_MIND_BLAST, 5s, 15s);
|
||||
_events.ScheduleEvent(EVENT_SHADOW_SHOCK, 10s, 15s);
|
||||
_events.ScheduleEvent(EVENT_PSYCHIC_SCREAM, 15s, 25s);
|
||||
_events.ScheduleEvent(EVENT_SLEEP, 5s, 15s);
|
||||
_events.ScheduleEvent(EVENT_DOMINATION, 15s, 25s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
bool _transformed;
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
void AddSC_boss_dathrohan_balnazzar()
|
||||
{
|
||||
new boss_dathrohan_balnazzar();
|
||||
RegisterStratholmeCreatureAI(boss_dathrohan_balnazzar);
|
||||
}
|
||||
|
||||
@@ -15,134 +15,101 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Magistrate_Barthilas
|
||||
SD%Complete: 70
|
||||
SDComment:
|
||||
SDCategory: Stratholme
|
||||
EndScriptData */
|
||||
/*
|
||||
* Timers requires to be revisited
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "stratholme.h"
|
||||
|
||||
enum Spells
|
||||
enum BarthilasSpells
|
||||
{
|
||||
SPELL_DRAININGBLOW = 16793,
|
||||
SPELL_CROWDPUMMEL = 10887,
|
||||
SPELL_MIGHTYBLOW = 14099,
|
||||
SPELL_FURIOUS_ANGER = 16791
|
||||
SPELL_FURIOUS_ANGER = 16791,
|
||||
SPELL_DRAINING_BLOW = 16793,
|
||||
SPELL_CROWD_PUMMEL = 10887,
|
||||
SPELL_MIGHTY_BLOW = 14099,
|
||||
|
||||
SPELL_TRANSFORMATION = 16794
|
||||
};
|
||||
|
||||
enum Models
|
||||
enum BarthilasEvents
|
||||
{
|
||||
MODEL_NORMAL = 10433,
|
||||
MODEL_HUMAN = 3637
|
||||
EVENT_FURIOUS_ANGER = 1,
|
||||
EVENT_DRAINING_BLOW,
|
||||
EVENT_CROWD_PUMMEL,
|
||||
EVENT_MIGHTY_BLOW
|
||||
};
|
||||
|
||||
class boss_magistrate_barthilas : public CreatureScript
|
||||
// 10435 - Magistrate Barthilas
|
||||
struct boss_magistrate_barthilas : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
boss_magistrate_barthilas() : CreatureScript("boss_magistrate_barthilas") { }
|
||||
boss_magistrate_barthilas(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
void Reset() override
|
||||
{
|
||||
return GetStratholmeAI<boss_magistrate_barthilasAI>(creature);
|
||||
_events.Reset();
|
||||
}
|
||||
|
||||
struct boss_magistrate_barthilasAI : public ScriptedAI
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
boss_magistrate_barthilasAI(Creature* creature) : ScriptedAI(creature)
|
||||
_events.ScheduleEvent(EVENT_FURIOUS_ANGER, 0s, 4s);
|
||||
_events.ScheduleEvent(EVENT_DRAINING_BLOW, 0s, 5s);
|
||||
_events.ScheduleEvent(EVENT_CROWD_PUMMEL, 15s, 20s);
|
||||
_events.ScheduleEvent(EVENT_MIGHTY_BLOW, 15s, 25s);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
DoCastSelf(SPELL_TRANSFORMATION, true);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_FURIOUS_ANGER:
|
||||
DoCastSelf(SPELL_FURIOUS_ANGER);
|
||||
_events.Repeat(4s);
|
||||
break;
|
||||
case EVENT_DRAINING_BLOW:
|
||||
DoCastVictim(SPELL_DRAINING_BLOW);
|
||||
_events.Repeat(2s, 14s);
|
||||
break;
|
||||
case EVENT_CROWD_PUMMEL:
|
||||
DoCastSelf(SPELL_CROWD_PUMMEL);
|
||||
_events.Repeat(25s, 30s);
|
||||
break;
|
||||
case EVENT_MIGHTY_BLOW:
|
||||
DoCastVictim(SPELL_MIGHTY_BLOW);
|
||||
_events.Repeat(10s, 15s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
DrainingBlow_Timer = 20000;
|
||||
CrowdPummel_Timer = 15000;
|
||||
MightyBlow_Timer = 10000;
|
||||
FuriousAnger_Timer = 5000;
|
||||
AngerCount = 0;
|
||||
}
|
||||
|
||||
uint32 DrainingBlow_Timer;
|
||||
uint32 CrowdPummel_Timer;
|
||||
uint32 MightyBlow_Timer;
|
||||
uint32 FuriousAnger_Timer;
|
||||
uint32 AngerCount;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
|
||||
if (me->IsAlive())
|
||||
me->SetDisplayId(MODEL_NORMAL);
|
||||
else
|
||||
me->SetDisplayId(MODEL_HUMAN);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
|
||||
{
|
||||
//nothing to see here yet
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
me->SetDisplayId(MODEL_HUMAN);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
if (FuriousAnger_Timer <= diff)
|
||||
{
|
||||
FuriousAnger_Timer = 4000;
|
||||
if (AngerCount > 25)
|
||||
return;
|
||||
|
||||
++AngerCount;
|
||||
DoCast(me, SPELL_FURIOUS_ANGER, false);
|
||||
} else FuriousAnger_Timer -= diff;
|
||||
|
||||
//DrainingBlow
|
||||
if (DrainingBlow_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_DRAININGBLOW);
|
||||
DrainingBlow_Timer = 15000;
|
||||
} else DrainingBlow_Timer -= diff;
|
||||
|
||||
//CrowdPummel
|
||||
if (CrowdPummel_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_CROWDPUMMEL);
|
||||
CrowdPummel_Timer = 15000;
|
||||
} else CrowdPummel_Timer -= diff;
|
||||
|
||||
//MightyBlow
|
||||
if (MightyBlow_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_MIGHTYBLOW);
|
||||
MightyBlow_Timer = 20000;
|
||||
} else MightyBlow_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
void AddSC_boss_magistrate_barthilas()
|
||||
{
|
||||
new boss_magistrate_barthilas();
|
||||
RegisterStratholmeCreatureAI(boss_magistrate_barthilas);
|
||||
}
|
||||
|
||||
@@ -15,113 +15,104 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_maleki_the_pallid
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Stratholme
|
||||
EndScriptData */
|
||||
/*
|
||||
* Timers requires to be revisited
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "stratholme.h"
|
||||
|
||||
enum Spells
|
||||
enum MalekiSpells
|
||||
{
|
||||
SPELL_FROST_ARMOR = 12556,
|
||||
SPELL_FROSTBOLT = 17503,
|
||||
SPELL_DRAINLIFE = 20743,
|
||||
SPELL_DRAIN_LIFE = 17238,
|
||||
SPELL_DRAIN_MANA = 17243,
|
||||
SPELL_ICETOMB = 16869
|
||||
SPELL_ICE_TOMB = 16869
|
||||
};
|
||||
|
||||
enum MalekiEvents
|
||||
{
|
||||
EVENT_FROSTBOLT = 1,
|
||||
EVENT_DRAINLIFE = 2,
|
||||
EVENT_DRAIN_MANA = 3,
|
||||
EVENT_ICETOMB = 4
|
||||
EVENT_DRAIN_LIFE,
|
||||
EVENT_DRAIN_MANA,
|
||||
EVENT_ICE_TOMB
|
||||
};
|
||||
|
||||
class boss_maleki_the_pallid : public CreatureScript
|
||||
// 10438 - Maleki the Pallid
|
||||
struct boss_maleki_the_pallid : public ScriptedAI
|
||||
{
|
||||
public:
|
||||
boss_maleki_the_pallid() : CreatureScript("boss_maleki_the_pallid") { }
|
||||
boss_maleki_the_pallid(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
|
||||
|
||||
struct boss_maleki_the_pallidAI : public ScriptedAI
|
||||
void Reset() override
|
||||
{
|
||||
boss_maleki_the_pallidAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_events.Reset();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_FROSTBOLT, 1s);
|
||||
_events.ScheduleEvent(EVENT_ICETOMB, 16s);
|
||||
_events.ScheduleEvent(EVENT_DRAINLIFE, 31s);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
instance->SetData(TYPE_PALLID, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_FROSTBOLT:
|
||||
if (rand32() % 90)
|
||||
DoCastVictim(SPELL_FROSTBOLT);
|
||||
_events.ScheduleEvent(EVENT_FROSTBOLT, 3500ms);
|
||||
break;
|
||||
case EVENT_ICETOMB:
|
||||
if (rand32() % 65)
|
||||
DoCastVictim(SPELL_ICETOMB);
|
||||
_events.ScheduleEvent(EVENT_ICETOMB, 28s);
|
||||
break;
|
||||
case EVENT_DRAINLIFE:
|
||||
if (rand32() % 55)
|
||||
DoCastVictim(SPELL_DRAINLIFE);
|
||||
_events.ScheduleEvent(EVENT_DRAINLIFE, 31s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
InstanceScript* instance;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetStratholmeAI<boss_maleki_the_pallidAI>(creature);
|
||||
_events.Reset();
|
||||
DoCastSelf(SPELL_FROST_ARMOR);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_FROSTBOLT, 0s, 8s);
|
||||
_events.ScheduleEvent(EVENT_DRAIN_LIFE, 20s, 25s);
|
||||
_events.ScheduleEvent(EVENT_DRAIN_MANA, 15s, 25s);
|
||||
_events.ScheduleEvent(EVENT_ICE_TOMB, 10s, 20s);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_instance->SetData(TYPE_PALLID, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_FROSTBOLT:
|
||||
DoCastVictim(SPELL_FROSTBOLT);
|
||||
_events.Repeat(2s, 8s);
|
||||
break;
|
||||
case EVENT_DRAIN_LIFE:
|
||||
DoCastVictim(SPELL_DRAIN_LIFE);
|
||||
_events.Repeat(20s, 30s);
|
||||
break;
|
||||
case EVENT_DRAIN_MANA:
|
||||
{
|
||||
Unit* target = me->GetVictim();
|
||||
if (target && target->GetPowerType() == POWER_MANA)
|
||||
DoCast(target, SPELL_DRAIN_MANA);
|
||||
_events.Repeat(15s, 20s);
|
||||
break;
|
||||
}
|
||||
case EVENT_ICE_TOMB:
|
||||
DoCastVictim(SPELL_ICE_TOMB);
|
||||
_events.Repeat(15s, 25s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
void AddSC_boss_maleki_the_pallid()
|
||||
{
|
||||
new boss_maleki_the_pallid();
|
||||
RegisterStratholmeCreatureAI(boss_maleki_the_pallid);
|
||||
}
|
||||
|
||||
@@ -15,121 +15,98 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Nerubenkan
|
||||
SD%Complete: 70
|
||||
SDComment:
|
||||
SDCategory: Stratholme
|
||||
EndScriptData */
|
||||
/*
|
||||
* Timers requires to be revisited
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "stratholme.h"
|
||||
|
||||
enum Spells
|
||||
enum NerubenkanSpells
|
||||
{
|
||||
SPELL_ENCASINGWEBS = 4962,
|
||||
SPELL_PIERCEARMOR = 6016,
|
||||
SPELL_CRYPT_SCARABS = 31602,
|
||||
SPELL_RAISEUNDEADSCARAB = 17235
|
||||
SPELL_ENCASING_WEBS = 4962,
|
||||
SPELL_PIERCE_ARMOR = 6016,
|
||||
SPELL_RAISE_SCARAB = 17235
|
||||
};
|
||||
|
||||
class boss_nerubenkan : public CreatureScript
|
||||
enum NerubenkanEvents
|
||||
{
|
||||
public:
|
||||
boss_nerubenkan() : CreatureScript("boss_nerubenkan") { }
|
||||
EVENT_CRYPT_SCARABS = 1,
|
||||
EVENT_ENCASING_WEBS,
|
||||
EVENT_PIERCE_ARMOR,
|
||||
EVENT_RAISE_SCARAB
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
// 10437 - Nerub'enkan
|
||||
struct boss_nerubenkan : public ScriptedAI
|
||||
{
|
||||
boss_nerubenkan(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
return GetStratholmeAI<boss_nerubenkanAI>(creature);
|
||||
_events.Reset();
|
||||
}
|
||||
|
||||
struct boss_nerubenkanAI : public ScriptedAI
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
boss_nerubenkanAI(Creature* creature) : ScriptedAI(creature)
|
||||
_events.ScheduleEvent(EVENT_CRYPT_SCARABS, 0s);
|
||||
_events.ScheduleEvent(EVENT_ENCASING_WEBS, 5s, 10s);
|
||||
_events.ScheduleEvent(EVENT_PIERCE_ARMOR, 5s, 20s);
|
||||
_events.ScheduleEvent(EVENT_RAISE_SCARAB, 6s, 12s);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_instance->SetData(TYPE_NERUB, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
Initialize();
|
||||
instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
CryptScarabs_Timer = 3000;
|
||||
EncasingWebs_Timer = 7000;
|
||||
PierceArmor_Timer = 19000;
|
||||
RaiseUndeadScarab_Timer = 3000;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 EncasingWebs_Timer;
|
||||
uint32 PierceArmor_Timer;
|
||||
uint32 CryptScarabs_Timer;
|
||||
uint32 RaiseUndeadScarab_Timer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
instance->SetData(TYPE_NERUB, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void RaiseUndeadScarab(Unit* victim)
|
||||
{
|
||||
if (Creature* pUndeadScarab = DoSpawnCreature(10876, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180s))
|
||||
if (pUndeadScarab->AI())
|
||||
pUndeadScarab->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
//EncasingWebs
|
||||
if (EncasingWebs_Timer <= diff)
|
||||
switch (eventId)
|
||||
{
|
||||
DoCastVictim(SPELL_ENCASINGWEBS);
|
||||
EncasingWebs_Timer = 30000;
|
||||
} else EncasingWebs_Timer -= diff;
|
||||
|
||||
//PierceArmor
|
||||
if (PierceArmor_Timer <= diff)
|
||||
{
|
||||
if (urand(0, 3) < 2)
|
||||
DoCastVictim(SPELL_PIERCEARMOR);
|
||||
PierceArmor_Timer = 35000;
|
||||
} else PierceArmor_Timer -= diff;
|
||||
|
||||
//CryptScarabs_Timer
|
||||
if (CryptScarabs_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_CRYPT_SCARABS);
|
||||
CryptScarabs_Timer = 20000;
|
||||
} else CryptScarabs_Timer -= diff;
|
||||
|
||||
//RaiseUndeadScarab
|
||||
if (RaiseUndeadScarab_Timer <= diff)
|
||||
{
|
||||
RaiseUndeadScarab(me->GetVictim());
|
||||
RaiseUndeadScarab_Timer = 16000;
|
||||
} else RaiseUndeadScarab_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
case EVENT_CRYPT_SCARABS:
|
||||
DoCastVictim(SPELL_CRYPT_SCARABS);
|
||||
_events.Repeat(2s, 10s);
|
||||
break;
|
||||
case EVENT_ENCASING_WEBS:
|
||||
DoCastVictim(SPELL_ENCASING_WEBS);
|
||||
_events.Repeat(6s, 10s);
|
||||
break;
|
||||
case EVENT_PIERCE_ARMOR:
|
||||
DoCastVictim(SPELL_PIERCE_ARMOR);
|
||||
_events.Repeat(10s, 20s);
|
||||
break;
|
||||
case EVENT_RAISE_SCARAB:
|
||||
DoCastSelf(SPELL_RAISE_SCARAB);
|
||||
_events.Repeat(25s, 30s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
void AddSC_boss_nerubenkan()
|
||||
{
|
||||
new boss_nerubenkan();
|
||||
RegisterStratholmeCreatureAI(boss_nerubenkan);
|
||||
}
|
||||
|
||||
@@ -15,126 +15,108 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_postmaster_malown
|
||||
SD%Complete: 50
|
||||
SDComment:
|
||||
SDCategory: Stratholme
|
||||
EndScriptData */
|
||||
/*
|
||||
* Timers requires update
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "stratholme.h"
|
||||
|
||||
//Spell ID to summon this guy is 24627 "Summon Postmaster Malown"
|
||||
//He should be spawned along with three other elites once the third postbox has been opened
|
||||
|
||||
enum Says
|
||||
enum MalownTexts
|
||||
{
|
||||
SAY_KILL = 0
|
||||
SAY_AGGRO = 0,
|
||||
SAY_SLAY = 1
|
||||
};
|
||||
|
||||
enum Spells
|
||||
enum MalownSpells
|
||||
{
|
||||
SPELL_WAILINGDEAD = 7713,
|
||||
SPELL_INCORPOREAL_DEFENSE = 16331,
|
||||
SPELL_BACKHAND = 6253,
|
||||
SPELL_CURSEOFWEAKNESS = 8552,
|
||||
SPELL_CURSEOFTONGUES = 12889,
|
||||
SPELL_CALLOFTHEGRAVE = 17831
|
||||
SPELL_CURSE_OF_WEAKNESS = 12741,
|
||||
SPELL_CURSE_OF_TONGUES = 13338,
|
||||
SPELL_FEAR = 12542
|
||||
};
|
||||
|
||||
enum Events
|
||||
enum MalownEvents
|
||||
{
|
||||
EVENT_WAILINGDEAD = 1,
|
||||
EVENT_BACKHAND = 2,
|
||||
EVENT_CURSEOFWEAKNESS = 3,
|
||||
EVENT_CURSEOFTONGUES = 4,
|
||||
EVENT_CALLOFTHEGRAVE = 5
|
||||
EVENT_BACKHAND = 1,
|
||||
EVENT_CURSE_OF_WEAKNESS,
|
||||
EVENT_CURSE_OF_TONGUES,
|
||||
EVENT_FEAR
|
||||
};
|
||||
|
||||
class boss_postmaster_malown : public CreatureScript
|
||||
// 11143 - Postmaster Malown
|
||||
struct boss_postmaster_malown : public BossAI
|
||||
{
|
||||
public:
|
||||
boss_postmaster_malown() : CreatureScript("boss_postmaster_malown") { }
|
||||
boss_postmaster_malown(Creature* creature) : BossAI(creature, TYPE_MALOWN) { }
|
||||
|
||||
struct boss_postmaster_malownAI : public BossAI
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
DoCastSelf(SPELL_INCORPOREAL_DEFENSE);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
events.ScheduleEvent(EVENT_BACKHAND, 10s, 20s);
|
||||
events.ScheduleEvent(EVENT_CURSE_OF_WEAKNESS, 20s, 30s);
|
||||
events.ScheduleEvent(EVENT_CURSE_OF_TONGUES, 15s, 30s);
|
||||
events.ScheduleEvent(EVENT_FEAR, 25s, 35s);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
boss_postmaster_malownAI(Creature* creature) : BossAI(creature, TYPE_MALOWN) { }
|
||||
|
||||
void Reset() override { }
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
switch (eventId)
|
||||
{
|
||||
events.ScheduleEvent(EVENT_WAILINGDEAD, 19s); // lasts 6 sec
|
||||
events.ScheduleEvent(EVENT_BACKHAND, 8s); // 2 sec stun
|
||||
events.ScheduleEvent(EVENT_CURSEOFWEAKNESS, 20s); // lasts 2 mins
|
||||
events.ScheduleEvent(EVENT_CURSEOFTONGUES, 22s);
|
||||
events.ScheduleEvent(EVENT_CALLOFTHEGRAVE, 25s);
|
||||
case EVENT_BACKHAND:
|
||||
DoCastVictim(SPELL_BACKHAND);
|
||||
events.Repeat(10s, 15s);
|
||||
break;
|
||||
case EVENT_CURSE_OF_WEAKNESS:
|
||||
DoCastSelf(SPELL_CURSE_OF_WEAKNESS);
|
||||
events.Repeat(30s, 40s);
|
||||
break;
|
||||
case EVENT_CURSE_OF_TONGUES:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
DoCast(target, SPELL_CURSE_OF_TONGUES);
|
||||
events.Repeat(20s, 30s);
|
||||
break;
|
||||
case EVENT_FEAR:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
DoCast(target, SPELL_FEAR);
|
||||
events.Repeat(25s, 35s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
{
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_WAILINGDEAD:
|
||||
if (rand32() % 100 < 65) //65% chance to cast
|
||||
DoCastVictim(SPELL_WAILINGDEAD, true);
|
||||
events.ScheduleEvent(EVENT_WAILINGDEAD, 19s);
|
||||
break;
|
||||
case EVENT_BACKHAND:
|
||||
if (rand32() % 100 < 45) //45% chance to cast
|
||||
DoCastVictim(SPELL_BACKHAND, true);
|
||||
events.ScheduleEvent(EVENT_WAILINGDEAD, 8s);
|
||||
break;
|
||||
case EVENT_CURSEOFWEAKNESS:
|
||||
if (rand32() % 100 < 3) //3% chance to cast
|
||||
DoCastVictim(SPELL_CURSEOFWEAKNESS, true);
|
||||
events.ScheduleEvent(EVENT_WAILINGDEAD, 20s);
|
||||
break;
|
||||
case EVENT_CURSEOFTONGUES:
|
||||
if (rand32() % 100 < 3) //3% chance to cast
|
||||
DoCastVictim(SPELL_CURSEOFTONGUES, true);
|
||||
events.ScheduleEvent(EVENT_WAILINGDEAD, 22s);
|
||||
break;
|
||||
case EVENT_CALLOFTHEGRAVE:
|
||||
if (rand32() % 100 < 5) //5% chance to cast
|
||||
DoCastVictim(SPELL_CALLOFTHEGRAVE, true);
|
||||
events.ScheduleEvent(EVENT_WAILINGDEAD, 25s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetStratholmeAI<boss_postmaster_malownAI>(creature);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_postmaster_malown()
|
||||
{
|
||||
new boss_postmaster_malown();
|
||||
RegisterStratholmeCreatureAI(boss_postmaster_malown);
|
||||
}
|
||||
|
||||
@@ -15,106 +15,99 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: Boss_Ramstein_The_Gorger
|
||||
SD%Complete: 70
|
||||
SDComment:
|
||||
SDCategory: Stratholme
|
||||
EndScriptData */
|
||||
/*
|
||||
* Timers requires to be revisited
|
||||
* Intro NYI
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "stratholme.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
enum Spells
|
||||
enum RamsteinSpells
|
||||
{
|
||||
SPELL_FLURRY = 15088,
|
||||
SPELL_TRAMPLE = 5568,
|
||||
SPELL_KNOCKOUT = 17307
|
||||
};
|
||||
|
||||
enum CreatureId
|
||||
enum RamsteinEvents
|
||||
{
|
||||
NPC_MINDLESS_UNDEAD = 11030
|
||||
EVENT_TRAMPLE = 1,
|
||||
EVENT_KNOCKOUT
|
||||
};
|
||||
|
||||
class boss_ramstein_the_gorger : public CreatureScript
|
||||
enum RamsteinMisc
|
||||
{
|
||||
public:
|
||||
boss_ramstein_the_gorger() : CreatureScript("boss_ramstein_the_gorger") { }
|
||||
SUMMON_GROUP_SENTRY = 0,
|
||||
SUMMON_GROUP_UNDEAD = 1
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
// 10439 - Ramstein the Gorger
|
||||
struct boss_ramstein_the_gorger : public ScriptedAI
|
||||
{
|
||||
boss_ramstein_the_gorger(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
return GetStratholmeAI<boss_ramstein_the_gorgerAI>(creature);
|
||||
_events.Reset();
|
||||
DoCastSelf(SPELL_FLURRY);
|
||||
}
|
||||
|
||||
struct boss_ramstein_the_gorgerAI : public ScriptedAI
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
boss_ramstein_the_gorgerAI(Creature* creature) : ScriptedAI(creature)
|
||||
_events.ScheduleEvent(EVENT_TRAMPLE, 10s, 15s);
|
||||
_events.ScheduleEvent(EVENT_KNOCKOUT, 10s, 20s);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
me->SummonCreatureGroup(SUMMON_GROUP_SENTRY);
|
||||
me->SummonCreatureGroup(SUMMON_GROUP_UNDEAD);
|
||||
|
||||
_instance->SetData(TYPE_RAMSTEIN, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
Initialize();
|
||||
instance = me->GetInstanceScript();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Trample_Timer = 3000;
|
||||
Knockout_Timer = 12000;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 Trample_Timer;
|
||||
uint32 Knockout_Timer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
for (uint8 i = 0; i < 30; ++i)
|
||||
switch (eventId)
|
||||
{
|
||||
if (Creature* mob = me->SummonCreature(NPC_MINDLESS_UNDEAD, 3969.35f+irand(-10, 10), -3391.87f+irand(-10, 10), 119.11f, 5.91f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30min))
|
||||
mob->AI()->AttackStart(me->SelectNearestTarget(100.0f));
|
||||
case EVENT_TRAMPLE:
|
||||
DoCastSelf(SPELL_TRAMPLE);
|
||||
_events.Repeat(10s, 25s);
|
||||
break;
|
||||
case EVENT_KNOCKOUT:
|
||||
DoCastVictim(SPELL_KNOCKOUT);
|
||||
_events.Repeat(15s, 20s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
instance->SetData(TYPE_RAMSTEIN, DONE);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
//Trample
|
||||
if (Trample_Timer <= diff)
|
||||
{
|
||||
DoCast(me, SPELL_TRAMPLE);
|
||||
Trample_Timer = 7000;
|
||||
} else Trample_Timer -= diff;
|
||||
|
||||
//Knockout
|
||||
if (Knockout_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_KNOCKOUT);
|
||||
Knockout_Timer = 10000;
|
||||
} else Knockout_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
void AddSC_boss_ramstein_the_gorger()
|
||||
{
|
||||
new boss_ramstein_the_gorger();
|
||||
RegisterStratholmeCreatureAI(boss_ramstein_the_gorger);
|
||||
}
|
||||
|
||||
@@ -15,89 +15,82 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_timmy_the_cruel
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Stratholme
|
||||
EndScriptData */
|
||||
/*
|
||||
* Timers requires to be revisited
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "stratholme.h"
|
||||
|
||||
enum Says
|
||||
enum TimmyTexts
|
||||
{
|
||||
SAY_SPAWN = 0
|
||||
SAY_AGGRO = 0
|
||||
};
|
||||
|
||||
enum Spells
|
||||
enum TimmySpells
|
||||
{
|
||||
SPELL_RAVENOUSCLAW = 17470
|
||||
SPELL_THRASH = 12787,
|
||||
SPELL_RAVENOUS_CLAW = 17470
|
||||
};
|
||||
|
||||
class boss_timmy_the_cruel : public CreatureScript
|
||||
enum TimmyEvents
|
||||
{
|
||||
public:
|
||||
boss_timmy_the_cruel() : CreatureScript("boss_timmy_the_cruel") { }
|
||||
EVENT_RAVENOUS_CLAW = 1
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
// 10808 - Timmy the Cruel
|
||||
struct boss_timmy_the_cruel : public ScriptedAI
|
||||
{
|
||||
boss_timmy_the_cruel(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
return GetStratholmeAI<boss_timmy_the_cruelAI>(creature);
|
||||
_events.Reset();
|
||||
DoCastSelf(SPELL_THRASH);
|
||||
}
|
||||
|
||||
struct boss_timmy_the_cruelAI : public ScriptedAI
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
boss_timmy_the_cruelAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
RavenousClaw_Timer = 10000;
|
||||
HasYelled = false;
|
||||
}
|
||||
_events.ScheduleEvent(EVENT_RAVENOUS_CLAW, 10s, 15s);
|
||||
}
|
||||
|
||||
uint32 RavenousClaw_Timer;
|
||||
bool HasYelled;
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
_events.Update(diff);
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
if (!HasYelled)
|
||||
switch (eventId)
|
||||
{
|
||||
Talk(SAY_SPAWN);
|
||||
HasYelled = true;
|
||||
case EVENT_RAVENOUS_CLAW:
|
||||
DoCastVictim(SPELL_RAVENOUS_CLAW);
|
||||
_events.Repeat(10s, 15s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
//RavenousClaw
|
||||
if (RavenousClaw_Timer <= diff)
|
||||
{
|
||||
//Cast
|
||||
DoCastVictim(SPELL_RAVENOUSCLAW);
|
||||
//15 seconds until we should cast this again
|
||||
RavenousClaw_Timer = 15000;
|
||||
} else RavenousClaw_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
void AddSC_boss_timmy_the_cruel()
|
||||
{
|
||||
new boss_timmy_the_cruel();
|
||||
RegisterStratholmeCreatureAI(boss_timmy_the_cruel);
|
||||
}
|
||||
|
||||
@@ -567,15 +567,9 @@ class instance_stratholme : public InstanceMapScript
|
||||
TC_LOG_DEBUG("scripts", "Instance Stratholme: Baron run event reached end. Event has state {}.", GetData(TYPE_BARON_RUN));
|
||||
break;
|
||||
case EVENT_SLAUGHTER_SQUARE:
|
||||
if (Creature* baron = instance->GetCreature(baronGUID))
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
baron->SummonCreature(NPC_BLACK_GUARD, 4032.84f, -3390.24f, 119.73f, 4.71f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30min);
|
||||
|
||||
HandleGameObject(ziggurat4GUID, true);
|
||||
HandleGameObject(ziggurat5GUID, true);
|
||||
TC_LOG_DEBUG("scripts", "Instance Stratholme: Black guard sentries spawned. Opening gates to baron.");
|
||||
}
|
||||
TC_LOG_DEBUG("scripts", "Instance Stratholme: Opening gates to baron.");
|
||||
break;
|
||||
case EVENT_RAT_TRAP_CLOSE:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user