aboutsummaryrefslogtreecommitdiff
path: root/src/game/PetHandler.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-27 22:47:28 -0600
committermegamage <none@none>2009-03-27 22:47:28 -0600
commitff83e4a9b13594be4a682da535c9522c9f9de186 (patch)
treeb948e5d4508f23b9c99335d4a92475d9d1f6aea1 /src/game/PetHandler.cpp
parentd0a58f705f34a6831a242977b0059a03dba8b5a6 (diff)
*Fix some bugs of pet.
--HG-- branch : trunk
Diffstat (limited to 'src/game/PetHandler.cpp')
-rw-r--r--src/game/PetHandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp
index ae12bce690b..79788d7a234 100644
--- a/src/game/PetHandler.cpp
+++ b/src/game/PetHandler.cpp
@@ -545,7 +545,7 @@ void WorldSession::HandlePetSpellAutocastOpcode( WorldPacket& recvPacket )
uint8 state; //1 for on, 0 for off
recvPacket >> guid >> spellid >> spellid2 >> state;
- if(!_player->GetPet() && !_player->GetCharm())
+ if(!_player->GetGuardianPet() && !_player->GetCharm())
return;
if(ObjectAccessor::FindPlayer(guid))
@@ -553,7 +553,7 @@ void WorldSession::HandlePetSpellAutocastOpcode( WorldPacket& recvPacket )
Creature* pet=ObjectAccessor::GetCreatureOrPetOrVehicle(*_player,guid);
- if(!pet || (pet != _player->GetPet() && pet != _player->GetCharm()))
+ if(!pet || (pet != _player->GetGuardianPet() && pet != _player->GetCharm()))
{
sLog.outError( "HandlePetSpellAutocastOpcode.Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() );
return;
@@ -598,12 +598,12 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
sLog.outDebug("WORLD: CMSG_PET_CAST_SPELL, cast_count: %u, spellid %u, unk_flags %u", cast_count, spellid, unk_flags);
// This opcode is also sent from charmed and possessed units (players and creatures)
- if(!_player->GetPet() && !_player->GetCharm())
+ if(!_player->GetGuardianPet() && !_player->GetCharm())
return;
Unit* caster = ObjectAccessor::GetUnit(*_player, guid);
- if(!caster || (caster != _player->GetPet() && caster != _player->GetCharm()))
+ if(!caster || (caster != _player->GetGuardianPet() && caster != _player->GetCharm()))
{
sLog.outError( "HandlePetCastSpellOpcode: Pet %u isn't pet of player %s .", uint32(GUID_LOPART(guid)),GetPlayer()->GetName() );
return;