aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Outland
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2016-09-25 20:48:31 -0300
committerariel- <ariel-@users.noreply.github.com>2016-10-04 20:21:58 -0300
commit2ff855054f52bf2dcf81aa7a7da7bab7f8a99686 (patch)
tree29f25fc8bcfede91c6d4960c9ecb8bd1a8ddab49 /src/server/scripts/Outland
parente641d0c7d71bdb21e443bf52bf508b1581e07839 (diff)
Core/Scripts: Convert spells to new proc system
- Converted Unit::HandleDummyAuraProc function to AuraScripts * Extra: DMC: Madness now uses DB texts. yay! * Extra: improvements on Imp. Spell Reflection (range and max targets, filter caster with conditions) - Fixed Glyph of Succubus. (Closes #6599) - Changed old (not-blizz) behavior of Vampiric Embrace: * Before: party heal affected the priest too and self heal was reduced by that amount to not over-heal * Now: self heal amount not affected, rather filter the priest out of the party heal using conditions :) - Solve bug in AQ 3p set bonus, it should only trigger when healing others, not self heals. - Priest T10 2p bonus (heal) now rolls its effect properly - Use brand new GetEffectiveHeal to fix #17142 - While we're at it, also close #17034 for good - Converted Unit::HandleAuraProc function to AuraScripts (#17941) - Converted Unit::HandleAuraProc function to AuraScripts (cont'd) (#17955) - Corrected Flametongue weapon damage formula - Actually check offhand weapon for flametongue in Lava Lash script - Implemented halved proc chance for Missile Barrage on Arcane Barrage, Fireball, Frostbolt and Frostfire Bolt cast - Converted Unit::HandleProcTriggerSpell function to AuraScripts (#17956) - De-hack Earth shield. Fixes #13808 - Updated Honor among Thieves - Implemented mana proc for Mark of Conquest in case of ranged attack - Fixed Scent of Blood giving more stacks than the talent rank currently learnt. - Ported old proc table. Proc system is dead. Long live the proc system! - Recklessness should get charges removed per cast. Closes #15529 - Use proc system to remove Molten Core charges on Incinerate/Soul Fire cast. Closes #15942 Closes #3463 Closes #5401 Closes #15595 Closes #15974 Closes #16679 Closes #17925
Diffstat (limited to 'src/server/scripts/Outland')
-rw-r--r--src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.cpp66
-rw-r--r--src/server/scripts/Outland/boss_doomlord_kazzak.cpp60
-rw-r--r--src/server/scripts/Outland/outland_script_loader.cpp2
3 files changed, 118 insertions, 10 deletions
diff --git a/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.cpp b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.cpp
new file mode 100644
index 00000000000..0aba111b6ae
--- /dev/null
+++ b/src/server/scripts/Outland/Auchindoun/ShadowLabyrinth/shadow_labyrinth.cpp
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "SpellScript.h"
+
+enum Spells
+{
+ SPELL_MARK_OF_MALICE_TRIGGERED = 33494
+};
+
+class spell_mark_of_malice : public SpellScriptLoader
+{
+ public:
+ spell_mark_of_malice() : SpellScriptLoader("spell_mark_of_malice") { }
+
+ class spell_mark_of_malice_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_mark_of_malice_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_MARK_OF_MALICE_TRIGGERED))
+ return false;
+ return true;
+ }
+
+ void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
+ {
+ PreventDefaultAction();
+ // just drop charges
+ if (aurEff->GetBase()->GetCharges() > 1)
+ return;
+
+ GetTarget()->CastSpell(GetTarget(), SPELL_MARK_OF_MALICE_TRIGGERED, true);
+ }
+
+ void Register() override
+ {
+ OnEffectProc += AuraEffectProcFn(spell_mark_of_malice_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_mark_of_malice_AuraScript();
+ }
+};
+
+void AddSC_shadow_labyrinth()
+{
+ new spell_mark_of_malice();
+}
diff --git a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
index d4f0637c0d1..f305c1e47be 100644
--- a/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
+++ b/src/server/scripts/Outland/boss_doomlord_kazzak.cpp
@@ -34,16 +34,17 @@ enum Texts
enum Spells
{
- SPELL_SHADOW_VOLLEY = 32963,
- SPELL_CLEAVE = 31779,
- SPELL_THUNDERCLAP = 36706,
- SPELL_VOID_BOLT = 39329,
- SPELL_MARK_OF_KAZZAK = 32960,
- SPELL_MARK_OF_KAZZAK_DAMAGE = 32961,
- SPELL_ENRAGE = 32964,
- SPELL_CAPTURE_SOUL = 32966,
- SPELL_TWISTED_REFLECTION = 21063,
- SPELL_BERSERK = 32965,
+ SPELL_SHADOW_VOLLEY = 32963,
+ SPELL_CLEAVE = 31779,
+ SPELL_THUNDERCLAP = 36706,
+ SPELL_VOID_BOLT = 39329,
+ SPELL_MARK_OF_KAZZAK = 32960,
+ SPELL_MARK_OF_KAZZAK_DAMAGE = 32961,
+ SPELL_ENRAGE = 32964,
+ SPELL_CAPTURE_SOUL = 32966,
+ SPELL_TWISTED_REFLECTION = 21063,
+ SPELL_TWISTED_REFLECTION_HEAL = 21064,
+ SPELL_BERSERK = 32965,
};
enum Events
@@ -222,8 +223,47 @@ class spell_mark_of_kazzak : public SpellScriptLoader
}
};
+class spell_twisted_reflection : public SpellScriptLoader
+{
+ public:
+ spell_twisted_reflection() : SpellScriptLoader("spell_twisted_reflection") { }
+
+ class spell_twisted_reflection_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_twisted_reflection_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_TWISTED_REFLECTION_HEAL))
+ return false;
+ return true;
+ }
+
+ void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
+ {
+ PreventDefaultAction();
+ DamageInfo* damageInfo = eventInfo.GetDamageInfo();
+ if (!damageInfo || !damageInfo->GetDamage())
+ return;
+
+ eventInfo.GetActionTarget()->CastSpell(eventInfo.GetActor(), SPELL_TWISTED_REFLECTION_HEAL, true);
+ }
+
+ void Register() override
+ {
+ OnEffectProc += AuraEffectProcFn(spell_twisted_reflection_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const override
+ {
+ return new spell_twisted_reflection_AuraScript();
+ }
+};
+
void AddSC_boss_doomlordkazzak()
{
new boss_doomlord_kazzak();
new spell_mark_of_kazzak();
+ new spell_twisted_reflection();
}
diff --git a/src/server/scripts/Outland/outland_script_loader.cpp b/src/server/scripts/Outland/outland_script_loader.cpp
index ed2c21da6c3..e5c025a43cf 100644
--- a/src/server/scripts/Outland/outland_script_loader.cpp
+++ b/src/server/scripts/Outland/outland_script_loader.cpp
@@ -37,6 +37,7 @@ void AddSC_boss_ambassador_hellmaw();
void AddSC_boss_blackheart_the_inciter();
void AddSC_boss_grandmaster_vorpil();
void AddSC_boss_murmur();
+void AddSC_shadow_labyrinth();
void AddSC_instance_shadow_labyrinth();
// Black Temple
@@ -159,6 +160,7 @@ void AddOutlandScripts()
AddSC_boss_blackheart_the_inciter();
AddSC_boss_grandmaster_vorpil();
AddSC_boss_murmur();
+ AddSC_shadow_labyrinth();
AddSC_instance_shadow_labyrinth();
// Black Temple