Correct usage of basePoints in various locations
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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