[7125] Work under pet talents

Coorrect update Talent Points on levelup / leveldown
Unlearn other ranks of learned talent
Fix typo in Pet::HasSpell (wrong result for removed spell)
Allow .reset talents reset pet talent
Implement SPELL_AURA_MOD_PET_TALENT_POINTS aura (hunter talent)
Only reset pet talent from trainer unlearn.

Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
DiSlord 2009-01-21 00:14:39 +03:00
parent ca7ac74134
commit 921914f87e
10 changed files with 225 additions and 72 deletions

View file

@ -11103,7 +11103,6 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id)
pet->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
uint32 level = (creatureTarget->getLevel() < (getLevel() - 5)) ? (getLevel() - 5) : creatureTarget->getLevel();
pet->SetFreeTalentPoints(pet->GetMaxTalentPointsForLevel(level));
if(!pet->InitStatsForLevel(level))
{
@ -11116,6 +11115,7 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id)
// this enables pet details window (Shift+P)
pet->AIM_Initialize();
pet->InitPetCreateSpells();
pet->InitTalentForLevel();
pet->SetHealth(pet->GetMaxHealth());
return pet;