*Try to fix enormous amount of some ap related spells. This may not fix all issues.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-02-19 00:27:30 +01:00
parent d344d4b6e9
commit 13fd0ed366
2 changed files with 5 additions and 9 deletions
+1 -1
View File
@@ -2264,7 +2264,7 @@ void Spell::EffectApplyAura(uint32 i)
//mod duration of channeled aura by spell haste //mod duration of channeled aura by spell haste
if (IsChanneledSpell(m_spellInfo)) if (IsChanneledSpell(m_spellInfo))
m_caster->ModSpellCastTime(m_spellInfo, duration); caster->ModSpellCastTime(m_spellInfo, duration);
// if Aura removed and deleted, do not continue. // if Aura removed and deleted, do not continue.
if(duration== 0 && !(Aur->IsPermanent())) if(duration== 0 && !(Aur->IsPermanent()))
+4 -8
View File
@@ -10459,17 +10459,13 @@ float Unit::GetTotalAttackPowerValue(WeaponAttackType attType) const
{ {
if (attType == RANGED_ATTACK) if (attType == RANGED_ATTACK)
{ {
int32 ap = GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_RANGED_ATTACK_POWER_MODS); 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));
if (ap < 0) return ap < 0.0f ? 0.0f : ap ;
return 0.0f;
return ap * (1.0f + GetFloatValue(UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER));
} }
else else
{ {
int32 ap = GetInt32Value(UNIT_FIELD_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS); float ap = (1.0f + GetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER)) * float(GetInt32Value(UNIT_FIELD_ATTACK_POWER) + GetInt32Value(UNIT_FIELD_ATTACK_POWER_MODS));
if (ap < 0) return ap < 0.0f ? 0.0f : ap ;
return 0.0f;
return ap * (1.0f + GetFloatValue(UNIT_FIELD_ATTACK_POWER_MULTIPLIER));
} }
} }