diff options
author | Gildor <gildor55@gmail.com> | 2022-04-06 23:56:40 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-06-10 15:29:55 +0200 |
commit | b52ce8e65e8998df1b243b854129d359ee2d25ae (patch) | |
tree | 9d9b6972b146c5372d9b4e5a9f280b3e5dcca211 /src/server/game/Spells/Spell.cpp | |
parent | 675af93f13da005dd9875fb5e7b044050bf62b9f (diff) |
Core/Spells: Increase search radius for avoid problems with some spells that can't find units with huge combat reach (#27827)
(cherry picked from commit 70767717c112f1acbf19e5ce366b61ae6dc73475)
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 02262d1500c..81fcf8aa784 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1219,9 +1219,10 @@ void Spell::SelectImplicitConeTargets(SpellEffectInfo const& spellEffectInfo, Sp if (uint32 containerTypeMask = GetSearcherTypeMask(objectType, condList)) { + float extraSearchRadius = radius > 0.0f ? EXTRA_CELL_SEARCH_RADIUS : 0.0f; Trinity::WorldObjectSpellConeTargetCheck check(coneSrc, DegToRad(coneAngle), m_spellInfo->Width ? m_spellInfo->Width : m_caster->GetCombatReach(), radius, m_caster, m_spellInfo, selectionType, condList, objectType); Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellConeTargetCheck> searcher(m_caster, targets, check, containerTypeMask); - SearchTargets<Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellConeTargetCheck> >(searcher, containerTypeMask, m_caster, m_caster, radius); + SearchTargets<Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellConeTargetCheck> >(searcher, containerTypeMask, m_caster, m_caster, radius + extraSearchRadius); CallScriptObjectAreaTargetSelectHandlers(targets, spellEffectInfo.EffectIndex, targetType); @@ -2079,9 +2080,11 @@ void Spell::SearchAreaTargets(std::list<WorldObject*>& targets, float range, Pos uint32 containerTypeMask = GetSearcherTypeMask(objectType, condList); if (!containerTypeMask) return; + + float extraSearchRadius = range > 0.0f ? EXTRA_CELL_SEARCH_RADIUS : 0.0f; Trinity::WorldObjectSpellAreaTargetCheck check(range, position, m_caster, referer, m_spellInfo, selectionType, condList, objectType); Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellAreaTargetCheck> searcher(m_caster, targets, check, containerTypeMask); - SearchTargets<Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellAreaTargetCheck> > (searcher, containerTypeMask, m_caster, position, range); + SearchTargets<Trinity::WorldObjectListSearcher<Trinity::WorldObjectSpellAreaTargetCheck> > (searcher, containerTypeMask, m_caster, position, range + extraSearchRadius); } void Spell::SearchChainTargets(std::list<WorldObject*>& targets, uint32 chainTargets, WorldObject* target, SpellTargetObjectTypes objectType, SpellTargetCheckTypes selectType, SpellEffectInfo const& spellEffectInfo, bool isChainHeal) |