*Fix the bug that pets cast damage spells on self. However, this may not be the correct way to fix it. Thank TheGriffon for pointing out the mistake.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-11-26 12:45:13 -06:00
parent b591c21659
commit 6101b5d4b5

View File

@@ -4169,7 +4169,8 @@ int16 Spell::PetCanCast(Unit* target)
duelvsplayertar |= (m_spellInfo->EffectImplicitTargetA[j] == TARGET_DUELVSPLAYER);
}
// AoE spells have the caster as their target
if(m_caster->IsFriendlyTo(target) && m_caster != target && !duelvsplayertar)
// AOE spells should not have target
if(m_caster->IsFriendlyTo(target) /*&& m_caster != target*/ && !duelvsplayertar)
{
return SPELL_FAILED_BAD_TARGETS;
}