diff options
author | QAston <none@none> | 2009-07-19 01:09:23 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-07-19 01:09:23 +0200 |
commit | b7ac1c253b8e16ecf993df35adbf0e323fa95c08 (patch) | |
tree | 0c5709d66481008d0a92faa2799a46bedc22afd6 | |
parent | 4af68b87d3aa73ffa42bae38f6029d3d550afe36 (diff) |
*Cleanups and fixes in Unrelenting Assault.
--HG--
branch : trunk
-rw-r--r-- | src/game/SpellAuras.cpp | 23 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 29 | ||||
-rw-r--r-- | src/game/Unit.cpp | 4 |
3 files changed, 25 insertions, 31 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index c10f8a47b4d..0338bb01ff6 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -2499,6 +2499,29 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real, bool changeAmount) // AT APPLY if(apply) { + // Overpower + if (caster && m_spellProto->SpellFamilyName == SPELLFAMILY_WARRIOR && + m_spellProto->SpellFamilyFlags[0] & 0x4) + { + // Must be casting target + if (!m_target->IsNonMeleeSpellCasted(false)) + return; + if (AuraEffect * aurEff = caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARRIOR, 2775, 0)) + { + switch (aurEff->GetId()) + { + // Unrelenting Assault, rank 1 + case 46859: + caster->CastSpell(m_target,64849,true,NULL,aurEff); + break; + // Unrelenting Assault, rank 2 + case 46860: + caster->CastSpell(m_target,64850,true,NULL,aurEff); + break; + } + } + return; + } switch(GetId()) { // Haunting Spirits - perdiodic trigger demon diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index bd0b1766acb..a640f9c1ce3 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1321,35 +1321,6 @@ void Spell::EffectDummy(uint32 i) m_damage+= uint32(damage * m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100); return; } - // Overpower - if(m_spellInfo->SpellFamilyFlags[0] & 0x4) - { - // Must be casting target - if (!unitTarget->IsNonMeleeSpellCasted(false)) - return; - // Find Unrelenting Assault - Unit::AuraEffectList const& modifierAuras = m_caster->GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER); - for(Unit::AuraEffectList::const_iterator itr = modifierAuras.begin(); itr != modifierAuras.end(); ++itr) - { - if((*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARRIOR && (*itr)->GetSpellProto()->SpellIconID == 2775) - { - switch ((*itr)->GetSpellProto()->Id) - { - // Unrelenting Assault, rank 1 - case 46859: - m_caster->CastSpell(unitTarget,64849,true,0,(*itr)); - break; - // Unrelenting Assault, rank 2 - case 46860: - m_caster->CastSpell(unitTarget,64850,true,0,(*itr)); - break; - default: - break; - } - } - } - return; - } switch(m_spellInfo->Id) { // Warrior's Wrath diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 15a52ff62f6..a4bb8ecdeaf 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9335,7 +9335,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3 { coeff = bonus->direct_damage; if (bonus->ap_bonus > 0) - DoneTotal+=bonus->ap_dot_bonus * stack * ApCoeffMod * GetTotalAttackPowerValue( + DoneTotal+=bonus->ap_bonus * stack * ApCoeffMod * GetTotalAttackPowerValue( (IsRangedWeaponSpell(spellProto) && spellProto->DmgClass !=SPELL_DAMAGE_CLASS_MELEE)? RANGED_ATTACK : BASE_ATTACK); } } @@ -9810,7 +9810,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint { coeff = bonus->direct_damage; if (bonus->ap_bonus > 0) - DoneTotal+=bonus->ap_dot_bonus * stack * GetTotalAttackPowerValue( + DoneTotal+=bonus->ap_bonus * stack * GetTotalAttackPowerValue( (IsRangedWeaponSpell(spellProto) && spellProto->DmgClass !=SPELL_DAMAGE_CLASS_MELEE)? RANGED_ATTACK : BASE_ATTACK); } } |