Core/Scripts: Fix startup errors
This commit is contained in:
1 parent
2de8d6b4bb
commit
35aa198984
6 files changed
+106
-102
No files matched your search
@@ -1083,7 +1083,7 @@ class spell_dru_swift_flight_passive : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// -33943 - Flight Form
|
||||
// 33943 - Flight Form (Shapeshift)
|
||||
class spell_dru_flight_form : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -52,6 +52,7 @@ enum RogueSpells
|
||||
SPELL_ROGUE_TRICKS_OF_THE_TRADE_PROC = 59628,
|
||||
SPELL_ROGUE_SERRATED_BLADES_R1 = 14171,
|
||||
SPELL_ROGUE_RUPTURE = 1943,
|
||||
SPELL_ROGUE_HONOR_AMONG_THIEVES_TRIGGERED = 51699
|
||||
};
|
||||
|
||||
enum RogueSpellIcons
|
||||
@@ -1008,6 +1009,58 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// -51698 - Honor Among Thieves
|
||||
class spell_rog_honor_among_thieves : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_rog_honor_among_thieves() : SpellScriptLoader("spell_rog_honor_among_thieves") { }
|
||||
|
||||
class spell_rog_honor_among_thieves_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_rog_honor_among_thieves_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_HONOR_AMONG_THIEVES_TRIGGERED))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster)
|
||||
return false;
|
||||
|
||||
return !caster->GetSpellHistory()->HasCooldown(SPELL_ROGUE_HONOR_AMONG_THIEVES_TRIGGERED);
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
if (Player* player = caster->ToPlayer())
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*player, player->GetTarget()))
|
||||
caster->CastSpell(target, SPELL_ROGUE_HONOR_AMONG_THIEVES_TRIGGERED, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD), nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_rog_honor_among_thieves_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_rog_honor_among_thieves_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_rog_honor_among_thieves_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_rogue_spell_scripts()
|
||||
{
|
||||
new spell_rog_blade_flurry();
|
||||
@@ -1028,4 +1081,5 @@ void AddSC_rogue_spell_scripts()
|
||||
new spell_rog_tricks_of_the_trade();
|
||||
new spell_rog_tricks_of_the_trade_proc();
|
||||
new spell_rog_serrated_blades();
|
||||
new spell_rog_honor_among_thieves();
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
Reference in new issue
Block a user