From ff6bec96aec0037488a010a0acb3674db00f5649 Mon Sep 17 00:00:00 2001 From: PSZ Date: Sat, 14 Apr 2012 00:30:43 +0200 Subject: [PATCH] [11960] Implement custom overwrite for range of some spell effects Original idea and improved design for this by PSZ, who also implemented spells 66881 (with diffmodes) Original patch for spells 28241, 54363 by Azerus Also fix spell 24811 Signed-off-by: Schmoozerd --- src/game/Spell.cpp | 37 +++++++++++++++++++++++++++++++++++++ src/shared/revision_nr.h | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 8e5667efe..609d61509 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -1743,6 +1743,43 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList& break; } + // custom radius cases + switch (m_spellInfo->SpellFamilyName) + { + case SPELLFAMILY_GENERIC: + { + switch (m_spellInfo->Id) + { + case 24811: // Draw Spirit (Lethon) + { + if (effIndex == EFFECT_INDEX_0) // Copy range from EFF_1 to 0 + radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[EFFECT_INDEX_1])); + break; + } + case 28241: // Poison (Naxxramas, Grobbulus Cloud) + case 54363: // Poison (Naxxramas, Grobbulus Cloud) (H) + { + uint32 auraId = (m_spellInfo->Id == 28241 ? 28158 : 54362); + if (SpellAuraHolder* auraHolder = m_caster->GetSpellAuraHolder(auraId)) + radius = 0.5f * (60000 - auraHolder->GetAuraDuration()) * 0.001f; + break; + } + case 66881: // Slime Pool (ToCrusader, Acidmaw & Dreadscale) + case 67638: // Slime Pool (ToCrusader, Acidmaw & Dreadscale) (Mode 1) + case 67639: // Slime Pool (ToCrusader, Acidmaw & Dreadscale) (Mode 2) + case 67640: // Slime Pool (ToCrusader, Acidmaw & Dreadscale) (Mode 3) + if (SpellAuraHolder* auraHolder = m_caster->GetSpellAuraHolder(66882)) + radius = 0.5f * (60000 - auraHolder->GetAuraDuration()) * 0.001f; + break; + default: + break; + } + break; + } + default: + break; + } + Unit::AuraList const& mod = m_caster->GetAurasByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS); for(Unit::AuraList::const_iterator m = mod.begin(); m != mod.end(); ++m) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 210ce8f96..ee98b7876 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 "11959" + #define REVISION_NR "11960" #endif // __REVISION_NR_H__