aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-08-01 22:02:14 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-08-01 22:02:14 +0200
commit26d090fa9ac9457819874b0a7b5df7f57e6ee504 (patch)
tree3550d980a4f2f3d756ac9c7b4ab86c3d5fe4832c
parentec34ff90239e273583f2943bd0c5568d05c917b5 (diff)
Core/Spells: Fix druid talent "Nature's Grace"
-rw-r--r--sql/updates/world/2013_08_01_02_world_spell_proc_event_434.sql8
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp108
-rw-r--r--src/server/scripts/Spells/spell_rogue.cpp2
3 files changed, 88 insertions, 30 deletions
diff --git a/sql/updates/world/2013_08_01_02_world_spell_proc_event_434.sql b/sql/updates/world/2013_08_01_02_world_spell_proc_event_434.sql
new file mode 100644
index 00000000000..907777522d9
--- /dev/null
+++ b/sql/updates/world/2013_08_01_02_world_spell_proc_event_434.sql
@@ -0,0 +1,8 @@
+DELETE FROM `spell_proc_event` WHERE `entry`=-16880;
+INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
+(-16880, 0, 7, 0x200042, 0, 0, 0, 0, 0, 0, 60);
+
+DELETE FROM `spell_script_names` WHERE `spell_id` IN (48517,48518);
+INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
+(48517,'spell_dru_eclipse_solar'),
+(48518,'spell_dru_eclipse_lunar');
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index aeda1687fe0..d4f6913d90f 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -53,6 +53,8 @@ enum DruidSpells
SPELL_DRUID_LIFEBLOOM_FINAL_HEAL = 33778,
SPELL_DRUID_LIVING_SEED_HEAL = 48503,
SPELL_DRUID_LIVING_SEED_PROC = 48504,
+ SPELL_DRUID_NATURES_GRACE = 16880,
+ SPELL_DRUID_NATURES_GRACE_TRIGGER = 16886,
SPELL_DRUID_SURVIVAL_INSTINCTS = 50322,
SPELL_DRUID_SAVAGE_ROAR = 62071,
SPELL_DRUID_STAMPEDE_BAER_RANK_1 = 81016,
@@ -61,6 +63,81 @@ enum DruidSpells
SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178
};
+// 1850 - Dash
+class spell_dru_dash : public SpellScriptLoader
+{
+ public:
+ spell_dru_dash() : SpellScriptLoader("spell_dru_dash") { }
+
+ class spell_dru_dash_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_dru_dash_AuraScript);
+
+ void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
+ {
+ // do not set speed if not in cat form
+ if (GetUnitOwner()->GetShapeshiftForm() != FORM_CAT)
+ amount = 0;
+ }
+
+ void Register() OVERRIDE
+ {
+ DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dru_dash_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_INCREASE_SPEED);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_dru_dash_AuraScript();
+ }
+};
+
+// 48517 - Eclipse (Solar)
+// 48518 - Eclipse (Lunar)
+class spell_dru_eclipse : public SpellScriptLoader
+{
+ public:
+ spell_dru_eclipse(char const* scriptName) : SpellScriptLoader(scriptName) { }
+
+ class spell_dru_eclipse_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_dru_eclipse_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_NATURES_GRACE) ||
+ !sSpellMgr->GetSpellInfo(SPELL_DRUID_NATURES_GRACE_TRIGGER))
+ return false;
+ return true;
+ }
+
+ bool Load() OVERRIDE
+ {
+ return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER;
+ }
+
+ void ApplyEffect(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
+ {
+ Unit* caster = GetCaster();
+ if (!caster)
+ return;
+
+ if (caster->ToPlayer()->GetAuraOfRankedSpell(SPELL_DRUID_NATURES_GRACE))
+ caster->ToPlayer()->RemoveSpellCooldown(SPELL_DRUID_NATURES_GRACE_TRIGGER, true);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectApply += AuraEffectApplyFn(spell_dru_eclipse_AuraScript::ApplyEffect, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, AURA_EFFECT_HANDLE_REAL);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_dru_eclipse_AuraScript();
+ }
+};
+
// 2912, 5176, 78674 - Starfire, Wrath, and Starsurge
class spell_dru_eclipse_energize : public SpellScriptLoader
{
@@ -171,35 +248,6 @@ class spell_dru_eclipse_energize : public SpellScriptLoader
}
};
-// 1850 - Dash
-class spell_dru_dash : public SpellScriptLoader
-{
- public:
- spell_dru_dash() : SpellScriptLoader("spell_dru_dash") { }
-
- class spell_dru_dash_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_dru_dash_AuraScript);
-
- void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
- {
- // do not set speed if not in cat form
- if (GetUnitOwner()->GetShapeshiftForm() != FORM_CAT)
- amount = 0;
- }
-
- void Register() OVERRIDE
- {
- DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dru_dash_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_INCREASE_SPEED);
- }
- };
-
- AuraScript* GetAuraScript() const OVERRIDE
- {
- return new spell_dru_dash_AuraScript();
- }
-};
-
// 5229 - Enrage
class spell_dru_enrage : public SpellScriptLoader
{
@@ -1107,6 +1155,8 @@ class spell_dru_t10_restoration_4p_bonus : public SpellScriptLoader
void AddSC_druid_spell_scripts()
{
new spell_dru_dash();
+ new spell_dru_eclipse("spell_dru_eclipse_lunar");
+ new spell_dru_eclipse("spell_dru_eclipse_solar");
new spell_dru_eclipse_energize();
new spell_dru_enrage();
new spell_dru_glyph_of_innervate();
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp
index 5fe0bb1b780..75fee6b749e 100644
--- a/src/server/scripts/Spells/spell_rogue.cpp
+++ b/src/server/scripts/Spells/spell_rogue.cpp
@@ -728,7 +728,7 @@ class spell_rog_stealth : public SpellScriptLoader
Unit* target = GetTarget();
// Master of Subtlety
- if (AuraEffect const* aurEff = target->GetAuraEffectOfRankedSpell(SPELL_ROGUE_MASTER_OF_SUBTLETY_PASSIVE, EFFECT_0))
+ if (AuraEffect const* aurEff = target->GetAuraEffect(SPELL_ROGUE_MASTER_OF_SUBTLETY_PASSIVE, EFFECT_0))
{
int32 basepoints0 = aurEff->GetAmount();
target->CastCustomSpell(target, SPELL_ROGUE_MASTER_OF_SUBTLETY_DAMAGE_PERCENT, &basepoints0, NULL, NULL, true);