fix(DB/CreatureScript): The Lurker Below (#2083)
- Fix "The Lurker Below" not spawning.
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1562842380647125073');
|
||||||
|
|
||||||
|
UPDATE `creature_template` SET `InhabitType` = 3 WHERE `entry` = 21217;
|
||||||
@@ -8,12 +8,12 @@
|
|||||||
|
|
||||||
enum Spells
|
enum Spells
|
||||||
{
|
{
|
||||||
SPELL_WATER_BOLT = 37138,
|
SPELL_WATER_BOLT = 37138,
|
||||||
SPELL_WHIRL = 37660,
|
SPELL_WHIRL = 37660,
|
||||||
SPELL_GEYSER = 37478,
|
SPELL_GEYSER = 37478,
|
||||||
SPELL_SPOUT_VISUAL = 37431,
|
SPELL_SPOUT_VISUAL = 37431,
|
||||||
SPELL_SPOUT_PERIODIC = 37430,
|
SPELL_SPOUT_PERIODIC = 37430,
|
||||||
SPELL_LURKER_SPAWN_TRIGGER = 54587 // Needed for achievement
|
SPELL_LURKER_SPAWN_TRIGGER = 54587 // Needed for achievement
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Misc
|
enum Misc
|
||||||
@@ -58,69 +58,69 @@ class boss_the_lurker_below : public CreatureScript
|
|||||||
|
|
||||||
struct boss_the_lurker_belowAI : public BossAI
|
struct boss_the_lurker_belowAI : public BossAI
|
||||||
{
|
{
|
||||||
boss_the_lurker_belowAI(Creature* creature) : BossAI(creature, DATA_THE_LURKER_BELOW)
|
boss_the_lurker_belowAI(Creature* creature) : BossAI(creature, DATA_THE_LURKER_BELOW) { }
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void Reset()
|
void Reset() override
|
||||||
{
|
{
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
|
me->SetReactState(REACT_PASSIVE);
|
||||||
me->SetStandState(UNIT_STAND_STATE_SUBMERGED);
|
me->SetStandState(UNIT_STAND_STATE_SUBMERGED);
|
||||||
me->SetVisible(false);
|
me->SetVisible(false);
|
||||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
|
|
||||||
|
// Reset summons
|
||||||
|
summons.DespawnAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summon)
|
void JustSummoned(Creature* summon) override
|
||||||
{
|
{
|
||||||
summon->SetInCombatWithZone();
|
summon->SetInCombatWithZone();
|
||||||
summons.Summon(summon);
|
summons.Summon(summon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoAction(int32 param)
|
void DoAction(int32 param) override
|
||||||
{
|
{
|
||||||
if (param == ACTION_START_EVENT)
|
if (param == ACTION_START_EVENT)
|
||||||
|
{
|
||||||
|
me->SetReactState(REACT_AGGRESSIVE);
|
||||||
|
me->setAttackTimer(BASE_ATTACK, 6000);
|
||||||
|
me->SetVisible(true);
|
||||||
|
me->UpdateObjectVisibility(true);
|
||||||
|
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
|
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
me->SetInCombatWithZone();
|
me->SetInCombatWithZone();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer)
|
void JustDied(Unit* killer) override
|
||||||
{
|
{
|
||||||
BossAI::JustDied(killer);
|
BossAI::JustDied(killer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttackStart(Unit* who)
|
void AttackStart(Unit* who) override
|
||||||
{
|
{
|
||||||
if (who && me->GetReactState() == REACT_AGGRESSIVE)
|
if (who && me->GetReactState() == REACT_AGGRESSIVE)
|
||||||
me->Attack(who, true);
|
me->Attack(who, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* who)
|
void EnterCombat(Unit* /*who*/) override
|
||||||
{
|
{
|
||||||
BossAI::EnterCombat(who);
|
|
||||||
me->setAttackTimer(BASE_ATTACK, 6000);
|
|
||||||
me->SetVisible(true);
|
|
||||||
me->UpdateObjectVisibility(true);
|
|
||||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
|
||||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
|
||||||
|
|
||||||
events.ScheduleEvent(EVENT_SPELL_WHIRL, 18000);
|
events.ScheduleEvent(EVENT_SPELL_WHIRL, 18000);
|
||||||
events.ScheduleEvent(EVENT_SPELL_SPOUT, 45000);
|
events.ScheduleEvent(EVENT_SPELL_SPOUT, 45000);
|
||||||
events.ScheduleEvent(EVENT_SPELL_GEYSER, 10000);
|
events.ScheduleEvent(EVENT_SPELL_GEYSER, 10000);
|
||||||
events.ScheduleEvent(EVENT_PHASE_2, 125000);
|
events.ScheduleEvent(EVENT_PHASE_2, 125000);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* /*who*/)
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateAI(uint32 diff)
|
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
events.Update(diff);
|
|
||||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
events.Update(diff);
|
||||||
|
|
||||||
switch (events.ExecuteEvent())
|
switch (events.ExecuteEvent())
|
||||||
{
|
{
|
||||||
case EVENT_SPELL_WHIRL:
|
case EVENT_SPELL_WHIRL:
|
||||||
|
|||||||
Reference in New Issue
Block a user