Core/Spells: ported radius entry indexing from master branch and dropped several now deprecated spell 'fixes' from spellMgr

This commit is contained in:
Ovahlord committed 2023-08-06 12:54:05 +02:00
1 parent 569d66d352
commit 2bcc645cd3
13 files changed
+97 -523

No files matched your search

@@ -0,0 +1 @@
DELETE FROM `spell_script_names` WHERE `ScriptName´= 'spell_anraphet_omega_stance_spider_effect';
@@ -31,6 +31,12 @@ enum SpellEffIndex : uint8
EFFECT_2 = 2
};
enum class SpellTargetIndex : uint8
{
TargetA = 0,
TargetB = 1
};
// used in script definitions
#define EFFECT_FIRST_FOUND 254
#define EFFECT_ALL 255
+26 -25
View File
@@ -825,8 +825,8 @@ void Spell::SelectSpellTargets()
if (implicitTargetMask & (TARGET_FLAG_GAMEOBJECT | TARGET_FLAG_GAMEOBJECT_ITEM))
m_targets.SetTargetFlag(TARGET_FLAG_GAMEOBJECT);
SelectEffectImplicitTargets(SpellEffIndex(i), m_spellInfo->Effects[i].TargetA, processedAreaEffectsMask);
SelectEffectImplicitTargets(SpellEffIndex(i), m_spellInfo->Effects[i].TargetB, processedAreaEffectsMask);
SelectEffectImplicitTargets(SpellEffIndex(i), m_spellInfo->Effects[i].TargetA, SpellTargetIndex::TargetA, processedAreaEffectsMask);
SelectEffectImplicitTargets(SpellEffIndex(i), m_spellInfo->Effects[i].TargetB, SpellTargetIndex::TargetB, processedAreaEffectsMask);
// Select targets of effect based on effect type
// those are used when no valid target could be added for spell effect based on spell target type
@@ -950,7 +950,7 @@ void Spell::RecalculateDelayMomentForDst()
m_caster->m_Events.ModifyEventTime(_spellEvent, GetDelayStart() + m_delayMoment);
}
void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32& processedEffectMask)
void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex, uint32& processedEffectMask)
{
if (!targetType.GetTarget())
return;
@@ -974,7 +974,8 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
effects[effIndex].TargetA.GetTarget() == effects[j].TargetA.GetTarget() &&
effects[effIndex].TargetB.GetTarget() == effects[j].TargetB.GetTarget() &&
effects[effIndex].ImplicitTargetConditions == effects[j].ImplicitTargetConditions &&
effects[effIndex].CalcRadius(m_caster) == effects[j].CalcRadius(m_caster) &&
effects[effIndex].CalcRadius(m_caster, SpellTargetIndex::TargetA) == effects[j].CalcRadius(m_caster, SpellTargetIndex::TargetA) &&
effects[effIndex].CalcRadius(m_caster, SpellTargetIndex::TargetB) == effects[j].CalcRadius(m_caster, SpellTargetIndex::TargetB) &&
CheckScriptEffectImplicitTargets(effIndex, j))
{
effectMask |= 1 << j;
@@ -992,13 +993,13 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
SelectImplicitChannelTargets(effIndex, targetType);
break;
case TARGET_SELECT_CATEGORY_NEARBY:
SelectImplicitNearbyTargets(effIndex, targetType, effectMask);
SelectImplicitNearbyTargets(effIndex, targetType, targetIndex, effectMask);
break;
case TARGET_SELECT_CATEGORY_CONE:
SelectImplicitConeTargets(effIndex, targetType, effectMask);
SelectImplicitConeTargets(effIndex, targetType, targetIndex, effectMask);
break;
case TARGET_SELECT_CATEGORY_AREA:
SelectImplicitAreaTargets(effIndex, targetType, effectMask);
SelectImplicitAreaTargets(effIndex, targetType, targetIndex,effectMask);
break;
case TARGET_SELECT_CATEGORY_TRAJ:
// just in case there is no dest, explanation in SelectImplicitDestDestTargets
@@ -1024,13 +1025,13 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
switch (targetType.GetReferenceType())
{
case TARGET_REFERENCE_TYPE_CASTER:
SelectImplicitCasterDestTargets(effIndex, targetType);
SelectImplicitCasterDestTargets(effIndex, targetType, targetIndex);
break;
case TARGET_REFERENCE_TYPE_TARGET:
SelectImplicitTargetDestTargets(effIndex, targetType);
SelectImplicitTargetDestTargets(effIndex, targetType, targetIndex);
break;
case TARGET_REFERENCE_TYPE_DEST:
SelectImplicitDestDestTargets(effIndex, targetType);
SelectImplicitDestDestTargets(effIndex, targetType, targetIndex);
break;
default:
ASSERT(false && "Spell::SelectEffectImplicitTargets: received not implemented select target reference type for TARGET_TYPE_OBJECT_DEST");
@@ -1118,7 +1119,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa
}
}
void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32 effMask)
void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, [[maybe_unused]] SpellTargetIndex targetIndex, uint32 effMask)
{
if (targetType.GetReferenceType() != TARGET_REFERENCE_TYPE_CASTER)
{
@@ -1258,7 +1259,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
SelectImplicitChainTargets(effIndex, targetType, target, effMask);
}
void Spell::SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32 effMask)
void Spell::SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex, uint32 effMask)
{
Position coneSrc(*m_caster);
float coneAngle = m_spellInfo->ConeAngle;
@@ -1289,7 +1290,7 @@ void Spell::SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTarge
SpellTargetCheckTypes selectionType = targetType.GetCheckType();
ConditionContainer* condList = m_spellInfo->Effects[effIndex].ImplicitTargetConditions;
float radius = m_spellInfo->Effects[effIndex].CalcRadius(m_caster);
float radius = m_spellInfo->Effects[effIndex].CalcRadius(m_caster, targetIndex);
// Workaround for some spells that don't have RadiusEntry set in dbc (but SpellRange instead)
if (G3D::fuzzyEq(radius, 0.f))
radius = m_spellInfo->GetMaxRange(m_spellInfo->IsPositiveEffect(effIndex), m_caster, this);
@@ -1323,7 +1324,7 @@ void Spell::SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTarge
}
}
void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32 effMask)
void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex, uint32 effMask)
{
WorldObject* referer = nullptr;
switch (targetType.GetReferenceType())
@@ -1376,7 +1377,7 @@ void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTarge
return;
}
float radius = m_spellInfo->Effects[effIndex].CalcRadius(m_caster);
float radius = m_spellInfo->Effects[effIndex].CalcRadius(m_caster, targetIndex);
// Workaround for some spells that don't have RadiusEntry set in dbc (but SpellRange instead)
if (G3D::fuzzyEq(radius, 0.f))
@@ -1433,7 +1434,7 @@ void Spell::SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTarge
}
}
void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex)
{
SpellDestination dest(*m_caster);
@@ -1501,7 +1502,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
if (!unitCaster)
break;
float dist = m_spellInfo->Effects[effIndex].CalcRadius(unitCaster);
float dist = m_spellInfo->Effects[effIndex].CalcRadius(unitCaster, targetIndex);
float angle = targetType.CalcDirectionAngle(m_spellInfo->Effects[effIndex]);
Position pos = dest._position;
@@ -1519,8 +1520,8 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
float dist = [&]()
{
// Effect specific radius may override default behavior
if (m_spellInfo->Effects[effIndex].HasRadius())
return m_spellInfo->Effects[effIndex].CalcRadius(m_caster);
if (m_spellInfo->Effects[effIndex].HasRadius(targetIndex))
return m_spellInfo->Effects[effIndex].CalcRadius(m_caster, targetIndex);
// Gameobject summons use range entries
if (m_spellInfo->Effects[effIndex].Effect == SPELL_EFFECT_TRANS_DOOR)
@@ -1547,7 +1548,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
}
default:
{
float dist = m_spellInfo->Effects[effIndex].CalcRadius(m_caster);
float dist = m_spellInfo->Effects[effIndex].CalcRadius(m_caster, targetIndex);
float angle = targetType.CalcDirectionAngle(m_spellInfo->Effects[effIndex]);
float objSize = m_caster->GetCombatReach();
@@ -1563,7 +1564,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
case TARGET_DEST_CASTER_BACK_RIGHT:
{
static float const DefaultTotemDistance = 3.0f;
if (!m_spellInfo->Effects[effIndex].HasRadius())
if (!m_spellInfo->Effects[effIndex].HasRadius(targetIndex))
dist = DefaultTotemDistance;
break;
}
@@ -1586,7 +1587,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
m_targets.SetDst(dest);
}
void Spell::SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
void Spell::SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex)
{
ASSERT(m_targets.GetObjectTarget() && "Spell::SelectImplicitTargetDestTargets - no explicit object target available!");
WorldObject* target = m_targets.GetObjectTarget();
@@ -1601,7 +1602,7 @@ void Spell::SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplici
default:
{
float angle = targetType.CalcDirectionAngle(m_spellInfo->Effects[effIndex]);
float dist = m_spellInfo->Effects[effIndex].CalcRadius(nullptr);
float dist = m_spellInfo->Effects[effIndex].CalcRadius(nullptr, targetIndex);
if (targetType.GetTarget() == TARGET_DEST_TARGET_RANDOM)
dist *= float(rand_norm());
@@ -1617,7 +1618,7 @@ void Spell::SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplici
m_targets.SetDst(dest);
}
void Spell::SelectImplicitDestDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType)
void Spell::SelectImplicitDestDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex)
{
// set destination to caster if no dest provided
// can only happen if previous destination target could not be set for some reason
@@ -1637,7 +1638,7 @@ void Spell::SelectImplicitDestDestTargets(SpellEffIndex effIndex, SpellImplicitT
default:
{
float angle = targetType.CalcDirectionAngle(m_spellInfo->Effects[effIndex]);
float dist = m_spellInfo->Effects[effIndex].CalcRadius(m_caster);
float dist = m_spellInfo->Effects[effIndex].CalcRadius(m_caster, targetIndex);
if (targetType.GetTarget() == TARGET_DEST_DEST_RANDOM)
dist *= float(rand_norm());
+7 -7
View File
@@ -419,14 +419,14 @@ class TC_GAME_API Spell
void SelectExplicitTargets();
void SelectSpellTargets();
void SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32& processedEffectMask);
void SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex, uint32& processedEffectMask);
void SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
void SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32 effMask);
void SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32 effMask);
void SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, uint32 effMask);
void SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
void SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
void SelectImplicitDestDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
void SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex, uint32 effMask);
void SelectImplicitConeTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex, uint32 effMask);
void SelectImplicitAreaTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex, uint32 effMask);
void SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex);
void SelectImplicitTargetDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex);
void SelectImplicitDestDestTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, SpellTargetIndex targetIndex);
void SelectImplicitCasterObjectTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
void SelectImplicitTargetObjectTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType);
void SelectImplicitChainTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, WorldObject* target, uint32 effMask);
+2 -2
View File
@@ -3268,7 +3268,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
case 45151:
{
//Workaround for Range ... should be global for every ScriptEffect
float radius = m_spellInfo->Effects[effIndex].CalcRadius();
float radius = m_spellInfo->Effects[effIndex].CalcRadius(nullptr, SpellTargetIndex::TargetB);
if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->GetDistance(m_caster) >= radius && !unitTarget->HasAura(46394) && unitTarget != m_caster)
unitTarget->CastSpell(unitTarget, 46394, true);
@@ -4903,7 +4903,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
if (m_targets.HasDst())
destTarget->GetPosition(fx, fy, fz, fo);
//FIXME: this can be better check for most objects but still hack
else if (m_spellInfo->Effects[effIndex].HasRadius() && m_spellInfo->Speed == 0)
else if (m_spellInfo->Effects[effIndex].HasRadius(SpellTargetIndex::TargetA) && m_spellInfo->Speed == 0)
{
float dis = m_spellInfo->Effects[effIndex].CalcRadius(unitCaster);
unitCaster->GetClosePoint(fx, fy, fz, DEFAULT_PLAYER_BOUNDING_RADIUS, dis);
+19 -13
View File
@@ -380,8 +380,8 @@ SpellEffectInfo::SpellEffectInfo(SpellEntry const* /*spellEntry*/, SpellInfo con
Mechanic = Mechanics(_effect ? _effect->EffectMechanic : 0);
TargetA = SpellImplicitTargetInfo(_effect ? _effect->EffectImplicitTargetA : 0);
TargetB = SpellImplicitTargetInfo(_effect ? _effect->EffectImplicitTargetB : 0);
RadiusEntry = _effect && _effect->EffectRadiusIndex ? sSpellRadiusStore.LookupEntry(_effect->EffectRadiusIndex) : nullptr;
MaxRadiusEntry = _effect && _effect->EffectRadiusMaxIndex ? sSpellRadiusStore.LookupEntry(_effect->EffectRadiusMaxIndex) : nullptr;
TargetARadiusEntry = _effect && _effect->EffectRadiusIndex ? sSpellRadiusStore.LookupEntry(_effect->EffectRadiusIndex) : nullptr;
TargetBRadiusEntry = _effect && _effect->EffectRadiusMaxIndex ? sSpellRadiusStore.LookupEntry(_effect->EffectRadiusMaxIndex) : nullptr;
ChainTarget = _effect ? _effect->EffectChainTargets : 0;
ItemType = _effect ? _effect->EffectItemType : 0;
TriggerSpell = _effect ? _effect->EffectTriggerSpell : 0;
@@ -616,21 +616,27 @@ float SpellEffectInfo::CalcDamageMultiplier(WorldObject* caster, Spell* spell) c
return multiplierPercent / 100.0f;
}
bool SpellEffectInfo::HasRadius() const
bool SpellEffectInfo::HasRadius(SpellTargetIndex targetIndex) const
{
return RadiusEntry != nullptr;
switch (targetIndex)
{
case SpellTargetIndex::TargetA:
return TargetARadiusEntry != nullptr;
case SpellTargetIndex::TargetB:
return TargetBRadiusEntry != nullptr;
default:
return false;
}
}
bool SpellEffectInfo::HasMaxRadius() const
float SpellEffectInfo::CalcRadius(WorldObject* caster /*= nullptr*/, SpellTargetIndex targetIndex /*=SpellTargetIndex::TargetA*/, Spell* spell /*= nullptr*/) const
{
return MaxRadiusEntry != nullptr;
}
float SpellEffectInfo::CalcRadius(WorldObject* caster, Spell* spell) const
{
const SpellRadiusEntry* entry = RadiusEntry;
if (!HasRadius() && HasMaxRadius())
entry = MaxRadiusEntry;
// TargetA -> TargetARadiusEntry
// TargetB -> TargetBRadiusEntry
// Aura effects have TargetARadiusEntry == TargetBRadiusEntry (mostly)
SpellRadiusEntry const* entry = TargetARadiusEntry;
if (targetIndex == SpellTargetIndex::TargetB && HasRadius(targetIndex))
entry = TargetBRadiusEntry;
if (!entry)
return 0.0f;
+5 -6
View File
@@ -261,8 +261,8 @@ public:
Mechanics Mechanic;
SpellImplicitTargetInfo TargetA;
SpellImplicitTargetInfo TargetB;
SpellRadiusEntry const* RadiusEntry;
SpellRadiusEntry const* MaxRadiusEntry;
SpellRadiusEntry const* TargetARadiusEntry;
SpellRadiusEntry const* TargetBRadiusEntry;
uint32 ChainTarget;
uint32 ItemType;
uint32 TriggerSpell;
@@ -278,7 +278,7 @@ public:
SpellEffectInfo() : _spellInfo(nullptr), _effIndex(0), Effect(0), ApplyAuraName(0), AuraPeriod(0), DieSides(0),
RealPointsPerLevel(0.f), BasePoints(0), PointsPerComboPoint(0), Amplitude(0.f), DamageMultiplier(0.f),
BonusMultiplier(0.f), MiscValue(0), MiscValueB(0), Mechanic(MECHANIC_NONE), RadiusEntry(nullptr), MaxRadiusEntry(nullptr),
BonusMultiplier(0.f), MiscValue(0), MiscValueB(0), Mechanic(MECHANIC_NONE), TargetARadiusEntry(nullptr), TargetBRadiusEntry(nullptr),
ChainTarget(0), ItemType(0), TriggerSpell(0), ImplicitTargetConditions(nullptr) { }
SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex, SpellEffectEntry const* effect);
@@ -296,9 +296,8 @@ public:
float CalcValueMultiplier(WorldObject* caster, Spell* spell = nullptr) const;
float CalcDamageMultiplier(WorldObject* caster, Spell* spell = nullptr) const;
bool HasRadius() const;
bool HasMaxRadius() const;
float CalcRadius(WorldObject* caster = nullptr, Spell* = nullptr) const;
bool HasRadius(SpellTargetIndex targetIndex) const;
float CalcRadius(WorldObject* caster = nullptr, SpellTargetIndex targetIndex = SpellTargetIndex::TargetA, Spell* = nullptr) const;
uint32 GetProvidedTargetMask() const;
uint32 GetMissingTargetMask(bool srcSet = false, bool destSet = false, uint32 mask = 0) const;
+27 -442
View File
@@ -3048,12 +3048,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_0].BonusMultiplier = spellInfo->Effects[EFFECT_1].BonusMultiplier;
});
// Howl of Azgalor
ApplySpellFix({ 31344 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_100_YARDS); // 100yards instead of 50000?!
});
ApplySpellFix({
42818, // Headless Horseman - Wisp Flight Port
42821 // Headless Horseman - Wisp Flight Missile
@@ -3086,14 +3080,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_SRC_AREA_ENEMY);
});
// Improved Spell Reflection - aoe aura
ApplySpellFix({ 59725 }, [](SpellInfo* spellInfo)
{
// Target entry seems to be wrong for this spell :/
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_CASTER_AREA_PARTY);
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_20_YARDS);
});
ApplySpellFix({
31347, // Doom
36327, // Shoot Arcane Explosion Arrow
@@ -3501,13 +3487,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx |= SPELL_ATTR1_NO_THREAT;
});
// Siege Cannon (Tol Barad)
ApplySpellFix({ 85123 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS);
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_UNIT_SRC_AREA_ENTRY);
});
ApplySpellFix({
46842, // Flame Ring
46836 // Flame Patch
@@ -3571,12 +3550,6 @@ void SpellMgr::LoadSpellInfoCorrections()
});
// ENDOF BLACK TEMPLE SPELLS
// Summon Corpse Scarabs
ApplySpellFix({ 28864, 29105 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_10_YARDS);
});
// Tag Greater Felfire Diemetradon
ApplySpellFix({ 37851 }, [](SpellInfo* spellInfo)
{
@@ -3632,27 +3605,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->RecoveryTime = 1000;
});
//
// VIOLET HOLD SPELLS
//
// Water Globule (Ichoron)
ApplySpellFix({ 54258, 54264, 54265, 54266, 54267 }, [](SpellInfo* spellInfo)
{
// in 3.3.5 there is only one radius in dbc which is 0 yards in this
// use max radius from 4.3.4
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_25_YARDS);
});
// ENDOF VIOLET HOLD
//
// ULDUAR SPELLS
//
// Pursued (Flame Leviathan)
ApplySpellFix({ 62374 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
});
// Focused Eyebeam Summon Trigger (Kologarn)
ApplySpellFix({ 63342 }, [](SpellInfo* spellInfo)
{
@@ -3779,31 +3731,6 @@ void SpellMgr::LoadSpellInfoCorrections()
});
// ENDOF TRIAL OF THE CRUSADER SPELLS
//
// HALLS OF REFLECTION SPELLS
//
ApplySpellFix({
72435, // Defiling Horror
72452 // Defiling Horror
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_60_YARDS); // 60yd
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_60_YARDS); // 60yd
});
// Achievement Check
ApplySpellFix({ 72830 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
});
// Start Halls of Reflection Quest AE
ApplySpellFix({ 72900 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
});
// ENDOF HALLS OF REFLECTION SPELLS
//
// ICECROWN CITADEL SPELLS
//
@@ -3823,20 +3750,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_DEST_DB);
});
ApplySpellFix({
69075, // Bone Storm (Lord Marrowgar)
70834, // Bone Storm (Lord Marrowgar)
70835, // Bone Storm (Lord Marrowgar)
70836, // Bone Storm (Lord Marrowgar)
72864, // Death Plague (Rotting Frost Giant)
71160, // Plague Stench (Stinky)
71161, // Plague Stench (Stinky)
71123 // Decimate (Stinky & Precious)
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_100_YARDS); // 100yd
});
// Shadow's Fate
ApplySpellFix({ 71169 }, [](SpellInfo* spellInfo)
{
@@ -3871,28 +3784,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesCu |= SPELL_ATTR0_CU_CONE_LINE;
});
// Award Reputation - Boss Kill
ApplySpellFix({ 73843, 73844, 73845, 73846 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
});
ApplySpellFix({
72378, // Blood Nova (Deathbringer Saurfang)
73058, // Blood Nova (Deathbringer Saurfang)
72769 // Scent of Blood (Deathbringer Saurfang)
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS);
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS);
});
// Scent of Blood (Deathbringer Saurfang)
ApplySpellFix({ 72771 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS);
});
// Resistant Skin (Deathbringer Saurfang adds)
ApplySpellFix({ 72723 }, [](SpellInfo* spellInfo)
{
@@ -3940,27 +3831,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_1].Effect = 0;
});
// Mutated Plague (Professor Putricide)
ApplySpellFix({ 72454, 72464, 72506, 72507 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
});
// Unbound Plague (Professor Putricide) (needs target selection script)
ApplySpellFix({ 70911, 72854, 72855, 72856 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].TargetB = SpellImplicitTargetInfo(TARGET_UNIT_TARGET_ENEMY);
});
ApplySpellFix({
71518, // Unholy Infusion Quest Credit (Professor Putricide)
72934, // Blood Infusion Quest Credit (Blood-Queen Lana'thel)
72289 // Frost Infusion Quest Credit (Sindragosa)
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // another missing radius
});
// Empowered Flare (Blood Prince Council)
ApplySpellFix({ 71708, 72785, 72786, 72787 }, [](SpellInfo* spellInfo)
{
@@ -3991,12 +3867,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(9); // 30 seconds (missing)
});
// Frostbolt Volley (only heroic)
ApplySpellFix({ 72015, 72016 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_2].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_40_YARDS);
});
// Summon Suppressor (needs target selection script)
ApplySpellFix({ 70936 }, [](SpellInfo* spellInfo)
{
@@ -4005,14 +3875,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(157); // 90yd
});
ApplySpellFix({
72706, // Achievement Check (Valithria Dreamwalker)
71357 // Order Whelp
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
});
// Sindragosa's Fury
ApplySpellFix({ 70598 }, [](SpellInfo* spellInfo)
{
@@ -4053,15 +3915,13 @@ void SpellMgr::LoadSpellInfoCorrections()
// Defile
ApplySpellFix({ 72754, 73708, 73709, 73710 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
spellInfo->Effects[EFFECT_0].TargetBRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
spellInfo->Effects[EFFECT_1].TargetBRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
});
// Val'kyr Target Search
ApplySpellFix({ 69030 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
spellInfo->Attributes |= SPELL_ATTR0_NO_IMMUNITIES;
});
@@ -4071,14 +3931,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(13); // 50000yd
});
// Harvest Souls
ApplySpellFix({ 73654, 74295, 74296, 74297 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
spellInfo->Effects[EFFECT_2].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
});
// Harvest Soul
ApplySpellFix({ 73655 }, [](SpellInfo* spellInfo)
{
@@ -4097,91 +3949,51 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(28); // 5 seconds
});
// Shadow Trap
ApplySpellFix({ 73529 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_10_YARDS); // 10yd
});
// Shadow Trap (searcher)
ApplySpellFix({ 74282 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_5_YARDS); // 5yd
});
// Restore Soul
ApplySpellFix({ 72595, 73650 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
spellInfo->Effects[EFFECT_0].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
});
// Destroy Soul
ApplySpellFix({ 74086 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
spellInfo->Effects[EFFECT_0].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
});
// Summon Spirit Bomb
ApplySpellFix({ 74302, 74342 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
spellInfo->Effects[EFFECT_0].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
spellInfo->MaxAffectedTargets = 1;
});
// Summon Spirit Bomb
ApplySpellFix({ 74341, 74343 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
spellInfo->Effects[EFFECT_0].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
spellInfo->MaxAffectedTargets = 3;
});
// Summon Spirit Bomb
ApplySpellFix({ 73579 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_25_YARDS); // 25yd
});
// Fury of Frostmourne
ApplySpellFix({ 72350 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
});
ApplySpellFix(
{
75127, // Kill Frostmourne Players
72351, // Fury of Frostmourne
72431, // Jump (removes Fury of Frostmourne debuff)
72429, // Mass Resurrection
73159, // Play Movie
73582 // Trigger Vile Spirit (Inside, Heroic)
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
spellInfo->Effects[EFFECT_0].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_25_YARDS); // 25yd
});
// Raise Dead
ApplySpellFix({ 72376 }, [](SpellInfo* spellInfo)
{
spellInfo->MaxAffectedTargets = 3;
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
});
// Jump
ApplySpellFix({ 71809 }, [](SpellInfo* spellInfo)
{
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(5); // 40yd
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_10_YARDS); // 10yd
spellInfo->Effects[EFFECT_0].MiscValue = 190;
});
// Broken Frostmourne
ApplySpellFix({ 72405 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_20_YARDS); // 20yd
spellInfo->AttributesEx |= SPELL_ATTR1_NO_THREAT;
});
// ENDOF ICECROWN CITADEL SPELLS
//
@@ -4190,13 +4002,7 @@ void SpellMgr::LoadSpellInfoCorrections()
// Soul Consumption
ApplySpellFix({ 74799 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_12_YARDS);
});
// Twilight Cutter
ApplySpellFix({ 74769, 77844, 77845, 77846 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_100_YARDS); // 100yd
spellInfo->Effects[EFFECT_1].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_12_YARDS);
});
// Twilight Mending
@@ -4211,18 +4017,18 @@ void SpellMgr::LoadSpellInfoCorrections()
{
spellInfo->Effects[EFFECT_0].Mechanic = MECHANIC_NONE;
spellInfo->Effects[EFFECT_1].Mechanic = MECHANIC_SNARE;
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_6_YARDS);
spellInfo->Effects[EFFECT_1].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_6_YARDS);
});
ApplySpellFix({ 75884 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_6_YARDS);
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_6_YARDS);
spellInfo->Effects[EFFECT_0].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_6_YARDS);
spellInfo->Effects[EFFECT_1].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_6_YARDS);
});
ApplySpellFix({ 75883, 75876 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_6_YARDS);
spellInfo->Effects[EFFECT_1].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_6_YARDS);
});
// ENDOF RUBY SANCTUM SPELLS
@@ -4276,41 +4082,11 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AuraInterruptFlags = SpellAuraInterruptFlags::Damage | SpellAuraInterruptFlags::HostileActionReceived;
});
// Rupture
ApplySpellFix({ 95669 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_1].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_8_YARDS);
});
// ENDOF STONECORE SPELLS
//
// THE VORTEX PINNACLE SPELLS
//
// Howling Gale
ApplySpellFix({ 85085 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_5_YARDS);
});
// Howling Gale
ApplySpellFix({ 85159 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(84); // To-do: Enum this radius entry - EFFECT_RADIUS_17_YARDS.
});
// Upwind of Altairus
ApplySpellFix({ 88282 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS);
});
// Twisting Winds
ApplySpellFix({ 88314 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_3_YARDS);
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_3_YARDS);
});
// Grounding Field
ApplySpellFix({
@@ -4413,11 +4189,6 @@ void SpellMgr::LoadSpellInfoCorrections()
});
// Ascendant Council
// Disperse
ApplySpellFix({ 83087 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS);
});
// Frozen Orb
ApplySpellFix({ 92267 }, [](SpellInfo* spellInfo)
@@ -4494,7 +4265,7 @@ void SpellMgr::LoadSpellInfoCorrections()
// Charge
ApplySpellFix({ 88295 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_100_YARDS);
spellInfo->Effects[EFFECT_0].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_100_YARDS);
});
// "Captain" Cookie
@@ -4511,7 +4282,7 @@ void SpellMgr::LoadSpellInfoCorrections()
// Spark
ApplySpellFix({ 95520 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_1_YARD);
spellInfo->Effects[EFFECT_0].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_1_YARD);
});
// Summon Defias
@@ -4545,15 +4316,9 @@ void SpellMgr::LoadSpellInfoCorrections()
// Commander Ulthok
// Dark Fissure
ApplySpellFix({ 76047 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_1_YARD);
});
ApplySpellFix({ 96311 }, [](SpellInfo* spellInfo)
{
spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(21); // Infinite
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_1_YARD);
});
// Ozumat
@@ -4561,7 +4326,7 @@ void SpellMgr::LoadSpellInfoCorrections()
ApplySpellFix({ 76953 }, [](SpellInfo* spellInfo)
{
spellInfo->MaxAffectedTargets = 5;
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_100_YARDS);
spellInfo->Effects[EFFECT_0].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_100_YARDS);
});
// Summon Murloc Add Trigger
@@ -4661,11 +4426,6 @@ void SpellMgr::LoadSpellInfoCorrections()
// THE LOST CITY OF THE TOL'VIR SPELLS
//
// General Husam
// Summon Shockwave Target N
ApplySpellFix({ 83131 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_4_YARDS);
});
// Hurl
ApplySpellFix({ 83235 }, [](SpellInfo* spellInfo)
@@ -4675,29 +4435,10 @@ void SpellMgr::LoadSpellInfoCorrections()
});
// High Prophet Barim
// Heaven's Fury
ApplySpellFix({ 81942, 90040 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_4_YARDS);
});
// Hallowed Ground
ApplySpellFix({ 88814, 90010 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_13_YARDS);
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_13_YARDS);
});
// Blaze of the Heavens
ApplySpellFix({ 91196 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_3_YARDS);
});
// Blaze of the Heavens
ApplySpellFix({ 95249 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_3_YARDS);
spellInfo->Effects[EFFECT_0].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_3_YARDS);
});
// Soul Fragment
@@ -4706,20 +4447,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx5 |= SPELL_ATTR5_ALLOW_ACTIONS_DURING_CHANNEL;
});
// Lockmaw and Augh
// Dust Flail
ApplySpellFix({ 81643, 81652 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_11_YARDS);
});
// Siamat
// Lightning Charge
ApplySpellFix({ 91872 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_10_YARDS);
});
// Generic Spells
// Slipstream
ApplySpellFix({ 91872 }, [](SpellInfo* spellInfo)
@@ -4738,7 +4465,7 @@ void SpellMgr::LoadSpellInfoCorrections()
}, [](SpellInfo* spellInfo)
{
// Little hack, Increase the radius so it can hit the Cave In Stalkers in the platform.
spellInfo->Effects[EFFECT_0].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_45_YARDS);
spellInfo->Effects[EFFECT_0].TargetBRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_45_YARDS);
});
// Destruction Protocoll
@@ -4747,42 +4474,12 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx2 |= SPELL_ATTR2_NO_INITIAL_THREAT;
});
// Crumbling Ruin
ApplySpellFix({
75609,
91206
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS);
});
// Solar Fire
ApplySpellFix({ 89133, 89878 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_4_YARDS);
});
// Solar Winds
ApplySpellFix({ 74108, 89130 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_4_YARDS);
});
// Spore Cloud
ApplySpellFix({ 75701 }, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx &= ~SPELL_ATTR1_IS_CHANNELLED;
});
// Noxious Spores
ApplySpellFix({
75702,
89889
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = nullptr;
});
ApplySpellFix({
73847, // Summon Sun-Touched Sprite
73848 // Summon Sun-Touched Spriteling
@@ -4796,27 +4493,6 @@ void SpellMgr::LoadSpellInfoCorrections()
//
// SHADOWFANG KEEP SPELLS
//
// Summon Spirit of Wolf Master Nandos
// Summon Spirit of Odo the Blindwatcher
// Summon Spirit of Razorclaw the Butcher
// Summon Spirit of Rethilgore
ApplySpellFix({ 93896, 93859, 93921, 93925 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_15_YARDS);
});
// Desecration Arm
ApplySpellFix({ 67802 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_7_YARDS);
});
// Desecration
ApplySpellFix({ 93691, 94370 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_6_YARDS);
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_6_YARDS);
});
// Toxic Coagulant
ApplySpellFix({ 93617 }, [](SpellInfo* spellInfo)
@@ -4930,12 +4606,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(21); // Infinite
});
// Immolation
ApplySpellFix({ 99845 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_100_YARDS);
});
// World in Flames
// There is no channel update packet in sniffs so we can assume that this is a leftover from a redesign
ApplySpellFix({
@@ -5000,8 +4670,9 @@ void SpellMgr::LoadSpellInfoCorrections()
101237,
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_10_YARDS);
spellInfo->Effects[EFFECT_1].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_10_YARDS);
// HACK! Caster - Target radius calculation needs corrections
spellInfo->Effects[EFFECT_0].TargetBRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_10_YARDS);
spellInfo->Effects[EFFECT_1].TargetBRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_10_YARDS);
});
// ENDOF FIRELANDS SPELLS
@@ -5027,19 +4698,10 @@ void SpellMgr::LoadSpellInfoCorrections()
// ZUL'GURUB SPELLS
//
// Tears of Blood
ApplySpellFix({
96422,
96957,
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_12_YARDS);
});
// Wave of Agony
ApplySpellFix({ 96461 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_2_YARDS);
spellInfo->Effects[EFFECT_0].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_2_YARDS);
});
// Wave of Agony (Damage)
@@ -5052,7 +4714,6 @@ void SpellMgr::LoadSpellInfoCorrections()
ApplySpellFix({ 97355 }, [](SpellInfo* spellInfo)
{
spellInfo->RangeEntry = sSpellRangeStore.LookupEntry(5); // 40yd
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_40_YARDS);
spellInfo->Effects[EFFECT_1].TargetB = SpellImplicitTargetInfo(TARGET_DEST_DEST);
});
@@ -5068,7 +4729,7 @@ void SpellMgr::LoadSpellInfoCorrections()
96319
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS);
spellInfo->Effects[EFFECT_0].TargetBRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS);
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_DEST_DEST);
});
@@ -5081,12 +4742,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(TARGET_DEST_DEST);
});
// Zanzili Fire
ApplySpellFix({ 96916 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_2_YARDS);
});
// Shadow Spike
ApplySpellFix({ 97158 }, [](SpellInfo* spellInfo)
{
@@ -5153,9 +4808,9 @@ void SpellMgr::LoadSpellInfoCorrections()
// Boulder Smash
ApplySpellFix({ 96834 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_5_YARDS);
spellInfo->Effects[EFFECT_1].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_5_YARDS);
spellInfo->Effects[EFFECT_2].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_5_YARDS);
spellInfo->Effects[EFFECT_0].TargetBRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_5_YARDS);
spellInfo->Effects[EFFECT_1].TargetBRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_5_YARDS);
spellInfo->Effects[EFFECT_2].TargetBRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_5_YARDS);
});
// ENDOF ZUL'GURUB SPELLS
@@ -5199,7 +4854,7 @@ void SpellMgr::LoadSpellInfoCorrections()
86191
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_3_YARDS);
spellInfo->Effects[EFFECT_0].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_3_YARDS);
});
// Al'Akir
@@ -5268,7 +4923,6 @@ void SpellMgr::LoadSpellInfoCorrections()
91104,
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50_YARDS);
spellInfo->DurationEntry = sSpellDurationStore.LookupEntry(245); // 50 seconds
});
@@ -5282,12 +4936,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->MaxAffectedTargets = 1;
});
// Lightning Clouds
ApplySpellFix({ 89583 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_80_YARDS);
});
// Lightning Clouds
ApplySpellFix({
89588,
@@ -5504,23 +5152,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT;
});
// Ignition
ApplySpellFix({
92134,
92196,
92197,
92198
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_2_YARDS);
});
// Armageddon
ApplySpellFix({ 92182 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_100_YARDS);
});
// Flamethrower
ApplySpellFix({
79505,
@@ -5551,7 +5182,7 @@ void SpellMgr::LoadSpellInfoCorrections()
// Overcharged Power Generator
ApplySpellFix({ 91858 }, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_5_YARDS);
spellInfo->Effects[EFFECT_1].TargetARadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_5_YARDS);
});
// Sonar Pulse
@@ -5634,20 +5265,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_0].TargetA = SpellImplicitTargetInfo(0);
});
// Growth Catalyst
ApplySpellFix({
77987,
101440,
101441,
101442
}, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx3 |= SPELL_ATTR3_DOT_STACKING_RULE;
spellInfo->Effects[EFFECT_0].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_10_YARDS);
spellInfo->Effects[EFFECT_1].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_10_YARDS);
spellInfo->Effects[EFFECT_2].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_10_YARDS);
});
// Release Aberrations
ApplySpellFix({ 77569 }, [](SpellInfo* spellInfo)
{
@@ -5666,15 +5283,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->AttributesEx2 |= SPELL_ATTR2_NO_INITIAL_THREAT;
});
// Dragon Orb
ApplySpellFix({
78219,
78220
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_4_YARDS);
});
// Shadowflame Breath
ApplySpellFix({
77826,
@@ -5692,17 +5300,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_0].AuraPeriod = 3000;
});
// Lightning Discharge
ApplySpellFix({
81435,
81436,
81437,
81438,
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_18_YARDS);
});
// Hail of Bones
ApplySpellFix({
78684,
@@ -5738,17 +5335,6 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->MaxAffectedTargets = 1;
});
// Lightning Discharge
ApplySpellFix({
81435,
81436,
81437,
81438
}, [](SpellInfo* spellInfo)
{
spellInfo->Effects[EFFECT_0].MaxRadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_18_YARDS);
});
// Explosive Cinders
ApplySpellFix({ 79339 }, [](SpellInfo* spellInfo)
{
@@ -5774,7 +5360,6 @@ void SpellMgr::LoadSpellInfoCorrections()
}, [](SpellInfo* spellInfo)
{
spellInfo->AttributesEx2 |= SPELL_ATTR2_NO_INITIAL_THREAT;
spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_4_YARDS);
});
// Mangle (Hotfix: 2011-03-16: Magmaw overall damage and health was a little too high on all difficulties and has been reduced slightly)
@@ -609,7 +609,7 @@ class spell_helix_sticky_bomb_periodic_trigger : public AuraScript
if (!spell)
return;
if (Player* player = target->SelectNearestPlayer(spell->Effects[EFFECT_0].CalcRadius()))
if (Player* player = target->SelectNearestPlayer(spell->Effects[EFFECT_0].CalcRadius(nullptr, SpellTargetIndex::TargetB)))
{
if (!player->GetVehicleBase() && player->GetExactDist(target) <= 1.0f)
{
@@ -370,29 +370,6 @@ class spell_anraphet_omega_stance_summon : public SpellScript
}
};
// 77127 Omega Stance Spider Effect
class spell_anraphet_omega_stance_spider_effect : public SpellScript
{
void SetDestPosition(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
float angle = float(rand_norm()) * static_cast<float>(2 * M_PI);
uint32 dist = caster->GetCombatReach() + GetSpellInfo()->Effects[EFFECT_0].CalcRadius(caster) * (float)rand_norm();
float x = caster->GetPositionX() + dist * std::cos(angle);
float y = caster->GetPositionY() + dist * std::sin(angle);
float z = caster->GetMap()->GetHeight(caster->GetPhaseShift(), x, y, caster->GetPositionZ());
float o = GetHitDest()->GetOrientation();
GetHitDest()->Relocate({ x, y, z, o });
}
void Register()
{
OnEffectLaunch.Register(&spell_anraphet_omega_stance_spider_effect::SetDestPosition, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
void AddSC_boss_anraphet()
{
RegisterHallsOfOriginationCreatureAI(boss_anraphet);
@@ -402,5 +379,4 @@ void AddSC_boss_anraphet()
RegisterSpellScript(spell_anraphet_alpha_beams);
RegisterSpellScript(spell_anraphet_omega_stance);
RegisterSpellScript(spell_anraphet_omega_stance_summon);
RegisterSpellScript(spell_anraphet_omega_stance_spider_effect);
}
@@ -578,7 +578,7 @@ class spell_marrowgar_coldflame_damage : public SpellScriptLoader
if (target->HasAura(SPELL_IMPALED))
return false;
if (target->GetExactDist2d(GetOwner()) > GetSpellInfo()->Effects[EFFECT_0].CalcRadius())
if (target->GetExactDist2d(GetOwner()) > GetSpellInfo()->Effects[EFFECT_0].CalcRadius(nullptr, SpellTargetIndex::TargetB))
return false;
if (Aura* aur = target->GetAura(GetId()))
@@ -182,7 +182,7 @@ class spell_krystallus_shatter_effect : public SpellScriptLoader
if (!GetHitUnit())
return;
float radius = GetSpellInfo()->Effects[EFFECT_0].CalcRadius(GetCaster());
float radius = GetSpellInfo()->Effects[EFFECT_0].CalcRadius(GetCaster(), SpellTargetIndex::TargetB);
if (!radius)
return;
@@ -310,7 +310,7 @@ class spell_gruul_shatter_effect : public SpellScriptLoader
if (!GetHitUnit())
return;
float radius = GetSpellInfo()->Effects[EFFECT_0].CalcRadius(GetCaster());
float radius = GetSpellInfo()->Effects[EFFECT_0].CalcRadius(GetCaster(), SpellTargetIndex::TargetB);
if (!radius)
return;