aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-07-22 19:46:21 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-07-22 19:47:06 +0200
commit35799424389f578854149297b68b51f84a79dab1 (patch)
treebdd0a685dff869020c73125a4f0285c6279c1974
parentde21f51fd7dd5677efd288e6f24d8cd531b97abb (diff)
Core/Spells: Update/Convert druid "Glyph of Starfire" for 4.3.4
-rw-r--r--sql/updates/world/2013_07_22_09_world_spell_spell_misc_434.sql7
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp6
-rw-r--r--src/server/scripts/Spells/spell_druid.cpp44
3 files changed, 46 insertions, 11 deletions
diff --git a/sql/updates/world/2013_07_22_09_world_spell_spell_misc_434.sql b/sql/updates/world/2013_07_22_09_world_spell_spell_misc_434.sql
new file mode 100644
index 00000000000..490b0bca6ae
--- /dev/null
+++ b/sql/updates/world/2013_07_22_09_world_spell_spell_misc_434.sql
@@ -0,0 +1,7 @@
+DELETE FROM `spell_script_names` WHERE `spell_id`=54845;
+INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
+(54845,'spell_dru_glyph_of_starfire_proc');
+
+DELETE FROM `spell_proc_event` WHERE `entry`=54845;
+INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
+(54845, 0, 7, 4, 0, 0, 65536, 0, 0, 100, 0);
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index f119be464dd..f724f67a990 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -5574,12 +5574,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
{
switch (dummySpell->Id)
{
- // Glyph of Starfire
- case 54845:
- {
- triggered_spell_id = 54846;
- break;
- }
// Glyph of Bloodletting
case 54815:
{
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index d3b9d6bdaca..e977fcfba97 100644
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -40,6 +40,7 @@ enum DruidSpells
SPELL_DRUID_LUNAR_ECLIPSE = 48518,
SPELL_DRUID_ENRAGE_MOD_DAMAGE = 51185,
SPELL_DRUID_GLYPH_OF_INNERVATE = 54833,
+ SPELL_DRUID_GLYPH_OF_STARFIRE = 54846,
SPELL_DRUID_GLYPH_OF_TYPHOON = 62135,
SPELL_DRUID_IDOL_OF_FERAL_SHADOWS = 34241,
SPELL_DRUID_IDOL_OF_WORSHIP = 60774,
@@ -49,7 +50,6 @@ enum DruidSpells
SPELL_DRUID_LIFEBLOOM_FINAL_HEAL = 33778,
SPELL_DRUID_LIVING_SEED_HEAL = 48503,
SPELL_DRUID_LIVING_SEED_PROC = 48504,
- SPELL_DRUID_NATURES_SPLENDOR = 57865,
SPELL_DRUID_SURVIVAL_INSTINCTS = 50322,
SPELL_DRUID_SAVAGE_ROAR = 62071,
SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178,
@@ -277,7 +277,7 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
{
- if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_INCREASED_MOONFIRE_DURATION) || !sSpellMgr->GetSpellInfo(SPELL_DRUID_NATURES_SPLENDOR))
+ if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_INCREASED_MOONFIRE_DURATION))
return false;
return true;
}
@@ -286,7 +286,7 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader
{
Unit* caster = GetCaster();
if (Unit* unitTarget = GetHitUnit())
- if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x00000002, 0, 0, caster->GetGUID()))
+ if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x2, 0, 0, caster->GetGUID()))
{
Aura* aura = aurEff->GetBase();
@@ -294,8 +294,6 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader
uint32 countMax = aura->GetSpellInfo()->GetMaxDuration() + 9000;
if (caster->HasAura(SPELL_DRUID_INCREASED_MOONFIRE_DURATION))
countMax += 3000;
- if (caster->HasAura(SPELL_DRUID_NATURES_SPLENDOR))
- countMax += 3000;
if (countMin < countMax)
{
@@ -317,6 +315,41 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader
}
};
+// 54845 - Glyph of Starfire
+class spell_dru_glyph_of_starfire_proc : public SpellScriptLoader
+{
+ public:
+ spell_dru_glyph_of_starfire_proc() : SpellScriptLoader("spell_dru_glyph_of_starfire_proc") { }
+
+ class spell_dru_glyph_of_starfire_proc_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_dru_glyph_of_starfire_proc_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_GLYPH_OF_STARFIRE))
+ return false;
+ return true;
+ }
+
+ void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
+ {
+ PreventDefaultAction();
+ GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_GLYPH_OF_STARFIRE, true, NULL, aurEff);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectProc += AuraEffectProcFn(spell_dru_glyph_of_starfire_proc_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_dru_glyph_of_starfire_proc_AuraScript();
+ }
+};
+
// 34246 - Idol of the Emerald Queen
// 60779 - Idol of Lush Moss
class spell_dru_idol_lifebloom : public SpellScriptLoader
@@ -1154,6 +1187,7 @@ void AddSC_druid_spell_scripts()
new spell_dru_enrage();
new spell_dru_glyph_of_innervate();
new spell_dru_glyph_of_starfire();
+ new spell_dru_glyph_of_starfire_proc();
new spell_dru_idol_lifebloom();
new spell_dru_innervate();
new spell_dru_insect_swarm();