Core/Spells: ported SpellModOp definitions from master branch

This commit is contained in:
Ovahlord committed 2022-09-17 11:56:54 +02:00
1 parent 3de0b005d5
commit ef3632109d
20 files changed
+179 -229

No files matched your search

+1 -1
View File
@@ -549,7 +549,7 @@ class spell_dru_idol_lifebloom : public AuraScript
if (!spellMod)
{
spellMod = new SpellModifier(GetAura());
spellMod->op = SPELLMOD_DOT;
spellMod->op = SpellModOp::PeriodicHealingAndDamage;
spellMod->type = SPELLMOD_FLAT;
spellMod->spellId = GetId();
spellMod->mask = GetSpellInfo()->Effects[aurEff->GetEffIndex()].SpellClassMask;
@@ -33,7 +33,6 @@
enum HunterSpells
{
SPELL_HUNTER_AIMED_SHOT = 19434,
SPELL_HUNTER_AIMED_SHOT_INSTANT = 82928,
SPELL_HUNTER_BESTIAL_WRATH = 19574,
SPELL_HUNTER_CALL_PET_1 = 883,
SPELL_HUNTER_CALL_PET_2 = 83242,
@@ -242,34 +241,6 @@ class spell_hun_disengage : public SpellScript
}
};
// 82926 - Fire!
class spell_hun_fire : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_HUNTER_AIMED_SHOT_INSTANT });
}
void HandleEffectCalcSpellMod(AuraEffect const* aurEff, SpellModifier*& spellMod)
{
if (!spellMod)
{
spellMod = new SpellModifier(GetAura());
spellMod->op = SPELLMOD_CASTING_TIME;
spellMod->type = SPELLMOD_PCT;
spellMod->spellId = GetId();
spellMod->mask = GetSpellInfo()->Effects[aurEff->GetEffIndex()].SpellClassMask;
}
spellMod->value = -aurEff->GetAmount();
}
void Register() override
{
DoEffectCalcSpellMod.Register(&spell_hun_fire::HandleEffectCalcSpellMod, EFFECT_0, SPELL_AURA_DUMMY);
}
};
// -19572 - Improved Mend Pet
class spell_hun_improved_mend_pet : public AuraScript
{
@@ -1477,7 +1448,6 @@ void AddSC_hunter_spell_scripts()
RegisterSpellScript(spell_hun_crouching_tiger_hidden_chimera);
RegisterSpellScript(spell_hun_disengage);
RegisterSpellScript(spell_hun_fervor);
RegisterSpellScript(spell_hun_fire);
RegisterSpellAndAuraScriptPair(spell_hun_focus_fire, spell_hun_focus_fire_AuraScript);
RegisterSpellScript(spell_hun_frenzy_effect);
RegisterSpellScript(spell_hun_glyph_of_kill_shot);
+1 -1
View File
@@ -426,7 +426,7 @@ class spell_pal_exorcism_and_holy_wrath_damage : public AuraScript
if (!spellMod)
{
spellMod = new SpellModifier(aurEff->GetBase());
spellMod->op = SPELLMOD_DAMAGE;
spellMod->op = SpellModOp::HealingAndDamage;
spellMod->type = SPELLMOD_FLAT;
spellMod->spellId = GetId();
spellMod->mask[1] = 0x200002;
+1 -1
View File
@@ -611,7 +611,7 @@ class spell_warl_health_funnel : public AuraScript
uint32 damage = caster->CountPctFromMaxHealth(aurEff->GetBaseAmount());
if (Player* modOwner = caster->GetSpellModOwner())
modOwner->ApplySpellMod(GetId(), SPELLMOD_COST, damage);
modOwner->ApplySpellMod(GetId(), SpellModOp::PowerCost0, damage);
SpellNonMeleeDamage damageInfo(caster, caster, GetSpellInfo()->Id, GetSpellInfo()->SchoolMask);
damageInfo.damage = damage;
+1 -1
View File
@@ -733,7 +733,7 @@ class spell_warr_victory_rush : public SpellScript
// Glyph: Victory Rush
if (Player* modOwner = caster->GetSpellModOwner())
modOwner->ApplySpellMod(m_scriptSpellId, SPELLMOD_EFFECT3, damage);
modOwner->ApplySpellMod(m_scriptSpellId, SpellModOp::PointsIndex2, damage);
SetEffectValue(damage);
}