Core/Spells: Fixed Totemic Mastery (Tier 6 2P) Shaman

This commit is contained in:
Keader authored and Shauren committed 2016-02-08 22:28:47 +01:00
1 parent fb9a686672
commit 61f92b9a89
3 files changed
+46 -20

No files matched your search

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_sha_totemic_mastery';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(38443, 'spell_sha_totemic_mastery');
@@ -5619,25 +5619,6 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
target->RemoveAurasDueToSpell(28820);
return;
}
// Totemic Mastery (Skyshatter Regalia (Shaman Tier 6) - bonus)
case 38443:
{
bool all = true;
for (int i = SUMMON_SLOT_TOTEM; i < MAX_TOTEM_SLOT; ++i)
{
if (!target->m_SummonSlot[i])
{
all = false;
break;
}
}
if (all)
target->CastSpell(target, 38437, true, NULL, this);
else
target->RemoveAurasDueToSpell(38437);
return;
}
}
break;
}
+43 -1
View File
@@ -55,7 +55,8 @@ enum ShamanSpells
SPELL_SHAMAN_TOTEM_EARTHBIND_EARTHGRAB = 64695,
SPELL_SHAMAN_TOTEM_EARTHBIND_TOTEM = 6474,
SPELL_SHAMAN_TOTEM_EARTHEN_POWER = 59566,
SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042
SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042,
SPELL_SHAMAN_TOTEMIC_MASTERY = 38437
};
enum ShamanSpellIcons
@@ -1025,6 +1026,46 @@ class spell_sha_thunderstorm : 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_proc();
@@ -1048,4 +1089,5 @@ void AddSC_shaman_spell_scripts()
new spell_sha_mana_tide_totem();
new spell_sha_sentry_totem();
new spell_sha_thunderstorm();
new spell_sha_totemic_mastery();
}