aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells
diff options
context:
space:
mode:
authorShocker <none@none>2010-08-25 03:21:22 +0300
committerShocker <none@none>2010-08-25 03:21:22 +0300
commitd3c6edeb4a8a7c061c138a5953f790cd99cff66f (patch)
tree38fa95a386082643dfefd76ae4697b584b6c30f8 /src/server/game/Spells
parentb940a9241515cb11f22f13ceb7604026513a35ea (diff)
Correct usage of basePoints in various locations
--HG-- branch : trunk
Diffstat (limited to 'src/server/game/Spells')
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp2
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp2
-rw-r--r--src/server/game/Spells/SpellEffects.cpp10
3 files changed, 7 insertions, 7 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index 41993275e57..7dd8ad17957 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -1896,7 +1896,7 @@ void AuraEffect::PeriodicDummyTick(Unit * target, Unit * caster) const
case 51689:
if (target->getVictim() && (target->GetHealth() * 100 / target->GetMaxHealth() > target->getVictim()->GetHealth() * 100 / target->getVictim()->GetMaxHealth())) {
if (!target->HasAura(58670)) {
- int32 basepoints = GetSpellProto()->EffectBasePoints[0];
+ int32 basepoints = SpellMgr::CalculateSpellEffectAmount(GetSpellProto(), 0);
target->CastCustomSpell(target, 58670, &basepoints, 0, 0, true);
}
}
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 8738c749d4e..31e206a5839 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -1477,7 +1477,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
if (unholyPresenceAura)
{
// Not listed as any effect, only base points set
- int32 basePoints0 = unholyPresenceAura->GetSpellProto()->EffectBasePoints[1];
+ int32 basePoints0 = SpellMgr::CalculateSpellEffectAmount(unholyPresenceAura->GetSpellProto(), 1)
target->CastCustomSpell(target,63622,&basePoints0 ,&basePoints0,&basePoints0,true,0,unholyPresenceAura);
target->CastCustomSpell(target,65095,&basePoints0 ,NULL,NULL,true,0,unholyPresenceAura);
}
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 9346681f7a5..ebd6b78c590 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -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)