aboutsummaryrefslogtreecommitdiff
path: root/src/game/Pet.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-25 10:12:15 -0600
committermegamage <none@none>2009-03-25 10:12:15 -0600
commitd2e0ed5f5701e40e46c3f3c269eb49c4d8dafb08 (patch)
tree3faf0c80fc766f17546f5d0615c7a26494366daf /src/game/Pet.cpp
parentd76578219ff556c604ea20e7328d952e07a709af (diff)
*Only set guardian's ownerguid in setpet.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Pet.cpp')
-rw-r--r--src/game/Pet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index 3048d42d344..031f9d90f8e 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -179,7 +179,8 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
else
m_charmInfo->SetPetNumber(pet_number, false);
- SetOwnerGUID(owner->GetGUID());
+ owner->SetPet(this, true);
+
SetDisplayId(fields[3].GetUInt32());
SetNativeDisplayId(fields[3].GetUInt32());
uint32 petlevel = fields[4].GetUInt32();
@@ -313,7 +314,6 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
_LoadSpells();
_LoadSpellCooldowns();
- owner->SetPet(this, true); // in DB stored only full controlled creature
sLog.outDebug("New Pet has guid %u", GetGUIDLow());
if(owner->GetTypeId() == TYPEID_PLAYER)