Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_emperor_dagran_thaurissan.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#include "ScriptMgr.h"
7#include "ScriptedCreature.h"
8#include "blackrock_depths.h"
9
11{
14};
15
21
23{
24public:
25 boss_emperor_dagran_thaurissan() : CreatureScript("boss_emperor_dagran_thaurissan") { }
26
28 {
29 return new boss_draganthaurissanAI(creature);
30 }
31
33 {
35 {
36 instance = me->GetInstanceScript();
37 }
38
42 //uint32 Counter;
43
45 {
47 AvatarOfFlame_Timer = 25000;
48 //Counter= 0;
49 }
50
51 void EnterCombat(Unit* /*who*/) OVERRIDE
52 {
54 me->CallForHelp(VISIBLE_RANGE);
55 }
56
57 void KilledUnit(Unit* /*victim*/) OVERRIDE
58 {
60 }
61
62 void JustDied(Unit* /*killer*/) OVERRIDE
63 {
64 if (Creature* Moira = ObjectAccessor::GetCreature(*me, instance ? instance->GetData64(DATA_MOIRA) : 0))
65 {
66 Moira->AI()->EnterEvadeMode();
67 Moira->setFaction(35);
68 }
69 }
70
72 {
73 //Return since we have no target
74 if (!UpdateVictim())
75 return;
76
77 if (HandOfThaurissan_Timer <= diff)
78 {
79 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
81
82 //3 Hands of Thaurissan will be casted
83 //if (Counter < 3)
84 //{
85 // HandOfThaurissan_Timer = 1000;
86 // ++Counter;
87 //}
88 //else
89 //{
91 //Counter = 0;
92 //}
93 } else HandOfThaurissan_Timer -= diff;
94
95 //AvatarOfFlame_Timer
96 if (AvatarOfFlame_Timer <= diff)
97 {
99 AvatarOfFlame_Timer = 18000;
100 } else AvatarOfFlame_Timer -= diff;
101
103 }
104 };
105};
106
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
#define VISIBLE_RANGE
Definition ScriptMgr.h:56
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
@ DATA_MOIRA
@ SAY_SLAY
#define SAY_AGGRO
void AddSC_boss_draganthaurissan()
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
bool UpdateVictim()
CreatureScript(const char *name)
static Creature * GetCreature(WorldObject const &u, uint64 guid)
void DoMeleeAttackIfReady()
Definition UnitAI.cpp:28
void DoCast(uint32 spellId)
Definition UnitAI.cpp:110
Unit * SelectTarget(SelectAggroTarget targetType, uint32 position=0, float dist=0.0f, bool playerOnly=false, int32 aura=0)
Definition UnitAI.cpp:66
void DoCastVictim(uint32 spellId, bool triggered=false)
Definition UnitAI.cpp:168
Definition Unit.h:1367
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Creature * me
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================