Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
zone_valley_of_the_four_winds.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 "ScriptedGossip.h"
9#include "Player.h"
10#include "Spell.h"
11
13{
14public:
15 npc_glade_glimmer() : CreatureScript("npc_glade_glimmer") {}
16
18 {
20 {
21 cooldown = 0;
22 }
23
30
32 {
33 Reset();
34 }
35
36 void OnSpellClick(Unit* clicker, bool& result) OVERRIDE
37 {
38 if (!result)
39 return;
40
41 cooldown = 60000;
43
44 }
46 {
47 if (cooldown)
48 {
49 if (cooldown <= diff)
50 {
51 Reset();
52 cooldown = 0;
53 }
54 else
55 cooldown -= diff;
56 }
57 }
58 private:
60 };
61
63 {
64 return new npc_glade_glimmerAI(creature);
65 }
66};
67
std::uint32_t uint32
Definition Define.h:77
#define OVERRIDE
Definition Define.h:60
@ UNIT_NPC_FLAG_SPELLCLICK
Definition Unit.h:711
@ UNIT_FLAG_NON_ATTACKABLE
Definition Unit.h:626
@ UNIT_FIELD_NPC_FLAGS
@ UNIT_FIELD_FLAGS
CreatureScript(const char *name)
Definition Unit.h:1367
CreatureAI * GetAI(Creature *creature) const OVERRIDE
Creature * me
ScriptedAI(Creature *creature)
void OnSpellClick(Unit *clicker, bool &result) OVERRIDE
void UpdateAI(uint32 diff) OVERRIDE
== Triggered Actions Requested ==================
void AddSC_valley_of_the_four_winds()