aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorclick <none@none>2010-10-10 05:50:40 +0200
committerclick <none@none>2010-10-10 05:50:40 +0200
commit29bddfa50ccc8ef84180d51a75f8308d15b3aadf (patch)
tree99485e58e6818167724fd0347a7ee27bc3f7756a /src
parent91b48b33dc4fda03b8b73094c6324806dbd32d4f (diff)
Core/Pets: Initialize pet level properly (stupid mistake), and set loaded XP after initialization is completed.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Entities/Pet/Pet.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp
index 9e127a157ca..df482c40143 100755
--- a/src/server/game/Entities/Pet/Pet.cpp
+++ b/src/server/game/Entities/Pet/Pet.cpp
@@ -230,7 +230,7 @@ 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);
+ InitStatsForLevel(petlevel);
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, fields[5].GetUInt32());
SynchronizeLevelWithOwner();
@@ -239,10 +239,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
SetCanModifyStats(true);
if (getPetType() == SUMMON_PET && !current) //all (?) summon pets come with full health when called, but not when they are current
- {
- InitStatsForLevel(petlevel);
SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
- }
else
{
uint32 savedhealth = fields[10].GetUInt32();