*Fix some restriction of pet spell cast.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-09-01 01:11:28 -05:00
parent 33a0155281
commit 51affe07d0
4 changed files with 28 additions and 3 deletions

View File

@@ -632,7 +632,12 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
spell->m_cast_count = spellid == 33395 ? 0 : cast_count; // probably pending spell cast
spell->m_targets = targets;
SpellCastResult result = spell->CheckPetCast(NULL);
// TODO: need to check victim?
SpellCastResult result;
if(caster->m_movedPlayer)
result = spell->CheckPetCast(caster->m_movedPlayer->GetSelectedUnit());
else
result = spell->CheckPetCast(NULL);
if(result == SPELL_CAST_OK)
{
if(caster->GetTypeId() == TYPEID_UNIT)