diff options
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
| -rw-r--r-- | src/server/game/Spells/Spell.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index cceb6c0a481..38946defeba 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -472,7 +472,7 @@ SpellValue::SpellValue(SpellInfo const* proto, WorldObject const* caster) { memset(EffectBasePoints, 0, sizeof(EffectBasePoints)); for (SpellEffectInfo const& spellEffectInfo : proto->GetEffects()) - EffectBasePoints[spellEffectInfo.EffectIndex] = spellEffectInfo.CalcBaseValue(caster, nullptr, 0, -1); + EffectBasePoints[spellEffectInfo.EffectIndex] = spellEffectInfo.CalcBaseValue(caster, nullptr); CustomBasePointsMask = 0; MaxAffectedTargets = proto->MaxAffectedTargets; @@ -3181,7 +3181,7 @@ SpellMissInfo Spell::PreprocessSpellHit(Unit* unit, TargetInfo& hitInfo) for (SpellEffectInfo const& auraSpellEffect : m_spellInfo->GetEffects()) hitInfo.AuraBasePoints[auraSpellEffect.EffectIndex] = (m_spellValue->CustomBasePointsMask & (1 << auraSpellEffect.EffectIndex)) ? m_spellValue->EffectBasePoints[auraSpellEffect.EffectIndex] - : auraSpellEffect.CalcBaseValue(m_originalCaster, unit, m_castItemEntry, m_castItemLevel); + : auraSpellEffect.CalcBaseValue(m_originalCaster, unit); // Get Data Needed for Diminishing Returns, some effects may have multiple auras, so this must be done on spell hit, not aura add hitInfo.DRGroup = m_spellInfo->GetDiminishingReturnsGroupForSpell(); @@ -5009,7 +5009,7 @@ static std::pair<int32, SpellHealPredictionType> CalcPredictedHealing(SpellInfo case SPELL_EFFECT_HEAL: case SPELL_EFFECT_HEAL_PCT: points += unitCaster->SpellHealingBonusDone(target, - spellInfo, spellEffectInfo.CalcValue(unitCaster, nullptr, target, nullptr, castItemEntry, castItemLevel), + spellInfo, spellEffectInfo.CalcValue(unitCaster, nullptr, target), DIRECT_DAMAGE, spellEffectInfo, 1, spell); if (target != unitCaster && (spellEffectInfo.TargetA.GetTarget() == TARGET_UNIT_CASTER || spellEffectInfo.TargetB.GetTarget() == TARGET_UNIT_CASTER)) @@ -5028,7 +5028,7 @@ static std::pair<int32, SpellHealPredictionType> CalcPredictedHealing(SpellInfo case SPELL_AURA_PERIODIC_HEAL: case SPELL_AURA_OBS_MOD_HEALTH: points += unitCaster->SpellHealingBonusDone(target, - spellInfo, spellEffectInfo.CalcValue(unitCaster, nullptr, target, nullptr, castItemEntry, castItemLevel), + spellInfo, spellEffectInfo.CalcValue(unitCaster, nullptr, target), DIRECT_DAMAGE, spellEffectInfo, 1, spell) * spellInfo->GetMaxTicks(); break; case SPELL_AURA_PERIODIC_TRIGGER_SPELL: @@ -6722,7 +6722,7 @@ SpellCastResult Spell::CheckCast(bool strict, int32* param1 /*= nullptr*/, int32 && !m_spellInfo->IsTargetingArea()) if (Unit* target = m_targets.GetUnitTarget()) if (!target->IsHighestExclusiveAuraEffect(m_spellInfo, spellEffectInfo.ApplyAuraName, - spellEffectInfo.CalcValue(m_caster, &m_spellValue->EffectBasePoints[spellEffectInfo.EffectIndex], nullptr, nullptr, m_castItemEntry, m_castItemLevel), + spellEffectInfo.CalcValue(m_caster, &m_spellValue->EffectBasePoints[spellEffectInfo.EffectIndex]), approximateAuraEffectMask, false)) return SPELL_FAILED_AURA_BOUNCED; } @@ -7050,7 +7050,7 @@ SpellCastResult Spell::CheckMovement() const int32 Spell::CalculateDamage(SpellEffectInfo const& spellEffectInfo, Unit const* target, float* var /*= nullptr*/) const { bool needRecalculateBasePoints = !(m_spellValue->CustomBasePointsMask & (1 << spellEffectInfo.EffectIndex)); - return m_caster->CalculateSpellDamage(target, spellEffectInfo, needRecalculateBasePoints ? nullptr : &m_spellValue->EffectBasePoints[spellEffectInfo.EffectIndex], var, m_castItemEntry, m_castItemLevel); + return m_caster->CalculateSpellDamage(target, spellEffectInfo, needRecalculateBasePoints ? nullptr : &m_spellValue->EffectBasePoints[spellEffectInfo.EffectIndex], var); } bool Spell::CanAutoCast(Unit* target) @@ -7083,7 +7083,7 @@ bool Spell::CanAutoCast(Unit* target) break; case SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT: // this one has further checks, but i don't think they're necessary for autocast logic case SPELL_GROUP_STACK_RULE_EXCLUSIVE_HIGHEST: - if (abs(spellEffectInfo.CalcBaseValue(m_caster, target, 0, -1)) <= abs((*auraIt)->GetAmount())) + if (abs(spellEffectInfo.CalcBaseValue(m_caster, target)) <= abs((*auraIt)->GetAmount())) return false; break; case SPELL_GROUP_STACK_RULE_DEFAULT: |
