Core/Scripts: Fix startup errors

This commit is contained in:
ariel- committed 2016-02-21 20:32:48 -03:00
1 parent 2de8d6b4bb
commit 35aa198984
6 files changed
+106 -102

No files matched your search

+43 -1
View File
@@ -61,7 +61,8 @@ enum ShamanSpells
SPELL_SHAMAN_TOTEM_EARTHBIND_TOTEM = 6474,
SPELL_SHAMAN_TOTEM_EARTHEN_POWER = 59566,
SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042,
SPELL_SHAMAN_TIDAL_WAVES = 53390
SPELL_SHAMAN_TIDAL_WAVES = 53390,
SPELL_SHAMAN_TOTEMIC_MASTERY = 38437
};
enum ShamanSpellIcons
@@ -1231,6 +1232,46 @@ class spell_sha_tidal_waves : public SpellScriptLoader
}
};
// 38443 - Totemic Mastery (Tier 6 - 2P)
class spell_sha_totemic_mastery : public SpellScriptLoader
{
public:
spell_sha_totemic_mastery() : SpellScriptLoader("spell_sha_totemic_mastery") { }
class spell_sha_totemic_mastery_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_totemic_mastery_AuraScript);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_TOTEMIC_MASTERY))
return false;
return true;
}
void HandleDummy(AuraEffect const* /*aurEff*/)
{
Unit* target = GetTarget();
for (uint8 i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i)
if (!target->m_SummonSlot[i])
return;
target->CastSpell(target, SPELL_SHAMAN_TOTEMIC_MASTERY, true);
PreventDefaultAction();
}
void Register() override
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_sha_totemic_mastery_AuraScript::HandleDummy, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_totemic_mastery_AuraScript();
}
};
void AddSC_shaman_spell_scripts()
{
new spell_sha_ancestral_awakening();
@@ -1260,4 +1301,5 @@ void AddSC_shaman_spell_scripts()
new spell_sha_telluric_currents();
new spell_sha_thunderstorm();
new spell_sha_tidal_waves();
new spell_sha_totemic_mastery();
}