aboutsummaryrefslogtreecommitdiff
path: root/src/game/PetHandler.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-16 12:00:14 -0600
committermegamage <none@none>2009-03-16 12:00:14 -0600
commit3eba06e4ad7c9b92babd3df14d0602212e60b7cc (patch)
tree2dde1616704447c9c2a0d0ab0c4d6cc523a2842f /src/game/PetHandler.cpp
parent2453f2212324d656676693fd2b420290797a9ebf (diff)
*Use SpellCastResult and finaly fix SPELL_CAST_OK value (255 custom value now). By VladimirMangos.
--HG-- branch : trunk
Diffstat (limited to 'src/game/PetHandler.cpp')
-rw-r--r--src/game/PetHandler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp
index 11caeb74a55..9f9cb3a33a3 100644
--- a/src/game/PetHandler.cpp
+++ b/src/game/PetHandler.cpp
@@ -207,7 +207,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
Spell *spell = new Spell(pet, spellInfo, false);
- int16 result = spell->PetCanCast(unit_target);
+ SpellCastResult result = spell->CheckPetCast(unit_target);
//auto turn to target unless possessed
if(result == SPELL_FAILED_UNIT_NOT_INFRONT && !pet->isPossessed())
@@ -218,10 +218,10 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
if(Unit* powner = pet->GetCharmerOrOwner())
if(powner->GetTypeId() == TYPEID_PLAYER)
pet->SendUpdateToPlayer((Player*)powner);
- result = -1;
+ result = SPELL_CAST_OK;
}
- if(result == -1)
+ if(result == SPELL_CAST_OK)
{
((Creature*)pet)->AddCreatureSpellCooldown(spellid);
if (((Creature*)pet)->isPet())
@@ -624,8 +624,8 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
spell->m_cast_count = cast_count; // probably pending spell cast
spell->m_targets = targets;
- int16 result = spell->PetCanCast(NULL);
- if(result == -1)
+ SpellCastResult result = spell->CheckPetCast(NULL);
+ if(result == SPELL_CAST_OK)
{
if(caster->GetTypeId() == TYPEID_UNIT)
{