*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:
QAston
2010-08-26 19:07:55 +02:00
parent 3c027962ba
commit 30d31ca40a
10 changed files with 73 additions and 162 deletions

View File

@@ -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