Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
zone_thunder_bluff.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: Thunder_Bluff
8SD%Complete: 100
9SDComment: Quest support: 925
10SDCategory: Thunder Bluff
11EndScriptData */
12
13#include "ScriptMgr.h"
14#include "ScriptedCreature.h"
15#include "ScriptedGossip.h"
16#include "Player.h"
17
18/*#####
19# npc_cairne_bloodhoof
20######*/
21
30
31#define GOSSIP_HCB "I know this is rather silly but a young ward who is a bit shy would like your hoofprint."
34{
35public:
36 npc_cairne_bloodhoof() : CreatureScript("npc_cairne_bloodhoof") { }
37
39 {
40 return new npc_cairne_bloodhoofAI (creature);
41 }
42
44 {
45 npc_cairne_bloodhoofAI(Creature* creature) : ScriptedAI(creature) { }
46
52
54 {
56 CleaveTimer = 5000;
57 MortalStrikeTimer = 10000;
58 ThunderclapTimer = 15000;
59 UppercutTimer = 10000;
60 }
61
62 void EnterCombat(Unit* /*who*/) OVERRIDE { }
63
65 {
66 if (!UpdateVictim())
67 return;
68
69 if (BerserkerChargeTimer <= diff)
70 {
71 if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
74 } else BerserkerChargeTimer -= diff;
75
76 if (UppercutTimer <= diff)
77 {
79 UppercutTimer = 20000;
80 } else UppercutTimer -= diff;
81
82 if (ThunderclapTimer <= diff)
83 {
85 ThunderclapTimer = 15000;
86 } else ThunderclapTimer -= diff;
87
88 if (MortalStrikeTimer <= diff)
89 {
91 MortalStrikeTimer = 15000;
92 } else MortalStrikeTimer -= diff;
93
94 if (CleaveTimer <= diff)
95 {
97 CleaveTimer = 7000;
98 } else CleaveTimer -= diff;
99
101 }
102 };
103};
104
106{
108}
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ SELECT_TARGET_RANDOM
Definition UnitAI.h:23
@ SPELL_CLEAVE
@ SPELL_MORTAL_STRIKE
@ SPELL_BERSERKER_CHARGE
@ SPELL_THUNDERCLAP
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
ScriptedAI(Creature *creature)
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
@ SPELL_CLEAVE
@ SPELL_MORTAL_STRIKE
@ SPELL_THUNDERCLAP
@ SPELL_BERSERKER_CHARGE
@ SPELL_UPPERCUT
void AddSC_thunder_bluff()