Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_anubshiah.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
17
19{
20public:
21 boss_anubshiah() : CreatureScript("boss_anubshiah") { }
22
24 {
33
35 {
36 ShadowBolt_Timer = 7000;
39 DemonArmor_Timer = 3000;
40 EnvelopingWeb_Timer = 16000;
41 }
42
43 void EnterCombat(Unit* /*who*/) OVERRIDE { }
44
46 {
47 //Return since we have no target
48 if (!UpdateVictim())
49 return;
50
51 //ShadowBolt_Timer
52 if (ShadowBolt_Timer <= diff)
53 {
55 ShadowBolt_Timer = 7000;
56 } else ShadowBolt_Timer -= diff;
57
58 //CurseOfTongues_Timer
59 if (CurseOfTongues_Timer <= diff)
60 {
61 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
64 } else CurseOfTongues_Timer -= diff;
65
66 //CurseOfWeakness_Timer
67 if (CurseOfWeakness_Timer <= diff)
68 {
71 } else CurseOfWeakness_Timer -= diff;
72
73 //DemonArmor_Timer
74 if (DemonArmor_Timer <= diff)
75 {
77 DemonArmor_Timer = 300000;
78 } else DemonArmor_Timer -= diff;
79
80 //EnvelopingWeb_Timer
81 if (EnvelopingWeb_Timer <= diff)
82 {
83 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
85 EnvelopingWeb_Timer = 12000;
86 } else EnvelopingWeb_Timer -= diff;
87
89 }
90
91 private:
97 };
98
100 {
101 return new boss_anubshiahAI(creature);
102 }
103};
104
106{
107 new boss_anubshiah();
108}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
@ SPELL_CURSEOFWEAKNESS
@ SPELL_ENVELOPINGWEB
@ SPELL_CURSEOFTONGUES
@ SPELL_SHADOWBOLT
@ SPELL_DEMONARMOR
void AddSC_boss_anubshiah()
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 EnterCombat(Unit *) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================