Core/Spells: Update/Convert druid "Glyph of Starfire" for 4.3.4
This commit is contained in:
1 parent
de21f51fd7
commit
3579942438
3 files changed
+46
-11
No files matched your search
@@ -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);
|
||||
@@ -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:
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user