Core/Spells: handle night elf racial bonus for Shadowmeld and no longer allow Pounce and Ravage being casted while using Shadowmeld (#348)

This commit is contained in:
AG authored and GitHub committed 2022-04-13 20:42:29 +02:00
1 parent 4e3cfe283d
commit 58cc1d7f3f
4 files changed
+85 -3

No files matched your search

+12 -2
View File
@@ -76,7 +76,8 @@ enum RogueSpells
SPELL_ROGUE_SERRATED_BLADES_R1 = 14171,
SPELL_ROGUE_RUPTURE = 1943,
SPELL_ROGUE_HONOR_AMONG_THIEVES_TRIGGERED = 51699,
SPELL_ROGUE_BLACKJACK_R1 = 79123
SPELL_ROGUE_BLACKJACK_R1 = 79123,
SPELL_RACIAL_ELUSIVENESS = 21009
};
enum RogueSpellIcons
@@ -847,7 +848,8 @@ class spell_rog_stealth : public SpellScriptLoader
SPELL_ROGUE_MASTER_OF_SUBTLETY_PERIODIC,
SPELL_ROGUE_OVERKILL_TALENT,
SPELL_ROGUE_OVERKILL_POWER_REGEN,
SPELL_ROGUE_OVERKILL_PERIODIC
SPELL_ROGUE_OVERKILL_PERIODIC,
SPELL_RACIAL_ELUSIVENESS
});
}
@@ -880,10 +882,18 @@ class spell_rog_stealth : public SpellScriptLoader
target->CastSpell(target, SPELL_ROGUE_OVERKILL_PERIODIC, true);
}
void HandleSpeedIncrease(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/)
{
// Elusiveness (Racial)
if (AuraEffect const* aurEff = GetUnitOwner()->GetAuraEffect(SPELL_RACIAL_ELUSIVENESS, EFFECT_0))
amount += aurEff->GetAmount();
}
void Register() override
{
AfterEffectApply.Register(&spell_rog_stealth_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_MOD_SHAPESHIFT, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
AfterEffectRemove.Register(&spell_rog_stealth_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_MOD_SHAPESHIFT, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
DoEffectCalcAmount.Register(&spell_rog_stealth_AuraScript::HandleSpeedIncrease, EFFECT_2, SPELL_AURA_MOD_SPEED_ALWAYS);
}
};