mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 05:43:12 +01:00
[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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user