aboutsummaryrefslogtreecommitdiff
path: root/src/game/PetHandler.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-09-01 01:11:28 -0500
committermegamage <none@none>2009-09-01 01:11:28 -0500
commit51affe07d01f4dbbf91a173240e965f6b9b3086e (patch)
tree5f129021b501f2b7a1fc0b50a536a9b6bd1db200 /src/game/PetHandler.cpp
parent33a0155281ca0ffb01cf47cddd690249c134ad89 (diff)
*Fix some restriction of pet spell cast.
--HG-- branch : trunk
Diffstat (limited to 'src/game/PetHandler.cpp')
-rw-r--r--src/game/PetHandler.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp
index 53c9873be72..0975a072841 100644
--- a/src/game/PetHandler.cpp
+++ b/src/game/PetHandler.cpp
@@ -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)