diff options
-rwxr-xr-x | src/server/game/Entities/Pet/Pet.cpp | 8 | ||||
-rwxr-xr-x | src/server/shared/Common.h | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/server/game/Entities/Pet/Pet.cpp b/src/server/game/Entities/Pet/Pet.cpp index aa26d788316..5e1843404b9 100755 --- a/src/server/game/Entities/Pet/Pet.cpp +++ b/src/server/game/Entities/Pet/Pet.cpp @@ -228,18 +228,17 @@ 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 - SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, fields[5].GetUInt32()); SetCreatorGUID(owner->GetGUID()); + SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, fields[5].GetUInt32()); + SynchronizeLevelWithOwner(); SetReactState(ReactStates(fields[6].GetUInt8())); SetCanModifyStats(true); - SynchronizeLevelWithOwner(); - InitStatsForLevel(petlevel); if (getPetType() == SUMMON_PET && !current) //all (?) summon pets come with full health when called, but not when they are current { - SetFullHealth(); + InitStatsForLevel(petlevel); SetPower(POWER_MANA, GetMaxPower(POWER_MANA)); } else @@ -1197,7 +1196,6 @@ void Pet::_SaveSpells(SQLTransaction& trans) case PETSPELL_UNCHANGED: continue; } - itr->second.state = PETSPELL_UNCHANGED; } } diff --git a/src/server/shared/Common.h b/src/server/shared/Common.h index 48ec5d4eb6d..e369583f007 100755 --- a/src/server/shared/Common.h +++ b/src/server/shared/Common.h @@ -48,7 +48,7 @@ #undef VERSION #endif //VERSION -# include "config.h" +# include "Config.h" #undef PACKAGE #undef PACKAGE_BUGREPORT |