[7887] Drop pet spell teaching code, including field in character_pet.

This commit is contained in:
VladimirMangos 2009-05-24 07:18:15 +04:00
parent 8171bb57dd
commit c56ef09fa3
10 changed files with 23 additions and 210 deletions

View file

@ -215,8 +215,6 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
if(result == SPELL_CAST_OK)
{
((Creature*)pet)->AddCreatureSpellCooldown(spellid);
if (((Creature*)pet)->isPet())
((Pet*)pet)->CheckLearning(spellid);
unit_target = spell->m_targets.getUnitTarget();
@ -627,11 +625,9 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
pet->AddCreatureSpellCooldown(spellid);
if(pet->isPet())
{
Pet* p = (Pet*)pet;
p->CheckLearning(spellid);
//10% chance to play special pet attack talk, else growl
//actually this only seems to happen on special spells, fire shield for imp, torment for voidwalker, but it's stupid to check every spell
if(p->getPetType() == SUMMON_PET && (urand(0, 100) < 10))
if(((Pet*)pet)->getPetType() == SUMMON_PET && (urand(0, 100) < 10))
pet->SendPetTalk((uint32)PET_TALK_SPECIAL_SPELL);
else
pet->SendPetAIReaction(guid);