Scripts/Stratholme: reworked Timmy the Cruel encounter
This commit is contained in:
1 parent
4a3da93788
commit
396dd9e24b
4 files changed
+86
-84
No files matched your search
@@ -46,7 +46,7 @@ enum Texts
|
||||
|
||||
struct boss_balnazzar : public BossAI
|
||||
{
|
||||
boss_balnazzar(Creature* creature) : BossAI(creature, DATA_BALNAZZAR) { }
|
||||
boss_balnazzar(Creature* creature) : BossAI(creature, BOSS_BALNAZZAR) { }
|
||||
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
|
||||
@@ -15,88 +15,98 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: boss_timmy_the_cruel
|
||||
SD%Complete: 100
|
||||
SDComment:
|
||||
SDCategory: Stratholme
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "stratholme.h"
|
||||
|
||||
enum Says
|
||||
enum Texts
|
||||
{
|
||||
SAY_SPAWN = 0
|
||||
// Timmy the Cruel
|
||||
SAY_AGGRO = 0
|
||||
};
|
||||
|
||||
enum Spells
|
||||
{
|
||||
SPELL_RAVENOUSCLAW = 17470
|
||||
// Timmy the Cruel
|
||||
SPELL_THRASH = 12787,
|
||||
SPELL_ENRAGE = 8599,
|
||||
SPELL_RAVENOUS_CLAW = 17470
|
||||
};
|
||||
|
||||
class boss_timmy_the_cruel : public CreatureScript
|
||||
enum Events
|
||||
{
|
||||
public:
|
||||
boss_timmy_the_cruel() : CreatureScript("boss_timmy_the_cruel") { }
|
||||
// Timmy the Cruel
|
||||
EVENT_ENRAGE = 1,
|
||||
EVENT_RAVENOUS_CLAW
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
struct boss_timmy_the_cruel : public BossAI
|
||||
{
|
||||
boss_timmy_the_cruel(Creature* creature) : BossAI(creature, BOSS_TIMMY_THE_CRUEL), _enraged(false) { }
|
||||
|
||||
void JustAppeared() override
|
||||
{
|
||||
return new boss_timmy_the_cruelAI(creature);
|
||||
DoCastSelf(SPELL_THRASH);
|
||||
}
|
||||
|
||||
struct boss_timmy_the_cruelAI : public ScriptedAI
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
boss_timmy_the_cruelAI(Creature* creature) : ScriptedAI(creature)
|
||||
BossAI::JustEngagedWith(who);
|
||||
Talk(SAY_AGGRO, who);
|
||||
events.ScheduleEvent(EVENT_RAVENOUS_CLAW, 14s);
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason /*why*/)
|
||||
{
|
||||
_DespawnAtEvade();
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
|
||||
{
|
||||
if (!_enraged && me->HealthBelowPctDamaged(25, damage))
|
||||
{
|
||||
Initialize();
|
||||
_enraged = true;
|
||||
events.ScheduleEvent(EVENT_ENRAGE, 1ms);
|
||||
}
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
RavenousClaw_Timer = 10000;
|
||||
HasYelled = false;
|
||||
}
|
||||
|
||||
uint32 RavenousClaw_Timer;
|
||||
bool HasYelled;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
if (!HasYelled)
|
||||
switch (eventId)
|
||||
{
|
||||
Talk(SAY_SPAWN);
|
||||
HasYelled = true;
|
||||
case EVENT_ENRAGE:
|
||||
DoCastSelf(SPELL_ENRAGE);
|
||||
break;
|
||||
case EVENT_RAVENOUS_CLAW:
|
||||
DoCastVictim(SPELL_RAVENOUS_CLAW);
|
||||
events.Repeat(5s, 8s);
|
||||
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:
|
||||
bool _enraged;
|
||||
};
|
||||
|
||||
void AddSC_boss_timmy_the_cruel()
|
||||
{
|
||||
new boss_timmy_the_cruel();
|
||||
RegisterStratholmeCreatureAI(boss_timmy_the_cruel);
|
||||
}
|
||||
@@ -15,13 +15,6 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* ScriptData
|
||||
SDName: instance_stratholme
|
||||
SD%Complete: 50
|
||||
SDComment: In progress. Undead side 75% implemented. Save/load not implemented.
|
||||
SDCategory: Stratholme
|
||||
EndScriptData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "AreaBoundary.h"
|
||||
#include "Creature.h"
|
||||
@@ -51,13 +44,13 @@ EllipseBoundary const beforeScarletGate(Position(3671.158f, -3181.79f), 60.0f, 4
|
||||
|
||||
ObjectData const creatureData[] =
|
||||
{
|
||||
{ BOSS_HEARTSINGER_FORRESTEN, DATA_HEARTHSINGER_FORRESTEN },
|
||||
{ BOSS_TIMMY_THE_CRUEL, DATA_TIMMY_THE_CRUEL },
|
||||
{ BOSS_COMMANDER_MALOR, DATA_COMMANDER_MALOR },
|
||||
{ BOSS_WILLEY_HOPEBREAKER, DATA_WILLEY_HOPEBREAKER },
|
||||
{ BOSS_INSTRUCTOR_GALFORD, DATA_INSTRUCTOR_GALFORD },
|
||||
{ BOSS_BALNAZZAR, DATA_BALNAZZAR },
|
||||
{ 0, 0 }, // END
|
||||
{ NPC_HEARTSINGER_FORRESTEN, BOSS_HEARTHSINGER_FORRESTEN },
|
||||
{ NPC_TIMMY_THE_CRUEL, BOSS_TIMMY_THE_CRUEL },
|
||||
{ NPC_COMMANDER_MALOR, BOSS_COMMANDER_MALOR },
|
||||
{ NPC_WILLEY_HOPEBREAKER, BOSS_WILLEY_HOPEBREAKER },
|
||||
{ NPC_INSTRUCTOR_GALFORD, BOSS_INSTRUCTOR_GALFORD },
|
||||
{ NPC_BALNAZZAR, BOSS_BALNAZZAR },
|
||||
{ 0, 0 }, // END
|
||||
};
|
||||
|
||||
class instance_stratholme : public InstanceMapScript
|
||||
|
||||
@@ -26,12 +26,13 @@
|
||||
enum STRData
|
||||
{
|
||||
// Crusader Square
|
||||
DATA_HEARTHSINGER_FORRESTEN = 0,
|
||||
DATA_TIMMY_THE_CRUEL = 1,
|
||||
DATA_COMMANDER_MALOR = 2,
|
||||
DATA_WILLEY_HOPEBREAKER = 3,
|
||||
DATA_INSTRUCTOR_GALFORD = 4,
|
||||
DATA_BALNAZZAR = 5,
|
||||
BOSS_HEARTHSINGER_FORRESTEN = 0,
|
||||
BOSS_TIMMY_THE_CRUEL = 1,
|
||||
BOSS_COMMANDER_MALOR = 2,
|
||||
BOSS_WILLEY_HOPEBREAKER = 3,
|
||||
BOSS_INSTRUCTOR_GALFORD = 4,
|
||||
BOSS_BALNAZZAR = 5,
|
||||
|
||||
// The Gauntlet
|
||||
DATA_THE_UNFORGIVEN = 6,
|
||||
DATA_BARONESS_ANASTARI = 7,
|
||||
@@ -69,12 +70,12 @@ enum STRDataTypes
|
||||
enum STRCreatureIds
|
||||
{
|
||||
// Crusader Square
|
||||
BOSS_HEARTSINGER_FORRESTEN = 10558,
|
||||
BOSS_TIMMY_THE_CRUEL = 10808,
|
||||
BOSS_COMMANDER_MALOR = 11032,
|
||||
BOSS_WILLEY_HOPEBREAKER = 10997,
|
||||
BOSS_INSTRUCTOR_GALFORD = 10811,
|
||||
BOSS_BALNAZZAR = 10813,
|
||||
NPC_HEARTSINGER_FORRESTEN = 10558,
|
||||
NPC_TIMMY_THE_CRUEL = 10808,
|
||||
NPC_COMMANDER_MALOR = 11032,
|
||||
NPC_WILLEY_HOPEBREAKER = 10997,
|
||||
NPC_INSTRUCTOR_GALFORD = 10811,
|
||||
NPC_BALNAZZAR = 10813,
|
||||
|
||||
NPC_CRYSTAL = 10415, // ziggurat crystal
|
||||
NPC_BARON = 10440, // ziggurat crystal
|
||||
@@ -90,9 +91,7 @@ enum STRCreatureIds
|
||||
NPC_CRIMSON_GUARDSMAN = 10418,
|
||||
NPC_CRIMSON_CONJUROR = 10419,
|
||||
NPC_CRIMSON_INITATE = 10420,
|
||||
NPC_CRIMSON_GALLANT = 10424,
|
||||
|
||||
NPC_TIMMY_THE_CRUEL = 10808
|
||||
NPC_CRIMSON_GALLANT = 10424
|
||||
};
|
||||
|
||||
enum STRGameobjectIds
|
||||
|
||||
Reference in new issue
Block a user