mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Merge pull request #15119 from robinsch/grounding
Core/Spells: Grounding totem fix
Fixes #15108
(cherry picked from commit 3f3ff8b36b)
This commit is contained in:
@@ -7918,7 +7918,6 @@ Unit* Unit::GetMagicHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo)
|
||||
{
|
||||
if (Unit* magnet = (*itr)->GetBase()->GetCaster())
|
||||
if (spellInfo->CheckExplicitTarget(this, magnet) == SPELL_CAST_OK
|
||||
&& spellInfo->CheckTarget(this, magnet, false) == SPELL_CAST_OK
|
||||
&& _IsValidAttackTarget(magnet, spellInfo))
|
||||
{
|
||||
/// @todo handle this charge drop by proc in cast phase on explicit target
|
||||
@@ -7927,7 +7926,7 @@ Unit* Unit::GetMagicHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo)
|
||||
// Set up missile speed based delay
|
||||
uint32 delay = uint32(std::floor(std::max<float>(victim->GetDistance(this), 5.0f) / spellInfo->Speed * 1000.0f));
|
||||
// Schedule charge drop
|
||||
(*itr)->GetBase()->DropChargeDelayed(delay,AURA_REMOVE_BY_EXPIRE);
|
||||
(*itr)->GetBase()->DropChargeDelayed(delay, AURA_REMOVE_BY_EXPIRE);
|
||||
}
|
||||
else
|
||||
(*itr)->GetBase()->DropCharge(AURA_REMOVE_BY_EXPIRE);
|
||||
|
||||
@@ -721,7 +721,7 @@ void Spell::SelectExplicitTargets()
|
||||
{
|
||||
// check for explicit target redirection, for Grounding Totem for example
|
||||
if (m_spellInfo->GetExplicitTargetMask() & TARGET_FLAG_UNIT_ENEMY
|
||||
|| (m_spellInfo->GetExplicitTargetMask() & TARGET_FLAG_UNIT && !m_spellInfo->IsPositive()))
|
||||
|| (m_spellInfo->GetExplicitTargetMask() & TARGET_FLAG_UNIT && !m_caster->IsFriendlyTo(target)))
|
||||
{
|
||||
Unit* redirect;
|
||||
switch (m_spellInfo->DmgClass)
|
||||
|
||||
Reference in New Issue
Block a user