Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
boss_ironaya.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_Ironaya
8SD%Complete: 100
9SDComment:
10SDCategory: Uldaman
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15
17{
21 SPELL_WSTOMP = 11876,
22};
23
25{
26public:
27 boss_ironaya() : CreatureScript("boss_ironaya") { }
28
29 struct boss_ironayaAI : public ScriptedAI
30 {
31 boss_ironayaAI(Creature* creature) : ScriptedAI(creature) { }
32
36
38 {
39 uiArcingTimer = 3000;
40 bHasCastedKnockaway = false;
41 bHasCastedWstomp = false;
42 }
43
44 void EnterCombat(Unit* /*who*/) OVERRIDE
45 {
47 }
48
50 {
51 //Return since we have no target
52 if (!UpdateVictim())
53 return;
54
55 //If we are <50% hp do knockaway ONCE
57 {
59
60 // current aggro target is knocked away pick new target
62
63 if (!target || target == me->GetVictim())
65
66 if (target)
67 me->TauntApply(target);
68
69 //Shouldn't cast this agian
71 }
72
73 //uiArcingTimer
74 if (uiArcingTimer <= uiDiff)
75 {
77 uiArcingTimer = 13000;
78 } else uiArcingTimer -= uiDiff;
79
81 {
83 bHasCastedWstomp = true;
84 }
85
87 }
88 };
89
91 {
92 return new boss_ironayaAI(creature);
93 }
94};
95
96//This is the actual function called only once durring InitScripts()
97//It must define all handled functions that are to be run in this script
99{
100 new boss_ironaya();
101}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ SELECT_TARGET_TOPAGGRO
Definition UnitAI.h:24
#define SAY_AGGRO
void AddSC_boss_ironaya()
Ironaya
@ SPELL_ARCINGSMASH
@ SAY_AGGRO
@ SPELL_KNOCKAWAY
@ SPELL_WSTOMP
void Talk(uint8 id, WorldObject const *whisperTarget=NULL)
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
bool HealthBelowPct(uint32 pct) const
ScriptedAI(Creature *creature)
void UpdateAI(uint32 uiDiff) OVERRIDE
== Triggered Actions Requested ==================
boss_ironayaAI(Creature *creature)
void EnterCombat(Unit *) OVERRIDE