mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[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 <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
067942a978
commit
ff6bec96ae
2 changed files with 38 additions and 1 deletions
|
|
@ -1743,6 +1743,43 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
break;
|
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);
|
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)
|
for(Unit::AuraList::const_iterator m = mod.begin(); m != mod.end(); ++m)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11959"
|
#define REVISION_NR "11960"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue