Merge pull request #15119 from robinsch/grounding

Core/Spells: Grounding totem fix

Fixes #15108
(cherry picked from commit 3f3ff8b36b)
This commit is contained in:
jackpoz
2015-08-08 21:11:55 +02:00
committed by Carbenium
parent 175b0bcfb5
commit bfb373ef22
2 changed files with 2 additions and 3 deletions

View File

@@ -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);

View File

@@ -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)