[8024] Implement SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR(285).

Also drop outdated support code for 61216 and ranks.
This implement work talents 61216 and 48978 with ranks.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Beaste 2009-06-16 12:09:37 +04:00 committed by VladimirMangos
parent 309ac7ead0
commit bdc7df00d6
5 changed files with 23 additions and 18 deletions

View file

@ -335,7 +335,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&Aura::HandleAuraIncreaseBaseHealthPercent, //282 SPELL_AURA_INCREASE_BASE_HEALTH_PERCENT
&Aura::HandleNoImmediateEffect, //283 SPELL_AURA_MOD_HEALING_RECEIVED implemented in Unit::SpellHealingBonus
&Aura::HandleUnused, //284 not used by any spells (3.08a)
&Aura::HandleUnused, //285 not used by any spells (3.08a)
&Aura::HandleAuraModAttackPowerOfArmor, //285 SPELL_AURA_MOD_ATTACK_POWER_OF_ARMOR implemented in Player::UpdateAttackPowerAndDamage
&Aura::HandleUnused, //286 not used by any spells (3.08a)
&Aura::HandleNoImmediateEffect, //287 SPELL_AURA_DEFLECT_SPELLS implemented in Unit::MagicSpellHitResult and Unit::MeleeSpellHitResult
&Aura::HandleUnused, //288 not used by any spells (3.09) except 1 test spell.
@ -5053,6 +5053,16 @@ void Aura::HandleAuraModAttackPowerOfStatPercent(bool /*apply*/, bool Real)
((Player*)m_target)->UpdateAttackPowerAndDamage(false);
}
void Aura::HandleAuraModAttackPowerOfArmor(bool /*apply*/, bool Real)
{
// spells required only Real aura add/remove
if(!Real)
return;
// Recalculate bonus
if(m_target->GetTypeId() == TYPEID_PLAYER)
((Player*)m_target)->UpdateAttackPowerAndDamage(false);
}
/********************************/
/*** DAMAGE BONUS ***/
/********************************/
@ -6407,19 +6417,6 @@ void Aura::PeriodicDummyTick()
// return;
break;
}
case SPELLFAMILY_WARRIOR:
{
// Armored to the Teeth
if (spell->SpellIconID == 3516)
{
// Increases your attack power by $s1 for every $s2 armor value you have.
// Calculate AP bonus (from 1 efect of this spell)
int32 apBonus = m_modifier.m_amount * m_target->GetArmor() / m_target->CalculateSpellDamage(spell, 1, spell->EffectBasePoints[1], m_target);
m_target->CastCustomSpell(m_target, 61217, &apBonus, &apBonus, NULL, true, NULL, this);
return;
}
break;
}
case SPELLFAMILY_DRUID:
{
switch (spell->Id)