TrinityCore
Loading...
Searching...
No Matches
uldaman.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#include "ScriptMgr.h"
19#include "GameObject.h"
20#include "GameObjectAI.h"
21#include "InstanceScript.h"
22#include "Player.h"
23#include "ScriptedCreature.h"
24#include "uldaman.h"
25
36
37// 4857 - Stone Keeper
39{
40 npc_stone_keeper(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
41
50
51 void JustEngagedWith(Unit* /*who*/) override
52 {
54
55 _scheduler.Schedule(10s, 15s, [this](TaskContext& task)
56 {
58 task.Repeat(10s, 15s);
59 });
60 }
61
62 void DoAction(int32 action) override
63 {
64 if (action == ACTION_KEEPER_ACTIVATED)
65 {
68 me->SetUninteractible(false);
69 me->SetImmuneToAll(false);
71 }
72 }
73
83
89
90 void JustDied(Unit* /*killer*/) override
91 {
93 }
94
95 void UpdateAI(uint32 diff) override
96 {
97 if (!UpdateVictim())
98 return;
99
100 _scheduler.Update(diff);
101 }
102
103private:
106};
107
108// 124371 - Keystone
110{
111 go_keystone_chamber(GameObject* go) : GameObjectAI(go), _instance(go->GetInstanceScript()) { }
112
113 bool OnGossipHello(Player* /*player*/) override
114 {
116 return false;
117 }
118
119private:
121};
122
int32_t int32
Definition Define.h:150
uint32_t uint32
Definition Define.h:154
@ IN_PROGRESS
@ FAIL
EvadeReason
void DoZoneInCombat()
Definition CreatureAI.h:169
virtual void EnterEvadeMode(EvadeReason why=EvadeReason::Other)
bool UpdateVictim()
Creature *const me
Definition CreatureAI.h:63
void SetImmuneToAll(bool apply) override
Definition Creature.h:187
virtual bool SetBossState(uint32 id, EncounterState state)
TaskContext & Repeat(TaskScheduler::duration_t duration)
TaskScheduler & CancelAll()
TaskScheduler & Schedule(duration_t time, task_handler_t task)
TaskScheduler & Update()
Update the scheduler to the current time.
SpellCastResult DoCastSelf(uint32 spellId, CastSpellExtraArgs const &args={})
Definition UnitAI.h:160
Definition Unit.h:647
void SetFaction(uint32 faction) override
Definition Unit.h:887
void SetUninteractible(bool apply)
Definition Unit.cpp:8583
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint32 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
Definition Unit.cpp:3992
virtual void SetData(uint32, uint32)
Definition ZoneScript.h:100
bool OnGossipHello(Player *) override
Definition uldaman.cpp:113
go_keystone_chamber(GameObject *go)
Definition uldaman.cpp:111
InstanceScript * _instance
Definition uldaman.cpp:120
void JustEngagedWith(Unit *) override
Definition uldaman.cpp:51
TaskScheduler _scheduler
Definition uldaman.cpp:105
void JustDied(Unit *) override
Definition uldaman.cpp:90
void DoAction(int32 action) override
Definition uldaman.cpp:62
void UpdateAI(uint32 diff) override
Definition uldaman.cpp:95
void JustReachedHome() override
Definition uldaman.cpp:74
InstanceScript * _instance
Definition uldaman.cpp:104
npc_stone_keeper(Creature *creature)
Definition uldaman.cpp:40
void EnterEvadeMode(EvadeReason why) override
Definition uldaman.cpp:84
void JustAppeared() override
Definition uldaman.cpp:42
void AddSC_uldaman()
Definition uldaman.cpp:123
StoneKeeper
Definition uldaman.cpp:27
@ SPELL_TRAMPLE
Definition uldaman.cpp:30
@ SPELL_DETECTION
Definition uldaman.cpp:29
@ FACTION_TITAN_2
Definition uldaman.cpp:33
@ FACTION_TITAN_3
Definition uldaman.cpp:34
@ SPELL_STONED
Definition uldaman.cpp:28
@ SPELL_SELF_DESTRUCT
Definition uldaman.cpp:31
@ ACTION_KEEPER_ACTIVATED
Definition uldaman.h:77
#define RegisterUldamanGameObjectAI(ai_name)
Definition uldaman.h:94
@ DATA_STONE_KEEPERS
Definition uldaman.h:39
@ DATA_IRONAYA_INTRO
Definition uldaman.h:41
#define RegisterUldamanCreatureAI(ai_name)
Definition uldaman.h:93