From 91b48b33dc4fda03b8b73094c6324806dbd32d4f Mon Sep 17 00:00:00 2001 From: click Date: Sun, 10 Oct 2010 04:23:08 +0200 Subject: Core/Pets: Initialize petlevel before synchronizing with owner --HG-- branch : trunk --- src/server/game/Entities/Pet/Pet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index 5e1843404b9..9e127a157ca 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -229,11 +229,13 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(NULL))); // cast can't be helped here SetCreatorGUID(owner->GetGUID()); + + SetLevel(petlevel); SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, fields[5].GetUInt32()); + SynchronizeLevelWithOwner(); SetReactState(ReactStates(fields[6].GetUInt8())); - SetCanModifyStats(true); if (getPetType() == SUMMON_PET && !current) //all (?) summon pets come with full health when called, but not when they are current -- cgit v1.2.3