aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-07-21 15:28:03 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-07-21 15:28:14 +0200
commite5cba4b07151ecf7d51fa33d2dd7574c7e14035c (patch)
treeb46fdc027d57c970027ad6dc8795cb8c45d7953f
parentfaa3dc9608a5d630e7c732de30dd8bc6b0eba124 (diff)
Core/Spells: Convert/Update druid "Glyph of Innervate" for 4.3.4
-rw-r--r--cmake/compiler/msvc/settings.cmake2
-rw-r--r--sql/updates/world/2013_07_21_04_world_spell_script_misc_434.sql7
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp11
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp44
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp6
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp7
6 files changed, 55 insertions, 22 deletions
diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake
index 423998f664c..baa5e66f9ce 100644
--- a/cmake/compiler/msvc/settings.cmake
+++ b/cmake/compiler/msvc/settings.cmake
@@ -62,4 +62,4 @@ endif()
# Enable and treat as errors the following warnings to easily detect virtual function signature failures:
# 'function' : member function does not override any base class virtual member function
# 'virtual_function' : no override available for virtual member function from base 'class'; function is hidden
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /we4263 /we4264")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /we4263 /we4264 /W4")
diff --git a/sql/updates/world/2013_07_21_04_world_spell_script_misc_434.sql b/sql/updates/world/2013_07_21_04_world_spell_script_misc_434.sql
new file mode 100644
index 00000000000..375d0bcaa1b
--- /dev/null
+++ b/sql/updates/world/2013_07_21_04_world_spell_script_misc_434.sql
@@ -0,0 +1,7 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=54832;
+INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
+(54832,'spell_dru_glyph_of_innervate');
+
+DELETE FROM `spell_proc_event` WHERE `entry`=54832;
+INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
+(54832, 0, 7, 0, 4096, 0, 16384, 0, 0, 100, 0);
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 96e41155764..9d96b920ad8 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -5628,17 +5628,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
{
switch (dummySpell->Id)
{
- // Glyph of Innervate
- case 54832:
- {
- if (procSpell->SpellIconID != 62)
- return false;
-
- basepoints0 = int32(CalculatePct(GetCreatePowers(POWER_MANA), triggerAmount) / 5);
- triggered_spell_id = 54833;
- target = this;
- break;
- }
// Glyph of Starfire
case 54845:
{
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index fa50d7b04ec..d3b9d6bdaca 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -39,6 +39,7 @@ enum DruidSpells
SPELL_DRUID_SOLAR_ECLIPSE = 48517,
SPELL_DRUID_LUNAR_ECLIPSE = 48518,
SPELL_DRUID_ENRAGE_MOD_DAMAGE = 51185,
+ SPELL_DRUID_GLYPH_OF_INNERVATE = 54833,
SPELL_DRUID_GLYPH_OF_TYPHOON = 62135,
SPELL_DRUID_IDOL_OF_FERAL_SHADOWS = 34241,
SPELL_DRUID_IDOL_OF_WORSHIP = 60774,
@@ -222,6 +223,48 @@ class spell_dru_enrage : public SpellScriptLoader
}
};
+// 54832 - Glyph of Innervate
+class spell_dru_glyph_of_innervate : public SpellScriptLoader
+{
+ public:
+ spell_dru_glyph_of_innervate() : SpellScriptLoader("spell_dru_glyph_of_innervate") { }
+
+ class spell_dru_glyph_of_innervate_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_dru_glyph_of_innervate_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_GLYPH_OF_INNERVATE))
+ return false;
+ return true;
+ }
+
+ bool CheckProc(ProcEventInfo& eventInfo)
+ {
+ // Not proc from self Innervate
+ return GetTarget() != eventInfo.GetProcTarget();
+ }
+
+ void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
+ {
+ PreventDefaultAction();
+ GetTarget()->CastSpell(GetTarget(), SPELL_DRUID_GLYPH_OF_INNERVATE, true, NULL, aurEff);
+ }
+
+ void Register() OVERRIDE
+ {
+ DoCheckProc += AuraCheckProcFn(spell_dru_glyph_of_innervate_AuraScript::CheckProc);
+ OnEffectProc += AuraEffectProcFn(spell_dru_glyph_of_innervate_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_dru_glyph_of_innervate_AuraScript();
+ }
+};
+
// 54846 - Glyph of Starfire
class spell_dru_glyph_of_starfire : public SpellScriptLoader
{
@@ -1109,6 +1152,7 @@ void AddSC_druid_spell_scripts()
new spell_dru_dash();
new spell_dru_eclipse_energize();
new spell_dru_enrage();
+ new spell_dru_glyph_of_innervate();
new spell_dru_glyph_of_starfire();
new spell_dru_idol_lifebloom();
new spell_dru_innervate();
diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp
index af97959f692..a5ae42e13aa 100644
--- a/src/server/scripts/Spells/spell_priest.cpp
+++ b/src/server/scripts/Spells/spell_priest.cpp
@@ -55,7 +55,7 @@ enum PriestSpells
SPELL_PRIEST_SHADOWFORM_VISUAL_WITH_GLYPH = 107904,
SPELL_PRIEST_SHADOW_WORD_DEATH = 32409,
SPELL_PRIEST_T9_HEALING_2P = 67201,
- SPELL_PRIEST_VAMPRIC_EMBRACE_HEAL = 15290,
+ SPELL_PRIEST_VAMPIRIC_EMBRACE_HEAL = 15290,
SPELL_PRIEST_VAMPIRIC_TOUCH_DISPEL = 64085,
};
@@ -907,7 +907,7 @@ class spell_pri_vampiric_embrace : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
- if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_VAMPRIC_EMBRACE_HEAL))
+ if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_VAMPIRIC_EMBRACE_HEAL))
return false;
return true;
}
@@ -924,7 +924,7 @@ class spell_pri_vampiric_embrace : public SpellScriptLoader
int32 self = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount()));
int32 team = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), aurEff->GetAmount() / 2));
- GetTarget()->CastCustomSpell((Unit*)NULL, SPELL_PRIEST_VAMPRIC_EMBRACE_HEAL, &team, &self, NULL, true, NULL, aurEff);
+ GetTarget()->CastCustomSpell((Unit*)NULL, SPELL_PRIEST_VAMPIRIC_EMBRACE_HEAL, &team, &self, NULL, true, NULL, aurEff);
}
void Register() OVERRIDE
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp
index 7698bec5111..d4f67e4acc9 100644
--- a/src/server/scripts/Spells/spell_warlock.cpp
+++ b/src/server/scripts/Spells/spell_warlock.cpp
@@ -80,7 +80,6 @@ enum MiscSpells
SPELL_PRIEST_SHADOW_WORD_DEATH = 32409
};
-
// -85113 - Aftermath
class spell_warl_aftermath : public SpellScriptLoader
{
@@ -104,15 +103,9 @@ class spell_warl_aftermath : public SpellScriptLoader
{
PreventDefaultAction();
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "procSpell: %u - blub", eventInfo.GetDamageInfo()->GetSpellInfo()->Id);
if (roll_chance_i(aurEff->GetAmount()))
- {
GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_WARLOCK_AFTERMATH_STUN, true, NULL, aurEff);
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "procSpell: %u -- proc", eventInfo.GetDamageInfo()->GetSpellInfo()->Id);
- }
}
- else
- TC_LOG_ERROR(LOG_FILTER_GENERAL, "procSpell: %u - xxx", eventInfo.GetDamageInfo()->GetSpellInfo()->Id);
}
void Register() OVERRIDE