diff options
| author | Shauren <shauren.trinity@gmail.com> | 2021-08-07 19:40:34 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-08-08 00:18:10 +0200 |
| commit | ce1046a8fd0f04aad6c414786949269fffea88f3 (patch) | |
| tree | 025a5a5ac6cbc886cf98897d0af814d33497bf8d /src/server/game/Spells/SpellInfo.cpp | |
| parent | cd5357dc185f95c6ef78089c5ab8bd2b885dd89f (diff) | |
Core/DataStores: 9.1.0 db2 structures
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
| -rw-r--r-- | src/server/game/Spells/SpellInfo.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index dde1cda8a3a..9bca5fcf1c0 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -400,6 +400,7 @@ SpellEffectInfo::SpellEffectInfo(SpellInfo const* spellInfo, SpellEffectEntry co TriggerSpell = _effect.EffectTriggerSpell; SpellClassMask = _effect.EffectSpellClassMask; BonusCoefficientFromAP = _effect.BonusCoefficientFromAP; + Scaling.Class = _effect.ScalingClass; Scaling.Coefficient = _effect.Coefficient; Scaling.Variance = _effect.Variance; Scaling.ResourceCoefficient = _effect.ResourceCoefficient; @@ -539,7 +540,7 @@ int32 SpellEffectInfo::CalcBaseValue(Unit const* caster, Unit const* target, uin float value = 0.0f; if (level > 0) { - if (!_spellInfo->Scaling.Class) + if (!Scaling.Class) return 0; uint32 effectiveItemLevel = itemLevel != -1 ? uint32(itemLevel) : 1u; @@ -548,21 +549,21 @@ int32 SpellEffectInfo::CalcBaseValue(Unit const* caster, Unit const* target, uin if (_spellInfo->Scaling.ScalesFromItemLevel) effectiveItemLevel = _spellInfo->Scaling.ScalesFromItemLevel; - if (_spellInfo->Scaling.Class == -8 || _spellInfo->Scaling.Class == -9) + if (Scaling.Class == -8 || Scaling.Class == -9) { RandPropPointsEntry const* randPropPoints = sRandPropPointsStore.LookupEntry(effectiveItemLevel); if (!randPropPoints) randPropPoints = sRandPropPointsStore.AssertEntry(sRandPropPointsStore.GetNumRows() - 1); - value = _spellInfo->Scaling.Class == -8 ? randPropPoints->DamageReplaceStatF : randPropPoints->DamageSecondaryF; + value = Scaling.Class == -8 ? randPropPoints->DamageReplaceStatF : randPropPoints->DamageSecondaryF; } else value = GetRandomPropertyPoints(effectiveItemLevel, ITEM_QUALITY_RARE, INVTYPE_CHEST, 0); } else - value = GetSpellScalingColumnForClass(sSpellScalingGameTable.GetRow(level), _spellInfo->Scaling.Class); + value = GetSpellScalingColumnForClass(sSpellScalingGameTable.GetRow(level), Scaling.Class); - if (_spellInfo->Scaling.Class == -7) + if (Scaling.Class == -7) if (GtCombatRatingsMultByILvl const* ratingMult = sCombatRatingsMultByILvlGameTable.GetRow(effectiveItemLevel)) if (ItemSparseEntry const* itemSparse = sItemSparseStore.LookupEntry(itemId)) value *= GetIlvlStatMultiplier(ratingMult, InventoryType(itemSparse->InventoryType)); @@ -1077,6 +1078,8 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] = {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 281 SPELL_EFFECT_LEARN_SOULBIND_CONDUIT {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 282 SPELL_EFFECT_CONVERT_ITEMS_TO_CURRENCY {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 283 SPELL_EFFECT_COMPLETE_CAMPAIGN + {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 284 SPELL_EFFECT_SEND_CHAT_MESSAGE + {EFFECT_IMPLICIT_TARGET_EXPLICIT, TARGET_OBJECT_TYPE_UNIT}, // 285 SPELL_EFFECT_MODIFY_KEYSTONE_2 }; SpellInfo::SpellInfo(SpellNameEntry const* spellName, ::Difficulty difficulty, SpellInfoLoadHelper const& data, @@ -1133,7 +1136,6 @@ SpellInfo::SpellInfo(SpellNameEntry const* spellName, ::Difficulty difficulty, S // SpellScalingEntry if (SpellScalingEntry const* _scaling = data.Scaling) { - Scaling.Class = _scaling->Class; Scaling.MinScalingLevel = _scaling->MinScalingLevel; Scaling.MaxScalingLevel = _scaling->MaxScalingLevel; Scaling.ScalesFromItemLevel = _scaling->ScalesFromItemLevel; |
