aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 38ec721e822..1ecc9986355 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -614,7 +614,7 @@ float SpellEffectInfo::CalcValueMultiplier(Unit* caster, Spell* spell) const
{
float multiplier = Amplitude;
if (Player* modOwner = (caster ? caster->GetSpellModOwner() : nullptr))
- modOwner->ApplySpellMod(_spellInfo, SPELLMOD_VALUE_MULTIPLIER, multiplier, spell);
+ modOwner->ApplySpellMod(_spellInfo, SpellModOp::Amplitude, multiplier, spell);
return multiplier;
}
@@ -622,7 +622,7 @@ float SpellEffectInfo::CalcDamageMultiplier(Unit* caster, Spell* spell) const
{
float multiplierPercent = ChainAmplitude * 100.0f;
if (Player* modOwner = (caster ? caster->GetSpellModOwner() : nullptr))
- modOwner->ApplySpellMod(_spellInfo, SPELLMOD_DAMAGE_MULTIPLIER, multiplierPercent, spell);
+ modOwner->ApplySpellMod(_spellInfo, SpellModOp::ChainAmplitude, multiplierPercent, spell);
return multiplierPercent / 100.0f;
}
@@ -656,7 +656,7 @@ float SpellEffectInfo::CalcRadius(Unit* caster, Spell* spell) const
radius += entry->RadiusPerLevel * caster->getLevel();
radius = std::min(radius, entry->RadiusMax);
if (Player* modOwner = caster->GetSpellModOwner())
- modOwner->ApplySpellMod(_spellInfo, SPELLMOD_RADIUS, radius, spell);
+ modOwner->ApplySpellMod(_spellInfo, SpellModOp::Radius, radius, spell);
}
return radius;
@@ -3672,7 +3672,7 @@ float SpellInfo::GetMaxRange(bool positive, Unit* caster, Spell* spell) const
float range = RangeEntry->RangeMax[positive ? 1 : 0];
if (caster)
if (Player* modOwner = caster->GetSpellModOwner())
- modOwner->ApplySpellMod(this, SPELLMOD_RANGE, range, spell);
+ modOwner->ApplySpellMod(this, SpellModOp::Range, range, spell);
return range;
}
@@ -3683,7 +3683,7 @@ int32 SpellInfo::CalcDuration(Unit* caster /*= nullptr*/) const
if (caster)
if (Player* modOwner = caster->GetSpellModOwner())
- modOwner->ApplySpellMod(this, SPELLMOD_DURATION, duration);
+ modOwner->ApplySpellMod(this, SpellModOp::Duration, duration);
return duration;
}
@@ -3910,13 +3910,13 @@ Optional<SpellPowerCost> SpellInfo::CalcPowerCost(SpellPowerEntry const* power,
switch (power->OrderIndex)
{
case 0:
- mod = SPELLMOD_COST;
+ mod = SpellModOp::PowerCost0;
break;
case 1:
- mod = SPELLMOD_SPELL_COST2;
+ mod = SpellModOp::PowerCost1;
break;
case 2:
- mod = SPELLMOD_SPELL_COST3;
+ mod = SpellModOp::PowerCost2;
break;
default:
break;
@@ -4493,9 +4493,11 @@ bool SpellInfo::_IsPositiveEffect(uint32 effIndex, bool deep) const
case SPELL_AURA_ADD_PCT_MODIFIER:
{
// non-positive mods
- switch (effect->MiscValue)
+ switch (SpellModOp(effect->MiscValue))
{
- case SPELLMOD_COST: // dependent from bas point sign (negative -> positive)
+ case SpellModOp::PowerCost0: // dependent from bas point sign (negative -> positive)
+ case SpellModOp::PowerCost1:
+ case SpellModOp::PowerCost2:
if (effect->CalcValue() > 0)
{
if (!deep)