aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <none@none>2009-02-19 00:27:30 +0100
committerQAston <none@none>2009-02-19 00:27:30 +0100
commit13fd0ed366d250c59b46825628e0507e6dc21489 (patch)
treeed2d4eab5563aa63f52489b9d8295fdd3602e9a7 /src
parentd344d4b6e9f6fef6592405ecf039b400fad55162 (diff)
*Try to fix enormous amount of some ap related spells. This may not fix all issues.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellEffects.cpp2
-rw-r--r--src/game/Unit.cpp12
2 files changed, 5 insertions, 9 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 73677ccc15f..1686c8b607f 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -2264,7 +2264,7 @@ void Spell::EffectApplyAura(uint32 i)
//mod duration of channeled aura by spell haste
if (IsChanneledSpell(m_spellInfo))
- m_caster->ModSpellCastTime(m_spellInfo, duration);
+ caster->ModSpellCastTime(m_spellInfo, duration);
// if Aura removed and deleted, do not continue.
if(duration== 0 && !(Aur->IsPermanent()))
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 473be9e88a6..8863f5b19f6 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -10459,17 +10459,13 @@ float Unit::GetTotalAttackPowerValue(WeaponAttackType attType) const
{
if (attType == RANGED_ATTACK)
{
- int32 ap = GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MODS);
- if (ap < 0)
- return 0.0f;
- return ap * (1.0f + GetFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER));
+ float ap = (1.0f + GetFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER)) * float(GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MODS));
+ return ap < 0.0f ? 0.0f : ap ;
}
else
{
- int32 ap = GetInt32Value(UNIT_FIELD_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS);
- if (ap < 0)
- return 0.0f;
- return ap * (1.0f + GetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER));
+ float ap = (1.0f + GetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER)) * float(GetInt32Value(UNIT_FIELD_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS));
+ return ap < 0.0f ? 0.0f : ap ;
}
}