TrinityCore
boss_ramstein_the_gorger.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/* ScriptData
19SDName: Boss_Ramstein_The_Gorger
20SD%Complete: 70
21SDComment:
22SDCategory: Stratholme
23EndScriptData */
24
25#include "ScriptMgr.h"
26#include "ScriptedCreature.h"
27#include "stratholme.h"
28#include "TemporarySummon.h"
29
31{
33 SPELL_KNOCKOUT = 17307
34};
35
37{
39};
40
42{
43public:
44 boss_ramstein_the_gorger() : CreatureScript("boss_ramstein_the_gorger") { }
45
46 CreatureAI* GetAI(Creature* creature) const override
47 {
48 return GetStratholmeAI<boss_ramstein_the_gorgerAI>(creature);
49 }
50
52 {
54 {
55 Initialize();
56 }
57
59 {
60 Trample_Timer = 3000;
61 Knockout_Timer = 12000;
62 }
63
66
67 void Reset() override
68 {
70
71 Initialize();
72 }
73
74 void JustDied(Unit* killer) override
75 {
76 BossAI::JustDied(killer);
77
78 for (uint8 i = 0; i < 30; ++i)
79 {
80 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))
81 mob->AI()->AttackStart(me->SelectNearestTarget(100.0f));
82 }
83 }
84
85 void UpdateAI(uint32 diff) override
86 {
87 //Return since we have no target
88 if (!UpdateVictim())
89 return;
90
91 //Trample
92 if (Trample_Timer <= diff)
93 {
95 Trample_Timer = 7000;
96 } else Trample_Timer -= diff;
97
98 //Knockout
99 if (Knockout_Timer <= diff)
100 {
102 Knockout_Timer = 10000;
103 } else Knockout_Timer -= diff;
104 }
105 };
106};
107
109{
111}
uint8_t uint8
Definition: Define.h:144
uint32_t uint32
Definition: Define.h:142
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition: ObjectDefines.h:63
Spells
Definition: PlayerAI.cpp:32
int32 irand(int32 min, int32 max)
Definition: Random.cpp:35
void AddSC_boss_ramstein_the_gorger()
void JustDied(Unit *) override
void Reset() override
bool UpdateVictim()
Definition: CreatureAI.cpp:245
Creature *const me
Definition: CreatureAI.h:61
Unit * SelectNearestTarget(float dist=0, bool playerOnly=false) const
Definition: Creature.cpp:2493
SpellCastResult DoCastVictim(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.cpp:180
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
Definition: Unit.h:627
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition: Object.cpp:2025
CreatureAI * GetAI(Creature *creature) const override
@ BOSS_RAMSTEIN_THE_GORGER
Definition: stratholme.h:39