mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[7838] More fixes in pet's levelup spells.
* Fixed not updating levelup spells at warlock pet summon firsy time (overwriting by default original ranks in fact) * Correctly upgrade/doungrade spell ranks in action bar. * Fixed spell learning spam at warlock pet re-summon in some cases. TODO: currently (before this commit and in it) PetSpellInitialize() called too oftern. Maybe possible cache update flag and do it one time somewhere in Pet::Update....
This commit is contained in:
parent
8cf9dc035b
commit
122c9c5785
6 changed files with 97 additions and 48 deletions
|
|
@ -4792,13 +4792,10 @@ bool ChatHandler::HandleResetLevelCommand(const char * args)
|
|||
player->InitTalentForLevel();
|
||||
player->SetUInt32Value(PLAYER_XP,0);
|
||||
|
||||
// reset level to summoned pet
|
||||
Pet* pet = player->GetPet();
|
||||
if(pet && pet->getPetType()==SUMMON_PET)
|
||||
{
|
||||
pet->InitStatsForLevel(1);
|
||||
pet->InitTalentForLevel();
|
||||
}
|
||||
// reset level for pet
|
||||
if(Pet* pet = player->GetPet())
|
||||
pet->SynchronizeLevelWithOwner();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue