fix(Core/Scripts): Rewrite Hungarfen (#14426)
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
--
|
||||||
|
UPDATE `creature_template` SET `ScriptName` = 'boss_hungarfen', `AIName` = '' WHERE `entry` = 17770;
|
||||||
|
UPDATE `creature_template` SET `ScriptName` = 'npc_underbog_mushroom', `AIName` = '', `scale` = 1, `faction` = 14, `speed_walk` = 1 WHERE `entry` = 17990;
|
||||||
|
UPDATE `creature_template` SET `scale` = 1, `faction` = 14, `speed_walk` = 1 WHERE `entry` = 20189;
|
||||||
|
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|33554432, `speed_walk` = 1, `speed_run` = 1.57143 WHERE `entry` IN (17770, 20169);
|
||||||
|
|
||||||
|
DELETE FROM `smart_scripts` WHERE `entryorguid` = 17770 AND `source_type` = 0;
|
||||||
|
DELETE FROM `smart_scripts` WHERE `entryorguid` = 17990 AND `source_type` = 0;
|
||||||
|
|
||||||
|
DELETE FROM `creature_template_addon` WHERE `entry` IN (17990, 20189);
|
||||||
|
INSERT INTO `creature_template_addon` (`entry`, `auras`) VALUES
|
||||||
|
(17990, '31690'),
|
||||||
|
(20189, '31690');
|
||||||
|
|
||||||
|
DELETE FROM `creature_template_movement` WHERE `CreatureId` IN (17990, 20189);
|
||||||
|
INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`) VALUES
|
||||||
|
(17990, 0, 0, 0, 1, 0, 0),
|
||||||
|
(20189, 0, 0, 0, 1, 0, 0);
|
||||||
|
|
||||||
|
UPDATE `spell_dbc` SET `Effect_1` = 28, `EffectMiscValueB_1` = 64 WHERE `ID` = 31692;
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 34168 AND `ScriptName` = 'spell_spore_cloud';
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 34874 AND `ScriptName` = 'spell_despawn_underbog_mushrooms';
|
||||||
|
INSERT INTO `spell_script_names` VALUES
|
||||||
|
(34168, 'spell_spore_cloud'),
|
||||||
|
(34874, 'spell_despawn_underbog_mushrooms');
|
||||||
|
|
||||||
|
DELETE FROM `creature_text` WHERE `CreatureID` = 17770;
|
||||||
|
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||||
|
(17770, 0, 0, 'Hungarfen roars in pain.', 16, 0, 100, 0, 0, 0, 16594, 0, 'Hungarfen - On 20% EMOTE');
|
||||||
@@ -35,9 +35,9 @@ enum eBlackStalker
|
|||||||
ACTION_MOVE_TO_PLATFORM = 1
|
ACTION_MOVE_TO_PLATFORM = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
struct boss_ghazan : public ScriptedAI
|
struct boss_ghazan : public BossAI
|
||||||
{
|
{
|
||||||
boss_ghazan(Creature* creature) : ScriptedAI(creature)
|
boss_ghazan(Creature* creature) : BossAI(creature, DATA_GHAZAN)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,19 +50,22 @@ struct boss_ghazan : public ScriptedAI
|
|||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
events.Reset();
|
|
||||||
_enraged = false;
|
_enraged = false;
|
||||||
if (!_reachedPlatform)
|
if (!_reachedPlatform)
|
||||||
{
|
{
|
||||||
_movedToPlatform = false;
|
_movedToPlatform = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BossAI::Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit*) override
|
void EnterCombat(Unit* who) override
|
||||||
{
|
{
|
||||||
events.ScheduleEvent(EVENT_ACID_BREATH, 3s);
|
events.ScheduleEvent(EVENT_ACID_BREATH, 3s);
|
||||||
events.ScheduleEvent(EVENT_ACID_SPIT, 1s);
|
events.ScheduleEvent(EVENT_ACID_SPIT, 1s);
|
||||||
events.ScheduleEvent(EVENT_TAIL_SWEEP, DUNGEON_MODE<Milliseconds>(5900ms, 10s));
|
events.ScheduleEvent(EVENT_TAIL_SWEEP, DUNGEON_MODE<Milliseconds>(5900ms, 10s));
|
||||||
|
|
||||||
|
BossAI::EnterCombat(who);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*type*/, SpellSchoolMask /*school*/) override
|
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*type*/, SpellSchoolMask /*school*/) override
|
||||||
@@ -106,6 +109,8 @@ struct boss_ghazan : public ScriptedAI
|
|||||||
{
|
{
|
||||||
me->GetMotionMaster()->MoveRandom(12.f);
|
me->GetMotionMaster()->MoveRandom(12.f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BossAI::JustReachedHome();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
@@ -164,7 +169,7 @@ public:
|
|||||||
{
|
{
|
||||||
if (InstanceScript* instance = player->GetInstanceScript())
|
if (InstanceScript* instance = player->GetInstanceScript())
|
||||||
{
|
{
|
||||||
if (Creature* ghazan = ObjectAccessor::GetCreature(*player, instance->GetGuidData(NPC_GHAZAN)))
|
if (Creature* ghazan = instance->GetCreature(DATA_GHAZAN))
|
||||||
{
|
{
|
||||||
ghazan->AI()->DoAction(ACTION_MOVE_TO_PLATFORM);
|
ghazan->AI()->DoAction(ACTION_MOVE_TO_PLATFORM);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -0,0 +1,197 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU Affero General Public License as published by the
|
||||||
|
* Free Software Foundation; either version 3 of the License, or (at your
|
||||||
|
* option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Player.h"
|
||||||
|
#include "ScriptMgr.h"
|
||||||
|
#include "ScriptedCreature.h"
|
||||||
|
#include "SpellScript.h"
|
||||||
|
#include "TaskScheduler.h"
|
||||||
|
#include "the_underbog.h"
|
||||||
|
|
||||||
|
enum Spells
|
||||||
|
{
|
||||||
|
// Hungarfen
|
||||||
|
SPELL_SPAWN_MUSHROOMS = 31692,
|
||||||
|
SPELL_DESPAWN_MUSHROOMS = 34874,
|
||||||
|
SPELL_FOUL_SPORES = 31673,
|
||||||
|
SPELL_ACID_GEYSER = 38739,
|
||||||
|
|
||||||
|
// Underbog Mushroom
|
||||||
|
SPELL_SHRINK = 31691,
|
||||||
|
SPELL_GROW = 31698,
|
||||||
|
SPELL_SPORE_CLOUD = 34168
|
||||||
|
};
|
||||||
|
|
||||||
|
enum Misc
|
||||||
|
{
|
||||||
|
MAX_GROW_REPEAT = 9,
|
||||||
|
EMOTE_ROARS = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
struct boss_hungarfen : public BossAI
|
||||||
|
{
|
||||||
|
boss_hungarfen(Creature* creature) : BossAI(creature, DATA_HUNGARFEN), _foul_spores(false) { }
|
||||||
|
|
||||||
|
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType, SpellSchoolMask) override
|
||||||
|
{
|
||||||
|
if (me->HealthBelowPctDamaged(20, damage) && !_foul_spores)
|
||||||
|
{
|
||||||
|
_foul_spores = true;
|
||||||
|
me->AddUnitState(UNIT_STATE_ROOT);
|
||||||
|
Talk(EMOTE_ROARS);
|
||||||
|
DoCastSelf(SPELL_FOUL_SPORES);
|
||||||
|
_scheduler.DelayAll(11s);
|
||||||
|
_scheduler.Schedule(11s, [this](TaskContext /*context*/)
|
||||||
|
{
|
||||||
|
me->ClearUnitState(UNIT_STATE_ROOT);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset() override
|
||||||
|
{
|
||||||
|
BossAI::Reset();
|
||||||
|
_foul_spores = false;
|
||||||
|
_scheduler.CancelAll();
|
||||||
|
DoCastAOE(SPELL_DESPAWN_MUSHROOMS, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EnterCombat(Unit* who) override
|
||||||
|
{
|
||||||
|
BossAI::EnterCombat(who);
|
||||||
|
|
||||||
|
_scheduler.Schedule(IsHeroic() ? randtime(2400ms, 3600ms) : 10s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0, true))
|
||||||
|
{
|
||||||
|
target->CastSpell(target, SPELL_SPAWN_MUSHROOMS, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
context.Repeat();
|
||||||
|
});
|
||||||
|
|
||||||
|
if (IsHeroic())
|
||||||
|
{
|
||||||
|
_scheduler.Schedule(6s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastAOE(SPELL_ACID_GEYSER);
|
||||||
|
context.Repeat(8500ms, 11s);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateAI(uint32 diff) override
|
||||||
|
{
|
||||||
|
if (!UpdateVictim())
|
||||||
|
return;
|
||||||
|
|
||||||
|
_scheduler.Update(diff, [this]
|
||||||
|
{
|
||||||
|
DoMeleeAttackIfReady();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
TaskScheduler _scheduler;
|
||||||
|
bool _foul_spores;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct npc_underbog_mushroom : public ScriptedAI
|
||||||
|
{
|
||||||
|
npc_underbog_mushroom(Creature* creature) : ScriptedAI(creature) { }
|
||||||
|
|
||||||
|
void InitializeAI() override
|
||||||
|
{
|
||||||
|
DoCastSelf(SPELL_SHRINK, true);
|
||||||
|
|
||||||
|
_scheduler.Schedule(2s, [this](TaskContext context)
|
||||||
|
{
|
||||||
|
DoCastSelf(SPELL_GROW, true);
|
||||||
|
|
||||||
|
if (context.GetRepeatCounter() == MAX_GROW_REPEAT)
|
||||||
|
{
|
||||||
|
DoCastSelf(SPELL_SPORE_CLOUD);
|
||||||
|
|
||||||
|
context.Schedule(4s, [this](TaskContext /*context*/)
|
||||||
|
{
|
||||||
|
me->RemoveAurasDueToSpell(SPELL_GROW);
|
||||||
|
me->DespawnOrUnsummon(2000);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
context.Repeat();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateAI(uint32 diff) override
|
||||||
|
{
|
||||||
|
_scheduler.Update(diff);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
TaskScheduler _scheduler;
|
||||||
|
};
|
||||||
|
|
||||||
|
class spell_spore_cloud : public AuraScript
|
||||||
|
{
|
||||||
|
PrepareAuraScript(spell_spore_cloud);
|
||||||
|
|
||||||
|
void HandlePeriodic(AuraEffect const* /*aurEff*/)
|
||||||
|
{
|
||||||
|
PreventDefaultAction();
|
||||||
|
|
||||||
|
if (Unit* caster = GetCaster())
|
||||||
|
{
|
||||||
|
if (InstanceScript* instance = caster->GetInstanceScript())
|
||||||
|
{
|
||||||
|
if (Creature* hungarfen = instance->GetCreature(DATA_HUNGARFEN))
|
||||||
|
caster->CastSpell((Unit*)nullptr, GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, true, nullptr, nullptr, hungarfen->GetGUID());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnEffectPeriodic += AuraEffectPeriodicFn(spell_spore_cloud::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
class spell_despawn_underbog_mushrooms : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_despawn_underbog_mushrooms);
|
||||||
|
|
||||||
|
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||||
|
{
|
||||||
|
if (Unit* target = GetHitUnit())
|
||||||
|
if (Creature* cTarget = target->ToCreature())
|
||||||
|
if (cTarget->GetEntry() == NPC_UNDERBOG_MUSHROOM)
|
||||||
|
cTarget->DespawnOrUnsummon();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnEffectHitTarget += SpellEffectFn(spell_despawn_underbog_mushrooms::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
void AddSC_boss_hungarfen()
|
||||||
|
{
|
||||||
|
RegisterUnderbogCreatureAI(boss_hungarfen);
|
||||||
|
RegisterUnderbogCreatureAI(npc_underbog_mushroom);
|
||||||
|
RegisterSpellScript(spell_spore_cloud);
|
||||||
|
RegisterSpellScript(spell_despawn_underbog_mushrooms);
|
||||||
|
}
|
||||||
@@ -15,13 +15,6 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ScriptData
|
|
||||||
SDName: Boss_the_black_stalker
|
|
||||||
SD%Complete: 95
|
|
||||||
SDComment: Timers may be incorrect
|
|
||||||
SDCategory: Coilfang Resevoir, Underbog
|
|
||||||
EndScriptData */
|
|
||||||
|
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
#include "SpellScript.h"
|
#include "SpellScript.h"
|
||||||
@@ -48,34 +41,19 @@ enum eBlackStalker
|
|||||||
ENTRY_SPORE_STRIDER = 22299
|
ENTRY_SPORE_STRIDER = 22299
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_the_black_stalker : public CreatureScript
|
struct boss_the_black_stalker : public BossAI
|
||||||
{
|
{
|
||||||
public:
|
boss_the_black_stalker(Creature* creature) : BossAI(creature, DATA_BLACK_STALKER)
|
||||||
boss_the_black_stalker() : CreatureScript("boss_the_black_stalker") { }
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return GetTheUnderbogAI<boss_the_black_stalkerAI>(creature);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct boss_the_black_stalkerAI : public ScriptedAI
|
|
||||||
{
|
|
||||||
boss_the_black_stalkerAI(Creature* creature) : ScriptedAI(creature), summons(me)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
EventMap events;
|
|
||||||
SummonList summons;
|
|
||||||
ObjectGuid lTarget;
|
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
events.Reset();
|
|
||||||
summons.DespawnAll();
|
|
||||||
lTarget.Clear();
|
lTarget.Clear();
|
||||||
|
BossAI::Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit*) override
|
void EnterCombat(Unit* who) override
|
||||||
{
|
{
|
||||||
events.ScheduleEvent(EVENT_LEVITATE, 12000);
|
events.ScheduleEvent(EVENT_LEVITATE, 12000);
|
||||||
events.ScheduleEvent(EVENT_SPELL_CHAIN, 6000);
|
events.ScheduleEvent(EVENT_SPELL_CHAIN, 6000);
|
||||||
@@ -83,29 +61,27 @@ public:
|
|||||||
events.ScheduleEvent(EVENT_CHECK, 5000);
|
events.ScheduleEvent(EVENT_CHECK, 5000);
|
||||||
if (IsHeroic())
|
if (IsHeroic())
|
||||||
events.ScheduleEvent(EVENT_SPELL_SPORES, urand(10000, 15000));
|
events.ScheduleEvent(EVENT_SPELL_SPORES, urand(10000, 15000));
|
||||||
|
|
||||||
|
BossAI::EnterCombat(who);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustSummoned(Creature* summon) override
|
void JustSummoned(Creature* summon) override
|
||||||
{
|
{
|
||||||
summons.Summon(summon);
|
|
||||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||||
summon->AI()->AttackStart(target);
|
summon->AI()->AttackStart(target);
|
||||||
else if (me->GetVictim())
|
else if (me->GetVictim())
|
||||||
summon->AI()->AttackStart(me->GetVictim());
|
summon->AI()->AttackStart(me->GetVictim());
|
||||||
|
|
||||||
|
BossAI::JustSummoned(summon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SummonedCreatureDies(Creature* summon, Unit*) override
|
void SummonedCreatureDies(Creature* summon, Unit* /*killer*/) override
|
||||||
{
|
{
|
||||||
summons.Despawn(summon);
|
summons.Despawn(summon);
|
||||||
for (uint8 i = 0; i < 3; ++i)
|
for (uint8 i = 0; i < 3; ++i)
|
||||||
me->CastSpell(me, SPELL_SUMMON_SPORE_STRIDER, false);
|
me->CastSpell(me, SPELL_SUMMON_SPORE_STRIDER, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit*) override
|
|
||||||
{
|
|
||||||
summons.DespawnAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
@@ -177,17 +153,14 @@ public:
|
|||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
};
|
|
||||||
|
private:
|
||||||
|
ObjectGuid lTarget;
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_gen_allergies : public SpellScriptLoader
|
class spell_gen_allergies : public AuraScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareAuraScript(spell_gen_allergies);
|
||||||
spell_gen_allergies() : SpellScriptLoader("spell_gen_allergies") { }
|
|
||||||
|
|
||||||
class spell_gen_allergies_AuraScript : public AuraScript
|
|
||||||
{
|
|
||||||
PrepareAuraScript(spell_gen_allergies_AuraScript);
|
|
||||||
|
|
||||||
void CalcPeriodic(AuraEffect const* /*effect*/, bool& isPeriodic, int32& amplitude)
|
void CalcPeriodic(AuraEffect const* /*effect*/, bool& isPeriodic, int32& amplitude)
|
||||||
{
|
{
|
||||||
@@ -202,19 +175,13 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_gen_allergies_AuraScript::CalcPeriodic, EFFECT_0, SPELL_AURA_DUMMY);
|
DoEffectCalcPeriodic += AuraEffectCalcPeriodicFn(spell_gen_allergies::CalcPeriodic, EFFECT_0, SPELL_AURA_DUMMY);
|
||||||
OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_gen_allergies_AuraScript::Update, EFFECT_0, SPELL_AURA_DUMMY);
|
OnEffectUpdatePeriodic += AuraEffectUpdatePeriodicFn(spell_gen_allergies::Update, EFFECT_0, SPELL_AURA_DUMMY);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
AuraScript* GetAuraScript() const override
|
|
||||||
{
|
|
||||||
return new spell_gen_allergies_AuraScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_boss_the_black_stalker()
|
void AddSC_boss_the_black_stalker()
|
||||||
{
|
{
|
||||||
new boss_the_black_stalker();
|
RegisterUnderbogCreatureAI(boss_the_black_stalker);
|
||||||
new spell_gen_allergies();
|
RegisterSpellScript(spell_gen_allergies);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,12 @@
|
|||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
#include "the_underbog.h"
|
#include "the_underbog.h"
|
||||||
|
|
||||||
|
ObjectData const creatureData[] =
|
||||||
|
{
|
||||||
|
{ NPC_HUNGARFEN, DATA_HUNGARFEN },
|
||||||
|
{ NPC_GHAZAN, DATA_GHAZAN }
|
||||||
|
};
|
||||||
|
|
||||||
class instance_the_underbog : public InstanceMapScript
|
class instance_the_underbog : public InstanceMapScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -34,35 +40,11 @@ public:
|
|||||||
{
|
{
|
||||||
instance_the_underbog_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
instance_the_underbog_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||||
|
|
||||||
void OnCreatureCreate(Creature* creature) override
|
void Initialize() override
|
||||||
{
|
{
|
||||||
InstanceScript::OnCreatureCreate(creature);
|
SetBossNumber(MAX_ENCOUNTERS);
|
||||||
|
LoadObjectData(creatureData, nullptr);
|
||||||
switch (creature->GetEntry())
|
|
||||||
{
|
|
||||||
case NPC_GHAZAN:
|
|
||||||
_ghazanGUID = creature->GetGUID();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ObjectGuid GetGuidData(uint32 type) const override
|
|
||||||
{
|
|
||||||
switch (type)
|
|
||||||
{
|
|
||||||
case NPC_GHAZAN:
|
|
||||||
return _ghazanGUID;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ObjectGuid::Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
ObjectGuid _ghazanGUID;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -22,8 +22,20 @@
|
|||||||
|
|
||||||
#define TheUnderbogScriptName "instance_the_underbog"
|
#define TheUnderbogScriptName "instance_the_underbog"
|
||||||
|
|
||||||
|
enum Data
|
||||||
|
{
|
||||||
|
DATA_HUNGARFEN = 0,
|
||||||
|
DATA_GHAZAN = 1,
|
||||||
|
DATA_MUSELEK = 2,
|
||||||
|
DATA_BLACK_STALKER = 3,
|
||||||
|
|
||||||
|
MAX_ENCOUNTERS = 4
|
||||||
|
};
|
||||||
|
|
||||||
enum NPCs
|
enum NPCs
|
||||||
{
|
{
|
||||||
|
NPC_HUNGARFEN = 17770,
|
||||||
|
NPC_UNDERBOG_MUSHROOM = 17990,
|
||||||
NPC_GHAZAN = 18105
|
NPC_GHAZAN = 18105
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -50,8 +50,9 @@ void AddSC_boss_hydromancer_thespia(); //CR Steam Vault
|
|||||||
void AddSC_boss_mekgineer_steamrigger();
|
void AddSC_boss_mekgineer_steamrigger();
|
||||||
void AddSC_boss_warlord_kalithresh();
|
void AddSC_boss_warlord_kalithresh();
|
||||||
void AddSC_instance_steam_vault();
|
void AddSC_instance_steam_vault();
|
||||||
void AddSC_boss_the_black_stalker(); //CR Underbog
|
void AddSC_boss_hungarfen(); //CR Underbog
|
||||||
void AddSC_boss_ghazan();
|
void AddSC_boss_ghazan();
|
||||||
|
void AddSC_boss_the_black_stalker();
|
||||||
void AddSC_instance_the_underbog();
|
void AddSC_instance_the_underbog();
|
||||||
void AddSC_boss_ahune();
|
void AddSC_boss_ahune();
|
||||||
void AddSC_instance_the_slave_pens();
|
void AddSC_instance_the_slave_pens();
|
||||||
@@ -144,8 +145,9 @@ void AddOutlandScripts()
|
|||||||
AddSC_boss_mekgineer_steamrigger();
|
AddSC_boss_mekgineer_steamrigger();
|
||||||
AddSC_boss_warlord_kalithresh();
|
AddSC_boss_warlord_kalithresh();
|
||||||
AddSC_instance_steam_vault();
|
AddSC_instance_steam_vault();
|
||||||
AddSC_boss_the_black_stalker(); //CR Underbog
|
AddSC_boss_hungarfen(); //CR Underbog
|
||||||
AddSC_boss_ghazan();
|
AddSC_boss_ghazan();
|
||||||
|
AddSC_boss_the_black_stalker();
|
||||||
AddSC_instance_the_underbog();
|
AddSC_instance_the_underbog();
|
||||||
AddSC_boss_ahune();
|
AddSC_boss_ahune();
|
||||||
AddSC_instance_the_slave_pens();
|
AddSC_instance_the_slave_pens();
|
||||||
|
|||||||
Reference in New Issue
Block a user