diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Outland/zone_hellfire_peninsula.cpp | 114 |
1 files changed, 0 insertions, 114 deletions
diff --git a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp index a434e99ee1e..5ddb89aa341 100644 --- a/src/server/scripts/Outland/zone_hellfire_peninsula.cpp +++ b/src/server/scripts/Outland/zone_hellfire_peninsula.cpp @@ -26,7 +26,6 @@ EndScriptData */ npc_aeranas npc_ancestral_wolf npc_wounded_blood_elf -npc_fel_guard_hound EndContentData */ #include "ScriptMgr.h" @@ -330,118 +329,6 @@ public: } }; -/*###### -## npc_fel_guard_hound -######*/ - -enum FelGuard -{ - SPELL_SUMMON_POO = 37688, - SPELL_FAKE_BLOOD = 37692, - NPC_DERANGED_HELBOAR = 16863, - - EVENT_SEARCH_HELBOAR = 1, - EVENT_HELBOAR_FOUND = 2, - EVENT_SUMMON_POO = 3, - EVENT_FOLLOW_PLAYER = 4 -}; - -class npc_fel_guard_hound : public CreatureScript -{ -public: - npc_fel_guard_hound() : CreatureScript("npc_fel_guard_hound") { } - - struct npc_fel_guard_houndAI : public ScriptedAI - { - npc_fel_guard_houndAI(Creature* creature) : ScriptedAI(creature) - { - Initialize(); - } - - void Initialize() - { - helboarGUID.Clear(); - _events.ScheduleEvent(EVENT_SEARCH_HELBOAR, 3s); - } - - void Reset() override - { - Initialize(); - } - - void MovementInform(uint32 type, uint32 id) override - { - if (type != POINT_MOTION_TYPE || id != 1) - return; - - if (Creature* helboar = ObjectAccessor::GetCreature(*me, helboarGUID)) - { - _events.CancelEvent(EVENT_SEARCH_HELBOAR); - me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED); - me->CastSpell(helboar, SPELL_FAKE_BLOOD); - _events.ScheduleEvent(EVENT_HELBOAR_FOUND, 2s); - } - } - - void UpdateAI(uint32 diff) override - { - _events.Update(diff); - - while (uint32 eventId = _events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SEARCH_HELBOAR: - if (Creature* helboar = me->FindNearestCreature(NPC_DERANGED_HELBOAR, 10.0f, false)) - { - if (helboar->GetGUID() != helboarGUID && me->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE && !me->FindCurrentSpellBySpellId(SPELL_SUMMON_POO)) - { - helboarGUID = helboar->GetGUID(); - me->SetWalk(true); - me->GetMotionMaster()->MovePoint(1, helboar->GetPositionX(), helboar->GetPositionY(), helboar->GetPositionZ()); - helboar->DespawnOrUnsummon(Seconds(10)); - } - } - _events.Repeat(Seconds(3)); - break; - case EVENT_HELBOAR_FOUND: - if (Creature* helboar = ObjectAccessor::GetCreature(*me, helboarGUID)) - { - me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK_UNARMED); - me->CastSpell(helboar, SPELL_FAKE_BLOOD); - _events.ScheduleEvent(EVENT_SUMMON_POO, 1s); - } - break; - case EVENT_SUMMON_POO: - DoCast(SPELL_SUMMON_POO); - _events.ScheduleEvent(EVENT_FOLLOW_PLAYER, 2s); - break; - case EVENT_FOLLOW_PLAYER: - me->SetWalk(false); - if (Player* owner = me->GetCharmerOrOwnerPlayerOrPlayerItself()) - me->GetMotionMaster()->MoveFollow(owner, 0.0f, 0.0f); - _events.ScheduleEvent(EVENT_SEARCH_HELBOAR, 3s); - break; - } - } - - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - - private: - EventMap _events; - ObjectGuid helboarGUID; - }; - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_fel_guard_houndAI(creature); - } -}; - enum ExorcismSpells { SPELL_JULES_GOES_PRONE = 39283, @@ -1214,7 +1101,6 @@ void AddSC_hellfire_peninsula() new npc_aeranas(); new npc_ancestral_wolf(); new npc_wounded_blood_elf(); - new npc_fel_guard_hound(); new npc_colonel_jules(); new npc_barada(); new npc_magister_aledis(); |