[10630] Convert Set(Get)ChannelObjectGuid to ObjectGuid way.

Also fix typo in debug output for prev. commit.
This commit is contained in:
VladimirMangos 2010-10-20 08:49:27 +04:00
parent 31c9efd219
commit da07caba28
6 changed files with 10 additions and 11 deletions

View file

@ -3808,12 +3808,12 @@ void Spell::SendChannelUpdate(uint32 time)
{
m_caster->RemoveAurasByCasterSpell(m_spellInfo->Id, m_caster->GetGUID());
ObjectGuid target_guid = m_caster->GetChannelObjectGUID();
ObjectGuid target_guid = m_caster->GetChannelObjectGuid();
if (target_guid != m_caster->GetObjectGuid() && target_guid.IsUnit())
if (Unit* target = ObjectAccessor::GetUnit(*m_caster, target_guid))
target->RemoveAurasByCasterSpell(m_spellInfo->Id, m_caster->GetGUID());
m_caster->SetChannelObjectGUID(0);
m_caster->SetChannelObjectGuid(ObjectGuid());
m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL, 0);
}
@ -3861,7 +3861,7 @@ void Spell::SendChannelStart(uint32 duration)
m_timer = duration;
if (target)
m_caster->SetChannelObjectGUID(target->GetGUID());
m_caster->SetChannelObjectGuid(target->GetObjectGuid());
m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL, m_spellInfo->Id);
}