TrinityCore
magisters_terrace.cpp
Go to the documentation of this file.
1/*
2 * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the
6 * Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18/* ScriptData
19SDName: Magisters_Terrace
20SD%Complete: 100
21SDComment: Quest support: 11490(post-event)
22SDCategory: Magisters Terrace
23EndScriptData */
24
25/* ContentData
26npc_kalecgos
27EndContentData */
28
29#include "ScriptMgr.h"
30#include "magisters_terrace.h"
31#include "MotionMaster.h"
32#include "Player.h"
33#include "ScriptedCreature.h"
34#include "ScriptedGossip.h"
35
36/*######
37## npc_kalecgos
38######*/
39
41{
46};
47
49{
51};
52
54{
57};
58
60{
61public:
62 npc_kalecgos() : CreatureScript("npc_kalecgos") { }
63
64 struct npc_kalecgosAI : public ScriptedAI
65 {
66 npc_kalecgosAI(Creature* creature) : ScriptedAI(creature) { }
67
68 void MovementInform(uint32 type, uint32 pointId) override
69 {
70 if (type != WAYPOINT_MOTION_TYPE)
71 return;
72
73 if (pointId == POINT_ID_PREPARE_LANDING)
74 {
76 me->SetDisableGravity(false);
77 me->SetHover(false);
79 }
80 }
81
82 void UpdateAI(uint32 diff) override
83 {
84 events.Update(diff);
85
86 switch (events.ExecuteEvent())
87 {
90 me->SetObjectScale(0.6f);
92 break;
98 break;
99 default:
100 break;
101 }
102 }
103
104 private:
106 };
107
108 CreatureAI* GetAI(Creature* creature) const override
109 {
110 return GetMagistersTerraceAI<npc_kalecgosAI>(creature);
111 }
112};
113
115{
116 new npc_kalecgos();
117}
uint32_t uint32
Definition: Define.h:142
@ WAYPOINT_MOTION_TYPE
Spells
Definition: PlayerAI.cpp:32
@ EMOTE_ONESHOT_LAND
Creature *const me
Definition: CreatureAI.h:61
void SetObjectScale(float scale) override
Definition: Creature.cpp:3391
bool UpdateEntry(uint32 entry, CreatureData const *data=nullptr, bool updateLevel=true)
Definition: Creature.cpp:577
uint32 ExecuteEvent()
Definition: EventMap.cpp:73
void Update(uint32 time)
Definition: EventMap.h:56
void ScheduleEvent(uint32 eventId, Milliseconds time, uint32 group=0, uint8 phase=0)
Definition: EventMap.cpp:36
SpellCastResult DoCastAOE(uint32 spellId, CastSpellExtraArgs const &args={})
Definition: UnitAI.h:161
SpellCastResult DoCast(uint32 spellId)
Definition: UnitAI.cpp:89
bool SetHover(bool enable, bool updateAnimTier=true)
Definition: Unit.cpp:12938
bool SetDisableGravity(bool disable, bool updateAnimTier=true)
Definition: Unit.cpp:12725
void HandleEmoteCommand(Emote emoteId, Player *target=nullptr, Trinity::IteratorPair< int32 const * > spellVisualKitIds={}, int32 sequenceVariation=0)
Definition: Unit.cpp:1598
CreatureAI * GetAI(Creature *creature) const override
@ SPELL_KALECGOS_TRANSFORM
@ SPELL_ORB_KILL_CREDIT
@ SPELL_CAMERA_SHAKE
@ SPELL_TRANSFORM_VISUAL
MovementPoints
@ POINT_ID_PREPARE_LANDING
@ EVENT_KALECGOS_TRANSFORM
@ EVENT_KALECGOS_LANDING
void AddSC_magisters_terrace()
@ NPC_HUMAN_KALECGOS
void MovementInform(uint32 type, uint32 pointId) override
void UpdateAI(uint32 diff) override
npc_kalecgosAI(Creature *creature)