From 3c297ac8c4c9d044f3fe60f3f7a155a680c593af Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Sun, 9 Aug 2009 14:59:06 +0400 Subject: [PATCH] [8340] Implement talent 29447 and ranks. Original patch provided by raftom. More compact spell filter code provided by Sarjuuk. Signed-off-by: VladimirMangos --- src/game/Unit.cpp | 33 +++++++++++++++++++++++++++++---- src/shared/revision_nr.h | 2 +- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 2194bde54..49c3b1a69 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -7981,13 +7981,38 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3 } // Custom scripted damage - // Ice Lance - if (spellProto->SpellFamilyName == SPELLFAMILY_MAGE && spellProto->SpellIconID == 186) + switch(spellProto->SpellFamilyName) { - if (pVictim->isFrozen()) - DoneTotalMod *= 3.0f; + case SPELLFAMILY_MAGE: + { + // Ice Lance + if (spellProto->SpellIconID == 186) + { + if (pVictim->isFrozen()) + DoneTotalMod *= 3.0f; + } + // Torment the weak affected (Arcane Barrage, Arcane Blast, Frostfire Bolt, Arcane Missiles, Fireball) + if ((spellProto->SpellFamilyFlags & UI64LIT(0x0000900020200021)) && + (pVictim->HasAuraType(SPELL_AURA_MOD_DECREASE_SPEED) || pVictim->HasAuraType(SPELL_AURA_MELEE_SLOW))) + { + //Search for Torment the weak dummy aura + Unit::AuraList const& ttw = GetAurasByType(SPELL_AURA_DUMMY); + for(Unit::AuraList::const_iterator i = ttw.begin(); i != ttw.end(); ++i) + { + if ((*i)->GetSpellProto()->SpellIconID == 3263) + { + DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f) / 100.0f; + break; + } + } + } + break; + } + default: + break; } + // ..taken AuraList const& mModDamagePercentTaken = pVictim->GetAurasByType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN); for(AuraList::const_iterator i = mModDamagePercentTaken.begin(); i != mModDamagePercentTaken.end(); ++i) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 8a7d5a04f..29563b6a2 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8339" + #define REVISION_NR "8340" #endif // __REVISION_NR_H__