*Fix a crash in CanCast.
--HG-- branch : trunk
This commit is contained in:
+2
-4
@@ -4212,13 +4212,11 @@ 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)
|
||||
pet->CastSpell(pet, 32752, true, NULL, NULL, pet->GetGUID());
|
||||
if(Pet* pet = m_caster->GetPet())
|
||||
pet->CastSpell(pet, 32752, true, NULL, NULL, pet->GetGUID());
|
||||
}
|
||||
else
|
||||
return SPELL_FAILED_ALREADY_HAVE_SUMMON;
|
||||
|
||||
Reference in New Issue
Block a user