Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_princess_theradras.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_Princess_Theradras
8SD%Complete: 100
9SDComment:
10SDCategory: Maraudon
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15#include "ScriptedCreature.h"
16
24
26{
27public:
28 boss_princess_theradras() : CreatureScript("boss_princess_theradras") { }
29
31 {
32 return new boss_ptheradrasAI(creature);
33 }
34
36 {
37 boss_ptheradrasAI(Creature* creature) : ScriptedAI(creature) { }
38
43
45 {
46 DustfieldTimer = 8000;
47 BoulderTimer = 2000;
48 ThrashTimer = 5000;
49 RepulsiveGazeTimer = 23000;
50 }
51
52 void EnterCombat(Unit* /*who*/) OVERRIDE { }
53
54 void JustDied(Unit* /*killer*/) OVERRIDE
55 {
56 me->SummonCreature(12238, 28.067f, 61.875f, -123.405f, 4.67f, TempSummonType::TEMPSUMMON_TIMED_DESPAWN, 600000);
57 }
58
60 {
61 if (!UpdateVictim())
62 return;
63
64 //DustfieldTimer
65 if (DustfieldTimer <= diff)
66 {
68 DustfieldTimer = 14000;
69 }
70 else DustfieldTimer -= diff;
71
72 //BoulderTimer
73 if (BoulderTimer <= diff)
74 {
75 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
76 DoCast(target, SPELL_BOULDER);
77 BoulderTimer = 10000;
78 }
79 else BoulderTimer -= diff;
80
81 //RepulsiveGazeTimer
82 if (RepulsiveGazeTimer <= diff)
83 {
85 RepulsiveGazeTimer = 20000;
86 }
87 else RepulsiveGazeTimer -= diff;
88
89 //ThrashTimer
90 if (ThrashTimer <= diff)
91 {
93 ThrashTimer = 18000;
94 }
95 else ThrashTimer -= diff;
96
98 }
99 };
100};
101
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ TEMPSUMMON_TIMED_DESPAWN
Definition Object.h:70
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
@ SPELL_THRASH
void AddSC_boss_ptheradras()
bool UpdateVictim()
CreatureScript(const char *name)
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 ==================