Skip to content

Instantly share code, notes, and snippets.

@Retriman
Created October 4, 2012 21:13
Show Gist options
  • Save Retriman/3836496 to your computer and use it in GitHub Desktop.
Save Retriman/3836496 to your computer and use it in GitHub Desktop.
Totems de chami(tremor, grounding) respetando colision y LoS q no deberia ser
@@ -3474,11 +3474,11 @@ void Unit::_UnapplyAura(AuraApplicationMap::iterator &i, AuraRemoveMode removeMo
// all effect mustn't be applied
ASSERT(!aurApp->GetEffectMask());
// Remove totem at next update if totem loses its aura
- if (aurApp->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE && GetTypeId() == TYPEID_UNIT && ToCreature()->isTotem()&& ToTotem()->GetSummonerGUID() == aura->GetCasterGUID())
+ if (aurApp->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE && GetTypeId() == TYPEID_UNIT && ToCreature()->isTotem())
{
if (ToTotem()->GetSpell() == aura->GetId() && ToTotem()->GetTotemType() == TOTEM_PASSIVE)
ToTotem()->setDeathState(JUST_DIED);
}
@@ -10207,15 +10207,14 @@ Unit* Unit::GetMagicHitRedirectTarget(Unit* victim, SpellInfo const* spellInfo)
return victim;
Unit::AuraEffectList const& magnetAuras = victim->GetAuraEffectsByType(SPELL_AURA_SPELL_MAGNET);
for (Unit::AuraEffectList::const_iterator itr = magnetAuras.begin(); itr != magnetAuras.end(); ++itr)
{
- if (Unit* magnet = (*itr)->GetBase()->GetCaster())
+ if (Unit* magnet = (*itr)->GetBase()->GetUnitOwner())
if (spellInfo->CheckExplicitTarget(this, magnet) == SPELL_CAST_OK
&& spellInfo->CheckTarget(this, magnet, false) == SPELL_CAST_OK
- && _IsValidAttackTarget(magnet, spellInfo)
- && IsWithinLOSInMap(magnet))
+ && _IsValidAttackTarget(magnet, spellInfo))
{
// TODO: handle this charge drop by proc in cast phase on explicit target
(*itr)->GetBase()->DropCharge(AURA_REMOVE_BY_EXPIRE);
return magnet;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment