mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-02 23:26:37 +01:00
*Fix usage of EffectValueMultiplier in spell code.
*Remove some obsolete code from spell class. *Rename some spellmod and dbc column names to be more accurate. --HG-- branch : trunk
This commit is contained in:
@@ -1896,6 +1896,26 @@ int32 SpellMgr::CalculateSpellEffectBaseAmount(int32 value, SpellEntry const * s
|
||||
return value - 1;
|
||||
}
|
||||
|
||||
float SpellMgr::CalculateSpellEffectValueMultiplier(SpellEntry const * spellEntry, uint8 effIndex, Unit * caster, Spell const * spell)
|
||||
{
|
||||
float multiplier = spellEntry->EffectValueMultiplier[effIndex];
|
||||
|
||||
if (caster)
|
||||
if (Player * modOwner = caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(spellEntry->Id, SPELLMOD_VALUE_MULTIPLIER, multiplier);
|
||||
return multiplier;
|
||||
}
|
||||
|
||||
float SpellMgr::CalculateSpellEffectDamageMultiplier(SpellEntry const * spellEntry, uint8 effIndex, Unit * caster, Spell const * spell)
|
||||
{
|
||||
float multiplier = spellEntry->EffectDamageMultiplier[effIndex];
|
||||
|
||||
if (caster)
|
||||
if (Player * modOwner = caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(spellEntry->Id, SPELLMOD_DAMAGE_MULTIPLIER, multiplier);
|
||||
return multiplier;
|
||||
}
|
||||
|
||||
SpellEntry const* SpellMgr::SelectAuraRankForPlayerLevel(SpellEntry const* spellInfo, uint32 playerLevel) const
|
||||
{
|
||||
// ignore passive spells
|
||||
|
||||
Reference in New Issue
Block a user