Correct usage of basePoints in various locations
--HG-- branch : trunk
This commit is contained in:
1 parent
b940a92415
commit
d3c6edeb4a
6 files changed
+21
-19
No files matched your search
@@ -402,7 +402,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
float radius = GetSpellRadiusForHostile(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[0]));
|
||||
if (!radius) return;
|
||||
float distance = m_caster->GetDistance2d(unitTarget);
|
||||
damage = (distance > radius) ? 0 : int32(m_spellInfo->EffectBasePoints[0]*((radius - distance)/radius));
|
||||
damage = (distance > radius) ? 0 : int32(SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 0) * ((radius - distance)/radius));
|
||||
break;
|
||||
}
|
||||
// TODO: add spell specific target requirement hook for spells
|
||||
@@ -444,7 +444,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
if (!radius)
|
||||
return;
|
||||
float distance = m_caster->GetDistance2d(unitTarget);
|
||||
damage = (distance > radius) ? 0 : int32(m_spellInfo->EffectBasePoints[0]*distance);
|
||||
damage = (distance > radius) ? 0 : int32(SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 0) * distance);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -698,7 +698,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
|
||||
|
||||
// TODO: should this be put on taken but not done?
|
||||
if (found)
|
||||
damage += m_spellInfo->EffectBasePoints[1];
|
||||
damage += SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 1);
|
||||
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
@@ -1556,7 +1556,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
case 27222:
|
||||
case 57946: spFactor = 0.5f; break;
|
||||
}
|
||||
int32 damage = int32(m_spellInfo->EffectBasePoints[0] + (6.3875 * m_spellInfo->baseLevel));
|
||||
int32 damage = int32(SpellMgr::CalculateSpellEffectAmount(m_spellInfo, 0) + (6.3875 * m_spellInfo->baseLevel));
|
||||
int32 mana = int32(damage + (m_caster->ToPlayer()->GetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+SPELL_SCHOOL_SHADOW) * spFactor));
|
||||
|
||||
if (unitTarget && (int32(unitTarget->GetHealth()) > damage))
|
||||
@@ -6439,7 +6439,7 @@ void Spell::EffectPullTowards(uint32 i)
|
||||
if (!unitTarget)
|
||||
return;
|
||||
|
||||
float speedZ = (float)(m_spellInfo->EffectBasePoints[i]/10);
|
||||
float speedZ = (float)(SpellMgr::CalculateSpellEffectAmount(m_spellInfo, i) / 10);
|
||||
float speedXY = (float)(m_spellInfo->EffectMiscValue[i]/10);
|
||||
Position pos;
|
||||
if (m_spellInfo->Effect[i] == SPELL_EFFECT_PULL_TOWARDS_DEST)
|
||||
|
||||
Reference in new issue
Block a user