Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_ramstein_the_gorger.cpp
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6/* ScriptData
7SDName: Boss_Ramstein_The_Gorger
8SD%Complete: 70
9SDComment:
10SDCategory: Stratholme
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15#include "stratholme.h"
16
18{
21};
22
24{
26};
27
29{
30public:
31 boss_ramstein_the_gorger() : CreatureScript("boss_ramstein_the_gorger") { }
32
34 {
35 return new boss_ramstein_the_gorgerAI(creature);
36 }
37
39 {
41 {
42 instance = me->GetInstanceScript();
43 }
44
46
49
51 {
52 Trample_Timer = 3000;
53 Knockout_Timer = 12000;
54 }
55
56 void EnterCombat(Unit* /*who*/) OVERRIDE
57 {
58 }
59
60 void JustDied(Unit* /*killer*/) OVERRIDE
61 {
62 for (uint8 i = 0; i < 30; ++i)
63 {
64 if (Creature* mob = me->SummonCreature(NPC_MINDLESS_UNDEAD, 3969.35f+(std::rand() % 10 + -10), -3391.87f+(std::rand() % 10 + -10), 119.11f, 5.91f, TempSummonType::TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000))
65 mob->AI()->AttackStart(me->SelectNearestTarget(100.0f));
66 }
67
68 if (instance)
69 instance->SetData(TYPE_RAMSTEIN, DONE);
70 }
71
73 {
74 //Return since we have no target
75 if (!UpdateVictim())
76 return;
77
78 //Trample
79 if (Trample_Timer <= diff)
80 {
82 Trample_Timer = 7000;
83 } else Trample_Timer -= diff;
84
85 //Knockout
86 if (Knockout_Timer <= diff)
87 {
89 Knockout_Timer = 10000;
90 } else Knockout_Timer -= diff;
91
93 }
94 };
95};
96
std::uint8_t uint8
Definition Define.h:79
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ DONE
@ TEMPSUMMON_TIMED_OR_DEAD_DESPAWN
Definition Object.h:68
void AddSC_boss_ramstein_the_gorger()
bool UpdateVictim()
CreatureScript(const char *name)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:168
Definition Unit.h:1367
CreatureAI * GetAI(Creature *creature) const OVERRIDE
@ TYPE_RAMSTEIN
Definition stratholme.h:15
Creature * me
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================