Skip to content

Commit

Permalink
Merge branch 'Keader-shamant6' into 3.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Shauren committed Feb 8, 2016
2 parents fb9a686 + 61f92b9 commit 9b796dd
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 20 deletions.
3 changes: 3 additions & 0 deletions sql/updates/world/2016_02_08_08_world.sql
@@ -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');
19 changes: 0 additions & 19 deletions src/server/game/Spells/Auras/SpellAuraEffects.cpp
Expand Up @@ -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;
}
Expand Down
44 changes: 43 additions & 1 deletion src/server/scripts/Spells/spell_shaman.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand All @@ -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();
}

0 comments on commit 9b796dd

Please sign in to comment.