TrinityCore
Loading...
Searching...
No Matches
zulgurub.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 "SpellScript.h"
20#include "zulgurub.h"
21#include "GameEventMgr.h"
22#include "GameObject.h"
23#include "GameObjectAI.h"
24#include "Unit.h"
25
26/*######
27 ## go_brazier_of_madness
28 ######*/
29
38
39using EventPair = std::pair<EventGameIds, ZGCreatureIds>;
47
48Position const MadnessSpawnPos = { -11901.229f, -1906.366f, 65.358f, 0.942f };
49
51{
52public:
53 go_brazier_of_madness() : GameObjectScript("go_brazier_of_madness") { }
54
56 {
58
59 bool OnGossipHello(Player* /*player*/) override
60 {
61 for (auto const& [eventId, npcEntry] : BrazierOfMadnessEventCreatures)
62 {
63 if (sGameEventMgr->IsActiveEvent(eventId))
64 {
66 break;
67 }
68 }
69 return false;
70 }
71 };
72
73 GameObjectAI* GetAI(GameObject* go) const override
74 {
75 return new go_brazier_of_madnessAI(go);
76 }
77};
78
83
84// 24320 - Poisonous Blood
104
106{
107 SPELL_AXE_FLURRY = 24020
109
110// 24019 - Axe Flurry
112{
114
115 bool Validate(SpellInfo const* /*spellInfo*/) override
116 {
118 }
119
120 void HandleDummy(SpellEffIndex /*effIndex*/)
121 {
123 }
124
129};
130
#define sGameEventMgr
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
#define RegisterSpellScript(spell_script)
Definition ScriptMgr.h:1128
SpellEffIndex
@ EFFECT_0
@ SPELL_EFFECT_DUMMY
@ SPELL_EFFECT_SCRIPT_EFFECT
#define SpellEffectFn(F, I, N)
GameObject *const me
Unit * GetCaster() const
Unit * GetHitUnit() const
HookList< EffectHandler > OnEffectHitTarget
SpellCastResult CastSpell(CastSpellTargetArg const &targets, uint32 spellId, CastSpellExtraArgs const &args={ })
Definition Object.cpp:2832
TempSummon * SummonCreature(uint32 entry, Position const &pos, TempSummonType despawnType=TEMPSUMMON_MANUAL_DESPAWN, Milliseconds despawnTime=0s, uint32 vehId=0, uint32 spellId=0, ObjectGuid privateObjectOwner=ObjectGuid::Empty)
Definition Object.cpp:1992
static bool ValidateSpellInfo(std::initializer_list< uint32 > spellIds)
GameObjectAI * GetAI(GameObject *go) const override
Definition zulgurub.cpp:73
PrepareSpellScript(spell_zulgurub_axe_flurry)
bool Validate(SpellInfo const *) override
Definition zulgurub.cpp:115
void HandleDummy(SpellEffIndex)
Definition zulgurub.cpp:120
void Register() override
Definition zulgurub.cpp:125
void HandleScript(SpellEffIndex)
Definition zulgurub.cpp:94
bool Validate(SpellInfo const *) override
Definition zulgurub.cpp:89
PrepareSpellScript(spell_zulgurub_poisonous_blood)
std::pair< EventGameIds, ZGCreatureIds > EventPair
Definition zulgurub.cpp:39
void AddSC_zulgurub()
Definition zulgurub.cpp:131
constexpr EventPair BrazierOfMadnessEventCreatures[]
Definition zulgurub.cpp:40
AxeFlurry
Definition zulgurub.cpp:106
@ SPELL_AXE_FLURRY
Definition zulgurub.cpp:107
PoisonousBlood
Definition zulgurub.cpp:80
@ SPELL_POISONOUS_BLOOD
Definition zulgurub.cpp:81
Position const MadnessSpawnPos
Definition zulgurub.cpp:48
EventGameIds
Definition zulgurub.cpp:31
@ EVENT_EDGE_OF_MADNESS_RENATAKI
Definition zulgurub.cpp:35
@ EVENT_EDGE_OF_MADNESS_HAZZARAH
Definition zulgurub.cpp:34
@ EVENT_EDGE_OF_MADNESS_WUSHOOLAY
Definition zulgurub.cpp:36
@ EVENT_EDGE_OF_MADNESS_GRILEK
Definition zulgurub.cpp:33
@ NPC_HAZZARAH
Definition zulgurub.h:66
@ NPC_RENATAKI
Definition zulgurub.h:68
@ NPC_WUSHOOLAY
Definition zulgurub.h:67
@ NPC_GRILEK
Definition zulgurub.h:69