TrinityCore
ruby_life_pools.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 "SpellAuras.h"
19#include "SpellScript.h"
20#include "ScriptMgr.h"
21#include "Unit.h"
22#include "ruby_life_pools.h"
23
25{
26 // Flashfrost Chillweaver
28
29 // Primal Juggernaut
30 SPELL_EXCAVATE = 373497
31};
32
33// 371652 - Executed
35{
36 void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
37 {
38 Unit* target = GetTarget();
42 }
43
44 void Register() override
45 {
47 }
48};
49
50// 384933 - Ice Shield
52{
53 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
54 {
55 Unit* target = GetTarget();
56
57 if (Aura* iceShield = target->GetAura(SPELL_ICE_SHIELD))
58 iceShield->RefreshDuration();
59 }
60
61 void Register() override
62 {
64 }
65};
66
67// 372793 - Excavate
69{
70 void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
71 {
72 if (Unit* caster = GetCaster())
73 caster->CastSpell(GetTarget(), SPELL_EXCAVATE, true);
74 }
75
76 void Register() override
77 {
79 }
80};
81
82// 395029 - Storm Infusion
84{
86 {
87 dest.RelocateOffset({ 9.0f, 0.0f, 4.0f, 0.0f });
88 }
89
90 void Register() override
91 {
93 }
94};
95
97{
102}
#define RegisterSpellScript(spell_script)
Definition: ScriptMgr.h:1369
@ EFFECT_1
Definition: SharedDefines.h:31
@ EFFECT_0
Definition: SharedDefines.h:30
@ TARGET_DEST_DEST
AuraEffectHandleModes
@ AURA_EFFECT_HANDLE_REAL
@ SPELL_AURA_PERIODIC_DUMMY
@ SPELL_AURA_MOD_STUN
#define AuraEffectPeriodicFn(F, I, N)
Definition: SpellScript.h:2046
#define SpellDestinationTargetSelectFn(F, I, N)
Definition: SpellScript.h:874
#define AuraEffectApplyFn(F, I, N, M)
Definition: SpellScript.h:2029
@ UNIT_FLAG2_FEIGN_DEATH
Definition: UnitDefines.h:194
@ UNIT_FLAG3_FAKE_DEAD
Definition: UnitDefines.h:259
@ UNIT_FLAG_PREVENT_EMOTES_FROM_CHAT_TEXT
Definition: UnitDefines.h:173
HookList< EffectPeriodicHandler > OnEffectPeriodic
Definition: SpellScript.h:2045
Unit * GetCaster() const
Unit * GetTarget() const
HookList< EffectApplyHandler > OnEffectApply
Definition: SpellScript.h:2024
HookList< DestinationTargetSelectHandler > OnDestinationTargetSelect
Definition: SpellScript.h:873
Definition: Unit.h:627
void SetUnitFlag3(UnitFlags3 flags)
Definition: Unit.h:843
void SetUnitFlag2(UnitFlags2 flags)
Definition: Unit.h:838
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint32 reqEffMask=0) const
Definition: Unit.cpp:4560
void SetUnitFlag(UnitFlags flags)
Definition: Unit.h:833
void HandleEffectPeriodic(AuraEffect const *)
void HandleEffectApply(AuraEffect const *, AuraEffectHandleModes)
void HandleEffectPeriodic(AuraEffect const *)
void SetDest(SpellDestination &dest)
void AddSC_ruby_life_pools()
RLPSpells
@ SPELL_EXCAVATE
@ SPELL_ICE_SHIELD
void RelocateOffset(Position const &offset)
Definition: Spell.cpp:122