*Fix a crash in CanCast.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-23 16:13:30 -06:00
parent 2c6e5a4b23
commit e9fb303e36
+1 -3
View File
@@ -4212,12 +4212,10 @@ SpellCastResult Spell::CheckCast(bool strict)
{
if(m_caster->GetPetGUID()) //let warlock do a replacement summon
{
Pet* pet = ((Player*)m_caster)->GetPet();
if (m_caster->GetTypeId()==TYPEID_PLAYER && m_caster->getClass()==CLASS_WARLOCK)
{
if (strict) //starting cast, trigger pet stun (cast by pet so it doesn't attack player)
if(Pet* pet = m_caster->GetPet())
pet->CastSpell(pet, 32752, true, NULL, NULL, pet->GetGUID());
}
else