aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index a57811aee0c..2458f505fde 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -550,7 +550,7 @@ m_spellValue(new SpellValue(m_spellInfo, caster)), _spellEvent(nullptr)
m_spellSchoolMask = SpellSchoolMask(1 << pItem->GetTemplate()->GetDamageType());
if (Player const* modOwner = caster->GetSpellModOwner())
- modOwner->ApplySpellMod(info, SPELLMOD_STACK_AMOUNT, m_spellValue->AuraStackAmount, this);
+ modOwner->ApplySpellMod(info, SpellModOp::Doses, m_spellValue->AuraStackAmount, this);
if (!originalCasterGUID.IsEmpty())
m_originalCasterGUID = originalCasterGUID;
@@ -1583,7 +1583,7 @@ void Spell::SelectImplicitChainTargets(SpellEffIndex effIndex, SpellImplicitTarg
uint32 maxTargets = effect->ChainTargets;
if (Player* modOwner = m_caster->GetSpellModOwner())
- modOwner->ApplySpellMod(m_spellInfo, SPELLMOD_JUMP_TARGETS, maxTargets, this);
+ modOwner->ApplySpellMod(m_spellInfo, SpellModOp::ChainTargets, maxTargets, this);
if (maxTargets > 1)
{
@@ -1901,7 +1901,7 @@ void Spell::SearchChainTargets(std::list<WorldObject*>& targets, uint32 chainTar
}
if (Player* modOwner = m_caster->GetSpellModOwner())
- modOwner->ApplySpellMod(m_spellInfo, SPELLMOD_JUMP_DISTANCE, jumpRadius, this);
+ modOwner->ApplySpellMod(m_spellInfo, SpellModOp::ChainJumpDistance, jumpRadius, this);
// chain lightning/heal spells and similar - allow to jump at larger distance and go out of los
bool isBouncingFar = (m_spellInfo->HasAttribute(SPELL_ATTR4_AREA_TARGET_CHAIN)
@@ -2870,7 +2870,7 @@ bool Spell::UpdateChanneledTargetList()
{
range = m_spellInfo->GetMaxRange(IsPositive());
if (Player* modOwner = m_caster->GetSpellModOwner())
- modOwner->ApplySpellMod(m_spellInfo, SPELLMOD_RANGE, range, this);
+ modOwner->ApplySpellMod(m_spellInfo, SpellModOp::Range, range, this);
// add little tolerance level
range += std::min(MAX_SPELL_RANGE_TOLERANCE, range*0.1f); // 10% but no more than MAX_SPELL_RANGE_TOLERANCE
@@ -3406,7 +3406,7 @@ void Spell::handle_immediate()
// First mod_duration then haste - see Missile Barrage
// Apply duration mod
if (Player* modOwner = m_caster->GetSpellModOwner())
- modOwner->ApplySpellMod(m_spellInfo, SPELLMOD_DURATION, duration);
+ modOwner->ApplySpellMod(m_spellInfo, SpellModOp::Duration, duration);
// Apply haste mods
m_caster->ModSpellDurationTime(m_spellInfo, duration, this);
@@ -4653,7 +4653,7 @@ void Spell::TakePower()
hit = false;
//lower spell cost on fail (by talent aura)
if (Player* modOwner = m_caster->ToPlayer()->GetSpellModOwner())
- modOwner->ApplySpellMod(m_spellInfo, SPELLMOD_SPELL_COST_REFUND_ON_FAIL, cost.Amount);
+ modOwner->ApplySpellMod(m_spellInfo, SpellModOp::PowerCostOnMiss, cost.Amount);
}
break;
}
@@ -6287,7 +6287,7 @@ std::pair<float, float> Spell::GetMinMaxRange(bool strict) const
maxRange *= ranged->GetTemplate()->GetRangedModRange() * 0.01f;
if (Player* modOwner = m_caster->GetSpellModOwner())
- modOwner->ApplySpellMod(m_spellInfo, SPELLMOD_RANGE, maxRange, const_cast<Spell*>(this));
+ modOwner->ApplySpellMod(m_spellInfo, SpellModOp::Range, maxRange, const_cast<Spell*>(this));
maxRange += rangeMod;
@@ -6888,7 +6888,7 @@ void Spell::Delayed() // only called in DealDamage()
//check pushback reduce
int32 delaytime = 500; // spellcasting delay is normally 500ms
int32 delayReduce = 100; // must be initialized to 100 for percent modifiers
- m_caster->ToPlayer()->ApplySpellMod(m_spellInfo, SPELLMOD_NOT_LOSE_CASTING_TIME, delayReduce, this);
+ m_caster->ToPlayer()->ApplySpellMod(m_spellInfo, SpellModOp::ResistPushback, delayReduce, this);
delayReduce += m_caster->GetTotalAuraModifier(SPELL_AURA_REDUCE_PUSHBACK) - 100;
if (delayReduce >= 100)
return;
@@ -6926,7 +6926,7 @@ void Spell::DelayedChannel()
int32 delaytime = CalculatePct(duration, 25); // channeling delay is normally 25% of its time per hit
int32 delayReduce = 100; // must be initialized to 100 for percent modifiers
- m_caster->ToPlayer()->ApplySpellMod(m_spellInfo, SPELLMOD_NOT_LOSE_CASTING_TIME, delayReduce, this);
+ m_caster->ToPlayer()->ApplySpellMod(m_spellInfo, SpellModOp::ResistPushback, delayReduce, this);
delayReduce += m_caster->GetTotalAuraModifier(SPELL_AURA_REDUCE_PUSHBACK) - 100;
if (delayReduce >= 100)
return;
@@ -7846,7 +7846,7 @@ void Spell::TriggerGlobalCooldown()
{
// gcd modifier auras are applied only to own spells and only players have such mods
if (Player* modOwner = m_caster->GetSpellModOwner())
- modOwner->ApplySpellMod(m_spellInfo, SPELLMOD_GLOBAL_COOLDOWN, gcd, this);
+ modOwner->ApplySpellMod(m_spellInfo, SpellModOp::StartCooldown, gcd, this);
bool isMeleeOrRangedSpell = m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE ||
m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_RANGED ||