diff options
| author | Intel <chemicstry@gmail.com> | 2014-12-07 23:20:52 +0200 |
|---|---|---|
| committer | Intel <chemicstry@gmail.com> | 2014-12-07 23:20:52 +0200 |
| commit | 4825832c85f5ae824c0e099ed5defa516333e00f (patch) | |
| tree | 9c6b12a3646b632c5761a7cfb8cf57fef973f65e /src/server/game/Spells/SpellInfo.cpp | |
| parent | 4b8493d4b2e492cd4a0cda9719cdad187ec0673b (diff) | |
| parent | 88ca8b95e0e1a31bd561e741da96b582d16c984a (diff) | |
Merge branch '6.x' into Spells
Conflicts:
src/server/game/DataStores/DBCStores.h
src/server/game/Entities/Player/Player.cpp
src/server/game/Entities/Unit/Unit.cpp
src/server/game/Server/Protocol/Opcodes.cpp
src/server/scripts/Spells/spell_druid.cpp
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
| -rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index b97c169ec7b..bded05190dc 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -445,7 +445,7 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster, int32 const* bp, Unit const if (target && _spellInfo->IsPositiveEffect(EffectIndex) && (Effect == SPELL_EFFECT_APPLY_AURA)) level = target->getLevel(); - if (GtSpellScalingEntry const* gtScaling = sGtSpellScalingStore.LookupEntry((_spellInfo->ScalingClass != -1 ? _spellInfo->ScalingClass - 1 : MAX_CLASSES - 1) * 100 + level - 1)) + if (GtSpellScalingEntry const* gtScaling = sGtSpellScalingStore.EvaluateTable(level - 1, (_spellInfo->ScalingClass != -1 ? _spellInfo->ScalingClass - 1 : MAX_CLASSES - 1))) { float multiplier = gtScaling->value; if (_spellInfo->CastTimeMax > 0 && _spellInfo->CastTimeMaxLevel > level) @@ -556,8 +556,8 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster, int32 const* bp, Unit const if (canEffectScale) { - GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.LookupEntry(_spellInfo->SpellLevel - 1); - GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(caster->getLevel() - 1); + GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.EvaluateTable(_spellInfo->SpellLevel - 1, 0); + GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.EvaluateTable(caster->getLevel() - 1, 0); if (spellScaler && casterScaler) value *= casterScaler->ratio / spellScaler->ratio; } @@ -2500,8 +2500,8 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask) c { if (Attributes & SPELL_ATTR0_LEVEL_DAMAGE_CALCULATION) { - GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.LookupEntry(SpellLevel - 1); - GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.LookupEntry(caster->getLevel() - 1); + GtNPCManaCostScalerEntry const* spellScaler = sGtNPCManaCostScalerStore.EvaluateTable(SpellLevel - 1, 0); + GtNPCManaCostScalerEntry const* casterScaler = sGtNPCManaCostScalerStore.EvaluateTable(caster->getLevel() - 1, 0); if (spellScaler && casterScaler) powerCost *= casterScaler->ratio / spellScaler->ratio; } |
