mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +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
|
|
@ -2302,10 +2302,9 @@ void Player::GiveLevel(uint32 level)
|
|||
SetPower(POWER_FOCUS, 0);
|
||||
SetPower(POWER_HAPPINESS, 0);
|
||||
|
||||
// give level to summoned pet
|
||||
Pet* pet = GetPet();
|
||||
if(pet && pet->getPetType()==SUMMON_PET)
|
||||
pet->GivePetLevel(level);
|
||||
// update level to hunter/summon pet
|
||||
if (Pet* pet = GetPet())
|
||||
pet->SynchronizeLevelWithOwner();
|
||||
GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL);
|
||||
}
|
||||
|
||||
|
|
@ -2491,6 +2490,10 @@ void Player::InitStatsForLevel(bool reapplyMods)
|
|||
SetPower(POWER_FOCUS, 0);
|
||||
SetPower(POWER_HAPPINESS, 0);
|
||||
SetPower(POWER_RUNIC_POWER, 0);
|
||||
|
||||
// update level to hunter/summon pet
|
||||
if (Pet* pet = GetPet())
|
||||
pet->SynchronizeLevelWithOwner();
|
||||
}
|
||||
|
||||
void Player::SendInitialSpells()
|
||||
|
|
@ -20016,4 +20019,3 @@ bool Player::canSeeSpellClickOn(Creature const *c) const
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue