diff options
author | megamage <none@none> | 2009-05-15 13:44:49 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-05-15 13:44:49 -0500 |
commit | a442a9b9145586b37b8d1db5efec91a232e7c382 (patch) | |
tree | 2ff606f609badef409d3c0036be12a533bc25274 /src/game/Level2.cpp | |
parent | 0d715cfd8f3e76f2d4deb180ffbc23af93e623a9 (diff) |
[7831] Prevent have hunter pet with level greater player levels at level changes. Propertly set hunter pet xp values at level update. Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src/game/Level2.cpp')
-rw-r--r-- | src/game/Level2.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index 782b0f9c44e..ef3cb99d919 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -1329,6 +1329,11 @@ bool ChatHandler::HandleNpcChangeLevelCommand(const char* args) if(pCreature->isPet()) { + if(((Pet*)pCreature)->getPetType()==HUNTER_PET) + { + pCreature->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, objmgr.GetXPForLevel(lvl)/4); + pCreature->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0); + } ((Pet*)pCreature)->GivePetLevel(lvl); } else |