*Try to fix some bugs about pet spells and talents.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-08 17:15:19 -05:00
parent 2007bbbd95
commit 80bec6788c
3 changed files with 16 additions and 20 deletions

View File

@@ -1800,6 +1800,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
pet->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000);
pet->SetHealth(pet->GetMaxHealth());
pet->SetPower(POWER_MANA, pet->GetMaxPower(POWER_MANA));
pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, time(NULL));
break;
}
@@ -1812,6 +1813,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
break;
case SUMMON_PET:
pet->InitPetCreateSpells();
pet->InitTalentForLevel();
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
PetSpellInitialize();
break;