mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[10884] Pet with same level as owner must have xp = 0
Thanks to Click for original patch and problem description.
This commit is contained in:
parent
07172bc5ae
commit
8d7cc36098
3 changed files with 16 additions and 27 deletions
|
|
@ -1736,14 +1736,7 @@ bool ChatHandler::HandleNpcChangeLevelCommand(char* args)
|
|||
}
|
||||
|
||||
if (pCreature->IsPet())
|
||||
{
|
||||
if (((Pet*)pCreature)->getPetType()==HUNTER_PET)
|
||||
{
|
||||
pCreature->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForPetLevel(lvl));
|
||||
pCreature->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
|
||||
}
|
||||
((Pet*)pCreature)->GivePetLevel(lvl);
|
||||
}
|
||||
else
|
||||
{
|
||||
pCreature->SetMaxHealth(100 + 30*lvl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue