[9216] Fixed hunter pet XP requirements.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Also move calculation to function. And avoid use operator[] for access to per-area base xp table data.
This commit is contained in:
Lightguard 2010-01-20 04:59:20 +03:00 committed by VladimirMangos
parent 2b891624c6
commit 0088d1300c
5 changed files with 13 additions and 11 deletions

View file

@ -1275,7 +1275,7 @@ bool ChatHandler::HandleNpcChangeLevelCommand(const char* args)
{
if(((Pet*)pCreature)->getPetType()==HUNTER_PET)
{
pCreature->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForLevel(lvl)/4);
pCreature->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForPetLevel(lvl));
pCreature->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
}
((Pet*)pCreature)->GivePetLevel(lvl);