mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[7831] Prevent have hunter pet with level greater player levels at level changes. Propertly set hunter pet xp values at level update.
This commit is contained in:
parent
ac67ac8c28
commit
e134b5383b
6 changed files with 44 additions and 8 deletions
|
|
@ -1283,6 +1283,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue