aboutsummaryrefslogtreecommitdiff
path: root/src/game/PetHandler.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-07-01 18:36:03 -0500
committermegamage <none@none>2009-07-01 18:36:03 -0500
commit4a8a89e1db1f103020ffecbb570e1c570c2e0d21 (patch)
treed5e62fa664a0f36d668f738abc50ac9406d50e5a /src/game/PetHandler.cpp
parent111dac5f94eac3fe26da2107842dea4e1aacd660 (diff)
[8103] More wide use IsInWorld checks and delayed at teleport operations. Author: Ambal
* IsInWorld used to prevent return unexpected not in world objects. * Delayed operations need to process its in world state. --HG-- branch : trunk
Diffstat (limited to 'src/game/PetHandler.cpp')
-rw-r--r--src/game/PetHandler.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp
index ad3389c8ab4..3d92caa406c 100644
--- a/src/game/PetHandler.cpp
+++ b/src/game/PetHandler.cpp
@@ -500,6 +500,9 @@ void WorldSession::HandlePetAbandon( WorldPacket & recv_data )
recv_data >> guid; //pet guid
sLog.outDetail( "HandlePetAbandon. CMSG_PET_ABANDON pet guid is %u", GUID_LOPART(guid) );
+ if(!_player->IsInWorld())
+ return;
+
// pet/charmed
Creature* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if(pet)